Wiktionary igwiktionary https://ig.wiktionary.org/wiki/Ihu_mb%E1%BB%A5 MediaWiki 1.47.0-wmf.8 case-sensitive Midia Ọpụrụiche Ńkàtá Ojiarụ Ńkàtá ojiarụ Wiktionary Ńkàtá Wiktionary Faịlụ Ńkàtá faịlụ MidiaWiki Ńkàtá MidiaWiki Templeeti Ńkàtá templeeti Enyemaka Ńkàtá enyemaka Otú Ńkàtá otú TimedText TimedText talk Module Module talk Event Event talk Mkpebi 0 921 64714 30099 2026-06-28T10:40:57Z Geraldine Kene 966 64714 wikitext text/x-wiki '''Mkpebi''' =Nkọwa= Nke a bụ ihe mmadụ kwubiri n'onwe ya ịme, maọbụ ọkaikpe kwubiri n'ụlọịkpe. ===Nkejiasụsụ=== aha ===Ọmụmaatụ=== Mkpebi ikpe nke kọtụma nyere n'ụlọikpe n'ụbọchị taa atọghị ọchị ma ncha. ===Mkpọpụta=== [[File:LL-Q33578 (ibo)-Ceentia-mkpebi.wav|LL-Q33578_(ibo)-Ceentia-mkpebi]] ===Olumba=== =Ntụgharị n'asụsụ ọzọ= bekee [[wiktionary:decision|decision]] [[Òtù:aha]] thnz0d376mgm4g80137qy42xe22ofoy 64715 64714 2026-06-28T10:41:20Z Geraldine Kene 966 /* Nkọwa */ 64715 wikitext text/x-wiki '''Mkpebi''' =Nkọwa= Nke a bụ ihe mmadụ kwubiri n'onwe ya ime, maọbụ ọkaikpe kwubiri n'ụlọịkpe. ===Nkejiasụsụ=== aha ===Ọmụmaatụ=== Mkpebi ikpe nke kọtụma nyere n'ụlọikpe n'ụbọchị taa atọghị ọchị ma ncha. ===Mkpọpụta=== [[File:LL-Q33578 (ibo)-Ceentia-mkpebi.wav|LL-Q33578_(ibo)-Ceentia-mkpebi]] ===Olumba=== =Ntụgharị n'asụsụ ọzọ= bekee [[wiktionary:decision|decision]] [[Òtù:aha]] r5g4l44iaw2107jzsm1kf01ocqts55j Nkịta 0 1116 64716 4621 2026-06-28T10:43:54Z Geraldine Kene 966 64716 wikitext text/x-wiki Nkịta ===Nkọwa=== Nkịta bụ aha anụmanụ na-ebi n'ụlọ ===Nkejiasụsụ=== Aha ===Ọmụmaatụ=== Nkịta bu anụ ụlọ, ya mere nkịta na mmadụ na ebi. Ụfọdụ ndị jikwa nkịta echedo be ha nche. E nwere ụfọdụ obodo na-eri anụ nkịta. ===Mkpọpụta=== Nkịta ===Olumba=== Nkịta ===Ntụgharị=== ===Bekee=== https://en.m.wiktionary.org/wiki/Dog ===Yoruba=== Aja ===Hausa=== Kare ===Category=== [[Òtù:wiki loves names]] jl2n1e38vbt4ggxdl1qjx22zdps0xg9 Okporoko 0 1351 64707 22660 2026-06-28T10:30:57Z Geraldine Kene 966 64707 wikitext text/x-wiki Okporoko ==Nkọwa== Nke a bụ ụdị azụ ofe eji esi nri n'ala Igbo. Ọ bụ ụdị azụ bị n'osimírí nnu nke amịkpọrọ, mee nke ọma ma mee ka ọkpọọ akpọ iji sie nri. ===Nkejiasụsụ=== Aha ===Ọmụmaatụ=== # Nne m tinyere okporoko n'ofe ọha o siri ụnyaahụ. # Eji okporoko ata ụgba. ===Mkpọpụta=== [[File:Ig-Okporoko.ogg|Ig-Okporoko]] ===Olumba=== ==Ntụgharị n'asụsụ ọzọ== ===Bekee=== [https://en.wikipedia.org/wiki/stockfish stockfish] [[Òtù:Aha]] cw12ssgjmc7zfq3l9bcdi8byb72jgnj Ọkụkọ 0 1352 64708 29329 2026-06-28T10:31:33Z Geraldine Kene 966 Geraldine Kene moved page [[Okuko]] to [[Ọkụkọ]]: Misspelled title 29329 wikitext text/x-wiki ==Nkọwa== Okụkọ bụ anu ulo. A na erikwa anu ya eri. ===Nkejiasụsụ=== Ahauche ===Ọmụmaatụ=== Okụkọ a buru ibu. ===Mkpọpụta=== O/kụ/ko [[File:LL-Q33578 (ibo)-Chiraldine-Okụko.wav|LL-Q33578 (ibo)-Chiraldine-Okụko]] ===Olumba=== ==Ntụghari n'asụsụ ọzọ== ==Bekee== Chicken [[Òtù:aha]] [[Òtù:Anụmanụ]] [[Òtù:Anụ ụlọ]] [[Òtù:Igbo Noun Project]] 73m25vlw9d75xo05dtd7kqoflhck6g0 64710 64708 2026-06-28T10:32:47Z Geraldine Kene 966 64710 wikitext text/x-wiki ==Nkọwa== Okụkọ bụ anụ ụlọ. A na-erikwa anụ ya eri. ===Nkejiasụsụ=== Ahauche ===Ọmụmaatụ=== Ọkụkọ a buru ibu. ===Mkpọpụta=== Ọ/kụ/kọ [[File:LL-Q33578 (ibo)-Chiraldine-Okụko.wav|LL-Q33578 (ibo)-Chiraldine-Okụko]] ===Olumba=== ==Ntụghari n'asụsụ ọzọ== ==Bekee== Chicken [[Òtù:aha]] [[Òtù:Anụmanụ]] [[Òtù:Anụ ụlọ]] [[Òtù:Igbo Noun Project]] cw4pi9792ecu8aoezq7m4r2mpimiwfg Okwa 0 1353 64705 29404 2026-06-28T04:29:58Z Geraldine Kene 966 64705 wikitext text/x-wiki '''Okwa''' =Nkọwa= Nke a bụ nnụnụ na-adi ka ọkụkọ mana ọ na ebi n'ohia. ahụ ya na atụ agwa ọcha na ọji [[Usòrò:Birds that hunt and are hunted - life histories of one hundred and seventy birds of prey, game birds and water-fowls (1902) (14746942361).jpg|thumb|right|Okwa]] ===Nkejịasụsụ=== Aha ===Ọmụmaatụ=== #Anyị riri anụ ọkwa taa #Anụ Ọkwa na-atọ ụtọ nke ukwuu ===Mkpọpụta=== [[File:LL-Q33578 (ibo)-Confidence Obi-Ọkwa.wav]] ===Olumba=== Okwa - Orlu =Ntụgharị n'asụsụ ọzọ= ===Bekee=== [https://en.wiktionary.org/wiki/guineafowl guineafowl] [[Òtù:Aha]] [[Otú:Anụmanụ]] [[Òtù:Anụ ọhịa]] [[Òtù:Igbo Noun Project]] b28xcoz3iq1kjnkx1ydrbhrn715sckn 64706 64705 2026-06-28T10:27:32Z Geraldine Kene 966 64706 wikitext text/x-wiki '''Okwa''' =Nkọwa= Nke a bụ nnụnụ na-adi ka ọkụkọ mana ọ na-ebi n'ohia. Ahụ ya na-atụ agwa ọcha na ọji [[Usòrò:Birds that hunt and are hunted - life histories of one hundred and seventy birds of prey, game birds and water-fowls (1902) (14746942361).jpg|thumb|right|Okwa]] ===Nkejiasụsụ=== Aha ===Ọmụmaatụ=== #Anyị riri anụ ọkwa taa #Anụ Ọkwa na-atọ ụtọ nke ukwuu ===Mkpọpụta=== [[File:LL-Q33578 (ibo)-Confidence Obi-Ọkwa.wav]] ===Olumba=== Okwa - Orlu =Ntụgharị n'asụsụ ọzọ= ===Bekee=== [https://en.wiktionary.org/wiki/guineafowl guineafowl] [[Òtù:Aha]] [[Otú:Anụmanụ]] [[Òtù:Anụ ọhịa]] [[Òtù:Igbo Noun Project]] ccz5gbtsd7m3i1t75qqllryb27uxv0r Oliọkpa 0 1370 64711 22893 2026-06-28T10:33:45Z Geraldine Kene 966 Geraldine Kene moved page [[Oliokpa]] to [[Oliọkpa]]: Misspelled title 22893 wikitext text/x-wiki """Oliọkpa""" ===Nkọwa=== Oliọkpa bụ afa mọnwụ ndị Nsukka na eyi akwa ọcha. Oliọkpa na apia utari nke ukwuu. ===Nkeji Asụsụ=== Aha ===Ọmụmaatụ=== Oliọkpa bụ afa mọnwụ ===Mkpọputa=== Ólíọ́kpá [[File:LL-Q33578 (ibo)-Chiraldine-Oliọkpa.wav|LL-Q33578 (ibo)-Chiraldine-Oliọkpa]] ===Ọlumba=== Ḿọ́ńwụ́ ===Ntụgharị=== ===Bekee=== Masquerade https://en.m.wiktionary.org/wiki/masquerade [[Òtù:Wiki Loves Names]] 474c2olqco0nansrhp1czhqumkg2qbh 64713 64711 2026-06-28T10:36:03Z Geraldine Kene 966 64713 wikitext text/x-wiki """Oliọkpa""" ===Nkọwa=== Oliọkpa bụ aha mmọnwụ ndị Nsukka na-eyi akwa ọcha. Oliọkpa na-apịa ụtarị nke ukwuu. ===Nkejiasụsụ=== Aha ===Ọmụmaatụ=== Oliọkpa bụ aha mmọnwụ ===Mkpọpụta=== Ólíọ́kpá [[File:LL-Q33578 (ibo)-Chiraldine-Oliọkpa.wav|LL-Q33578 (ibo)-Chiraldine-Oliọkpa]] ===Ọlumba=== Ḿmọ́ńwụ́ ===Ntụgharị=== ===Bekee=== Masquerade https://en.m.wiktionary.org/wiki/masquerade [[Òtù:Wiki Loves Names]] ai0cud3rmnkcxuxljfzxmj91tzgsd0p Onyemaechi 0 1466 64723 30177 2026-06-28T10:54:31Z Geraldine Kene 966 64723 wikitext text/x-wiki [[Onyemaechi]] ==Nkọwa== Onyemaechi bụ aha a na-abakarị ụmụaka ụmụnwoke n'ala Igbo. ===Nkejiasụsụ=== Aha ===Ọmụmaatụ=== Onyemaechi bụ dinta ===Mkpọpụta=== [[File:LL-Q33578 (ibo)-Ozims Divine-Onyemaechi.wav]] ===Olumba=== ==Ntụgharị N'asụsụ Ọzọ== ===Bekee=== Who knows tomorrow [[Òtù:aha]] [[Òtù:Mmadụ]] [[Òtù:Igbo Noun Project]] ildj4oeiw3u25z76bgk7ezpeq6ds0e9 Onyemalụechi 0 1467 64719 29276 2026-06-28T10:52:27Z Geraldine Kene 966 64719 wikitext text/x-wiki Onyemaluechi ==Nkowa== Onyemalụechi pụtara na onweghi onye maara ihe echi ga abụ. ===Nkejiasụsụ=== Aha ===Ọmụmaatụ=== Onyemaluechi bụ aha mmadụ na-aza n'ala igbo ===Mkpoputa=== Ònyemalụ̀echi [[File:LL-Q33578 (ibo)-Aminwa 21-Onyemaluechi.wav|LL-Q33578 (ibo)-Aminwa 21-Onyemaluechi]] ===Olumba=== Odeemalụechi ==Ntụgharị n'asụsụ ọzọ== ===Bekee=== No one knows tomorrow [[Òtù:wiki loves names]] [[Òtù:aha]] [[Òtù:Mmadụ]] [[Òtù:Igbo Noun Project]] 276m8x3hc1ymaf7lnyzifplm967sp7f 64720 64719 2026-06-28T10:52:54Z Geraldine Kene 966 64720 wikitext text/x-wiki Onyemaluechi ==Nkọwa== Onyemalụechi pụtara na onweghi onye maara ihe echi ga abụ. ===Nkejiasụsụ=== Aha ===Ọmụmaatụ=== Onyemaluechi bụ aha mmadụ na-aza n'ala igbo ===Mkpọpụta=== Ònyemalụ̀echi [[File:LL-Q33578 (ibo)-Aminwa 21-Onyemaluechi.wav|LL-Q33578 (ibo)-Aminwa 21-Onyemaluechi]] ===Olumba=== Odeemalụechi ==Ntụgharị n'asụsụ ọzọ== ===Bekee=== No one knows tomorrow [[Òtù:wiki loves names]] [[Òtù:aha]] [[Òtù:Mmadụ]] [[Òtù:Igbo Noun Project]] iz5c3bfmv6o582ui38wikskfn1hyfhn 64721 64720 2026-06-28T10:53:12Z Geraldine Kene 966 Geraldine Kene moved page [[Onyemaluechi]] to [[Onyemalụechi]] 64720 wikitext text/x-wiki Onyemaluechi ==Nkọwa== Onyemalụechi pụtara na onweghi onye maara ihe echi ga abụ. ===Nkejiasụsụ=== Aha ===Ọmụmaatụ=== Onyemaluechi bụ aha mmadụ na-aza n'ala igbo ===Mkpọpụta=== Ònyemalụ̀echi [[File:LL-Q33578 (ibo)-Aminwa 21-Onyemaluechi.wav|LL-Q33578 (ibo)-Aminwa 21-Onyemaluechi]] ===Olumba=== Odeemalụechi ==Ntụgharị n'asụsụ ọzọ== ===Bekee=== No one knows tomorrow [[Òtù:wiki loves names]] [[Òtù:aha]] [[Òtù:Mmadụ]] [[Òtù:Igbo Noun Project]] iz5c3bfmv6o582ui38wikskfn1hyfhn Oti ịgba 0 1510 64726 6287 2026-06-28T11:23:02Z Geraldine Kene 966 64726 wikitext text/x-wiki ==Nkọwa== Onye ji ịgba eti egwu. [[Usòrò:South African Women Dancer and drummer 2.jpg|thumb|right|Oti igba]] ===Nkejiasụsụ=== Aha ===Ọmụmaatụ=== * Oti ịgba tiere m egwu ka m gbaa. * Oti ịgba nke a maara ihe ọ na-eme. ===Mkpọpụta=== ===Olumba=== ==Ntụgharị n'asụsụ ọzọ== ===Bekee=== Drummer '''French''' Le batteur '''Germany''' Schlagzeugerin(feminine) Schlagzeuger(masculine) '''Spanish''' Batería '''Category''':Aha '''Category''':wt/ig 2jz5zekfli8ttxuz6h20986s4y201j0 64727 64726 2026-06-28T11:23:22Z Geraldine Kene 966 Geraldine Kene moved page [[Oti igba]] to [[Oti ịgba]] 64726 wikitext text/x-wiki ==Nkọwa== Onye ji ịgba eti egwu. [[Usòrò:South African Women Dancer and drummer 2.jpg|thumb|right|Oti igba]] ===Nkejiasụsụ=== Aha ===Ọmụmaatụ=== * Oti ịgba tiere m egwu ka m gbaa. * Oti ịgba nke a maara ihe ọ na-eme. ===Mkpọpụta=== ===Olumba=== ==Ntụgharị n'asụsụ ọzọ== ===Bekee=== Drummer '''French''' Le batteur '''Germany''' Schlagzeugerin(feminine) Schlagzeuger(masculine) '''Spanish''' Batería '''Category''':Aha '''Category''':wt/ig 2jz5zekfli8ttxuz6h20986s4y201j0 Riri 0 1541 64700 21368 2026-06-28T04:21:43Z Geraldine Kene 966 64700 wikitext text/x-wiki '''Riri''' ==Nkọwa== Nke a bụ ọnọdụ mmadụ iri nri. Nri bụ ọgwụ nyere ahụ mmadụ ===Nkejiasụsụ=== Ngwaa ===Ọmụmaatụ=== Okeke riri nri ofe nsala # anyi riri nri na mmemme ahụ ===Mkpọpụta=== ===Olumba=== ==Ntụghari n'asụsụ ọzọ== ===Bekee=== [[Òtù:ngwaa]] 8dwz9wn12hqvei5py378vxv63979jff Riri Nri 0 1542 64701 21374 2026-06-28T04:23:26Z Geraldine Kene 966 64701 wikitext text/x-wiki '''Riri Nri''' ==Nkọwa== Nri bụ ihe na-enye aka na ndụ mmadụ nakwa ndụ ihe ọbụla na-eku ụme ===Nkejiasụsụ=== Ngwaa ===Ọmụmaatụ=== E riri m nri akpụ taa Emeka riri nri taa ===Mkpọpụta=== ===Olumba=== ==Ntụgharị n'asụsụ ọzọ== ===Bekee=== [[Òtù:ngwaa]] 9l5mngr4ky4c911kqfoa4jb0g2qtnw0 Rụrụ Ọrụ 0 1543 64699 6418 2026-06-28T04:20:23Z Geraldine Kene 966 64699 wikitext text/x-wiki '''Rụrụ Ọrụ''' ==Nkọwa== Nke a bụ ọ rụrụ ọrụ maka inwe nri ọnụ, ahụ isi ike nakwa ihe ndi ọzọ dị mkpa na ndụ mmadụ. ===Nkejiasụsụ=== Ngwaa ===Ọmụmaatụ=== Ọ rụrụ ọrụ di mkpa na ndụ mmadụ, ọkachasị onye nwere ahụ ike ===Mkpọpụta=== ===Olumba=== ==Ntụgharị n'asụsụ ọzọ== ===Bekee=== [To have something doing that will yield money] [[Òtù:ngwaa]] t733ne7oxlcjttisvd42q1ac7jgc59n Sọchima 0 1550 64689 22738 2026-06-27T22:39:03Z Geraldine Kene 966 Geraldine Kene moved page [[Sochima]] to [[Sọchima]]: Misspelled title 22738 wikitext text/x-wiki '''SOCHIMA''' ===nkọwa=== Nke a bụ aha na akowa na o bụ so chukwu Mara I've niile. ===nkejiasụsụ=== Aha ===ọmụmaatụ=== #Aha m bụ Sochima # Aha nwannem bu sochima ===mkpọpụta=== So/chi/ma [[File:LL-Q33578 (ibo)-Celetex-Sochima.wav|LL-Q33578 (ibo)-Celetex-Sochima]] ===olumba=== ===ntụghari=== ===bekee=== Only God knows [[Òtù:wiki loves names]] b70q1yvjdk60qnpbqet7rh8n7my8z6s 64691 64689 2026-06-27T22:41:02Z Geraldine Kene 966 64691 wikitext text/x-wiki '''SOCHIMA''' ===Nkọwa=== Nke a bụ aha na-akọwa na o bụ sọ chukwu maara ihe niile. ===Nkejiasụsụ=== Aha ===Ọmụmaatụ=== #Aha m bụ Sọchima # Aha nwannem bụ Sọchima ===mkpọpụta=== Sọ/chi/maih [[File:LL-Q33578 (ibo)-Celetex-Sochima.wav|LL-Q33578 (ibo)-Celetex-Sochima]] ===olumba=== ===ntụghari=== ===bekee=== Only God knows [[Òtù:wiki loves names]] alovmjuqs8lg3lgkk84ia6hu0b5ytb1 Sọmadịna 0 1553 64695 22737 2026-06-28T04:14:30Z Geraldine Kene 966 Geraldine Kene moved page [[Somadina]] to [[Sọmadịna]]: Misspelled title 22737 wikitext text/x-wiki '''SOMADINA''' ===Nkọwa=== Sọmadịna bụ aha mmadụ nke n'egosi na mmadụ chọrọ ịmụta ihe karịrị otu nwa. ===Nkeji Asụsụ=== Aha ===Ọmụmaatụ=== #Sọmadịna bụ aha onye nkuzim #Aha nwannem bụ sọmadịna ===Mkpọpụta=== Sòmádíná [[File:LL-Q33578 (ibo)-Celetex-Somadina.wav|LL-Q33578 (ibo)-Celetex-Somadina]] ===Olumba=== Nánïmébílè ===Ntụgharị=== ===Bekee=== Avoid lonesomeness https://en.m.wiktionary.org/wiki/lonesome ===Category=== [[Òtù:wiki loves names]] 2l97fxm9p1hrsad57igz4aev0y6f4ko 64697 64695 2026-06-28T04:16:33Z Geraldine Kene 966 64697 wikitext text/x-wiki '''SOMADINA''' ===Nkọwa=== Sọmadịna bụ aha mmadụ nke na-egosi na mmadụ chọrọ ịmụta ihe karịrị otu nwa. ===Nkejiasụsụ=== Aha ===Ọmụmaatụ=== #Sọmadịna bụ aha onye nkuzi m. #Aha nwannem bụ sọmadịna ===Mkpọpụta=== Sọ̀mádị́ná [[File:LL-Q33578 (ibo)-Celetex-Somadina.wav|LL-Q33578 (ibo)-Celetex-Somadina]] ===Olumba=== Nánị́mébílè ===Ntụgharị=== ===Bekee=== Avoid lonesomeness https://en.m.wiktionary.org/wiki/lonesome ===Category=== [[Òtù:wiki loves names]] qo17lp987iyht4csai0w1s3nbo019n8 Sonde 0 1558 64692 6465 2026-06-28T04:11:51Z Geraldine Kene 966 64692 wikitext text/x-wiki [[Wq]] '''Sọnde''' [[Usòrò:Tipaza algeria Morning Sun.jpg|thumb|right|alt=Sondee|Sondee]] ==Nkọwa== Nke a bụ ụbọchi ezumike, bụrụkwa ụbọchị uka ===Nkejịasụsụ=== Aha ===Ọmụmaatụ=== A gara m ụka taa bụ sọnde ===Mkpọpụta=== ===Olumba=== ==Ntụgharị n'asụsụ ọzọ== ===Bekee=== [https://en.wiktionary.org/w/index.php?title=Sunday&rdfrom=sunday sunday] [[Òtù:wt/ij/aha]] [[Usòrò:LL-Q33578 (ibo)-Chikeme Chizurum-Sunday.wav|thumb|left|alt=Sondee|Sondee]] tqmvmjpz4ejqhhnznqlbgw93elqsxom 64693 64692 2026-06-28T04:12:27Z Geraldine Kene 966 Geraldine Kene moved page [[Sondee]] to [[Sonde]]: Misspelled title 64692 wikitext text/x-wiki [[Wq]] '''Sọnde''' [[Usòrò:Tipaza algeria Morning Sun.jpg|thumb|right|alt=Sondee|Sondee]] ==Nkọwa== Nke a bụ ụbọchi ezumike, bụrụkwa ụbọchị uka ===Nkejịasụsụ=== Aha ===Ọmụmaatụ=== A gara m ụka taa bụ sọnde ===Mkpọpụta=== ===Olumba=== ==Ntụgharị n'asụsụ ọzọ== ===Bekee=== [https://en.wiktionary.org/w/index.php?title=Sunday&rdfrom=sunday sunday] [[Òtù:wt/ij/aha]] [[Usòrò:LL-Q33578 (ibo)-Chikeme Chizurum-Sunday.wav|thumb|left|alt=Sondee|Sondee]] tqmvmjpz4ejqhhnznqlbgw93elqsxom Udara 0 1591 64688 42442 2026-06-27T22:38:20Z Geraldine Kene 966 64688 wikitext text/x-wiki ==Nkọwa== Nke a bụ otụ na ime mkpụrụosisi na-eto n'ala Igbo. ===Nkejiasụsụ=== Aha ===Ọ̀mụ̀màatụ̀=== Ụdara a tọrọ Ụtọ ===Mkpọpụta=== Ụ/da/ra [[File:LL-Q33578 (ibo)-Celetex-Udara.wav|LL-Q33578 (ibo)-Celetex-Udara]] ===Olumba=== ===Ntụgharị n'asụsụ ọzọ=== ===Bekee=== African star apple [[Òtù:Wiki Loves Names]] [[Category: Aha]] [[Category: Mkpụrụ Osisi]] [[Òtù:Igbo Noun Project]] 7fnlcn1jfay7n0mfpr8l2vho92eq3vs Onyenche 0 3656 64718 16126 2026-06-28T10:49:49Z Geraldine Kene 966 64718 wikitext text/x-wiki """Onyenche""" ==Nkọwa== Nke a pụtara onye na-echekwa ụlọ ndị mmadụ n'abalị. ===Nkejiasụsụ=== Aha ===Ọmụmaatụ=== Onyenche a toro ogologo. ===Mkpọpụta=== O/nye/nche. ===Olumba=== ==Ntụgharị n'asụsụ ọzọ== ===Bekee=== Security man <nowiki>[[Category: wt/ig/wiki loves names]]</nowiki> <nowiki>[[Category: wt/ig]]</nowiki> qk0db7xwhly1kjxpupi9k32uh34z5sc Otimkpu 0 3731 64724 16214 2026-06-28T11:18:26Z Geraldine Kene 966 64724 wikitext text/x-wiki """Otimkpu""" ==Nkọwa== Otimkpu bụ aha mmadụ pụtara onye oje ozị. ===Nkejiasụsụ=== Aha ===Ọmụmaatụ=== Otimkpu bụ aha mmadụ ===Mkpọpụta=== Ótíḿkpú ===Olumba=== Onye ozi ==Ntụgharị n'asụsụ ọzọ== ===Bekee=== Forerunner https://en.m.wiktionary.org/wiki/forerunner [[Category:wt/ig/Wiki Loves Names]] r9ulzx90n2cekjok6ch5k7swd2axhcr 64725 64724 2026-06-28T11:18:48Z Geraldine Kene 966 64725 wikitext text/x-wiki """Otimkpu""" ==Nkọwa== Otimkpu bụ aha mmadụ pụtara onye oje ozi. ===Nkejiasụsụ=== Aha ===Ọmụmaatụ=== Otimkpu bụ aha mmadụ ===Mkpọpụta=== Ótíḿkpú ===Olumba=== Onye ozi ==Ntụgharị n'asụsụ ọzọ== ===Bekee=== Forerunner https://en.m.wiktionary.org/wiki/forerunner [[Category:wt/ig/Wiki Loves Names]] 54r6ky5zoangemh0jkvbkv7h4j4o013 Ọkpụnọ 0 3866 64702 16471 2026-06-28T04:24:54Z Geraldine Kene 966 Geraldine Kene moved page [[Okpuno]] to [[Ọkpụnọ]] 16471 wikitext text/x-wiki """Okpuno""" ===Nkọwa=== Okpuno bụ afa obodo dị na mpaghara odida Awka na Anambra Steeti nke Naijiria. ===Nkeji Asụsụ=== Aha ===Ọmụmaatụ=== Okpuno bụ afa obodo ===Mkpọputa=== Ọ́kpụ́ńò ===Olumba=== Okpuno okochi ===Ntụgharị=== ===Bekee=== [https://en.wiktionary.org/wiki"Okpuno" "Okpuno" sx0wceap09cccefqf8hvf0gsovwxdem 64704 64702 2026-06-28T04:27:43Z Geraldine Kene 966 64704 wikitext text/x-wiki """Ọkpụnọ""" ===Nkọwa=== Ọkpụnọ bụ aha obodo dị na mpaghara ọdịda Awka na Anambra Steeti nke Naijiria. ===Nkejiasụsụ=== Aha ===Ọmụmaatụ=== Ọkpụnọ bụ aha obodo ===Mkpọputa=== Ọ́kpụ́ńọ̀ ===Olumba=== Ọkpụnọ ọkọchị ===Ntụgharị=== ===Bekee=== [https://en.wiktionary.org/wiki"Okpuno" "Okpuno" ts94jvqvrk8h1ubeh3sml36scrolunh Saa ahụ 0 4861 64698 28228 2026-06-28T04:18:46Z Geraldine Kene 966 64698 wikitext text/x-wiki ''Saa ahụ'' ==Nkọwa== Ị́wụ́ mmiri n'ahụ ===Nkejiasụsụ=== Ngwaa ===Ọmụmaatu=== Ngọzi ga saa ahụ ===Mkpọpụta=== [[File:LL-Q33578 (ibo)-Ceentia-Saa ahụ.wav|LL-Q33578 (ibo)-Ceentia-Saa ahụ]] ===Olumba=== Saa arụ ==Ntụghari n'asụsụ ọzọ== ===Bekee=== [[https://en.wiktionary.org/wiki/Bathe/Bathe]] [[Category:Ngwaa]] 86vkqjkhr6bapctna7a5u9xphoxo853 Onyewuchi 0 5445 64717 42124 2026-06-28T10:46:00Z Geraldine Kene 966 64717 wikitext text/x-wiki ==Nkọwa== Nke a bụ aha mmadụ nke na-ajụ "Kedu onye bụ Chi" . ===Nkejiasụsụ=== Aha ===Ọmụmaatụ=== Onyewuchi a gaara ụlọakwụkwọ ===Mkpọpụta === ===Olumba === ===Ntụgharị n'asụsụ ọzọ === ===Bekee=== Who is God sdsethxxz1k1a9nhzoz2zryvtu8robk Templeeti:temp 10 6463 64556 43573 2006-10-07T08:03:13Z Wurmz 1403 30907 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 64557 43574 2006-10-25T11:01:43Z Herman Guthrie 1406 30913 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 64558 43575 2026-06-27T15:58:52Z King ChristLike 964 2 revisions imported from [[:en:Template:temp]] 30954 wikitext text/x-wiki <includeonly><onlyinclude>{{safesubst:<noinclude/>#invoke:template parser/templates|template_link_t}}</onlyinclude></includeonly><!-- -->{{temp|temp}}{{documentation}} j7pe9fadahr6jqm0fnpuxcxasravo3o 64683 64556 2006-10-07T08:03:13Z Wurmz 1403 30907 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 64684 64557 2006-10-25T11:01:43Z Herman Guthrie 1406 30913 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 64685 64558 2026-06-27T16:00:22Z King ChristLike 964 2 revisions imported from [[:en:Template:temp]] 30954 wikitext text/x-wiki <includeonly><onlyinclude>{{safesubst:<noinclude/>#invoke:template parser/templates|template_link_t}}</onlyinclude></includeonly><!-- -->{{temp|temp}}{{documentation}} j7pe9fadahr6jqm0fnpuxcxasravo3o Module:temp 828 6520 64370 43399 2006-10-07T08:03:13Z Wurmz 1403 34427 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 64371 43400 2006-10-25T11:01:43Z Herman Guthrie 1406 34433 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 64372 43401 2026-06-27T15:56:43Z King ChristLike 964 2 revisions imported from [[:en:Template:temp]] 34474 wikitext text/x-wiki <includeonly><onlyinclude>{{safesubst:<noinclude/>#invoke:template parser/templates|template_link_t}}</onlyinclude></includeonly><!-- -->{{temp|temp}}{{documentation}} j7pe9fadahr6jqm0fnpuxcxasravo3o Templeeti:cd 10 6622 64681 41635 2024-04-25T16:54:32Z 152.26.51.90 36113 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 64682 41636 2026-06-27T15:59:04Z King ChristLike 964 1 revision imported from [[:en:Template:cd]] 36116 wikitext text/x-wiki #REDIRECT [[Template:code]] kaxcai41ou8uprnp6jghkf8869oymbt Templeeti:para 10 8068 64566 43576 2019-04-20T23:37:43Z en>Unknown user 0 41609 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 64567 43577 2026-06-27T15:58:58Z King ChristLike 964 1 revision imported from [[:en:Template:para]] 41614 wikitext text/x-wiki <code>&#124;{{#if:{{{}}}|{{#if:{{{1<includeonly>|</includeonly>}}}|{{{1}}}{{#if:{{{list|}}}|<var>N</var>}}=}}{{{2<includeonly>|</includeonly>}}}|={{{1|}}}}}</code><!-- -->{{#if:{{{3|}}}<!-- -->|&nbsp;({{#if:{{{req|}}}|'''''required''''',&nbsp;}}{{#if:{{{opt|}}}|''optional'',&nbsp;}}{{{3}}})<!-- -->|{{#if:{{{req|}}}|&nbsp;('''''required''''')}}{{#if:{{{opt|}}}|&nbsp;(''optional'')}}<!-- -->}}<!-- --><noinclude>{{documentation}}</noinclude> ila07avdxjfpqibvzqu562e2zqxw53f Templeeti:delete/documentation 10 8215 64686 43019 2018-08-09T10:10:05Z en>Unknown user 0 43019 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 64687 43034 2026-06-27T16:00:25Z King ChristLike 964 1 revision imported from [[:en:Template:delete/documentation]] 43033 wikitext text/x-wiki {{documentation subpage}} ==Usage== {{shortcut|Template:d|Template:db|Template:speedy}} This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using {{tl|rfd}}. Do not blank the page before adding this template. When you add it to a page, click on the "What links here" tool to correct any incoming links. It is generally better to improve a poorly formatted or defined entry than to delete it. If you are unsure what the definition should look like but you are sure it is a valid word, you can replace the incorrect definition with {{tl|rfdef}}. If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry. ===Some examples=== * {{tl|delete|misspelling of [[x]]}} * {{tl|delete|nonsense}} * {{tl|delete|copyvio}} * {{tl|delete|personal attack}} === See also === * [[:Category:Candidates for speedy deletion]] * [[MediaWiki:Deletereason-dropdown|List of reasons for deletion]] <includeonly> [[Category:Deletion templates]] [[Category:Request templates]] </includeonly> 46eh5fjsex4ghzdk38xz8i1fnmtrux4 Module:gender and number 828 8287 64098 2013-03-06T02:35:25Z Rua 1351 Created page with "local export = {} local codes = {} -- Genders codes["m"] = "<abbr class=\"gender\" title=\"masculine gender\">m</abbr>" codes["f"] = "<abbr class=\"gender\" title=\"feminine..." 64098 Scribunto text/plain local export = {} local codes = {} -- Genders codes["m"] = "<abbr class=\"gender\" title=\"masculine gender\">m</abbr>" codes["f"] = "<abbr class=\"gender\" title=\"feminine gender\">f</abbr>" codes["n"] = "<abbr class=\"gender\" title=\"neuter gender\">n</abbr>" codes["c"] = "<abbr class=\"gender\" title=\"common gender\">c</abbr>" -- Additional qualifiers codes["an"] = "<abbr class=\"gender\" title=\"animate\">anim</abbr>" codes["in"] = "<abbr class=\"gender\" title=\"inanimate\">inan</abbr>" codes["pr"] = "<abbr class=\"gender\" title=\"personal\">pers</abbr>" -- Numbers codes["s"] = "<abbr class=\"gender\" title=\"singular\">sg</abbr>" codes["d"] = "<abbr class=\"gender\" title=\"dual\">du</abbr>" codes["p"] = "<abbr class=\"gender\" title=\"plural\">pl</abbr>" -- Format a list of gender specifications. function export.format_list(list) for key, gender in ipairs(list) do list[key] = export.format_single(gender) end return table.concat(list, " and ") end -- Format the sub-parts of a single gender specification. function export.format_single(spec) local parts = mw.text.split(spec, "-") for key, part in ipairs(parts) do parts[key] = codes[part] or error("Invalid gender specification: \"" .. part .. "\"") end return table.concat(parts, " ") end return export 69u7c6leejnpk96dy3zok0pd5mgd64r 64099 64098 2013-03-06T15:26:51Z Rua 1351 64099 Scribunto text/plain local export = {} local codes = {} -- Genders codes["m"] = "<abbr class=\"gender\" title=\"masculine gender\">m</abbr>" codes["f"] = "<abbr class=\"gender\" title=\"feminine gender\">f</abbr>" codes["n"] = "<abbr class=\"gender\" title=\"neuter gender\">n</abbr>" codes["c"] = "<abbr class=\"gender\" title=\"common gender\">c</abbr>" -- Additional qualifiers codes["an"] = "<abbr class=\"gender\" title=\"animate\">anim</abbr>" codes["in"] = "<abbr class=\"gender\" title=\"inanimate\">inan</abbr>" codes["pr"] = "<abbr class=\"gender\" title=\"personal\">pers</abbr>" -- Numbers codes["s"] = "<abbr class=\"gender\" title=\"singular\">sg</abbr>" codes["d"] = "<abbr class=\"gender\" title=\"dual\">du</abbr>" codes["p"] = "<abbr class=\"gender\" title=\"plural\">pl</abbr>" -- Format a list of gender specifications. function export.format(list) if type(list) == "table" then for key, gender in ipairs(list) do list[key] = format_single(gender) end return table.concat(list, "'', ''") else return format_single(list) end end -- Format the sub-parts of a single gender specification. function format_single(spec) -- No need to split it if it's just a single code. if codes[spec] then return codes[spec] else local parts = mw.text.split(spec, "-") for key, part in ipairs(parts) do parts[key] = codes[part] or error("Invalid gender specification: \"" .. part .. "\"") end return table.concat(parts, " ") end end return export t5sjgcbpiv4xckjv5k24rcemf3x0twv 64101 64099 2013-03-06T16:40:30Z Rua 1351 64101 Scribunto text/plain local export = {} local codes = {} -- Genders codes["m"] = '<abbr class="gender" title="masculine gender">m</abbr>' codes["f"] = '<abbr class="gender" title="feminine gender">f</abbr>' codes["n"] = '<abbr class="gender" title="neuter gender">n</abbr>' codes["c"] = '<abbr class="gender" title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr class="gender" title="animate">anim</abbr>' codes["in"] = '<abbr class="gender" title="inanimate">inan</abbr>' codes["pr"] = '<abbr class="gender" title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr class="gender" title="singular">sg</abbr>' codes["d"] = '<abbr class="gender" title="dual">du</abbr>' codes["p"] = '<abbr class="gender" title="plural">pl</abbr>' -- Format a list of gender specifications. function export.format(list) -- If the argument given is a list, iterate over each element and convert -- it, then concatenate the result if type(list) == "table" then for key, gender in ipairs(list) do list[key] = format_single(gender) end return table.concat(list, "'', ''") else return format_single(list) end end -- Format the sub-parts of a single gender specification. function format_single(spec) -- No need to split it if it's already a valid code. Just return it. if codes[spec] then return codes[spec] else -- Split the parts and iterate over each part local parts = mw.text.split(spec, "-") for key, part in ipairs(parts) do parts[key] = codes[part] or error("Invalid gender specification: \"" .. part .. "\"") end return table.concat(parts, " ") end end return export lxlunizfrrbrh5yplpikgbutzil5mf6 64102 64101 2013-03-06T16:42:30Z Rua 1351 64102 Scribunto text/plain local export = {} local codes = {} -- Genders codes["m"] = '<abbr class="gender" title="masculine gender">m</abbr>' codes["f"] = '<abbr class="gender" title="feminine gender">f</abbr>' codes["n"] = '<abbr class="gender" title="neuter gender">n</abbr>' codes["c"] = '<abbr class="gender" title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr class="gender" title="animate">anim</abbr>' codes["in"] = '<abbr class="gender" title="inanimate">inan</abbr>' codes["pr"] = '<abbr class="gender" title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr class="gender" title="singular">sg</abbr>' codes["d"] = '<abbr class="gender" title="dual">du</abbr>' codes["p"] = '<abbr class="gender" title="plural">pl</abbr>' -- Format one or more gender specifications. The argument can either be -- a single string containing a specification, or a table of specifications. -- A specification looks like: "n" or "f-p" or "m-an-p" function export.format(list) -- If the argument given is a list, iterate over each element and convert -- it, then concatenate the result if type(list) == "table" then for key, gender in ipairs(list) do list[key] = format_single(gender) end return table.concat(list, "'', ''") else return format_single(list) end end -- Format the sub-parts of a single gender specification. function format_single(spec) -- No need to split it if it's already a valid code. Just return it. if codes[spec] then return codes[spec] else -- Split the parts and iterate over each part local parts = mw.text.split(spec, "-") for key, part in ipairs(parts) do parts[key] = codes[part] or error("Invalid gender specification: \"" .. part .. "\"") end return table.concat(parts, " ") end end return export h7lv8ee7zj07lg4qpjj5v3nsr1h39r8 64104 64102 2013-03-06T16:45:25Z Rua 1351 64104 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. -- Genders codes["m"] = '<abbr class="gender" title="masculine gender">m</abbr>' codes["f"] = '<abbr class="gender" title="feminine gender">f</abbr>' codes["n"] = '<abbr class="gender" title="neuter gender">n</abbr>' codes["c"] = '<abbr class="gender" title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr class="gender" title="animate">anim</abbr>' codes["in"] = '<abbr class="gender" title="inanimate">inan</abbr>' codes["pr"] = '<abbr class="gender" title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr class="gender" title="singular">sg</abbr>' codes["d"] = '<abbr class="gender" title="dual">du</abbr>' codes["p"] = '<abbr class="gender" title="plural">pl</abbr>' -- Format one or more gender specifications. The argument can either be -- a single string containing a specification, or a table of specifications. function export.format(list) -- If the argument given is a list, iterate over each element and convert -- it, then concatenate the result if type(list) == "table" then for key, gender in ipairs(list) do list[key] = format_single(gender) end return table.concat(list, "'', ''") else return format_single(list) end end -- Format the sub-parts of a single gender specification. function format_single(spec) -- No need to split it if it's already a valid code. Just return it. if codes[spec] then return codes[spec] else -- Split the parts and iterate over each part local parts = mw.text.split(spec, "-") for key, part in ipairs(parts) do parts[key] = codes[part] or error("Invalid gender specification: \"" .. part .. "\"") end return table.concat(parts, " ") end end return export 3bvklyew68z09onl2lhvu4w69tbhl7y 64105 64104 2013-03-08T15:38:23Z Ruakh 1334 allow p.format to be called with a single space-or-comma-delimited argument (so it can take a single template-parameter) 64105 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. -- Genders codes["m"] = '<abbr class="gender" title="masculine gender">m</abbr>' codes["f"] = '<abbr class="gender" title="feminine gender">f</abbr>' codes["n"] = '<abbr class="gender" title="neuter gender">n</abbr>' codes["c"] = '<abbr class="gender" title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr class="gender" title="animate">anim</abbr>' codes["in"] = '<abbr class="gender" title="inanimate">inan</abbr>' codes["pr"] = '<abbr class="gender" title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr class="gender" title="singular">sg</abbr>' codes["d"] = '<abbr class="gender" title="dual">du</abbr>' codes["p"] = '<abbr class="gender" title="plural">pl</abbr>' -- Format one or more gender specifications. The argument can either be -- a single string containing a specification, or a table of specifications. function export.format(list) -- If the argument given is a list, iterate over each element and convert -- it, then concatenate the result if type(list) == "table" then for key, gender in ipairs(list) do list[key] = format_single(gender) end return table.concat(list, "'', ''") else return export.format(mw.text.split(list, "[, ]")) end end -- Format the sub-parts of a single gender specification. function format_single(spec) -- No need to split it if it's already a valid code. Just return it. if codes[spec] then return codes[spec] else -- Split the parts and iterate over each part local parts = mw.text.split(spec, "-") for key, part in ipairs(parts) do parts[key] = codes[part] or error("Invalid gender specification: \"" .. part .. "\"") end return table.concat(parts, " ") end end return export bqz31fqyw6bfp6h933l5d44qwwxmkwt 64107 64105 2013-04-02T19:43:27Z ZxxZxxZ 1333 64107 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. -- Genders codes["m"] = '<abbr class="gender" title="masculine gender">m</abbr>' codes["f"] = '<abbr class="gender" title="feminine gender">f</abbr>' codes["n"] = '<abbr class="gender" title="neuter gender">n</abbr>' codes["c"] = '<abbr class="gender" title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr class="gender" title="animate">anim</abbr>' codes["in"] = '<abbr class="gender" title="inanimate">inan</abbr>' codes["pr"] = '<abbr class="gender" title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr class="gender" title="singular">sg</abbr>' codes["d"] = '<abbr class="gender" title="dual">du</abbr>' codes["p"] = '<abbr class="gender" title="plural">pl</abbr>' -- Format one or more gender specifications. The argument can either be -- a single string containing a specification, or a table of specifications. function export.format(list) -- If the argument given is a list, iterate over each element and convert -- it, then concatenate the result if list == {} then return "" elseif type(list) == "table" then for key, gender in ipairs(list) do list[key] = format_single(gender) end return table.concat(list, "'', ''") else return export.format(mw.text.split(list, "[, ]")) end end -- Format the sub-parts of a single gender specification. function format_single(spec) -- No need to split it if it's already a valid code. Just return it. if codes[spec] then return codes[spec] else -- Split the parts and iterate over each part local parts = mw.text.split(spec, "-") for key, part in ipairs(parts) do parts[key] = codes[part] or error("Invalid gender specification: \"" .. part .. "\"") end return table.concat(parts, " ") end end return export mk45cvf8j2hobhafrepf0luykempjqh 64109 64107 2013-04-02T19:46:21Z ZxxZxxZ 1333 64109 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. -- Genders codes["m"] = '<abbr class="gender" title="masculine gender">m</abbr>' codes["f"] = '<abbr class="gender" title="feminine gender">f</abbr>' codes["n"] = '<abbr class="gender" title="neuter gender">n</abbr>' codes["c"] = '<abbr class="gender" title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr class="gender" title="animate">anim</abbr>' codes["in"] = '<abbr class="gender" title="inanimate">inan</abbr>' codes["pr"] = '<abbr class="gender" title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr class="gender" title="singular">sg</abbr>' codes["d"] = '<abbr class="gender" title="dual">du</abbr>' codes["p"] = '<abbr class="gender" title="plural">pl</abbr>' -- Format one or more gender specifications. The argument can either be -- a single string containing a specification, or a table of specifications. function export.format(list) -- If the argument given is a list, iterate over each element and convert -- it, then concatenate the result if not list or list == {} then return "" elseif type(list) == "table" then for key, gender in ipairs(list) do list[key] = format_single(gender) end return table.concat(list, "'', ''") else return export.format(mw.text.split(list, "[, ]")) end end -- Format the sub-parts of a single gender specification. function format_single(spec) -- No need to split it if it's already a valid code. Just return it. if codes[spec] then return codes[spec] else -- Split the parts and iterate over each part local parts = mw.text.split(spec, "-") for key, part in ipairs(parts) do parts[key] = codes[part] or error("Invalid gender specification: \"" .. part .. "\"") end return table.concat(parts, " ") end end return export gcr8v8e37m12aap0zs6ifvpi3nbaopg 64110 64109 2013-04-02T20:05:45Z ZxxZxxZ 1333 rv own -- fixed from Module:links 64110 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. -- Genders codes["m"] = '<abbr class="gender" title="masculine gender">m</abbr>' codes["f"] = '<abbr class="gender" title="feminine gender">f</abbr>' codes["n"] = '<abbr class="gender" title="neuter gender">n</abbr>' codes["c"] = '<abbr class="gender" title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr class="gender" title="animate">anim</abbr>' codes["in"] = '<abbr class="gender" title="inanimate">inan</abbr>' codes["pr"] = '<abbr class="gender" title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr class="gender" title="singular">sg</abbr>' codes["d"] = '<abbr class="gender" title="dual">du</abbr>' codes["p"] = '<abbr class="gender" title="plural">pl</abbr>' -- Format one or more gender specifications. The argument can either be -- a single string containing a specification, or a table of specifications. function export.format(list) -- If the argument given is a list, iterate over each element and convert -- it, then concatenate the result if type(list) == "table" then for key, gender in ipairs(list) do list[key] = format_single(gender) end return table.concat(list, "'', ''") else return export.format(mw.text.split(list, "[, ]")) end end -- Format the sub-parts of a single gender specification. function format_single(spec) -- No need to split it if it's already a valid code. Just return it. if codes[spec] then return codes[spec] else -- Split the parts and iterate over each part local parts = mw.text.split(spec, "-") for key, part in ipairs(parts) do parts[key] = codes[part] or error("Invalid gender specification: \"" .. part .. "\"") end return table.concat(parts, " ") end end return export bqz31fqyw6bfp6h933l5d44qwwxmkwt 64112 64110 2013-04-03T00:15:58Z ZxxZxxZ 1333 64112 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. -- Genders codes["m"] = '<abbr class="gender" title="masculine gender">m</abbr>' codes["f"] = '<abbr class="gender" title="feminine gender">f</abbr>' codes["n"] = '<abbr class="gender" title="neuter gender">n</abbr>' codes["c"] = '<abbr class="gender" title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr class="gender" title="animate">anim</abbr>' codes["in"] = '<abbr class="gender" title="inanimate">inan</abbr>' codes["pr"] = '<abbr class="gender" title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr class="gender" title="singular">sg</abbr>' codes["d"] = '<abbr class="gender" title="dual">du</abbr>' codes["p"] = '<abbr class="gender" title="plural">pl</abbr>' -- Format one or more gender specifications. The argument can either be -- a single string containing a specification, or a table of specifications. function export.format(list) -- If the argument given is a list, iterate over each element and convert -- it, then concatenate the result if type(list) == "table" then for key, gender in ipairs(list) do list[key] = format_single(gender) end return mw.text.listToText(list) else return export.format(mw.text.split(list, "[, ]")) end end -- Format the sub-parts of a single gender specification. function format_single(spec) -- No need to split it if it's already a valid code. Just return it. if codes[spec] then return codes[spec] else -- Split the parts and iterate over each part local parts = mw.text.split(spec, "-") for key, part in ipairs(parts) do parts[key] = codes[part] or error("Invalid gender specification: \"" .. part .. "\"") end return table.concat(parts, " ") end end return export mshxqjqzf72jeu6xsmfxicnpdarbkbn 64113 64112 2013-04-03T00:19:38Z ZxxZxxZ 1333 Undo revision 20078910 by [[Special:Contributions/ZxxZxxZ|ZxxZxxZ]] ([[User talk:ZxxZxxZ|talk]]) 64113 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. -- Genders codes["m"] = '<abbr class="gender" title="masculine gender">m</abbr>' codes["f"] = '<abbr class="gender" title="feminine gender">f</abbr>' codes["n"] = '<abbr class="gender" title="neuter gender">n</abbr>' codes["c"] = '<abbr class="gender" title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr class="gender" title="animate">anim</abbr>' codes["in"] = '<abbr class="gender" title="inanimate">inan</abbr>' codes["pr"] = '<abbr class="gender" title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr class="gender" title="singular">sg</abbr>' codes["d"] = '<abbr class="gender" title="dual">du</abbr>' codes["p"] = '<abbr class="gender" title="plural">pl</abbr>' -- Format one or more gender specifications. The argument can either be -- a single string containing a specification, or a table of specifications. function export.format(list) -- If the argument given is a list, iterate over each element and convert -- it, then concatenate the result if type(list) == "table" then for key, gender in ipairs(list) do list[key] = format_single(gender) end return table.concat(list, "'', ''") else return export.format(mw.text.split(list, "[, ]")) end end -- Format the sub-parts of a single gender specification. function format_single(spec) -- No need to split it if it's already a valid code. Just return it. if codes[spec] then return codes[spec] else -- Split the parts and iterate over each part local parts = mw.text.split(spec, "-") for key, part in ipairs(parts) do parts[key] = codes[part] or error("Invalid gender specification: \"" .. part .. "\"") end return table.concat(parts, " ") end end return export bqz31fqyw6bfp6h933l5d44qwwxmkwt 64115 64113 2013-04-03T00:39:11Z Rua 1351 Protected "[[Module:gender and number]]": Highly visible template/module ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) 64113 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. -- Genders codes["m"] = '<abbr class="gender" title="masculine gender">m</abbr>' codes["f"] = '<abbr class="gender" title="feminine gender">f</abbr>' codes["n"] = '<abbr class="gender" title="neuter gender">n</abbr>' codes["c"] = '<abbr class="gender" title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr class="gender" title="animate">anim</abbr>' codes["in"] = '<abbr class="gender" title="inanimate">inan</abbr>' codes["pr"] = '<abbr class="gender" title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr class="gender" title="singular">sg</abbr>' codes["d"] = '<abbr class="gender" title="dual">du</abbr>' codes["p"] = '<abbr class="gender" title="plural">pl</abbr>' -- Format one or more gender specifications. The argument can either be -- a single string containing a specification, or a table of specifications. function export.format(list) -- If the argument given is a list, iterate over each element and convert -- it, then concatenate the result if type(list) == "table" then for key, gender in ipairs(list) do list[key] = format_single(gender) end return table.concat(list, "'', ''") else return export.format(mw.text.split(list, "[, ]")) end end -- Format the sub-parts of a single gender specification. function format_single(spec) -- No need to split it if it's already a valid code. Just return it. if codes[spec] then return codes[spec] else -- Split the parts and iterate over each part local parts = mw.text.split(spec, "-") for key, part in ipairs(parts) do parts[key] = codes[part] or error("Invalid gender specification: \"" .. part .. "\"") end return table.concat(parts, " ") end end return export bqz31fqyw6bfp6h933l5d44qwwxmkwt 64116 64115 2013-04-11T22:48:15Z Rua 1351 64116 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. -- Genders codes["m"] = '<abbr class="gender" title="masculine gender">m</abbr>' codes["f"] = '<abbr class="gender" title="feminine gender">f</abbr>' codes["n"] = '<abbr class="gender" title="neuter gender">n</abbr>' codes["c"] = '<abbr class="gender" title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr class="gender" title="animate">anim</abbr>' codes["in"] = '<abbr class="gender" title="inanimate">inan</abbr>' codes["pr"] = '<abbr class="gender" title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr class="gender" title="singular">sg</abbr>' codes["d"] = '<abbr class="gender" title="dual">du</abbr>' codes["p"] = '<abbr class="gender" title="plural">pl</abbr>' -- Format one or more gender specifications. The argument can either be -- a single string containing a specification, or a table of specifications. function export.format(list) local list2 = {} -- If the argument given is a list, iterate over each element and convert -- it, then concatenate the result if type(list) == "table" then for key, gender in ipairs(list) do list2[key] = format_single(gender) end return table.concat(list2, "'', ''") else return export.format(mw.text.split(list, "[, ]")) end end -- Format the sub-parts of a single gender specification. function format_single(spec) -- No need to split it if it's already a valid code. Just return it. if codes[spec] then return codes[spec] else -- Split the parts and iterate over each part local parts = mw.text.split(spec, "-") for key, part in ipairs(parts) do parts[key] = codes[part] or error("Invalid gender specification: \"" .. part .. "\"") end return table.concat(parts, " ") end end return export 9vwsxzxr6lotzllh87uva5m2qjxu671 64118 64116 2013-05-10T14:16:42Z Rua 1351 64118 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. -- Genders codes["m"] = '<abbr class="gender" title="masculine gender">m</abbr>' codes["f"] = '<abbr class="gender" title="feminine gender">f</abbr>' codes["n"] = '<abbr class="gender" title="neuter gender">n</abbr>' codes["c"] = '<abbr class="gender" title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr class="gender" title="animate">anim</abbr>' codes["in"] = '<abbr class="gender" title="inanimate">inan</abbr>' codes["pr"] = '<abbr class="gender" title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr class="gender" title="singular">sg</abbr>' codes["d"] = '<abbr class="gender" title="dual">du</abbr>' codes["p"] = '<abbr class="gender" title="plural">pl</abbr>' -- Noun classes codes["c1"] = '<abbr class="gender" title="noun class 1">1</abbr>' -- Format one or more gender specifications. The argument can either be -- a single string containing a specification, or a table of specifications. function export.format_list(list) local list2 = {} -- If the argument given is a list, iterate over each element and convert -- it, then concatenate the result if type(list) == "table" then for key, gender in ipairs(list) do list2[key] = export.format_specification(gender) end return table.concat(list2, "'', ''") else return export.format(mw.text.split(list, "[, ]")) end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec) -- No need to split it if it's already a valid code. Just return it. if codes[spec] then return codes[spec] else -- Split the parts and iterate over each part local parts = mw.text.split(spec, "-") for key, part in ipairs(parts) do parts[key] = codes[part] or error("Invalid gender specification: \"" .. part .. "\"") end return table.concat(parts, " ") end end return export t0k7g81wk0ctmxe7kuvpjkxin9bkpur 64119 64118 2013-05-10T14:31:41Z Rua 1351 64119 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. -- Genders codes["m"] = '<abbr class="gender" title="masculine gender">m</abbr>' codes["f"] = '<abbr class="gender" title="feminine gender">f</abbr>' codes["n"] = '<abbr class="gender" title="neuter gender">n</abbr>' codes["c"] = '<abbr class="gender" title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr class="gender" title="animate">anim</abbr>' codes["in"] = '<abbr class="gender" title="inanimate">inan</abbr>' codes["pr"] = '<abbr class="gender" title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr class="gender" title="singular">sg</abbr>' codes["d"] = '<abbr class="gender" title="dual">du</abbr>' codes["p"] = '<abbr class="gender" title="plural">pl</abbr>' -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list) -- Iterate over each specification and format it for key, spec in ipairs(list) do list[key] = export.format_specification(spec) end -- Add the processed codes together with commas return table.concat(list, "'', ''") end -- Format the sub-parts of a single gender specification. function export.format_specification(spec) -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do parts[key] = format_code(code) end -- Add the processed codes together with spaces return table.concat(parts, " ") end -- Format a single code. function format_code(code) -- Is this code in the list? if codes[code] then return codes[code] -- Is this a noun class? elseif code:find("^c.+") then local subcode = code:gsub("^c", "") return "<abbr class=\"noun-class\" title=\"noun class " .. subcode .. "\">" .. subcode .. "</abbr>" else error("Invalid gender specification code: \"" .. code .. "\"") end end return export h2ke67ukklgy3ecsumponxk877ka6iv 64121 64119 2013-05-10T14:37:08Z Rua 1351 64121 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. -- Genders codes["m"] = '<abbr class="gender" title="masculine gender">m</abbr>' codes["f"] = '<abbr class="gender" title="feminine gender">f</abbr>' codes["n"] = '<abbr class="gender" title="neuter gender">n</abbr>' codes["c"] = '<abbr class="gender" title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr class="gender" title="animate">anim</abbr>' codes["in"] = '<abbr class="gender" title="inanimate">inan</abbr>' codes["pr"] = '<abbr class="gender" title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr class="gender" title="singular">sg</abbr>' codes["d"] = '<abbr class="gender" title="dual">du</abbr>' codes["p"] = '<abbr class="gender" title="plural">pl</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local list = {} local i = 1 while args[i] do table.insert(list, args[i]) i = i + 1 end return format_list(list) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list) -- Iterate over each specification and format it for key, spec in ipairs(list) do list[key] = export.format_specification(spec) end -- Add the processed codes together with commas return table.concat(list, "'', ''") end -- Format the sub-parts of a single gender specification. function export.format_specification(spec) -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do parts[key] = format_code(code) end -- Add the processed codes together with spaces return table.concat(parts, " ") end -- Format a single code. function format_code(code) -- Is this code in the list? if codes[code] then return codes[code] -- Is this a noun class? elseif code:find("^c.+") then local subcode = code:gsub("^c", "") return "<abbr class=\"noun-class\" title=\"noun class " .. subcode .. "\">" .. subcode .. "</abbr>" else error("Invalid gender specification code: \"" .. code .. "\"") end end return export cbjylvii6ikhfjc5bgmsmurycgftmyx 64122 64121 2013-05-10T14:38:05Z Rua 1351 64122 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. -- Genders codes["m"] = '<abbr class="gender" title="masculine gender">m</abbr>' codes["f"] = '<abbr class="gender" title="feminine gender">f</abbr>' codes["n"] = '<abbr class="gender" title="neuter gender">n</abbr>' codes["c"] = '<abbr class="gender" title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr class="gender" title="animate">anim</abbr>' codes["in"] = '<abbr class="gender" title="inanimate">inan</abbr>' codes["pr"] = '<abbr class="gender" title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr class="gender" title="singular">sg</abbr>' codes["d"] = '<abbr class="gender" title="dual">du</abbr>' codes["p"] = '<abbr class="gender" title="plural">pl</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list) -- Iterate over each specification and format it for key, spec in ipairs(list) do list[key] = export.format_specification(spec) end -- Add the processed codes together with commas return table.concat(list, "'', ''") end -- Format the sub-parts of a single gender specification. function export.format_specification(spec) -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do parts[key] = format_code(code) end -- Add the processed codes together with spaces return table.concat(parts, " ") end -- Format a single code. function format_code(code) -- Is this code in the list? if codes[code] then return codes[code] -- Is this a noun class? elseif code:find("^c.+") then local subcode = code:gsub("^c", "") return "<abbr class=\"noun-class\" title=\"noun class " .. subcode .. "\">" .. subcode .. "</abbr>" else error("Invalid gender specification code: \"" .. code .. "\"") end end return export bdrzmbkn2vzg5hgtgs1xn01q65s4uvy 64124 64122 2013-05-10T14:44:23Z Rua 1351 64124 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. -- Genders codes["m"] = '<abbr class="gender" title="masculine gender">m</abbr>' codes["f"] = '<abbr class="gender" title="feminine gender">f</abbr>' codes["n"] = '<abbr class="gender" title="neuter gender">n</abbr>' codes["c"] = '<abbr class="gender" title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr class="gender" title="animate">anim</abbr>' codes["in"] = '<abbr class="gender" title="inanimate">inan</abbr>' codes["pr"] = '<abbr class="gender" title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr class="gender" title="singular">sg</abbr>' codes["d"] = '<abbr class="gender" title="dual">du</abbr>' codes["p"] = '<abbr class="gender" title="plural">pl</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list) -- Iterate over each specification and format it for key, spec in ipairs(list) do list[key] = export.format_specification(spec) end -- Add the processed codes together with commas return table.concat(list, "'', ''") end -- Format the sub-parts of a single gender specification. function export.format_specification(spec) -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code in the list? if codes[code] then parts[key] = codes[code] -- Is this a noun class? elseif code:find("^c.+") then local subcode = code:gsub("^c", "") parts[key] = "<abbr class=\"noun-class\" title=\"noun class " .. subcode .. "\">" .. subcode .. "</abbr>" else error("Invalid gender specification code: \"" .. code .. "\"") end end -- Add the processed codes together with spaces return table.concat(parts, " ") end return export i2ixpyx2k20937fkc0rrmweue3y8met 64125 64124 2013-05-10T15:09:28Z Rua 1351 64125 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular">sg</abbr>' codes["d"] = '<abbr title="dual">du</abbr>' codes["p"] = '<abbr title="plural">pl</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list) -- Iterate over each specification and format it for key, spec in ipairs(list) do list[key] = export.format_specification(spec) end -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end -- Format the sub-parts of a single gender specification. function export.format_specification(spec) local separator = " " -- If the specification starts with cX, then it is a noun class specification. -- Use / as the separator instead. if spec:find("^c[^-]") then spec = spec:gsub("^c", "") -- Split the parts and iterate over each part local parts = mw.text.split(spec, "/") for key, code in ipairs(parts) do parts[key] = "<abbr class=\"noun-class\" title=\"noun class " .. subcode .. "\">" .. subcode .. "</abbr>" end return table.concat(parts, "/") else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("Invalid gender specification code: \"" .. code .. "\"") end end -- Add the processed codes together with spaces return table.concat(parts, " ") end end return export h4ku74zeonx5zi0ia6lebku85qhri8v 64127 64125 2013-05-10T15:14:03Z Rua 1351 64127 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular">sg</abbr>' codes["d"] = '<abbr title="dual">du</abbr>' codes["p"] = '<abbr title="plural">pl</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list) local is_nounclass = false -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec) is_nounclass = is_nounclass or nc end if is_nounclass then -- Add the processed codes together with commas return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec) local separator = " " -- If the specification starts with cX, then it is a noun class specification. if spec:find("^c[^-]") then code = spec:gsub("^c", "") return "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>", true else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("Invalid gender specification code: \"" .. code .. "\"") end end -- Add the processed codes together with spaces return table.concat(parts, " "), false end end return export 3a8h4l3hmsr8umzm2itz8mutarvh2w8 64128 64127 2013-05-10T15:20:35Z Rua 1351 64128 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular">sg</abbr>' codes["d"] = '<abbr title="dual">du</abbr>' codes["p"] = '<abbr title="plural">pl</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with commas return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec) local separator = " " -- If the specification starts with cX, then it is a noun class specification. if spec:find("^c[^-]") then code = spec:gsub("^c", "") return "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>", true else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("Invalid gender specification code: \"" .. code .. "\"") end end -- Add the processed codes together with spaces return table.concat(parts, " "), false end end return export hfk1w5z7efwuxtp2c3mrttbd6faixhf 64130 64128 2013-05-10T15:28:32Z Rua 1351 64130 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with commas return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec) local separator = " " -- If the specification starts with cX, then it is a noun class specification. if spec:find("^c[^-]") then code = spec:gsub("^c", "") return "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>", true else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("Invalid gender specification code: \"" .. code .. "\"") end end -- Add the processed codes together with spaces return table.concat(parts, " "), false end end return export ew0r8zw6tx8x34447dwr4dw9bmke1tf 64132 64130 2013-06-22T12:49:35Z Rua 1351 64132 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with commas return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec) local separator = " " -- If the specification starts with cX, then it is a noun class specification. if spec:find("^c[^-]") then code = spec:gsub("^c", "") return "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>", true else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("Invalid gender specification code: \"" .. code .. "\"") end end -- Add the processed codes together with spaces return table.concat(parts, " "), false end end return export 3uf9ymky4hv0ecpmr32ln45j5kj30di 64133 64132 2013-06-24T22:52:36Z Rua 1351 64133 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with commas return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec) local separator = " " -- If the specification starts with cX, then it is a noun class specification. if spec:find("^c[^-]") then code = spec:gsub("^c", "") return "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>", true else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("Invalid gender specification code: \"" .. code .. "\"") end end -- Add the processed codes together with spaces return table.concat(parts, " "), false end end return export s0c09k3pij9qt1612nprbk2i9p85rv9 64134 64133 2013-07-15T18:34:15Z Rua 1351 64134 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec) local separator = " " -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then code = spec:gsub("^c", "") return "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>", true else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("Invalid gender specification code: \"" .. code .. "\"") end end -- Add the processed codes together with spaces return table.concat(parts, " "), false end end return export g5kps2wmpca7b2ulzhwoxiuyi34hwiy 64135 64134 2013-07-16T21:10:41Z Rua 1351 64135 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec) local separator = " " -- If the specification starts with cX, then it is a noun class specification. if spec:find("^c[^-]") then code = spec:gsub("^c", "") if code == "?" then return "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>", true else return "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>", true end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("Invalid gender specification code: \"" .. code .. "\"") end end -- Add the processed codes together with spaces return table.concat(parts, " "), false end end return export 4f1sz07bbhiev1m9nxva9fmgcp9sy6n 64136 64135 2013-07-16T21:18:08Z Rua 1351 64136 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec) local separator = " " -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then code = spec:gsub("^c", "") if code == "?" then return "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>", true else return "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>", true end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("Invalid gender specification code: \"" .. code .. "\"") end end -- Add the processed codes together with spaces return table.concat(parts, " "), false end end return export kp8egh32dp9ffgs52xn1k8ng9o74iks 64138 64136 2013-07-28T18:59:13Z ZxxZxxZ 1333 [[Module_talk:gender_and_number#NBSP|NBSP]] 64138 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec) local separator = " " -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then code = spec:gsub("^c", "") if code == "?" then return "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>", true else return "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>", true end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("Invalid gender specification code: \"" .. code .. "\"") end end -- Add the processed codes together with non-breaking spaces return table.concat(parts, "&nbsp;"), false end end return export phrlkyjb5vm5jzmfmqlp57egxgpav38 64139 64138 2013-09-10T10:23:17Z Rua 1351 64139 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" if lang then local m_languages = mw.loadData("Module:languages") local langinfo = m_languages[lang] or error("The language code \"" .. lang .. "\" is not valid.") -- Check if the specification is valid if langinfo.genders then local valid_genders = {} for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end if not valid_genders[spec] then error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ".") end end -- Is this an incomplete gender? if spec:find("?") then categories = categories .. "[[Category:" .. langinfo.names[1] .. " terms with incomplete gender]]" end end -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then code = spec:gsub("^c", "") if code == "?" then return "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" .. categories, true else return "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" .. categories, true end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("Invalid gender specification code: \"" .. code .. "\"") end end -- Add the processed codes together with non-breaking spaces return table.concat(parts, "&nbsp;") .. categories, false end end return export a1vyztltukidvmj94ad2tid7etj0zqp 64141 64139 2013-09-10T10:32:04Z Rua 1351 64141 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" if lang then local m_languages = mw.loadData("Module:languages") local langinfo = m_languages[lang] or error("The language code \"" .. lang .. "\" is not valid.") -- Check if the specification is valid if langinfo.genders then local valid_genders = {} for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end if not valid_genders[spec] then error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ".") end end -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({langinfo.names[1] .. " terms with incomplete gender"}, nil) end end -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then code = spec:gsub("^c", "") if code == "?" then return "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" .. categories, true else return "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" .. categories, true end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("Invalid gender specification code: \"" .. code .. "\"") end end -- Add the processed codes together with non-breaking spaces return table.concat(parts, "&nbsp;") .. categories, false end end return export jxatnfv3bua131kvsmpps095t8538md 64142 64141 2013-09-10T10:33:50Z Rua 1351 64142 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" if lang then local m_languages = mw.loadData("Module:languages") local langinfo = m_languages[lang] or error("The language code \"" .. lang .. "\" is not valid.") -- Check if the specification is valid if langinfo.genders then local valid_genders = {} for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end if not valid_genders[spec] then error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ".") end end -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({langinfo.names[1] .. " terms with incomplete gender"}, nil) end end -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then code = spec:gsub("^c", "") if code == "?" then return "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" .. categories, true else return "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" .. categories, true end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("Invalid gender specification code: \"" .. code .. "\"") end end -- Add the processed codes together with non-breaking spaces return table.concat(parts, "&nbsp;") .. categories, false end end return export gbl6ck2ho83quvu1lga04n0dqvilo6k 64144 64142 2013-09-10T10:37:21Z Rua 1351 64144 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" if lang then local m_languages = mw.loadData("Module:languages") local langinfo = m_languages[lang] or error("The language code \"" .. lang .. "\" is not valid.") -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({langinfo.names[1] .. " terms with incomplete gender"}, nil) -- Check if the specification is valid elseif langinfo.genders then local valid_genders = {} for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end if not valid_genders[spec] then error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ".") end end end -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then code = spec:gsub("^c", "") if code == "?" then return "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" .. categories, true else return "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" .. categories, true end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("Invalid gender specification code: \"" .. code .. "\"") end end -- Add the processed codes together with non-breaking spaces return table.concat(parts, "&nbsp;") .. categories, false end end return export m5mt9am963efqrhy6fdukyo5qx12p99 64145 64144 2013-09-10T10:44:12Z Rua 1351 64145 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" if lang then local m_languages = mw.loadData("Module:languages") local langinfo = m_languages[lang] or error("The language code \"" .. lang .. "\" is not valid.") -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({langinfo.names[1] .. " terms with incomplete gender"}, nil) -- Check if the specification is valid elseif langinfo.genders then local valid_genders = {} for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end if not valid_genders[spec] then error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(langinfo.genders, ", ")) end end end -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then code = spec:gsub("^c", "") if code == "?" then return "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" .. categories, true else return "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" .. categories, true end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("Invalid gender specification code: \"" .. code .. "\"") end end -- Add the processed codes together with non-breaking spaces return table.concat(parts, "&nbsp;") .. categories, false end end return export 9vvty3kwn6xhbrcgt97rtr5dxnhn3ry 64147 64145 2013-09-10T10:47:32Z Rua 1351 64147 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" if lang then local m_languages = mw.loadData("Module:languages") local langinfo = m_languages[lang] or error("The language code \"" .. lang .. "\" is not valid.") -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({langinfo.names[1] .. " terms with incomplete gender"}, nil) -- Check if the specification is valid elseif langinfo.genders then local valid_genders = {} for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end if not valid_genders[spec] then local valid_string = {} for i, g in ipairs(langinfo.genders) do valid_string[i] = g end error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) end end end -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then code = spec:gsub("^c", "") if code == "?" then return "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" .. categories, true else return "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" .. categories, true end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("Invalid gender specification code: \"" .. code .. "\"") end end -- Add the processed codes together with non-breaking spaces return table.concat(parts, "&nbsp;") .. categories, false end end return export mgxl8c2kpw31gnu0xko5mb37zea665b 64148 64147 2013-09-10T10:51:58Z Rua 1351 64148 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("The gender specification \"" .. spec .. "\" is not valid.") end end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then local m_languages = mw.loadData("Module:languages") local langinfo = m_languages[lang] or error("The language code \"" .. lang .. "\" is not valid.") -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({langinfo.names[1] .. " terms with incomplete gender"}, nil) -- Check if the specification is valid elseif langinfo.genders then local valid_genders = {} for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end if not valid_genders[spec] then local valid_string = {} for i, g in ipairs(langinfo.genders) do valid_string[i] = g end error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) end end end return ret .. categories, is_nounclass end return export flztwd5egf05mlm43zudyiyztela6p1 64150 64148 2013-11-19T18:10:41Z Rua 1351 64150 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("The gender specification \"" .. spec .. "\" is not valid.") end end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then local m_languages = mw.loadData("Module:languages/alldata") local langinfo = m_languages[lang] or error("The language code \"" .. lang .. "\" is not valid.") -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({langinfo.names[1] .. " terms with incomplete gender"}, nil) -- Check if the specification is valid elseif langinfo.genders then local valid_genders = {} for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end if not valid_genders[spec] then local valid_string = {} for i, g in ipairs(langinfo.genders) do valid_string[i] = g end error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) end end end return ret .. categories, is_nounclass end return export anu3ia455uq73ft10ac22fjvb8bdz23 64152 64150 2014-05-12T16:10:06Z Rua 1351 64152 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("The gender specification \"" .. spec .. "\" is not valid.") end end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then if type(lang) == "string" then require("Module:debug").track("lang name") lang = require("Module:languages").getLanguageByCode(lang) or error("The language code \"" .. lang .. "\" is not valid.") end -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({lang:getCanonicalName() .. " terms with incomplete gender"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export dcjud0kq8uif3lpkikkobhob56n2sp8 64153 64152 2014-05-13T02:08:02Z Rua 1351 64153 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("The gender specification \"" .. spec .. "\" is not valid.") end end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then if type(lang) == "string" then require("Module:debug").track("lang name") lang = require("Module:languages").getByCode(lang) or error("The language code \"" .. lang .. "\" is not valid.") end -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({lang:getCanonicalName() .. " terms with incomplete gender"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export elemlxagblafpynxkrynrj2k5t7gfg5 64155 64153 2014-06-12T10:30:06Z Rua 1351 64155 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("The gender specification \"" .. spec .. "\" is not valid.") end end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({lang:getCanonicalName() .. " terms with incomplete gender"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export hnt7u3wbo7iy1g6sp764fcwa4rfic7q 64156 64155 2015-06-23T16:51:06Z Wikitiki89 1330 added non-personal as antonym of personal 64156 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' codes["np"] = '<abbr title="non-personal">npers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("The gender specification \"" .. spec .. "\" is not valid.") end end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({lang:getCanonicalName() .. " terms with incomplete gender"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export 6sg1xf5b5nysltgycuxr3vytt0cmodi 64158 64156 2015-11-26T00:44:23Z Rua 1351 64158 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", display = '<abbr title="inanimate">inan</abbr>'} -- Personal codes["pr"] = {type = "personal", display = '<abbr title="personal">pers</abbr>'} codes["np"] = {type = "personal", display = '<abbr title="non-personal">npers</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "perfectivity", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "perfectivity", display = '<abbr title="perfective aspect">pf</abbr>'} -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code].display else error("The gender specification \"" .. spec .. "\" is not valid.") end end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({lang:getCanonicalName() .. " terms with incomplete gender"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export bmhmiml44lnupwlkxww4kmfi4y3z8du 64160 64158 2015-11-26T00:48:55Z Rua 1351 64160 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", display = '<abbr title="inanimate">inan</abbr>'} -- Personal codes["pr"] = {type = "personal", display = '<abbr title="personal">pers</abbr>'} codes["np"] = {type = "personal", display = '<abbr title="non-personal">npers</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "perfectivity", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "perfectivity", display = '<abbr title="perfective aspect">pf</abbr>'} -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else local types = {} -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error("The gender specification \"" .. spec .. "\" is not valid.") end if codes[code].type ~= "other" and types[codes[code].type] then error("The gender specification \"" .. spec .. "\" contains multiple tags of type \"" .. codes[code].type .. "\".") end parts[key] = codes[code].display types[codes[code].type] = true end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({lang:getCanonicalName() .. " terms with incomplete gender"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export nws8ssocyh8hliysep6l0cg15h16nis 64161 64160 2015-11-29T22:36:44Z Daniel Carrero 1329 Changed protection level for "[[Module:gender and number]]" ([Move=Allow only administrators] (indefinite)) 64160 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", display = '<abbr title="inanimate">inan</abbr>'} -- Personal codes["pr"] = {type = "personal", display = '<abbr title="personal">pers</abbr>'} codes["np"] = {type = "personal", display = '<abbr title="non-personal">npers</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "perfectivity", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "perfectivity", display = '<abbr title="perfective aspect">pf</abbr>'} -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else local types = {} -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error("The gender specification \"" .. spec .. "\" is not valid.") end if codes[code].type ~= "other" and types[codes[code].type] then error("The gender specification \"" .. spec .. "\" contains multiple tags of type \"" .. codes[code].type .. "\".") end parts[key] = codes[code].display types[codes[code].type] = true end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({lang:getCanonicalName() .. " terms with incomplete gender"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export nws8ssocyh8hliysep6l0cg15h16nis 64163 64161 2015-11-29T22:47:06Z Daniel Carrero 1329 Changed protection level for "[[Module:gender and number]]" ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only administrators] (indefinite)) 64160 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", display = '<abbr title="inanimate">inan</abbr>'} -- Personal codes["pr"] = {type = "personal", display = '<abbr title="personal">pers</abbr>'} codes["np"] = {type = "personal", display = '<abbr title="non-personal">npers</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "perfectivity", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "perfectivity", display = '<abbr title="perfective aspect">pf</abbr>'} -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else local types = {} -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error("The gender specification \"" .. spec .. "\" is not valid.") end if codes[code].type ~= "other" and types[codes[code].type] then error("The gender specification \"" .. spec .. "\" contains multiple tags of type \"" .. codes[code].type .. "\".") end parts[key] = codes[code].display types[codes[code].type] = true end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({lang:getCanonicalName() .. " terms with incomplete gender"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export nws8ssocyh8hliysep6l0cg15h16nis 64164 64163 2015-12-01T20:22:31Z Daniel Carrero 1329 Reverting CodeCat's edits that basically filled the module error category with pages that use "m-f" simultaneously. 64164 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' codes["np"] = '<abbr title="non-personal">npers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("The gender specification \"" .. spec .. "\" is not valid.") end end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({lang:getCanonicalName() .. " terms with incomplete gender"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export 6sg1xf5b5nysltgycuxr3vytt0cmodi 64171 64164 2016-02-21T20:14:29Z Ph3gal 2008 64171 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' codes["np"] = '<abbr title="non-personal">npers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' codes["stat"] = '<abbr title="stative verb">stat</abbr>' codes["dyn"] = '<abbr title="dynamic verb">dyn</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("The gender specification \"" .. spec .. "\" is not valid.") end end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({lang:getCanonicalName() .. " terms with incomplete gender"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export 9s0qasmzujyv5bv2w1gwa4s4ae5nbr5 64173 64171 2016-02-21T20:59:56Z Rua 1351 Reverted edits by [[Special:Contributions/Ph3gal|Ph3gal]]. If you think this rollback is in error, please leave a message on my talk page. 64173 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = '<abbr title="gender incomplete">?</abbr>' -- Genders codes["m"] = '<abbr title="masculine gender">m</abbr>' codes["f"] = '<abbr title="feminine gender">f</abbr>' codes["n"] = '<abbr title="neuter gender">n</abbr>' codes["c"] = '<abbr title="common gender">c</abbr>' -- Additional qualifiers codes["an"] = '<abbr title="animate">anim</abbr>' codes["in"] = '<abbr title="inanimate">inan</abbr>' codes["pr"] = '<abbr title="personal">pers</abbr>' codes["np"] = '<abbr title="non-personal">npers</abbr>' -- Numbers codes["s"] = '<abbr title="singular number">sg</abbr>' codes["d"] = '<abbr title="dual number">du</abbr>' codes["p"] = '<abbr title="plural number">pl</abbr>' -- Verb qualifiers codes["impf"] = '<abbr title="imperfective aspect">impf</abbr>' codes["pf"] = '<abbr title="perfective aspect">pf</abbr>' -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if codes[code] then parts[key] = codes[code] else error("The gender specification \"" .. spec .. "\" is not valid.") end end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({lang:getCanonicalName() .. " terms with incomplete gender"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export 6sg1xf5b5nysltgycuxr3vytt0cmodi 64175 64173 2018-01-29T20:12:02Z Rua 1351 Track cases where "m-f" and the likes are used as gender instead of "m" and "f" 64175 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", display = '<abbr title="inanimate">inan</abbr>'} -- Personal codes["pr"] = {type = "personal", display = '<abbr title="personal">pers</abbr>'} codes["np"] = {type = "personal", display = '<abbr title="non-personal">npers</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "perfectivity", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "perfectivity", display = '<abbr title="perfective aspect">pf</abbr>'} -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else local types = {} -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error("The gender specification \"" .. spec .. "\" is not valid.") end if codes[code].type ~= "other" and types[codes[code].type] then require("Module:debug").track("gender and number/multiple") require("Module:debug").track("gender and number/multiple/" .. spec) --error("The gender specification \"" .. spec .. "\" contains multiple tags of type \"" .. codes[code].type .. "\".") end parts[key] = codes[code].display types[codes[code].type] = true end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({lang:getCanonicalName() .. " terms with incomplete gender"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export j5e14kkf9tqg4ilrbrauqzf9a1gd9ii 64176 64175 2019-03-19T20:47:27Z Rua 1351 Reinstate errors when tags of the same type are mixed, now that all such existing uses have been fixed 64176 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", display = '<abbr title="inanimate">inan</abbr>'} -- Personal codes["pr"] = {type = "personal", display = '<abbr title="personal">pers</abbr>'} codes["np"] = {type = "personal", display = '<abbr title="non-personal">npers</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "perfectivity", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "perfectivity", display = '<abbr title="perfective aspect">pf</abbr>'} -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, ", ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else local types = {} -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error("The gender specification \"" .. spec .. "\" is not valid.") end if codes[code].type ~= "other" and types[codes[code].type] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error("The gender specification \"" .. spec .. "\" contains multiple tags of type \"" .. codes[code].type .. "\".") end parts[key] = codes[code].display types[codes[code].type] = true end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({lang:getCanonicalName() .. " terms with incomplete gender"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export 9qrz3wf0hdky9ja1sin1ew3hetjjgui 64178 64176 2019-04-06T20:41:16Z Rua 1351 Separate the genders with "or", which is clearer than a comma 64178 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", display = '<abbr title="inanimate">inan</abbr>'} -- Personal codes["pr"] = {type = "personal", display = '<abbr title="personal">pers</abbr>'} codes["np"] = {type = "personal", display = '<abbr title="non-personal">npers</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "perfectivity", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "perfectivity", display = '<abbr title="perfective aspect">pf</abbr>'} -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, " or ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else local types = {} -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error("The gender specification \"" .. spec .. "\" is not valid.") end if codes[code].type ~= "other" and types[codes[code].type] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error("The gender specification \"" .. spec .. "\" contains multiple tags of type \"" .. codes[code].type .. "\".") end parts[key] = codes[code].display types[codes[code].type] = true end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({lang:getCanonicalName() .. " terms with incomplete gender"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export 0a6200jrepbvwy6ghkh9wzgk9g8vw2o 64179 64178 2019-06-05T15:40:16Z Erutuon 1339 Undo revision 52056409 by [[Special:Contributions/Rua|Rua]] ([[User talk:Rua|talk]]): quite a few errors in entries, many of which are Greek and seem to be using [[T:el-noun-form]] 64179 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", display = '<abbr title="inanimate">inan</abbr>'} -- Personal codes["pr"] = {type = "personal", display = '<abbr title="personal">pers</abbr>'} codes["np"] = {type = "personal", display = '<abbr title="non-personal">npers</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "perfectivity", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "perfectivity", display = '<abbr title="perfective aspect">pf</abbr>'} -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, " or ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else local types = {} -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error("The gender specification \"" .. spec .. "\" is not valid.") end if codes[code].type ~= "other" and types[codes[code].type] then require("Module:debug").track("gender and number/multiple") require("Module:debug").track("gender and number/multiple/" .. spec) --error("The gender specification \"" .. spec .. "\" contains multiple tags of type \"" .. codes[code].type .. "\".") end parts[key] = codes[code].display types[codes[code].type] = true end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({lang:getCanonicalName() .. " terms with incomplete gender"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export to8hwvyy42ww0ly1paygddulj8f5i9o 64181 64179 2019-06-05T16:02:58Z Erutuon 1339 Undo revision 53238557 by [[Special:Contributions/Erutuon|Erutuon]] ([[User talk:Erutuon|talk]]): made m-f be converted into m and f in [[T:el-noun-form]] and regenerated all articles with m-f as gender in that template 64181 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", display = '<abbr title="inanimate">inan</abbr>'} -- Personal codes["pr"] = {type = "personal", display = '<abbr title="personal">pers</abbr>'} codes["np"] = {type = "personal", display = '<abbr title="non-personal">npers</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "perfectivity", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "perfectivity", display = '<abbr title="perfective aspect">pf</abbr>'} -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, " or ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else local types = {} -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error("The gender specification \"" .. spec .. "\" is not valid.") end if codes[code].type ~= "other" and types[codes[code].type] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error("The gender specification \"" .. spec .. "\" contains multiple tags of type \"" .. codes[code].type .. "\".") end parts[key] = codes[code].display types[codes[code].type] = true end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({lang:getCanonicalName() .. " terms with incomplete gender"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export 0a6200jrepbvwy6ghkh9wzgk9g8vw2o 64183 64181 2019-10-24T05:16:03Z WingerBot 1359 Semi-manually rename category refs of the format "LANG terms with incomplete gender" to "Requests for gender in LANG entries" 64183 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", display = '<abbr title="inanimate">inan</abbr>'} -- Personal codes["pr"] = {type = "personal", display = '<abbr title="personal">pers</abbr>'} codes["np"] = {type = "personal", display = '<abbr title="non-personal">npers</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "perfectivity", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "perfectivity", display = '<abbr title="perfective aspect">pf</abbr>'} -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, " or ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else local types = {} -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error("The gender specification \"" .. spec .. "\" is not valid.") end if codes[code].type ~= "other" and types[codes[code].type] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error("The gender specification \"" .. spec .. "\" contains multiple tags of type \"" .. codes[code].type .. "\".") end parts[key] = codes[code].display types[codes[code].type] = true end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({"Requests for gender in " .. lang:getCanonicalName() .. " entries"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export b0brgk3saizxvdnssip1xglthgesw90 64185 64183 2019-11-10T23:14:59Z Erutuon 1339 Changed protection level for "[[Module:gender and number]]": Same protection as other widely used modules ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only administrators] (indefinite)) 64183 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", display = '<abbr title="inanimate">inan</abbr>'} -- Personal codes["pr"] = {type = "personal", display = '<abbr title="personal">pers</abbr>'} codes["np"] = {type = "personal", display = '<abbr title="non-personal">npers</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "perfectivity", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "perfectivity", display = '<abbr title="perfective aspect">pf</abbr>'} -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, " or ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else local types = {} -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error("The gender specification \"" .. spec .. "\" is not valid.") end if codes[code].type ~= "other" and types[codes[code].type] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error("The gender specification \"" .. spec .. "\" contains multiple tags of type \"" .. codes[code].type .. "\".") end parts[key] = codes[code].display types[codes[code].type] = true end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({"Requests for gender in " .. lang:getCanonicalName() .. " entries"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export b0brgk3saizxvdnssip1xglthgesw90 64186 64185 2020-05-22T04:00:30Z Benwing2 1346 animal (for Ukrainian) 64186 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", display = '<abbr title="inanimate">inan</abbr>'} -- Animal (for Ukrainian) codes["anml"] = {type = "animal", display = '<abbr title="inanimate">animal</abbr>'} -- Personal codes["pr"] = {type = "personal", display = '<abbr title="personal">pers</abbr>'} codes["np"] = {type = "personal", display = '<abbr title="non-personal">npers</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "perfectivity", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "perfectivity", display = '<abbr title="perfective aspect">pf</abbr>'} -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, " or ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else local types = {} -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error("The gender specification \"" .. spec .. "\" is not valid.") end if codes[code].type ~= "other" and types[codes[code].type] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error("The gender specification \"" .. spec .. "\" contains multiple tags of type \"" .. codes[code].type .. "\".") end parts[key] = codes[code].display types[codes[code].type] = true end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({"Requests for gender in " .. lang:getCanonicalName() .. " entries"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export pcfvalthk4u9kw651rp9u9880af0t20 64188 64186 2020-05-22T04:00:55Z Benwing2 1346 64188 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", display = '<abbr title="inanimate">inan</abbr>'} -- Animal (for Ukrainian) codes["anml"] = {type = "animal", display = '<abbr title="animal">animal</abbr>'} -- Personal codes["pr"] = {type = "personal", display = '<abbr title="personal">pers</abbr>'} codes["np"] = {type = "personal", display = '<abbr title="non-personal">npers</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "perfectivity", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "perfectivity", display = '<abbr title="perfective aspect">pf</abbr>'} -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, " or ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else local types = {} -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error("The gender specification \"" .. spec .. "\" is not valid.") end if codes[code].type ~= "other" and types[codes[code].type] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error("The gender specification \"" .. spec .. "\" contains multiple tags of type \"" .. codes[code].type .. "\".") end parts[key] = codes[code].display types[codes[code].type] = true end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({"Requests for gender in " .. lang:getCanonicalName() .. " entries"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export 8cb7nr1nlbyjwioph8ug4iq3oelhuw6 64190 64188 2020-05-26T02:22:01Z Benwing2 1346 add virile/nonvirile 64190 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", display = '<abbr title="inanimate">inan</abbr>'} -- Animal (for Ukrainian and Polish) codes["anml"] = {type = "animal", display = '<abbr title="animal">animal</abbr>'} -- Personal codes["pr"] = {type = "personal", display = '<abbr title="personal">pers</abbr>'} codes["np"] = {type = "personal", display = '<abbr title="nonpersonal">npers</abbr>'} -- Virility (for Polish) codes["vr"] = {type = "virility", display = '<abbr title="virile">vir</abbr>'} codes["nv"] = {type = "virility", display = '<abbr title="nonvirile">nvir</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "perfectivity", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "perfectivity", display = '<abbr title="perfective aspect">pf</abbr>'} -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, " or ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else local types = {} -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error("The gender specification \"" .. spec .. "\" is not valid.") end if codes[code].type ~= "other" and types[codes[code].type] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error("The gender specification \"" .. spec .. "\" contains multiple tags of type \"" .. codes[code].type .. "\".") end parts[key] = codes[code].display types[codes[code].type] = true end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({"Requests for gender in " .. lang:getCanonicalName() .. " entries"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export nk77k7bol1tgtoi4rri3bxsmrxodb46 64191 64190 2020-10-15T02:45:33Z Benwing2 1346 add support for generating categories like 'German masculine nouns' and 'Russian imperfective verbs' 64191 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. For each part, we list -- the class it's in (gender, animacy, etc.), the associated category (if any) and the display form. -- In a given gender/number spec, only one part of each class is allowed. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'} -- Animal (for Ukrainian and Polish) codes["anml"] = {type = "animal", cat = "animal POS", display = '<abbr title="animal">animal</abbr>'} -- Personal codes["pr"] = {type = "personal", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'} codes["np"] = {type = "personal", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'} -- Virility (for Polish) codes["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile">vir</abbr>'} codes["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile">nvir</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "perfectivity", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "perfectivity", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'} -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. local combined_codes = {} combined_codes["mf"] = {codes = {"m", "f"}} combined_codes["mfbysense"] = {codes = {"m", "f"}, cat = "masculine and feminine POS by sense"} -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) local text, cats = export.format_genders(specs, lang, pos_for_cat) return text .. require("Module:utilities").format_categories(cats, lang, sort_key) end -- Format one or more gender specifications, returning two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` and `pos_for_cat` are given, gender categories such as "German masculine nouns" or -- "Russian imperfective verbs" are added to the categories. Otherwise, if only `lang` is given, -- the only category that may be returned is "Requests for gender in LANG entries". function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local category_text = "" local all_is_nounclass = nil for _, spec in ipairs(specs) do local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then table.insert(formatted_specs, "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>") else table.insert(formatted_specs, "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>") if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "%-") local all_parts = {{}} local extra_cats = {} for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do local types = {} for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error("The tag \"" .. code .. "\" in the gender specification \"" .. spec .. "\" is not valid.") end if codes[code].type ~= "other" and types[codes[code].type] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error("The gender specification \"" .. spec .. "\" contains multiple tags of type \"" .. codes[code].type .. "\".") end parts[key] = codes[code].display if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end types[codes[code].type] = true end -- Add the processed codes together with non-breaking spaces table.insert(formatted_specs, table.concat(parts, "&nbsp;")) end if #extra_cats > 0 then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? if spec:find("?") then table.insert(categories, "Requests for gender in " .. lang:getCanonicalName() .. " entries") end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with " or " return "<span class=\"gender\">" .. table.concat(formatted_specs, " or ") .. "</span>", categories end end return export d1b4a70vqa60mx4vxo8n69jwtj1aaik 64193 64191 2020-10-15T02:58:11Z Benwing2 1346 Undo revision 60853606 by [[Special:Contributions/Benwing2|Benwing2]] ([[User talk:Benwing2|talk]]); causes memory errors 64193 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", display = '<abbr title="inanimate">inan</abbr>'} -- Animal (for Ukrainian and Polish) codes["anml"] = {type = "animal", display = '<abbr title="animal">animal</abbr>'} -- Personal codes["pr"] = {type = "personal", display = '<abbr title="personal">pers</abbr>'} codes["np"] = {type = "personal", display = '<abbr title="nonpersonal">npers</abbr>'} -- Virility (for Polish) codes["vr"] = {type = "virility", display = '<abbr title="virile">vir</abbr>'} codes["nv"] = {type = "virility", display = '<abbr title="nonvirile">nvir</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "perfectivity", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "perfectivity", display = '<abbr title="perfective aspect">pf</abbr>'} -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Format one or more gender specifications, in the form of a table of specifications. function export.format_list(list, lang) local is_nounclass = nil -- Iterate over each specification and format it for key, spec in ipairs(list) do local nc list[key], nc = export.format_specification(spec, lang) -- Ensure that the specifications are either all noun classes, or none are. if is_nounclass == nil then is_nounclass = nc elseif is_nounclass ~= nc then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(list, "/") .. "</span>" else -- Add the processed codes together with commas return "<span class=\"gender\">" .. table.concat(list, " or ") .. "</span>" end end -- Format the sub-parts of a single gender specification. function export.format_specification(spec, lang) local categories = "" local ret = "" local is_nounclass = false -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then ret = "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>" else ret = "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>" end else local types = {} -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "-") for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error("The gender specification \"" .. spec .. "\" is not valid.") end if codes[code].type ~= "other" and types[codes[code].type] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error("The gender specification \"" .. spec .. "\" contains multiple tags of type \"" .. codes[code].type .. "\".") end parts[key] = codes[code].display types[codes[code].type] = true end -- Add the processed codes together with non-breaking spaces ret = table.concat(parts, "&nbsp;") end -- Do some additional checks if a language was given if lang then -- Is this an incomplete gender? if spec:find("?") then local m_utilities = require("Module:utilities") categories = m_utilities.format_categories({"Requests for gender in " .. lang:getCanonicalName() .. " entries"}, nil) end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end return ret .. categories, is_nounclass end return export nk77k7bol1tgtoi4rri3bxsmrxodb46 64195 64193 2020-10-15T04:14:37Z Benwing2 1346 support 'LANG multiword terms' and gender categories such as 'LANG masculine nouns' (again, this time hopefully no memory errors) 64195 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender specification is a list of one of the elements listed below, separated by hyphens. Examples are: "c", "n", "f-p", "m-an-p" ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. For each part, we list -- the class it's in (gender, animacy, etc.), the associated category (if any) and the display form. -- In a given gender/number spec, only one part of each class is allowed. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'} -- Animal (for Ukrainian and Polish) codes["anml"] = {type = "animal", cat = "animal POS", display = '<abbr title="animal">animal</abbr>'} -- Personal codes["pr"] = {type = "personal", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'} codes["np"] = {type = "personal", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'} -- Virility (for Polish) codes["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile">vir</abbr>'} codes["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile">nvir</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "perfectivity", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "perfectivity", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'} -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. local combined_codes = {} combined_codes["mf"] = {codes = {"m", "f"}} combined_codes["mfbysense"] = {codes = {"m", "f"}, cat = "masculine and feminine POS by sense"} -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities").format_categories(cats, lang, sort_key) end -- Format one or more gender specifications, returning two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` and `pos_for_cat` are given, gender categories such as "German masculine nouns" or -- "Russian imperfective verbs" are added to the categories. Otherwise, if only `lang` is given, -- the only category that may be returned is "Requests for gender in LANG entries". function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local category_text = "" local all_is_nounclass = nil local function do_gender_spec(parts) local types = {} for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error("The tag \"" .. code .. "\" in the gender specification \"" .. spec .. "\" is not valid.") end if codes[code].type ~= "other" and types[codes[code].type] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error("The gender specification \"" .. spec .. "\" contains multiple tags of type \"" .. codes[code].type .. "\".") end parts[key] = codes[code].display if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end types[codes[code].type] = true end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec:find("^[1-9]") or spec:find("^c[^-]") then is_nounclass = true code = spec:gsub("^c", "") if code == "?" then table.insert(formatted_specs, "<abbr class=\"noun-class\" title=\"noun class missing\">?</abbr>") else table.insert(formatted_specs, "<abbr class=\"noun-class\" title=\"noun class " .. code .. "\">" .. code .. "</abbr>") if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec, "%-") local extra_cats = {} local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then table.insert(formatted_specs, do_gender_spec(parts)) else local all_parts = {{}} for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do table.insert(formatted_specs, do_gender_spec(parts)) end end if #extra_cats > 0 then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? if spec:find("?") then table.insert(categories, "Requests for gender in " .. lang:getCanonicalName() .. " entries") end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error("The gender specification \"" .. spec .. "\" is not valid for " .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if is_nounclass then -- Add the processed codes together with slashes return "<span class=\"gender\">class " .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with " or " return "<span class=\"gender\">" .. table.concat(formatted_specs, " or ") .. "</span>", categories end end return export qzk6vpsuyssr1zczhif2u769mh0y469 64196 64195 2020-10-22T04:58:32Z Benwing2 1346 support gender/number qualifiers, add 'nouns with multiple genders/animacies' cats, misc. cleanups 64196 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. For each part, we list -- the class it's in (gender, animacy, etc.), the associated category (if any) and the display form. -- In a given gender/number spec, only one part of each class is allowed. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'} -- Animal (for Ukrainian, Belarusian, Polish) codes["anml"] = {type = "animacy", cat = "animal POS", display = '<abbr title="animal">animal</abbr>'} -- Personal (for Ukrainian, Belarusian, Polish) codes["pr"] = {type = "animacy", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'} -- Nonpersonal not currently used codes["np"] = {type = "animacy", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'} -- Virility (for Polish) codes["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile">vir</abbr>'} codes["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile">nvir</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "aspect", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "aspect", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'} -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. local combined_codes = {} combined_codes["mf"] = {codes = {"m", "f"}} combined_codes["mfbysense"] = {codes = {"m", "f"}, cat = "masculine and feminine POS by sense"} -- Categories when multiple gender/number specs of a given type occur in different local codetype_cats = {} codetype_cats["gender"] = "POS with multiple genders" codetype_cats["animacy"] = "POS with multiple animacies" codetype_cats["aspect"] = "biaspectual POS" -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities").format_categories(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or -- a table of the form {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` -- is a gender/number spec such as "f-p" and `.qualifiers` is a list of qualifiers to display before -- the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` and `pos_for_cat` are given, gender categories such as "German masculine nouns" or -- "Russian imperfective verbs" are added to the categories. Otherwise, if only `lang` is given, -- the only category that may be returned is "Requests for gender in LANG entries". If both are -- omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil local function do_gender_spec(spec, parts) local types = {} for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = codetype_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local extra_cats = {} local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then table.insert(formatted_specs, do_gender_spec(spec, parts)) else local all_parts = {{}} for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do table.insert(formatted_specs, do_gender_spec(spec, parts)) end end if #extra_cats > 0 then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? if spec.spec:find("?") then table.insert(categories, "Requests for gender in " .. lang:getCanonicalName() .. " entries") end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with " or " return '<span class="gender">' .. table.concat(formatted_specs, " or ") .. "</span>", categories end end return export arbk4k2m966jbe730ps0pc1iwipcsf5 64198 64196 2021-05-15T02:44:38Z Fenakhay 904 +cat dualia tantum 64198 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. For each part, we list -- the class it's in (gender, animacy, etc.), the associated category (if any) and the display form. -- In a given gender/number spec, only one part of each class is allowed. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'} -- Animal (for Ukrainian, Belarusian, Polish) codes["anml"] = {type = "animacy", cat = "animal POS", display = '<abbr title="animal">animal</abbr>'} -- Personal (for Ukrainian, Belarusian, Polish) codes["pr"] = {type = "animacy", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'} -- Nonpersonal not currently used codes["np"] = {type = "animacy", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'} -- Virility (for Polish) codes["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile">vir</abbr>'} codes["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile">nvir</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", cat = "dualia tantum", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "aspect", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "aspect", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'} -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. local combined_codes = {} combined_codes["mf"] = {codes = {"m", "f"}} combined_codes["mfbysense"] = {codes = {"m", "f"}, cat = "masculine and feminine POS by sense"} -- Categories when multiple gender/number specs of a given type occur in different local codetype_cats = {} codetype_cats["gender"] = "POS with multiple genders" codetype_cats["animacy"] = "POS with multiple animacies" codetype_cats["aspect"] = "biaspectual POS" -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities").format_categories(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or -- a table of the form {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` -- is a gender/number spec such as "f-p" and `.qualifiers` is a list of qualifiers to display before -- the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` and `pos_for_cat` are given, gender categories such as "German masculine nouns" or -- "Russian imperfective verbs" are added to the categories. Otherwise, if only `lang` is given, -- the only category that may be returned is "Requests for gender in LANG entries". If both are -- omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil local function do_gender_spec(spec, parts) local types = {} for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = codetype_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local extra_cats = {} local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then table.insert(formatted_specs, do_gender_spec(spec, parts)) else local all_parts = {{}} for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do table.insert(formatted_specs, do_gender_spec(spec, parts)) end end if #extra_cats > 0 then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? if spec.spec:find("?") then table.insert(categories, "Requests for gender in " .. lang:getCanonicalName() .. " entries") end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with " or " return '<span class="gender">' .. table.concat(formatted_specs, " or ") .. "</span>", categories end end return export l3zbslssj7sgp04fscqc09ey340lzsd 64200 64198 2022-01-04T15:49:28Z Surjection 380 64200 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local codes = {} -- A list of all possible "parts" that a specification can be made out of. For each part, we list -- the class it's in (gender, animacy, etc.), the associated category (if any) and the display form. -- In a given gender/number spec, only one part of each class is allowed. codes["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'} -- Genders codes["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'} codes["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'} codes["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'} codes["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'} -- Animacy codes["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'} codes["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'} -- Animal (for Ukrainian, Belarusian, Polish) codes["anml"] = {type = "animacy", cat = "animal POS", display = '<abbr title="animal">animal</abbr>'} -- Personal (for Ukrainian, Belarusian, Polish) codes["pr"] = {type = "animacy", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'} -- Nonpersonal not currently used codes["np"] = {type = "animacy", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'} -- Virility (for Polish) codes["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile">vir</abbr>'} codes["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile">nvir</abbr>'} -- Numbers codes["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'} codes["d"] = {type = "number", cat = "dualia tantum", display = '<abbr title="dual number">du</abbr>'} codes["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'} -- Verb qualifiers codes["impf"] = {type = "aspect", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'} codes["pf"] = {type = "aspect", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'} -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. local combined_codes = {} combined_codes["mf"] = {codes = {"m", "f"}} combined_codes["mfbysense"] = {codes = {"m", "f"}, cat = "masculine and feminine POS by sense"} -- Categories when multiple gender/number specs of a given type occur in different local codetype_cats = {} codetype_cats["gender"] = "POS with multiple genders" codetype_cats["animacy"] = "POS with multiple animacies" codetype_cats["aspect"] = "biaspectual POS" -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities/format_categories")(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or -- a table of the form {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` -- is a gender/number spec such as "f-p" and `.qualifiers` is a list of qualifiers to display before -- the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` and `pos_for_cat` are given, gender categories such as "German masculine nouns" or -- "Russian imperfective verbs" are added to the categories. Otherwise, if only `lang` is given, -- the only category that may be returned is "Requests for gender in LANG entries". If both are -- omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil local function do_gender_spec(spec, parts) local types = {} for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = codetype_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local extra_cats = {} local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then table.insert(formatted_specs, do_gender_spec(spec, parts)) else local all_parts = {{}} for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do table.insert(formatted_specs, do_gender_spec(spec, parts)) end end if #extra_cats > 0 then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? if spec.spec:find("?") then table.insert(categories, "Requests for gender in " .. lang:getCanonicalName() .. " entries") end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with " or " return '<span class="gender">' .. table.concat(formatted_specs, " or ") .. "</span>", categories end end return export pg3iz526cmd5e8o3jegh50n4s52bgyu 64201 64200 2022-01-27T11:02:05Z Surjection 380 move data to a data module ([[Module:gender and number/data]]) 64201 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local data = mw.loadData("Module:gender and number/data") -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities/format_categories")(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or -- a table of the form {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` -- is a gender/number spec such as "f-p" and `.qualifiers` is a list of qualifiers to display before -- the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` and `pos_for_cat` are given, gender categories such as "German masculine nouns" or -- "Russian imperfective verbs" are added to the categories. Otherwise, if only `lang` is given, -- the only category that may be returned is "Requests for gender in LANG entries". If both are -- omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.codetype_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local extra_cats = {} local combined_codes = data.combinations local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then table.insert(formatted_specs, do_gender_spec(spec, parts)) else local all_parts = {{}} for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do table.insert(formatted_specs, do_gender_spec(spec, parts)) end end if #extra_cats > 0 then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? if spec.spec:find("?") then table.insert(categories, "Requests for gender in " .. lang:getCanonicalName() .. " entries") end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with " or " return '<span class="gender">' .. table.concat(formatted_specs, " or ") .. "</span>", categories end end return export 2bvh2d0llwwfoz23w74sy361iik6gtb 64203 64201 2022-02-20T22:06:49Z Benwing2 1346 If a qualifier is attached to a spec like 'n-p', add the qualifier only before the first part 64203 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local data = mw.loadData("Module:gender and number/data") -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities/format_categories")(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or -- a table of the form {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` -- is a gender/number spec such as "f-p" and `.qualifiers` is a list of qualifiers to display before -- the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` and `pos_for_cat` are given, gender categories such as "German masculine nouns" or -- "Russian imperfective verbs" are added to the categories. Otherwise, if only `lang` is given, -- the only category that may be returned is "Requests for gender in LANG entries". If both are -- omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.codetype_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local extra_cats = {} local combined_codes = data.combinations local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do table.insert(formatted_specs, do_gender_spec(spec, parts)) end end if #extra_cats > 0 then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? if spec.spec:find("?") then table.insert(categories, "Requests for gender in " .. lang:getCanonicalName() .. " entries") end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with " or " return '<span class="gender">' .. table.concat(formatted_specs, " or ") .. "</span>", categories end end return export pwyr21ezcuokdta3qqe6o94i9k8ykv1 64204 64203 2022-12-05T15:20:04Z Erutuon 1339 try to fix use of global variable, probably a misspelling that happened to coincide with an inaccessible local variable (used [[Module:log globals]]) 64204 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local data = mw.loadData("Module:gender and number/data") -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities/format_categories")(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or -- a table of the form {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` -- is a gender/number spec such as "f-p" and `.qualifiers` is a list of qualifiers to display before -- the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` and `pos_for_cat` are given, gender categories such as "German masculine nouns" or -- "Russian imperfective verbs" are added to the categories. Otherwise, if only `lang` is given, -- the only category that may be returned is "Requests for gender in LANG entries". If both are -- omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.codetype_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local extra_cats = {} local combined_codes = data.combinations local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do table.insert(formatted_specs, do_gender_spec(spec, parts)) end end if #extra_cats > 0 then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? if spec.spec:find("?") then table.insert(categories, "Requests for gender in " .. lang:getCanonicalName() .. " entries") end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with " or " return '<span class="gender">' .. table.concat(formatted_specs, " or ") .. "</span>", categories end end return export kqrs2mvdwqpk8o9igis9f46udiw2nk9 64206 64204 2022-12-26T23:39:51Z Benwing2 1346 check for extra 'display' field for combined gender specs 64206 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local data = mw.loadData("Module:gender and number/data") -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities/format_categories")(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or -- a table of the form {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` -- is a gender/number spec such as "f-p" and `.qualifiers` is a list of qualifiers to display before -- the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` and `pos_for_cat` are given, gender categories such as "German masculine nouns" or -- "Russian imperfective verbs" are added to the categories. Otherwise, if only `lang` is given, -- the only category that may be returned is "Requests for gender in LANG entries". If both are -- omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.codetype_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_cats local extra_displays for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not extra_cats then extra_cats = {} end table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end table.insert(extra_displays, extra_display) end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) end if extra_cats then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if extra_displays then for _, display in ipairs(extra_displays) do table.insert(formatted_specs, display) end end end if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? if spec.spec:find("?") then table.insert(categories, "Requests for gender in " .. lang:getCanonicalName() .. " entries") end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. table.concat(formatted_specs, " ") .. "</span>", categories end end return export 16v22cdreuymk23nl5m5za00tbcryrv 64207 64206 2023-01-31T02:46:19Z Benwing2 1346 don't classify unattested gender into 'Requests for gender' 64207 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local data = mw.loadData("Module:gender and number/data") -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities/format_categories")(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or -- a table of the form {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` -- is a gender/number spec such as "f-p" and `.qualifiers` is a list of qualifiers to display before -- the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` and `pos_for_cat` are given, gender categories such as "German masculine nouns" or -- "Russian imperfective verbs" are added to the categories. Otherwise, if only `lang` is given, -- the only category that may be returned is "Requests for gender in LANG entries". If both are -- omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.codetype_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_cats local extra_displays for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not extra_cats then extra_cats = {} end table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end table.insert(extra_displays, extra_display) end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) end if extra_cats then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if extra_displays then for _, display in ipairs(extra_displays) do table.insert(formatted_specs, display) end end end if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? Make sure to skip ?!, which is unattested rather than unknown. if spec.spec:find("?") and not spec.spec:find("?!") then table.insert(categories, "Requests for gender in " .. lang:getCanonicalName() .. " entries") end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. table.concat(formatted_specs, " ") .. "</span>", categories end end return export rfndq5eoq87fzeh9fyw8xb6xg54rtii 64209 64207 2023-01-31T02:53:54Z Benwing2 1346 clean up code to check for '?' and put into category 64209 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local data = mw.loadData("Module:gender and number/data") -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities/format_categories")(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or -- a table of the form {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` -- is a gender/number spec such as "f-p" and `.qualifiers` is a list of qualifiers to display before -- the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` and `pos_for_cat` are given, gender categories such as "German masculine nouns" or -- "Russian imperfective verbs" are added to the categories. Otherwise, if only `lang` is given, -- the only category that may be returned is "Requests for gender in LANG entries". If both are -- omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.codetype_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_cats local extra_displays for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not extra_cats then extra_cats = {} end table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end table.insert(extra_displays, extra_display) end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) end if extra_cats then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if extra_displays then for _, display in ipairs(extra_displays) do table.insert(formatted_specs, display) end end end if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? for _, code in ipairs(parts) do if code == "?" then table.insert(categories, "Requests for gender in " .. lang:getCanonicalName() .. " entries") end end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. table.concat(formatted_specs, " ") .. "</span>", categories end end return export 7h4vi5xjkssrwyxkd1c399btzou70x7 64210 64209 2023-02-13T14:17:49Z Theknightwho 1347 64210 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local data = mw.loadData("Module:gender and number/data") -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities").format_categories(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or -- a table of the form {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` -- is a gender/number spec such as "f-p" and `.qualifiers` is a list of qualifiers to display before -- the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` and `pos_for_cat` are given, gender categories such as "German masculine nouns" or -- "Russian imperfective verbs" are added to the categories. Otherwise, if only `lang` is given, -- the only category that may be returned is "Requests for gender in LANG entries". If both are -- omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.codetype_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_cats local extra_displays for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not extra_cats then extra_cats = {} end table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end table.insert(extra_displays, extra_display) end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) end if extra_cats then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if extra_displays then for _, display in ipairs(extra_displays) do table.insert(formatted_specs, display) end end end if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? for _, code in ipairs(parts) do if code == "?" then table.insert(categories, "Requests for gender in " .. lang:getCanonicalName() .. " entries") end end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. table.concat(formatted_specs, " ") .. "</span>", categories end end return export 7hnbdeartynqjes5sq2yn7q65q8ahcu 64212 64210 2023-03-20T02:42:42Z Benwing2 1346 rename 'codetype_cats' -> 'multicode_cats' 64212 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local data = mw.loadData("Module:gender and number/data") -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities").format_categories(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or -- a table of the form {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` -- is a gender/number spec such as "f-p" and `.qualifiers` is a list of qualifiers to display before -- the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` and `pos_for_cat` are given, gender categories such as "German masculine nouns" or -- "Russian imperfective verbs" are added to the categories. Otherwise, if only `lang` is given, -- the only category that may be returned is "Requests for gender in LANG entries". If both are -- omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then --require("Module:debug").track("gender and number/multiple") --require("Module:debug").track("gender and number/multiple/" .. spec) error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.multicode_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_cats local extra_displays for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not extra_cats then extra_cats = {} end table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end table.insert(extra_displays, extra_display) end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) end if extra_cats then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if extra_displays then for _, display in ipairs(extra_displays) do table.insert(formatted_specs, display) end end end if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? for _, code in ipairs(parts) do if code == "?" then table.insert(categories, "Requests for gender in " .. lang:getCanonicalName() .. " entries") end end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. table.concat(formatted_specs, " ") .. "</span>", categories end end return export ebarwacxargysyx78iyglw8h43u7sko 64214 64212 2023-03-20T02:52:22Z Benwing2 1346 track if format_list() called; change gender-request category to 'Requests for aspect in ...' if pos_for_cat == "verbs"; update comments 64214 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local data = mw.loadData("Module:gender and number/data") -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) require("Module:debug/track")("gender and number/old-format-list") local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities").format_categories(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or a table of the form -- {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` is a gender/number spec such as "f-p" -- and `.qualifiers` is a list of qualifiers to display before the formatted gender/number spec. `.spec` must be present -- but `.qualifiers` may be omitted. -- -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` (which should be a language object) and `pos_for_cat` (which should be a plural part of speech) are given, -- gender categories such as "German masculine nouns" or "Russian imperfective verbs" are added to the categories. -- Otherwise, if only `lang` is given, the only category that may be returned is "Requests for gender in LANG entries". -- If both are omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.multicode_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_cats local extra_displays for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not extra_cats then extra_cats = {} end table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end table.insert(extra_displays, extra_display) end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) end if extra_cats then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if extra_displays then for _, display in ipairs(extra_displays) do table.insert(formatted_specs, display) end end end if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? for _, code in ipairs(parts) do if code == "?" then table.insert(categories, "Requests for " .. (pos_for_cat == "verbs" and "aspect" or "gender") .. " in " .. lang:getCanonicalName() .. " entries") end end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. table.concat(formatted_specs, " ") .. "</span>", categories end end return export gsscalek04pwbth81xlawslcxa1a3yk 64215 64214 2023-03-20T05:13:09Z Benwing2 1346 fix 'Requests for gender in LANG entries' handling 64215 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local data = mw.loadData("Module:gender and number/data") -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) require("Module:debug/track")("gender and number/old-format-list") local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities").format_categories(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or a table of the form -- {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` is a gender/number spec such as "f-p" -- and `.qualifiers` is a list of qualifiers to display before the formatted gender/number spec. `.spec` must be present -- but `.qualifiers` may be omitted. -- -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` (which should be a language object) and `pos_for_cat` (which should be a plural part of speech) are given, -- gender categories such as "German masculine nouns" or "Russian imperfective verbs" are added to the categories. -- Otherwise, if only `lang` is given, the only category that may be returned is "Requests for gender in LANG entries". -- If both are omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.multicode_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? for _, code in ipairs(parts) do if code == "?" then table.insert(categories, "Requests for " .. (pos_for_cat == "verbs" and "aspect" or "gender") .. " in " .. lang:getCanonicalName() .. " entries") end end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_cats local extra_displays for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not extra_cats then extra_cats = {} end table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end table.insert(extra_displays, extra_display) end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) end if extra_cats then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if extra_displays then for _, display in ipairs(extra_displays) do table.insert(formatted_specs, display) end end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. table.concat(formatted_specs, " ") .. "</span>", categories end end return export m49fnm506vliwy2ago0izm7vx4ikuvy 64217 64215 2023-07-29T23:52:01Z Theknightwho 1347 64217 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local data = mw.loadData("Module:gender and number/data") -- Version of format_list that can be invoked from a template. function export.show_list(frame) local args = frame.args local lang = args["lang"]; if lang == "" then lang = nil end local list = {} local i = 1 while args[i] and args[i] ~= "" do table.insert(list, args[i]) i = i + 1 end return export.format_list(list, lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) require("Module:debug/track")("gender and number/old-format-list") local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities").format_categories(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or a table of the form -- {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` is a gender/number spec such as "f-p" -- and `.qualifiers` is a list of qualifiers to display before the formatted gender/number spec. `.spec` must be present -- but `.qualifiers` may be omitted. -- -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` (which should be a language object) and `pos_for_cat` (which should be a plural part of speech) are given, -- gender categories such as "German masculine nouns" or "Russian imperfective verbs" are added to the categories. -- Otherwise, if only `lang` is given, the only category that may be returned is "Requests for gender in LANG entries". -- If both are omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.multicode_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true local code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? for _, code in ipairs(parts) do if code == "?" then table.insert(categories, "Requests for " .. (pos_for_cat == "verbs" and "aspect" or "gender") .. " in " .. lang:getCanonicalName() .. " entries") end end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_cats local extra_displays for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not extra_cats then extra_cats = {} end table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end table.insert(extra_displays, extra_display) end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) end if extra_cats then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if extra_displays then for _, display in ipairs(extra_displays) do table.insert(formatted_specs, display) end end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. table.concat(formatted_specs, " ") .. "</span>", categories end end return export 1c7ufcuw2cf6xg0ttyzj0c0jlzyhlvr 64218 64217 2023-11-27T23:38:22Z Benwing2 1346 allow etym languages 64218 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local data = mw.loadData("Module:gender and number/data") -- Version of format_list that can be invoked from a template. function export.show_list(frame) local iargs = frame.args local params = { [1] = {list = true}, ["lang"] = {}, } local args = require("Module:parameters").process(iargs, params) local lang = require("Module:languages").getByCode(args.lang, "lang", "allow etym") return export.format_list(args[1], lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) require("Module:debug/track")("gender and number/old-format-list") local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities").format_categories(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or a table of the form -- {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` is a gender/number spec such as "f-p" -- and `.qualifiers` is a list of qualifiers to display before the formatted gender/number spec. `.spec` must be present -- but `.qualifiers` may be omitted. -- -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` (which should be a language object) and `pos_for_cat` (which should be a plural part of speech) are given, -- gender categories such as "German masculine nouns" or "Russian imperfective verbs" are added to the categories. -- Otherwise, if only `lang` is given, the only category that may be returned is "Requests for gender in LANG entries". -- If both are omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil -- Currently we only use the language for categories, so fetch the non-etymological parent. Change this if we -- use the language for any other purpose. lang = lang:getNonEtymological() local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.multicode_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true local code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? for _, code in ipairs(parts) do if code == "?" then table.insert(categories, "Requests for " .. (pos_for_cat == "verbs" and "aspect" or "gender") .. " in " .. lang:getCanonicalName() .. " entries") end end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_cats local extra_displays for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not extra_cats then extra_cats = {} end table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end table.insert(extra_displays, extra_display) end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) end if extra_cats then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if extra_displays then for _, display in ipairs(extra_displays) do table.insert(formatted_specs, display) end end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. table.concat(formatted_specs, " ") .. "</span>", categories end end return export gmjfwwu1g9yegifkcukf9hehj3mhskr 64220 64218 2023-11-27T23:38:45Z Benwing2 1346 bug fix 64220 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local data = mw.loadData("Module:gender and number/data") -- Version of format_list that can be invoked from a template. function export.show_list(frame) local iargs = frame.args local params = { [1] = {list = true}, ["lang"] = {}, } local args = require("Module:parameters").process(iargs, params) local lang = args.lang and require("Module:languages").getByCode(args.lang, "lang", "allow etym") or nil return export.format_list(args[1], lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) require("Module:debug/track")("gender and number/old-format-list") local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities").format_categories(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or a table of the form -- {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` is a gender/number spec such as "f-p" -- and `.qualifiers` is a list of qualifiers to display before the formatted gender/number spec. `.spec` must be present -- but `.qualifiers` may be omitted. -- -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` (which should be a language object) and `pos_for_cat` (which should be a plural part of speech) are given, -- gender categories such as "German masculine nouns" or "Russian imperfective verbs" are added to the categories. -- Otherwise, if only `lang` is given, the only category that may be returned is "Requests for gender in LANG entries". -- If both are omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil -- Currently we only use the language for categories, so fetch the non-etymological parent. Change this if we -- use the language for any other purpose. lang = lang:getNonEtymological() local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.multicode_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true local code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? for _, code in ipairs(parts) do if code == "?" then table.insert(categories, "Requests for " .. (pos_for_cat == "verbs" and "aspect" or "gender") .. " in " .. lang:getCanonicalName() .. " entries") end end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_cats local extra_displays for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not extra_cats then extra_cats = {} end table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end table.insert(extra_displays, extra_display) end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) end if extra_cats then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if extra_displays then for _, display in ipairs(extra_displays) do table.insert(formatted_specs, display) end end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. table.concat(formatted_specs, " ") .. "</span>", categories end end return export lbu40fuhv9rjv33i52hmu6wjz6lyo50 64222 64220 2023-11-27T23:39:08Z Benwing2 1346 bug fix 64222 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local data = mw.loadData("Module:gender and number/data") -- Version of format_list that can be invoked from a template. function export.show_list(frame) local iargs = frame.args local params = { [1] = {list = true}, ["lang"] = {}, } local args = require("Module:parameters").process(iargs, params) local lang = args.lang and require("Module:languages").getByCode(args.lang, "lang", "allow etym") or nil return export.format_list(args[1], lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) require("Module:debug/track")("gender and number/old-format-list") local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities").format_categories(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or a table of the form -- {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` is a gender/number spec such as "f-p" -- and `.qualifiers` is a list of qualifiers to display before the formatted gender/number spec. `.spec` must be present -- but `.qualifiers` may be omitted. -- -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` (which should be a language object) and `pos_for_cat` (which should be a plural part of speech) are given, -- gender categories such as "German masculine nouns" or "Russian imperfective verbs" are added to the categories. -- Otherwise, if only `lang` is given, the only category that may be returned is "Requests for gender in LANG entries". -- If both are omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil -- Currently we only use the language for categories, so fetch the non-etymological parent. Change this if we -- use the language for any other purpose. lang = lang and lang:getNonEtymological() or nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.multicode_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true local code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? for _, code in ipairs(parts) do if code == "?" then table.insert(categories, "Requests for " .. (pos_for_cat == "verbs" and "aspect" or "gender") .. " in " .. lang:getCanonicalName() .. " entries") end end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_cats local extra_displays for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not extra_cats then extra_cats = {} end table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end table.insert(extra_displays, extra_display) end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) end if extra_cats then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if extra_displays then for _, display in ipairs(extra_displays) do table.insert(formatted_specs, display) end end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. table.concat(formatted_specs, " ") .. "</span>", categories end end return export nknfbuwlixx51isxbfo611ktxj420ml 64223 64222 2024-04-05T07:30:12Z WingerBot 1359 getNonEtymological{,Code,Name} -> getFull{,Code,Name} per rename of underlying functions to support renaming of 'etymology-only language' to 'language variety'; similar changes in comments (manually assisted) 64223 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local data = mw.loadData("Module:gender and number/data") -- Version of format_list that can be invoked from a template. function export.show_list(frame) local iargs = frame.args local params = { [1] = {list = true}, ["lang"] = {}, } local args = require("Module:parameters").process(iargs, params) local lang = args.lang and require("Module:languages").getByCode(args.lang, "lang", "allow etym") or nil return export.format_list(args[1], lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) require("Module:debug/track")("gender and number/old-format-list") local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities").format_categories(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or a table of the form -- {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` is a gender/number spec such as "f-p" -- and `.qualifiers` is a list of qualifiers to display before the formatted gender/number spec. `.spec` must be present -- but `.qualifiers` may be omitted. -- -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` (which should be a language object) and `pos_for_cat` (which should be a plural part of speech) are given, -- gender categories such as "German masculine nouns" or "Russian imperfective verbs" are added to the categories. -- Otherwise, if only `lang` is given, the only category that may be returned is "Requests for gender in LANG entries". -- If both are omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil -- Currently we only use the language for categories, so fetch the full parent. Change this if we -- use the language for any other purpose. lang = lang and lang:getFull() or nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.multicode_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true local code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? for _, code in ipairs(parts) do if code == "?" then table.insert(categories, "Requests for " .. (pos_for_cat == "verbs" and "aspect" or "gender") .. " in " .. lang:getCanonicalName() .. " entries") end end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_cats local extra_displays for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not extra_cats then extra_cats = {} end table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end table.insert(extra_displays, extra_display) end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) end if extra_cats then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if extra_displays then for _, display in ipairs(extra_displays) do table.insert(formatted_specs, display) end end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. table.concat(formatted_specs, " ") .. "</span>", categories end end return export j76j7yvqgp9v6pmdyqphgbxbqmjui0f 64225 64223 2024-04-12T04:52:41Z This, that and the other 894 link to this page in the error message when invalid tag used 64225 Scribunto text/plain --[=[ This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: "n" (neuter gender), "f-p" (feminine plural), "m-an-p" (masculine animate plural), "pf" (perfective aspect). Each gender/number element has the following properties: 1. A code, as used in the spec, e.g. "f" for feminine, "p" for plural". 2. A type, e.g. "gender", "number" or "animacy". Each element in a given spec must be of a different type. 3. A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code "an" has display code "anim" and tooltip gloss "animate". 4. A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec "m-an-p" is placed into the categories "LANG masculine nouns", "LANG animate nouns" and "LANG pluralia tantum". ]=]-- local export = {} local data = mw.loadData("Module:gender and number/data") -- Version of format_list that can be invoked from a template. function export.show_list(frame) local iargs = frame.args local params = { [1] = {list = true}, ["lang"] = {}, } local args = require("Module:parameters").process(iargs, params) local lang = args.lang and require("Module:languages").getByCode(args.lang, "lang", "allow etym") or nil return export.format_list(args[1], lang) end -- Older entry point; equivalent to format_genders() except that it formats the -- categories and returns them appended to the formatted gender text rather than -- returning the formatted text and categories separately. function export.format_list(specs, lang, pos_for_cat, sort_key) require("Module:debug/track")("gender and number/old-format-list") local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities").format_categories(cats, lang, sort_key) end -- Format one or more gender/number specifications. Each spec is either a string, e.g. "f-p", or a table of the form -- {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}} where `.spec` is a gender/number spec such as "f-p" -- and `.qualifiers` is a list of qualifiers to display before the formatted gender/number spec. `.spec` must be present -- but `.qualifiers` may be omitted. -- -- The function returns two values: -- (a) the formatted text; -- (b) a list of the categories to add. -- If `lang` (which should be a language object) and `pos_for_cat` (which should be a plural part of speech) are given, -- gender categories such as "German masculine nouns" or "Russian imperfective verbs" are added to the categories. -- Otherwise, if only `lang` is given, the only category that may be returned is "Requests for gender in LANG entries". -- If both are omitted, the returned list is empty. function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil -- Currently we only use the language for categories, so fetch the full parent. Change this if we -- use the language for any other purpose. lang = lang and lang:getFull() or nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid. See [[Module:gender and number]] for a list of valid tags.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.multicode_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true local code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? for _, code in ipairs(parts) do if code == "?" then table.insert(categories, "Requests for " .. (pos_for_cat == "verbs" and "aspect" or "gender") .. " in " .. lang:getCanonicalName() .. " entries") end end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_cats local extra_displays for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not extra_cats then extra_cats = {} end table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end table.insert(extra_displays, extra_display) end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) end if extra_cats then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if extra_displays then for _, display in ipairs(extra_displays) do table.insert(formatted_specs, display) end end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. table.concat(formatted_specs, " ") .. "</span>", categories end end return export cinve9b67gmaqdowar5vtg7j2aou96d 64226 64225 2024-06-27T22:24:42Z Benwing2 1346 clean up, convert internal comments into doc comments 64226 Scribunto text/plain local export = {} local data = mw.loadData("Module:gender and number/data") --[==[ intro: This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: {"n"} (neuter gender), {"f-p"} (feminine plural), {"m-an-p"} (masculine animate plural), {"pf"} (perfective aspect). Each gender/number element has the following properties: # A code, as used in the spec, e.g. {"f"} for feminine, {"p"} for plural. # A type, e.g. `gender`, `number` or `animacy`. Each element in a given spec must be of a different type. # A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code {"an"} has display code {"anim"} and tooltip gloss ''animate''. # A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec {"m-an-p"} is placed into the categories `<var>lang</var> masculine nouns`, `<var>lang</var> animate nouns` and `<var>lang</var> pluralia tantum`. ]==] --[==[ Version of format_list that can be invoked from a template. ]==] function export.show_list(frame) local params = { [1] = {list = true}, ["lang"] = {type = "language"}, } local iargs = require("Module:parameters").process(frame.args, params) return export.format_list(iargs[1], iargs.lang) end --[==[ Older entry point; equivalent to format_genders() except that it formats the categories and returns them appended to the formatted gender text rather than returning the formatted text and categories separately. ]==] function export.format_list(specs, lang, pos_for_cat, sort_key) require("Module:debug/track")("gender and number/old-format-list") local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities").format_categories(cats, lang, sort_key) end --[==[ Format one or more gender/number specifications. Each spec is either a string, e.g. {"f-p"}, or a table of the form { {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}}} where `.spec` is a gender/number spec such as {"f-p"} and `.qualifiers` is a list of qualifiers to display before the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. The function returns two values: # the formatted text; # a list of the categories to add. If `lang` (which should be a language object) and `pos_for_cat` (which should be a plural part of speech) are given, gender categories such as `German masculine nouns` or `Russian imperfective verbs` are added to the categories. Otherwise, if only `lang` is given, the only category that may be returned is `Requests for gender in <var>lang</var> entries`. If both are omitted, the returned list is empty. ]==] function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil -- Currently we only use the language for categories, so fetch the full parent. Change this if we -- use the language for any other purpose. lang = lang and lang:getFull() or nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid. See [[Module:gender and number]] for a list of valid tags.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. codes[code].display else parts[key] = codes[code].display end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.multicode_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true local code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations if lang then -- Do some additional gender checks if a language was given -- Is this an incomplete gender? for _, code in ipairs(parts) do if code == "?" then table.insert(categories, "Requests for " .. (pos_for_cat == "verbs" and "aspect" or "gender") .. " in " .. lang:getCanonicalName() .. " entries") end end -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_cats local extra_displays for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not extra_cats then extra_cats = {} end table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end table.insert(extra_displays, extra_display) end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) end if extra_cats then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if extra_displays then for _, display in ipairs(extra_displays) do table.insert(formatted_specs, display) end end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. table.concat(formatted_specs, " ") .. "</span>", categories end end return export tgqq3bvui53o57zfckxnh71io0kknnq 64228 64226 2024-10-06T07:54:39Z Benwing2 1346 support req=true for request specs like `an?`; auto-add <abbr>...</abbr> tooltip if not given in `display` 64228 Scribunto text/plain local export = {} local data = mw.loadData("Module:gender and number/data") --[==[ intro: This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: {"n"} (neuter gender), {"f-p"} (feminine plural), {"m-an-p"} (masculine animate plural), {"pf"} (perfective aspect). Each gender/number element has the following properties: # A code, as used in the spec, e.g. {"f"} for feminine, {"p"} for plural. # A type, e.g. `gender`, `number` or `animacy`. Each element in a given spec must be of a different type. # A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code {"an"} has display code {"anim"} and tooltip gloss ''animate''. # A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec {"m-an-p"} is placed into the categories `<var>lang</var> masculine nouns`, `<var>lang</var> animate nouns` and `<var>lang</var> pluralia tantum`. ]==] --[==[ Version of format_list that can be invoked from a template. ]==] function export.show_list(frame) local params = { [1] = {list = true}, ["lang"] = {type = "language"}, } local iargs = require("Module:parameters").process(frame.args, params) return export.format_list(iargs[1], iargs.lang) end --[==[ Older entry point; equivalent to format_genders() except that it formats the categories and returns them appended to the formatted gender text rather than returning the formatted text and categories separately. ]==] function export.format_list(specs, lang, pos_for_cat, sort_key) require("Module:debug/track")("gender and number/old-format-list") local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities").format_categories(cats, lang, sort_key) end local function autoadd_abbr(display) if not display then error("Internal error: '.display' for gender/number code is missing") end if display:find("<abbr") then return display else return ('<abbr title="%s">%s</abbr>'):format(display, display) end end --[==[ Format one or more gender/number specifications. Each spec is either a string, e.g. {"f-p"}, or a table of the form { {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}}} where `.spec` is a gender/number spec such as {"f-p"} and `.qualifiers` is a list of qualifiers to display before the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. The function returns two values: # the formatted text; # a list of the categories to add. If `lang` (which should be a language object) and `pos_for_cat` (which should be a plural part of speech) are given, gender categories such as `German masculine nouns` or `Russian imperfective verbs` are added to the categories, and request categories such as `Requests for gender in <var>lang</var> entries` or `Requests for animacy in <var>lang</var> entries` may also be added. Otherwise, if only `lang` is given, only request categories may be returned. If both are omitted, the returned list is empty. ]==] function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil -- Currently we only use the language for categories, so fetch the full parent. Change this if we -- use the language for any other purpose. lang = lang and lang:getFull() or nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid. See [[Module:gender and number]] for a list of valid tags.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. autoadd_abbr(codes[code].display) else parts[key] = autoadd_abbr(codes[code].display) end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.multicode_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end if lang and codes[code].req then local type_for_req = typ if code == "?" then -- Keep in mind `pos_for_cat` may be nil here. type_for_req = pos_for_cat == "verbs" and "aspect" or "gender" end table.insert(categories, "Requests for " .. type_for_req .. " in " .. lang:getCanonicalName() .. " entries") end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true local code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations if lang then -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_cats local extra_displays for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not extra_cats then extra_cats = {} end table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end table.insert(extra_displays, autoadd_abbr(extra_display)) end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) end if extra_cats then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if extra_displays then for _, display in ipairs(extra_displays) do table.insert(formatted_specs, display) end end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. table.concat(formatted_specs, " ") .. "</span>", categories end end return export mrw892u7olit3a8caqb4xr0ldftbfm7 64230 64228 2024-11-26T10:53:12Z J3133 1340 See talk page. 64230 Scribunto text/plain local export = {} local data = mw.loadData("Module:gender and number/data") --[==[ intro: This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: {"n"} (neuter gender), {"f-p"} (feminine plural), {"m-an-p"} (masculine animate plural), {"pf"} (perfective aspect). Each gender/number element has the following properties: # A code, as used in the spec, e.g. {"f"} for feminine, {"p"} for plural. # A type, e.g. `gender`, `number` or `animacy`. Each element in a given spec must be of a different type. # A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code {"an"} has display code {"anim"} and tooltip gloss ''animate''. # A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec {"m-an-p"} is placed into the categories `<var>lang</var> masculine nouns`, `<var>lang</var> animate nouns` and `<var>lang</var> pluralia tantum`. ]==] --[==[ Version of format_list that can be invoked from a template. ]==] function export.show_list(frame) local params = { [1] = {list = true}, ["lang"] = {type = "language"}, } local iargs = require("Module:parameters").process(frame.args, params) return export.format_list(iargs[1], iargs.lang) end --[==[ Older entry point; equivalent to format_genders() except that it formats the categories and returns them appended to the formatted gender text rather than returning the formatted text and categories separately. ]==] function export.format_list(specs, lang, pos_for_cat, sort_key) require("Module:debug/track")("gender and number/old-format-list") local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities").format_categories(cats, lang, sort_key) end local function autoadd_abbr(display) if not display then error("Internal error: '.display' for gender/number code is missing") end if display:find("<abbr") then return display else return ('%s'):format(display, display) end end --[==[ Format one or more gender/number specifications. Each spec is either a string, e.g. {"f-p"}, or a table of the form { {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}}} where `.spec` is a gender/number spec such as {"f-p"} and `.qualifiers` is a list of qualifiers to display before the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. The function returns two values: # the formatted text; # a list of the categories to add. If `lang` (which should be a language object) and `pos_for_cat` (which should be a plural part of speech) are given, gender categories such as `German masculine nouns` or `Russian imperfective verbs` are added to the categories, and request categories such as `Requests for gender in <var>lang</var> entries` or `Requests for animacy in <var>lang</var> entries` may also be added. Otherwise, if only `lang` is given, only request categories may be returned. If both are omitted, the returned list is empty. ]==] function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil -- Currently we only use the language for categories, so fetch the full parent. Change this if we -- use the language for any other purpose. lang = lang and lang:getFull() or nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid. See [[Module:gender and number]] for a list of valid tags.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. autoadd_abbr(codes[code].display) else parts[key] = autoadd_abbr(codes[code].display) end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.multicode_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end if lang and codes[code].req then local type_for_req = typ if code == "?" then -- Keep in mind `pos_for_cat` may be nil here. type_for_req = pos_for_cat == "verbs" and "aspect" or "gender" end table.insert(categories, "Requests for " .. type_for_req .. " in " .. lang:getCanonicalName() .. " entries") end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true local code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations if lang then -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_cats local extra_displays for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not extra_cats then extra_cats = {} end table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end table.insert(extra_displays, autoadd_abbr(extra_display)) end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) end if extra_cats then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if extra_displays then for _, display in ipairs(extra_displays) do table.insert(formatted_specs, display) end end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. table.concat(formatted_specs, " ") .. "</span>", categories end end return export ipmywqdfzuwqljnmzpog7t5k1dh6lzu 64231 64230 2024-12-11T05:25:10Z Benwing2 1346 [[User:MuDavid]] if the noun class is specified as 'c?', add to 'Requests for noun class in LANG entries' 64231 Scribunto text/plain local export = {} local data = mw.loadData("Module:gender and number/data") --[==[ intro: This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: {"n"} (neuter gender), {"f-p"} (feminine plural), {"m-an-p"} (masculine animate plural), {"pf"} (perfective aspect). Each gender/number element has the following properties: # A code, as used in the spec, e.g. {"f"} for feminine, {"p"} for plural. # A type, e.g. `gender`, `number` or `animacy`. Each element in a given spec must be of a different type. # A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code {"an"} has display code {"anim"} and tooltip gloss ''animate''. # A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec {"m-an-p"} is placed into the categories `<var>lang</var> masculine nouns`, `<var>lang</var> animate nouns` and `<var>lang</var> pluralia tantum`. ]==] --[==[ Version of format_list that can be invoked from a template. ]==] function export.show_list(frame) local params = { [1] = {list = true}, ["lang"] = {type = "language"}, } local iargs = require("Module:parameters").process(frame.args, params) return export.format_list(iargs[1], iargs.lang) end --[==[ Older entry point; equivalent to format_genders() except that it formats the categories and returns them appended to the formatted gender text rather than returning the formatted text and categories separately. ]==] function export.format_list(specs, lang, pos_for_cat, sort_key) require("Module:debug/track")("gender and number/old-format-list") local text, cats = export.format_genders(specs, lang, pos_for_cat) if #cats == 0 then return text end return text .. require("Module:utilities").format_categories(cats, lang, sort_key) end local function autoadd_abbr(display) if not display then error("Internal error: '.display' for gender/number code is missing") end if display:find("<abbr") then return display else return ('%s'):format(display, display) end end --[==[ Format one or more gender/number specifications. Each spec is either a string, e.g. {"f-p"}, or a table of the form { {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}}} where `.spec` is a gender/number spec such as {"f-p"} and `.qualifiers` is a list of qualifiers to display before the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. The function returns two values: # the formatted text; # a list of the categories to add. If `lang` (which should be a language object) and `pos_for_cat` (which should be a plural part of speech) are given, gender categories such as `German masculine nouns` or `Russian imperfective verbs` are added to the categories, and request categories such as `Requests for gender in <var>lang</var> entries` or `Requests for animacy in <var>lang</var> entries` may also be added. Otherwise, if only `lang` is given, only request categories may be returned. If both are omitted, the returned list is empty. ]==] function export.format_genders(specs, lang, pos_for_cat) local formatted_specs = {} local categories = {} local seen_types = {} local category_text = "" local all_is_nounclass = nil -- Currently we only use the language for categories, so fetch the full parent. Change this if we -- use the language for any other purpose. lang = lang and lang:getFull() or nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid. See [[Module:gender and number]] for a list of valid tags.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. autoadd_abbr(codes[code].display) else parts[key] = autoadd_abbr(codes[code].display) end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end if seen_types[typ] and seen_types[typ] ~= code then cat = data.multicode_cats[typ] if cat then table.insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end if lang and codes[code].req then local type_for_req = typ if code == "?" then -- Keep in mind `pos_for_cat` may be nil here. type_for_req = pos_for_cat == "verbs" and "aspect" or "gender" end table.insert(categories, "Requests for " .. type_for_req .. " in " .. lang:getCanonicalName() .. " entries") end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return table.concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true local code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' if lang then table.insert(categories, "Requests for noun class in " .. lang:getCanonicalName() .. " entries") end else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then table.insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = require("Module:qualifier").format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end table.insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations if lang then -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. table.concat(valid_string, ", ")) -- end --end end local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_cats local extra_displays for i, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) table.insert(new_combined_parts, one_code) table.insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not extra_cats then extra_cats = {} end table.insert(extra_cats, lang:getCanonicalName() .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end table.insert(extra_displays, autoadd_abbr(extra_display)) end else for _, one_parts in ipairs(all_parts) do table.insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if #formatted_specs > 0 then table.insert(formatted_specs, "or") end table.insert(formatted_specs, do_gender_spec(spec, parts)) end if extra_cats then for _, cat in ipairs(extra_cats) do table.insert(categories, cat) end end if extra_displays then for _, display in ipairs(extra_displays) do table.insert(formatted_specs, display) end end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. table.concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. table.concat(formatted_specs, " ") .. "</span>", categories end end return export qyiwfr4749v2jwjevdtc80nmnf3oeet 64233 64231 2025-02-24T22:04:48Z Theknightwho 1347 Don't return a category table from format_genders if there aren't any categories + optimisations. 64233 Scribunto text/plain local export = {} local debug_track_module = "Module:debug/track" local qualifier_module = "Module:qualifier" local parameters_module = "Module:parameters" local utilities_module = "Module:utilities" local concat = table.concat local insert = table.insert local data = mw.loadData("Module:gender and number/data") local function debug_track(...) debug_track = require(debug_track_module) return debug_track(...) end local function format_categories(...) format_categories = require(utilities_module).format_categories return format_categories(...) end local function format_qualifier(...) format_qualifier = require(qualifier_module).format_qualifier return format_qualifier(...) end local function process_params(...) process_params = require(parameters_module).process return process_params(...) end --[==[ intro: This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: {"n"} (neuter gender), {"f-p"} (feminine plural), {"m-an-p"} (masculine animate plural), {"pf"} (perfective aspect). Each gender/number element has the following properties: # A code, as used in the spec, e.g. {"f"} for feminine, {"p"} for plural. # A type, e.g. `gender`, `number` or `animacy`. Each element in a given spec must be of a different type. # A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code {"an"} has display code {"anim"} and tooltip gloss ''animate''. # A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec {"m-an-p"} is placed into the categories `<var>lang</var> masculine nouns`, `<var>lang</var> animate nouns` and `<var>lang</var> pluralia tantum`. ]==] --[==[ Version of format_list that can be invoked from a template. ]==] function export.show_list(frame) local params = { [1] = {list = true}, ["lang"] = {type = "language"}, } local iargs = process_params(frame.args, params) return export.format_list(iargs[1], iargs.lang) end --[==[ Older entry point; equivalent to format_genders() except that it formats the categories and returns them appended to the formatted gender text rather than returning the formatted text and categories separately. ]==] function export.format_list(specs, lang, pos_for_cat, sort_key) debug_track("gender and number/old-format-list") local text, cats = export.format_genders(specs, lang, pos_for_cat) if not cats then return text end return text .. format_categories(cats, lang, sort_key) end local function autoadd_abbr(display) if not display then error("Internal error: '.display' for gender/number code is missing") end if display:find("<abbr") then return display else return ('%s'):format(display, display) end end --[==[ Format one or more gender/number specifications. Each spec is either a string, e.g. {"f-p"}, or a table of the form { {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}}} where `.spec` is a gender/number spec such as {"f-p"} and `.qualifiers` is a list of qualifiers to display before the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. The function returns two values: # the formatted text; # a list of the categories to add. If `lang` (which should be a language object) and `pos_for_cat` (which should be a plural part of speech) are given, gender categories such as `German masculine nouns` or `Russian imperfective verbs` are added to the categories, and request categories such as `Requests for gender in <var>lang</var> entries` or `Requests for animacy in <var>lang</var> entries` may also be added. Otherwise, if only `lang` is given, only request categories may be returned. If both are omitted, the returned list is empty. ]==] function export.format_genders(specs, lang, pos_for_cat) local formatted_specs, categories, seen_types = {} local all_is_nounclass = nil -- Currently we only use the language for categories, so fetch the full parent. Change this if we -- use the language for any other purpose. lang = lang and lang:getFull() or nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid. See [[Module:gender and number]] for a list of valid tags.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true if key == 1 and spec.qualifiers and #spec.qualifiers > 0 then parts[key] = format_qualifier(spec.qualifiers) .. " " .. autoadd_abbr(codes[code].display) else parts[key] = autoadd_abbr(codes[code].display) end -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then if not categories then categories = {} end insert(categories, lang:getCanonicalName() .. " " .. cat) end if not seen_types then seen_types = {} elseif seen_types[typ] and seen_types[typ] ~= code then cat = data.multicode_cats[typ] if cat then if not categories then categories = {} end insert(categories, lang:getCanonicalName() .. " " .. cat) end end seen_types[typ] = code end if lang and codes[code].req then local type_for_req = typ if code == "?" then -- Keep in mind `pos_for_cat` may be nil here. type_for_req = pos_for_cat == "verbs" and "aspect" or "gender" end if not categories then categories = {} end insert(categories, "Requests for " .. type_for_req .. " in " .. lang:getCanonicalName() .. " entries") end end -- Add the processed codes together with non-breaking spaces if #parts == 1 then return parts[1] end return concat(parts, "&nbsp;") end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true local code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' if lang then if not categories then categories = {} end insert(categories, "Requests for noun class in " .. lang:getCanonicalName() .. " entries") end else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then if not categories then categories = {} end insert(categories, lang:getCanonicalName() .. " class " .. code .. " POS") end end local text_with_qual if spec.qualifiers and #spec.qualifiers > 0 then text_with_qual = format_qualifier(spec.qualifiers) .. " " .. text else text_with_qual = text end insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations if lang then -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. concat(valid_string, ", ")) -- end --end end local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if #formatted_specs > 0 then insert(formatted_specs, "or") end insert(formatted_specs, do_gender_spec(spec, parts)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_displays for _, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) insert(new_combined_parts, one_code) insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not categories then categories = {} end insert(categories, lang:getCanonicalName() .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end insert(extra_displays, autoadd_abbr(extra_display)) end else for _, one_parts in ipairs(all_parts) do insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if #formatted_specs > 0 then insert(formatted_specs, "or") end insert(formatted_specs, do_gender_spec(spec, parts)) end if extra_displays then for _, display in ipairs(extra_displays) do insert(formatted_specs, display) end end end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if categories and lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. concat(formatted_specs, " ") .. "</span>", categories end end return export 7qmcjwnjtia4n95058z8t96suf19lfp 64234 64233 2025-03-11T01:23:43Z Benwing2 1346 support fields q=/qq=/l=/ll=/refs on gender/number specs 64234 Scribunto text/plain local export = {} local debug_track_module = "Module:debug/track" local pron_qualifier_module = "Module:pron qualifier" local parameters_module = "Module:parameters" local utilities_module = "Module:utilities" local concat = table.concat local insert = table.insert local data = mw.loadData("Module:gender and number/data") local function debug_track(...) debug_track = require(debug_track_module) return debug_track(...) end local function format_categories(...) format_categories = require(utilities_module).format_categories return format_categories(...) end local function format_pron_qualifiers(...) format_pron_qualifiers = require(pron_qualifier_module).format_qualifiers return format_pron_qualifiers(...) end local function process_params(...) process_params = require(parameters_module).process return process_params(...) end --[==[ intro: This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: {"n"} (neuter gender), {"f-p"} (feminine plural), {"m-an-p"} (masculine animate plural), {"pf"} (perfective aspect). Each gender/number element has the following properties: # A code, as used in the spec, e.g. {"f"} for feminine, {"p"} for plural. # A type, e.g. `gender`, `number` or `animacy`. Each element in a given spec must be of a different type. # A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code {"an"} has display code {"anim"} and tooltip gloss ''animate''. # A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec {"m-an-p"} is placed into the categories `<var>lang</var> masculine nouns`, `<var>lang</var> animate nouns` and `<var>lang</var> pluralia tantum`. ]==] --[==[ Version of format_list that can be invoked from a template. ]==] function export.show_list(frame) local params = { [1] = {list = true}, ["lang"] = {type = "language"}, } local iargs = process_params(frame.args, params) return export.format_list(iargs[1], iargs.lang) end --[==[ Older entry point; equivalent to format_genders() except that it formats the categories and returns them appended to the formatted gender text rather than returning the formatted text and categories separately. ]==] function export.format_list(specs, lang, pos_for_cat, sort_key) debug_track("gender and number/old-format-list") local text, cats = export.format_genders(specs, lang, pos_for_cat) if not cats then return text end return text .. format_categories(cats, lang, sort_key) end local function autoadd_abbr(display) if not display then error("Internal error: '.display' for gender/number code is missing") end if display:find("<abbr") then return display else return ('%s'):format(display, display) end end -- Add qualifiers, labels and references to a formatted gender/number spec. `spec` is the object describing the -- gender/number spec, which should optionally contain: -- * left qualifiers in `q` or (for compatibility) `qualifiers`, an array of strings; -- * right qualifiers in `qq`, an array of strings; -- * left labels in `l`, an array of strings; -- * right labels in `ll`, an array of strings; -- * references in `refs`, an array either of strings (formatted reference text) or objects containing fields `text` -- (formatted reference text) and optionally `name` and/or `group`; -- `formatted` is the formatted version of the term itself, and `lang` is the optional language object passed into -- format_genders(). local function add_qualifiers_and_refs(formatted, spec, lang) local function field_non_empty(field) local list = spec[field] if not list then return nil end if type(list) ~= "table" then error(("Internal error: Wrong type for `spec.%s`=%s, should be \"table\""):format( field, mw.dumpObject(list))) end return list[1] end if field_non_empty("q") or field_non_empty("qq") or field_non_empty("l") or field_non_empty("ll") or field_non_empty("qualifiers") or field_non_empty("refs") then formatted = format_pron_qualifiers { lang = lang, text = formatted, q = spec.q, qq = spec.qq, qualifiers = spec.qualifiers, l = spec.l, ll = spec.ll, refs = spec.refs, } end return formatted end --[==[ Format one or more gender/number specifications. Each spec is either a string, e.g. {"f-p"}, or a table of the form { {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}}} where `.spec` is a gender/number spec such as {"f-p"} and `.qualifiers` is a list of qualifiers to display before the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. The function returns two values: # the formatted text; # a list of the categories to add. If `lang` (which should be a language object) and `pos_for_cat` (which should be a plural part of speech) are given, gender categories such as `German masculine nouns` or `Russian imperfective verbs` are added to the categories, and request categories such as `Requests for gender in <var>lang</var> entries` or `Requests for animacy in <var>lang</var> entries` may also be added. Otherwise, if only `lang` is given, only request categories may be returned. If both are omitted, the returned list is empty. ]==] function export.format_genders(specs, lang, pos_for_cat) local formatted_specs, categories, seen_types = {} local all_is_nounclass = nil local full_langname = lang and lang:getFullName() or nil local function do_gender_spec(spec, parts) local types = {} local codes = data.codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid. See [[Module:gender and number]] for a list of valid tags.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true parts[key] = autoadd_abbr(codes[code].display) -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then if not categories then categories = {} end insert(categories, full_langname .. " " .. cat) end if not seen_types then seen_types = {} elseif seen_types[typ] and seen_types[typ] ~= code then cat = data.multicode_cats[typ] if cat then if not categories then categories = {} end insert(categories, full_langname .. " " .. cat) end end seen_types[typ] = code end if lang and codes[code].req then local type_for_req = typ if code == "?" then -- Keep in mind `pos_for_cat` may be nil here. type_for_req = pos_for_cat == "verbs" and "aspect" or "gender" end if not categories then categories = {} end insert(categories, "Requests for " .. type_for_req .. " in " .. full_langname .. " entries") end end -- Add the processed codes together with non-breaking spaces if not parts[2] and parts[1] then return parts[1] else return concat(parts, "&nbsp;") end end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local is_nounclass -- If the specification starts with cX, then it is a noun class specification. if spec.spec:find("^[1-9]") or spec.spec:find("^c[^-]") then is_nounclass = true local code = spec.spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' if lang then if not categories then categories = {} end insert(categories, "Requests for noun class in " .. full_langname .. " entries") end else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then if not categories then categories = {} end insert(categories, full_langname .. " class " .. code .. " POS") end end local text_with_qual = add_qualifiers_and_refs(text, spec, lang) insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = mw.text.split(spec.spec, "%-") local combined_codes = data.combinations if lang then -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. concat(valid_string, ", ")) -- end --end end local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if formatted_specs[1] then insert(formatted_specs, "or") end insert(formatted_specs, add_qualifiers_and_refs(do_gender_spec(spec, parts), spec, lang)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_displays local this_formatted_specs = {} for _, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = mw.clone(one_parts) insert(new_combined_parts, one_code) insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not categories then categories = {} end insert(categories, full_langname .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end insert(extra_displays, autoadd_abbr(extra_display)) end else for _, one_parts in ipairs(all_parts) do insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if this_formatted_specs[1] then insert(this_formatted_specs, "or") end insert(this_formatted_specs, do_gender_spec(spec, parts)) end if extra_displays then for _, display in ipairs(extra_displays) do insert(this_formatted_specs, display) end end insert(formatted_specs, add_qualifiers_and_refs( concat(this_formatted_specs, " "), spec, lang)) end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if categories and lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. concat(formatted_specs, " ") .. "</span>", categories end end return export rzd9e4n70beocpvdfrnl3ecahmiccic 64236 64234 2025-03-21T02:32:54Z Theknightwho 1347 Optimisations. 64236 Scribunto text/plain local export = {} local debug_track_module = "Module:debug/track" local load_module = "Module:load" local pron_qualifier_module = "Module:pron qualifier" local parameters_module = "Module:parameters" local string_utilities_module = "Module:string utilities" local table_module = "Module:table" local utilities_module = "Module:utilities" local concat = table.concat local insert = table.insert local function debug_track(...) debug_track = require(debug_track_module) return debug_track(...) end local function deep_copy(...) deep_copy = require(table_module).deepCopy return deep_copy(...) end local function format_categories(...) format_categories = require(utilities_module).format_categories return format_categories(...) end local function format_pron_qualifiers(...) format_pron_qualifiers = require(pron_qualifier_module).format_qualifiers return format_pron_qualifiers(...) end local function load_data(...) load_data = require(load_module).load_data return load_data(...) end local function process_params(...) process_params = require(parameters_module).process return process_params(...) end local function split(...) split = require(string_utilities_module).split return split(...) end local gender_and_number_data local function get_gender_and_number_data() gender_and_number_data, get_gender_and_number_data = load_data("Module:gender and number/data"), nil return gender_and_number_data end --[==[ intro: This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: {"n"} (neuter gender), {"f-p"} (feminine plural), {"m-an-p"} (masculine animate plural), {"pf"} (perfective aspect). Each gender/number element has the following properties: # A code, as used in the spec, e.g. {"f"} for feminine, {"p"} for plural. # A type, e.g. `gender`, `number` or `animacy`. Each element in a given spec must be of a different type. # A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code {"an"} has display code {"anim"} and tooltip gloss ''animate''. # A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec {"m-an-p"} is placed into the categories `<var>lang</var> masculine nouns`, `<var>lang</var> animate nouns` and `<var>lang</var> pluralia tantum`. ]==] --[==[ Version of format_list that can be invoked from a template. ]==] function export.show_list(frame) local params = { [1] = {list = true}, ["lang"] = {type = "language"}, } local iargs = process_params(frame.args, params) return export.format_list(iargs[1], iargs.lang) end --[==[ Older entry point; equivalent to format_genders() except that it formats the categories and returns them appended to the formatted gender text rather than returning the formatted text and categories separately. ]==] function export.format_list(specs, lang, pos_for_cat, sort_key) debug_track("gender and number/old-format-list") local text, cats = export.format_genders(specs, lang, pos_for_cat) if not cats then return text end return text .. format_categories(cats, lang, sort_key) end local function autoadd_abbr(display) if not display then error("Internal error: '.display' for gender/number code is missing") end if display:find("<abbr", nil, true) then return display end return ('%s'):format(display, display) end -- Add qualifiers, labels and references to a formatted gender/number spec. `spec` is the object describing the -- gender/number spec, which should optionally contain: -- * left qualifiers in `q` or (for compatibility) `qualifiers`, an array of strings; -- * right qualifiers in `qq`, an array of strings; -- * left labels in `l`, an array of strings; -- * right labels in `ll`, an array of strings; -- * references in `refs`, an array either of strings (formatted reference text) or objects containing fields `text` -- (formatted reference text) and optionally `name` and/or `group`; -- `formatted` is the formatted version of the term itself, and `lang` is the optional language object passed into -- format_genders(). local function add_qualifiers_and_refs(formatted, spec, lang) local function field_non_empty(field) local list = spec[field] if not list then return nil end if type(list) ~= "table" then error(("Internal error: Wrong type for `spec.%s`=%s, should be \"table\""):format( field, mw.dumpObject(list))) end return list[1] end if field_non_empty("q") or field_non_empty("qq") or field_non_empty("l") or field_non_empty("ll") or field_non_empty("qualifiers") or field_non_empty("refs") then formatted = format_pron_qualifiers{ lang = lang, text = formatted, q = spec.q, qq = spec.qq, qualifiers = spec.qualifiers, l = spec.l, ll = spec.ll, refs = spec.refs, } end return formatted end --[==[ Format one or more gender/number specifications. Each spec is either a string, e.g. {"f-p"}, or a table of the form { {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}}} where `.spec` is a gender/number spec such as {"f-p"} and `.qualifiers` is a list of qualifiers to display before the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. The function returns two values: # the formatted text; # a list of the categories to add. If `lang` (which should be a language object) and `pos_for_cat` (which should be a plural part of speech) are given, gender categories such as `German masculine nouns` or `Russian imperfective verbs` are added to the categories, and request categories such as `Requests for gender in <var>lang</var> entries` or `Requests for animacy in <var>lang</var> entries` may also be added. Otherwise, if only `lang` is given, only request categories may be returned. If both are omitted, the returned list is empty. ]==] function export.format_genders(specs, lang, pos_for_cat) local formatted_specs, categories, seen_types = {} local all_is_nounclass = nil local full_langname = lang and lang:getFullName() or nil local function do_gender_spec(spec, parts) local types = {} local codes = (gender_and_number_data or get_gender_and_number_data()).codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid. See [[Module:gender and number]] for a list of valid tags.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true parts[key] = autoadd_abbr(codes[code].display) -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then if not categories then categories = {} end insert(categories, full_langname .. " " .. cat) end if not seen_types then seen_types = {} elseif seen_types[typ] and seen_types[typ] ~= code then cat = (gender_and_number_data or get_gender_and_number_data()).multicode_cats[typ] if cat then if not categories then categories = {} end insert(categories, full_langname .. " " .. cat) end end seen_types[typ] = code end if lang and codes[code].req then local type_for_req = typ if code == "?" then -- Keep in mind `pos_for_cat` may be nil here. type_for_req = pos_for_cat == "verbs" and "aspect" or "gender" end if not categories then categories = {} end insert(categories, "Requests for " .. type_for_req .. " in " .. full_langname .. " entries") end end -- Add the processed codes together with non-breaking spaces if not parts[2] and parts[1] then return parts[1] else return concat(parts, "&nbsp;") end end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local spec_spec, is_nounclass = spec.spec -- If the specification starts with cX, then it is a noun class specification. if spec_spec:match("^%d") or spec_spec:match("^c[^-]") then is_nounclass = true local code = spec_spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' if lang then if not categories then categories = {} end insert(categories, "Requests for noun class in " .. full_langname .. " entries") end else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then if not categories then categories = {} end insert(categories, full_langname .. " class " .. code .. " POS") end end local text_with_qual = add_qualifiers_and_refs(text, spec, lang) insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = split(spec.spec, "-", true, true) local combined_codes = (gender_and_number_data or get_gender_and_number_data()).combinations if lang then -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. concat(valid_string, ", ")) -- end --end end local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if formatted_specs[1] then insert(formatted_specs, "or") end insert(formatted_specs, add_qualifiers_and_refs(do_gender_spec(spec, parts), spec, lang)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_displays local this_formatted_specs = {} for _, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = deep_copy(one_parts) insert(new_combined_parts, one_code) insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not categories then categories = {} end insert(categories, full_langname .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end insert(extra_displays, autoadd_abbr(extra_display)) end else for _, one_parts in ipairs(all_parts) do insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if this_formatted_specs[1] then insert(this_formatted_specs, "or") end insert(this_formatted_specs, do_gender_spec(spec, parts)) end if extra_displays then for _, display in ipairs(extra_displays) do insert(this_formatted_specs, display) end end insert(formatted_specs, add_qualifiers_and_refs( concat(this_formatted_specs, " "), spec, lang)) end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if categories and lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. concat(formatted_specs, " ") .. "</span>", categories end end return export 2m0recg6bd63ggydwpzsqejrsntefgo 64238 64236 2026-06-27T15:56:34Z King ChristLike 964 86 revisions imported from [[:en:Module:gender_and_number]] 64236 Scribunto text/plain local export = {} local debug_track_module = "Module:debug/track" local load_module = "Module:load" local pron_qualifier_module = "Module:pron qualifier" local parameters_module = "Module:parameters" local string_utilities_module = "Module:string utilities" local table_module = "Module:table" local utilities_module = "Module:utilities" local concat = table.concat local insert = table.insert local function debug_track(...) debug_track = require(debug_track_module) return debug_track(...) end local function deep_copy(...) deep_copy = require(table_module).deepCopy return deep_copy(...) end local function format_categories(...) format_categories = require(utilities_module).format_categories return format_categories(...) end local function format_pron_qualifiers(...) format_pron_qualifiers = require(pron_qualifier_module).format_qualifiers return format_pron_qualifiers(...) end local function load_data(...) load_data = require(load_module).load_data return load_data(...) end local function process_params(...) process_params = require(parameters_module).process return process_params(...) end local function split(...) split = require(string_utilities_module).split return split(...) end local gender_and_number_data local function get_gender_and_number_data() gender_and_number_data, get_gender_and_number_data = load_data("Module:gender and number/data"), nil return gender_and_number_data end --[==[ intro: This module creates standardised displays for gender and number. It converts a gender specification into Wiki/HTML format. A gender/number specification consists of one or more gender/number elements, separated by hyphens. Examples are: {"n"} (neuter gender), {"f-p"} (feminine plural), {"m-an-p"} (masculine animate plural), {"pf"} (perfective aspect). Each gender/number element has the following properties: # A code, as used in the spec, e.g. {"f"} for feminine, {"p"} for plural. # A type, e.g. `gender`, `number` or `animacy`. Each element in a given spec must be of a different type. # A display form, which in turn consists of a display code and a tooltip gloss. The display code may not be the same as the spec code, e.g. the spec code {"an"} has display code {"anim"} and tooltip gloss ''animate''. # A category into which lemmas of the right part of speech are placed if they have a gender/number spec containing the given element. For example, a noun with gender/number spec {"m-an-p"} is placed into the categories `<var>lang</var> masculine nouns`, `<var>lang</var> animate nouns` and `<var>lang</var> pluralia tantum`. ]==] --[==[ Version of format_list that can be invoked from a template. ]==] function export.show_list(frame) local params = { [1] = {list = true}, ["lang"] = {type = "language"}, } local iargs = process_params(frame.args, params) return export.format_list(iargs[1], iargs.lang) end --[==[ Older entry point; equivalent to format_genders() except that it formats the categories and returns them appended to the formatted gender text rather than returning the formatted text and categories separately. ]==] function export.format_list(specs, lang, pos_for_cat, sort_key) debug_track("gender and number/old-format-list") local text, cats = export.format_genders(specs, lang, pos_for_cat) if not cats then return text end return text .. format_categories(cats, lang, sort_key) end local function autoadd_abbr(display) if not display then error("Internal error: '.display' for gender/number code is missing") end if display:find("<abbr", nil, true) then return display end return ('%s'):format(display, display) end -- Add qualifiers, labels and references to a formatted gender/number spec. `spec` is the object describing the -- gender/number spec, which should optionally contain: -- * left qualifiers in `q` or (for compatibility) `qualifiers`, an array of strings; -- * right qualifiers in `qq`, an array of strings; -- * left labels in `l`, an array of strings; -- * right labels in `ll`, an array of strings; -- * references in `refs`, an array either of strings (formatted reference text) or objects containing fields `text` -- (formatted reference text) and optionally `name` and/or `group`; -- `formatted` is the formatted version of the term itself, and `lang` is the optional language object passed into -- format_genders(). local function add_qualifiers_and_refs(formatted, spec, lang) local function field_non_empty(field) local list = spec[field] if not list then return nil end if type(list) ~= "table" then error(("Internal error: Wrong type for `spec.%s`=%s, should be \"table\""):format( field, mw.dumpObject(list))) end return list[1] end if field_non_empty("q") or field_non_empty("qq") or field_non_empty("l") or field_non_empty("ll") or field_non_empty("qualifiers") or field_non_empty("refs") then formatted = format_pron_qualifiers{ lang = lang, text = formatted, q = spec.q, qq = spec.qq, qualifiers = spec.qualifiers, l = spec.l, ll = spec.ll, refs = spec.refs, } end return formatted end --[==[ Format one or more gender/number specifications. Each spec is either a string, e.g. {"f-p"}, or a table of the form { {spec = "SPEC", qualifiers = {"QUALIFIER", "QUALIFIER", ...}}} where `.spec` is a gender/number spec such as {"f-p"} and `.qualifiers` is a list of qualifiers to display before the formatted gender/number spec. `.spec` must be present but `.qualifiers` may be omitted. The function returns two values: # the formatted text; # a list of the categories to add. If `lang` (which should be a language object) and `pos_for_cat` (which should be a plural part of speech) are given, gender categories such as `German masculine nouns` or `Russian imperfective verbs` are added to the categories, and request categories such as `Requests for gender in <var>lang</var> entries` or `Requests for animacy in <var>lang</var> entries` may also be added. Otherwise, if only `lang` is given, only request categories may be returned. If both are omitted, the returned list is empty. ]==] function export.format_genders(specs, lang, pos_for_cat) local formatted_specs, categories, seen_types = {} local all_is_nounclass = nil local full_langname = lang and lang:getFullName() or nil local function do_gender_spec(spec, parts) local types = {} local codes = (gender_and_number_data or get_gender_and_number_data()).codes for key, code in ipairs(parts) do -- Is this code valid? if not codes[code] then error('The tag "' .. code .. '" in the gender specification "' .. spec.spec .. '" is not valid. See [[Module:gender and number]] for a list of valid tags.') end -- Check for multiple genders/numbers/animacies in a single spec. local typ = codes[code].type if typ ~= "other" and types[typ] then error('The gender specification "' .. spec.spec .. '" contains multiple tags of type "' .. typ .. '".') end types[typ] = true parts[key] = autoadd_abbr(codes[code].display) -- Generate categories if called for. if lang and pos_for_cat then local cat = codes[code].cat if cat then if not categories then categories = {} end insert(categories, full_langname .. " " .. cat) end if not seen_types then seen_types = {} elseif seen_types[typ] and seen_types[typ] ~= code then cat = (gender_and_number_data or get_gender_and_number_data()).multicode_cats[typ] if cat then if not categories then categories = {} end insert(categories, full_langname .. " " .. cat) end end seen_types[typ] = code end if lang and codes[code].req then local type_for_req = typ if code == "?" then -- Keep in mind `pos_for_cat` may be nil here. type_for_req = pos_for_cat == "verbs" and "aspect" or "gender" end if not categories then categories = {} end insert(categories, "Requests for " .. type_for_req .. " in " .. full_langname .. " entries") end end -- Add the processed codes together with non-breaking spaces if not parts[2] and parts[1] then return parts[1] else return concat(parts, "&nbsp;") end end for _, spec in ipairs(specs) do if type(spec) ~= "table" then spec = {spec = spec} end local spec_spec, is_nounclass = spec.spec -- If the specification starts with cX, then it is a noun class specification. if spec_spec:match("^%d") or spec_spec:match("^c[^-]") then is_nounclass = true local code = spec_spec:gsub("^c", "") local text if code == "?" then text = '<abbr class="noun-class" title="noun class missing">?</abbr>' if lang then if not categories then categories = {} end insert(categories, "Requests for noun class in " .. full_langname .. " entries") end else text = '<abbr class="noun-class" title="noun class ' .. code .. '">' .. code .. "</abbr>" if lang and pos_for_cat then if not categories then categories = {} end insert(categories, full_langname .. " class " .. code .. " POS") end end local text_with_qual = add_qualifiers_and_refs(text, spec, lang) insert(formatted_specs, text_with_qual) else -- Split the parts and iterate over each part, converting it into its display form local parts = split(spec.spec, "-", true, true) local combined_codes = (gender_and_number_data or get_gender_and_number_data()).combinations if lang then -- Check if the specification is valid --elseif langinfo.genders then -- local valid_genders = {} -- for _, g in ipairs(langinfo.genders) do valid_genders[g] = true end -- -- if not valid_genders[spec.spec] then -- local valid_string = {} -- for i, g in ipairs(langinfo.genders) do valid_string[i] = g end -- error('The gender specification "' .. spec.spec .. '" is not valid for ' .. langinfo.names[1] .. ". Valid are: " .. concat(valid_string, ", ")) -- end --end end local has_combined = false for _, code in ipairs(parts) do if combined_codes[code] then has_combined = true break end end if not has_combined then if formatted_specs[1] then insert(formatted_specs, "or") end insert(formatted_specs, add_qualifiers_and_refs(do_gender_spec(spec, parts), spec, lang)) else -- This logic is to handle combined gender specs like 'mf' and 'mfbysense'. local all_parts = {{}} local extra_displays local this_formatted_specs = {} for _, code in ipairs(parts) do if combined_codes[code] then local new_all_parts = {} for _, one_parts in ipairs(all_parts) do for _, one_code in ipairs(combined_codes[code].codes) do local new_combined_parts = deep_copy(one_parts) insert(new_combined_parts, one_code) insert(new_all_parts, new_combined_parts) end end all_parts = new_all_parts if lang and pos_for_cat then local extra_cat = combined_codes[code].cat if extra_cat then if not categories then categories = {} end insert(categories, full_langname .. " " .. extra_cat) end end local extra_display = combined_codes[code].display if extra_display then if not extra_displays then extra_displays = {} end insert(extra_displays, autoadd_abbr(extra_display)) end else for _, one_parts in ipairs(all_parts) do insert(one_parts, code) end end end for _, parts in ipairs(all_parts) do if this_formatted_specs[1] then insert(this_formatted_specs, "or") end insert(this_formatted_specs, do_gender_spec(spec, parts)) end if extra_displays then for _, display in ipairs(extra_displays) do insert(this_formatted_specs, display) end end insert(formatted_specs, add_qualifiers_and_refs( concat(this_formatted_specs, " "), spec, lang)) end is_nounclass = false end -- Ensure that the specifications are either all noun classes, or none are. if all_is_nounclass == nil then all_is_nounclass = is_nounclass elseif all_is_nounclass ~= is_nounclass then error("Noun classes and genders cannot be mixed. Please use either one or the other.") end end if categories and lang and pos_for_cat then for i, cat in ipairs(categories) do categories[i] = cat:gsub("POS", pos_for_cat) end end if all_is_nounclass then -- Add the processed codes together with slashes return '<span class="gender">class ' .. concat(formatted_specs, "/") .. "</span>", categories else -- Add the processed codes together with spaces return '<span class="gender">' .. concat(formatted_specs, " ") .. "</span>", categories end end return export 2m0recg6bd63ggydwpzsqejrsntefgo Module:g 828 8288 64274 2013-06-29T16:59:41Z Rua 1351 Created page with "{{#invoke:gender and number|show_list|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}}}<!-- --><noinclude>{{documentation}}</noinclude>" 64274 wikitext text/x-wiki {{#invoke:gender and number|show_list|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> rg6pfjwl4kkmry9r70c0oqjm4mxjvf2 64276 64274 2013-06-29T17:02:00Z Rua 1351 64276 wikitext text/x-wiki {{#invoke:gender and number|show_list|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}}}<!-- -->{{#switch:{{{2|}}}|m|m-s|m-d|m-p|f|f-s|f-d|f-p|n|n-s|n-d|n-p|c|c-s|c-d|c-p=|#default=[[Category:Separate gender+number]]}}<!-- --><noinclude>{{documentation}}</noinclude> ekdiw469fb7g86iml9gf1arzztlj94t 64277 64276 2013-07-03T13:26:20Z Rua 1351 CodeCat moved page [[User:CodeCat/g]] to [[Template:g]] without leaving a redirect 64276 wikitext text/x-wiki {{#invoke:gender and number|show_list|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}}}<!-- -->{{#switch:{{{2|}}}|m|m-s|m-d|m-p|f|f-s|f-d|f-p|n|n-s|n-d|n-p|c|c-s|c-d|c-p=|#default=[[Category:Separate gender+number]]}}<!-- --><noinclude>{{documentation}}</noinclude> ekdiw469fb7g86iml9gf1arzztlj94t 64279 64277 2013-07-04T13:30:26Z Rua 1351 64279 wikitext text/x-wiki {{#invoke:gender and number|show_list|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}}}<!-- -->{{#switch:{{{2|}}}|m|m-s|m-d|m-p|f|f-s|f-d|f-p|n|n-s|n-d|n-p|c|c-s|c-d|c-p|=|#default=[[Category:Separate gender+number]]}}<!-- --><noinclude>{{documentation}}</noinclude> t5inkebi95a7rnq5uqvwgts78ejy41n 64280 64279 2013-10-19T15:10:49Z Rua 1351 64280 wikitext text/x-wiki {{#invoke:gender and number|show_list|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> rg6pfjwl4kkmry9r70c0oqjm4mxjvf2 64282 64280 2016-02-17T17:33:44Z 66.176.22.255 64282 wikitext text/x-wiki {{#invoke:gender and number|show_list|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> Lilian Perez is Awesome!!! ogg64k9cnblced0t2f8t68y4p7ppra3 64329 64282 2016-02-17T17:37:07Z Robin van der Vliet 2009 Reverted vandalism in a template that is used everywhere! 64329 wikitext text/x-wiki {{#invoke:gender and number|show_list|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> rg6pfjwl4kkmry9r70c0oqjm4mxjvf2 64331 64329 2018-11-27T19:40:05Z Surjection 380 Protected "[[Template:g]]": Highly visible template/module ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only template editors and administrators] (indefinite)) 64329 wikitext text/x-wiki {{#invoke:gender and number|show_list|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> rg6pfjwl4kkmry9r70c0oqjm4mxjvf2 64334 64331 2026-04-15T00:45:31Z AgingCheez 2010 64334 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 64337 64334 2026-04-15T00:59:19Z ActuallyNeverHappened02 2011 Undid revision [[Special:Diff/90141283|90141283]] by [[Special:Contributions/AgingCheez|AgingCheez]] ([[User talk:AgingCheez|talk]]) 64337 wikitext text/x-wiki {{#invoke:gender and number|show_list|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> rg6pfjwl4kkmry9r70c0oqjm4mxjvf2 64339 64337 2026-04-15T03:35:28Z Chuck Entz 1231 Changed protection settings for "[[Template:g]]" ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite)) 64337 wikitext text/x-wiki {{#invoke:gender and number|show_list|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> rg6pfjwl4kkmry9r70c0oqjm4mxjvf2 64342 64339 2026-06-27T15:56:38Z King ChristLike 964 11 revisions imported from [[:en:Template:g]] 64337 wikitext text/x-wiki {{#invoke:gender and number|show_list|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> rg6pfjwl4kkmry9r70c0oqjm4mxjvf2 Module:gender and number/data 828 8289 64355 2022-01-27T10:57:30Z Surjection 380 split from [[Module:gender and number]] 64355 Scribunto text/plain local data = {} -- A list of all possible "parts" that a specification can be made out of. For each part, we list -- the class it's in (gender, animacy, etc.), the associated category (if any) and the display form. -- In a given gender/number spec, only one part of each class is allowed. data.codes = { ["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'}, -- Genders ["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'}, ["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'}, ["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'}, ["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'}, -- Animacy ["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'}, ["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'}, -- Animal (for Ukrainian, Belarusian, Polish) ["anml"] = {type = "animacy", cat = "animal POS", display = '<abbr title="animal">animal</abbr>'}, -- Personal (for Ukrainian, Belarusian, Polish) ["pr"] = {type = "animacy", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'}, -- Nonpersonal not currently used ["np"] = {type = "animacy", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'}, -- Virility (for Polish) ["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile">vir</abbr>'}, ["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile">nvir</abbr>'}, -- Numbers ["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'}, ["d"] = {type = "number", cat = "dualia tantum", display = '<abbr title="dual number">du</abbr>'}, ["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'}, -- Verb qualifiers ["impf"] = {type = "aspect", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'}, ["pf"] = {type = "aspect", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'}, } -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. data.combinations = { ["mf"] = {codes = {"m", "f"}}, ["mfbysense"] = {codes = {"m", "f"}, cat = "masculine and feminine POS by sense"} } -- Categories when multiple gender/number specs of a given type occur in different data.codetype_cats = { ["gender"] = "POS with multiple genders", ["animacy"] = "POS with multiple animacies", ["aspect"] = "biaspectual POS" } return data a7mzemrolkqjypmy6sc6lvuafoay8ow 64356 64355 2022-01-27T10:57:49Z Surjection 380 Protected "[[Module:gender and number/data]]" ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite)) 64355 Scribunto text/plain local data = {} -- A list of all possible "parts" that a specification can be made out of. For each part, we list -- the class it's in (gender, animacy, etc.), the associated category (if any) and the display form. -- In a given gender/number spec, only one part of each class is allowed. data.codes = { ["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'}, -- Genders ["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'}, ["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'}, ["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'}, ["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'}, -- Animacy ["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'}, ["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'}, -- Animal (for Ukrainian, Belarusian, Polish) ["anml"] = {type = "animacy", cat = "animal POS", display = '<abbr title="animal">animal</abbr>'}, -- Personal (for Ukrainian, Belarusian, Polish) ["pr"] = {type = "animacy", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'}, -- Nonpersonal not currently used ["np"] = {type = "animacy", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'}, -- Virility (for Polish) ["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile">vir</abbr>'}, ["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile">nvir</abbr>'}, -- Numbers ["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'}, ["d"] = {type = "number", cat = "dualia tantum", display = '<abbr title="dual number">du</abbr>'}, ["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'}, -- Verb qualifiers ["impf"] = {type = "aspect", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'}, ["pf"] = {type = "aspect", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'}, } -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. data.combinations = { ["mf"] = {codes = {"m", "f"}}, ["mfbysense"] = {codes = {"m", "f"}, cat = "masculine and feminine POS by sense"} } -- Categories when multiple gender/number specs of a given type occur in different data.codetype_cats = { ["gender"] = "POS with multiple genders", ["animacy"] = "POS with multiple animacies", ["aspect"] = "biaspectual POS" } return data a7mzemrolkqjypmy6sc6lvuafoay8ow 64357 64356 2022-12-26T23:39:18Z Benwing2 1346 add extra display for mfbysense 64357 Scribunto text/plain local data = {} -- A list of all possible "parts" that a specification can be made out of. For each part, we list -- the class it's in (gender, animacy, etc.), the associated category (if any) and the display form. -- In a given gender/number spec, only one part of each class is allowed. data.codes = { ["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'}, -- Genders ["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'}, ["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'}, ["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'}, ["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'}, -- Animacy ["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'}, ["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'}, -- Animal (for Ukrainian, Belarusian, Polish) ["anml"] = {type = "animacy", cat = "animal POS", display = '<abbr title="animal">animal</abbr>'}, -- Personal (for Ukrainian, Belarusian, Polish) ["pr"] = {type = "animacy", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'}, -- Nonpersonal not currently used ["np"] = {type = "animacy", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'}, -- Virility (for Polish) ["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile">vir</abbr>'}, ["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile">nvir</abbr>'}, -- Numbers ["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'}, ["d"] = {type = "number", cat = "dualia tantum", display = '<abbr title="dual number">du</abbr>'}, ["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'}, -- Verb qualifiers ["impf"] = {type = "aspect", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'}, ["pf"] = {type = "aspect", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'}, } -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. data.combinations = { ["mf"] = {codes = {"m", "f"}}, ["mfbysense"] = {codes = {"m", "f"}, cat = "masculine and feminine POS by sense", display = '<abbr title="according to the gender of the referent">by sense</abbr>'} } -- Categories when multiple gender/number specs of a given type occur in different data.codetype_cats = { ["gender"] = "POS with multiple genders", ["animacy"] = "POS with multiple animacies", ["aspect"] = "biaspectual POS" } return data 0nvagzj0c8juptdqujbzyjvc3iytzfx 64358 64357 2023-01-31T02:41:47Z Benwing2 1346 add ?! for unattested 64358 Scribunto text/plain local data = {} -- A list of all possible "parts" that a specification can be made out of. For each part, we list -- the class it's in (gender, animacy, etc.), the associated category (if any) and the display form. -- In a given gender/number spec, only one part of each class is allowed. data.codes = { ["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'}, ["?!"] = {type = "other", display = '<abbr title="gender unattested">unattested</abbr>'}, -- Genders ["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'}, ["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'}, ["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'}, ["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'}, -- Animacy ["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'}, ["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'}, -- Animal (for Ukrainian, Belarusian, Polish) ["anml"] = {type = "animacy", cat = "animal POS", display = '<abbr title="animal">animal</abbr>'}, -- Personal (for Ukrainian, Belarusian, Polish) ["pr"] = {type = "animacy", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'}, -- Nonpersonal not currently used ["np"] = {type = "animacy", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'}, -- Virility (for Polish) ["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile">vir</abbr>'}, ["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile">nvir</abbr>'}, -- Numbers ["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'}, ["d"] = {type = "number", cat = "dualia tantum", display = '<abbr title="dual number">du</abbr>'}, ["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'}, -- Verb qualifiers ["impf"] = {type = "aspect", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'}, ["pf"] = {type = "aspect", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'}, } -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. data.combinations = { ["mf"] = {codes = {"m", "f"}}, ["mfbysense"] = {codes = {"m", "f"}, cat = "masculine and feminine POS by sense", display = '<abbr title="according to the gender of the referent">by sense</abbr>'} } -- Categories when multiple gender/number specs of a given type occur in different data.codetype_cats = { ["gender"] = "POS with multiple genders", ["animacy"] = "POS with multiple animacies", ["aspect"] = "biaspectual POS" } return data 7nku6bf2ys1ndna534r63qnki6y45ut 64359 64358 2023-01-31T22:06:29Z Benwing2 1346 [[User:Al-Muqanna]] display 'gender unattested' instead of just 'unattested' 64359 Scribunto text/plain local data = {} -- A list of all possible "parts" that a specification can be made out of. For each part, we list -- the class it's in (gender, animacy, etc.), the associated category (if any) and the display form. -- In a given gender/number spec, only one part of each class is allowed. data.codes = { ["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'}, ["?!"] = {type = "other", display = '<abbr title="gender unattested">gender unattested</abbr>'}, -- Genders ["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'}, ["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'}, ["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'}, ["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'}, -- Animacy ["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'}, ["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'}, -- Animal (for Ukrainian, Belarusian, Polish) ["anml"] = {type = "animacy", cat = "animal POS", display = '<abbr title="animal">animal</abbr>'}, -- Personal (for Ukrainian, Belarusian, Polish) ["pr"] = {type = "animacy", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'}, -- Nonpersonal not currently used ["np"] = {type = "animacy", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'}, -- Virility (for Polish) ["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile">vir</abbr>'}, ["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile">nvir</abbr>'}, -- Numbers ["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'}, ["d"] = {type = "number", cat = "dualia tantum", display = '<abbr title="dual number">du</abbr>'}, ["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'}, -- Verb qualifiers ["impf"] = {type = "aspect", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'}, ["pf"] = {type = "aspect", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'}, } -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. data.combinations = { ["mf"] = {codes = {"m", "f"}}, ["mfbysense"] = {codes = {"m", "f"}, cat = "masculine and feminine POS by sense", display = '<abbr title="according to the gender of the referent">by sense</abbr>'} } -- Categories when multiple gender/number specs of a given type occur in different data.codetype_cats = { ["gender"] = "POS with multiple genders", ["animacy"] = "POS with multiple animacies", ["aspect"] = "biaspectual POS" } return data q6ign5gdugncbtdotcf66ovx7vn2y4j 64360 64359 2023-03-20T02:42:40Z Benwing2 1346 add 'biasp' = impf + pf; rename 'codetype_cats' -> 'multicode_cats' 64360 Scribunto text/plain local data = {} -- A list of all possible "parts" that a specification can be made out of. For each part, we list -- the class it's in (gender, animacy, etc.), the associated category (if any) and the display form. -- In a given gender/number spec, only one part of each class is allowed. data.codes = { ["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'}, ["?!"] = {type = "other", display = '<abbr title="gender unattested">gender unattested</abbr>'}, -- Genders ["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'}, ["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'}, ["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'}, ["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'}, -- Animacy ["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'}, ["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'}, -- Animal (for Ukrainian, Belarusian, Polish) ["anml"] = {type = "animacy", cat = "animal POS", display = '<abbr title="animal">animal</abbr>'}, -- Personal (for Ukrainian, Belarusian, Polish) ["pr"] = {type = "animacy", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'}, -- Nonpersonal not currently used ["np"] = {type = "animacy", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'}, -- Virility (for Polish) ["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile">vir</abbr>'}, ["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile">nvir</abbr>'}, -- Numbers ["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'}, ["d"] = {type = "number", cat = "dualia tantum", display = '<abbr title="dual number">du</abbr>'}, ["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'}, -- Verb qualifiers ["impf"] = {type = "aspect", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'}, ["pf"] = {type = "aspect", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'}, } -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. data.combinations = { ["mf"] = {codes = {"m", "f"}}, ["mfbysense"] = {codes = {"m", "f"}, cat = "masculine and feminine POS by sense", display = '<abbr title="according to the gender of the referent">by sense</abbr>'}, ["biasp"] = {codes = {"impf", "pf"}}, } -- Categories when multiple gender/number codes of a given type occur in different specs (two or more of the same type -- cannot occur in a single spec). data.multicode_cats = { ["gender"] = "POS with multiple genders", ["animacy"] = "POS with multiple animacies", ["aspect"] = "biaspectual POS", } return data mzhgpd3w2qktlsumrxkrzoti8755vbz 64361 64360 2023-06-16T06:10:39Z Benwing2 1346 add 'mfequiv' when m and f do not change the meaning 64361 Scribunto text/plain local data = {} -- A list of all possible "parts" that a specification can be made out of. For each part, we list -- the class it's in (gender, animacy, etc.), the associated category (if any) and the display form. -- In a given gender/number spec, only one part of each class is allowed. data.codes = { ["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'}, ["?!"] = {type = "other", display = '<abbr title="gender unattested">gender unattested</abbr>'}, -- Genders ["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'}, ["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'}, ["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'}, ["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'}, -- Animacy ["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'}, ["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'}, -- Animal (for Ukrainian, Belarusian, Polish) ["anml"] = {type = "animacy", cat = "animal POS", display = '<abbr title="animal">animal</abbr>'}, -- Personal (for Ukrainian, Belarusian, Polish) ["pr"] = {type = "animacy", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'}, -- Nonpersonal not currently used ["np"] = {type = "animacy", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'}, -- Virility (for Polish) ["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile">vir</abbr>'}, ["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile">nvir</abbr>'}, -- Numbers ["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'}, ["d"] = {type = "number", cat = "dualia tantum", display = '<abbr title="dual number">du</abbr>'}, ["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'}, -- Verb qualifiers ["impf"] = {type = "aspect", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'}, ["pf"] = {type = "aspect", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'}, } -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. data.combinations = { ["mf"] = {codes = {"m", "f"}}, ["mfequiv"] = {codes = {"m", "f"}, display = '<abbr title="different genders do not affect the meaning">same meaning</abbr>'}, ["mfbysense"] = {codes = {"m", "f"}, cat = "masculine and feminine POS by sense", display = '<abbr title="according to the gender of the referent">by sense</abbr>'}, ["biasp"] = {codes = {"impf", "pf"}}, } -- Categories when multiple gender/number codes of a given type occur in different specs (two or more of the same type -- cannot occur in a single spec). data.multicode_cats = { ["gender"] = "POS with multiple genders", ["animacy"] = "POS with multiple animacies", ["aspect"] = "biaspectual POS", } return data f4ik8t1f3xbu3mvwhj27enlhe7pm2km 64362 64361 2023-07-06T22:05:36Z Benwing2 1346 add gender-neutral for spanish [[amigue]] etc. 64362 Scribunto text/plain local data = {} -- A list of all possible "parts" that a specification can be made out of. For each part, we list -- the class it's in (gender, animacy, etc.), the associated category (if any) and the display form. -- In a given gender/number spec, only one part of each class is allowed. data.codes = { ["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'}, ["?!"] = {type = "other", display = '<abbr title="gender unattested">gender unattested</abbr>'}, -- Genders ["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'}, ["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'}, ["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'}, ["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'}, ["gneut"] = {type = "gender", cat = "gender-neutral POS", display = '<abbr title="gender-neutral">gender-neutral</abbr>'}, -- Animacy ["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'}, ["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'}, -- Animal (for Ukrainian, Belarusian, Polish) ["anml"] = {type = "animacy", cat = "animal POS", display = '<abbr title="animal">animal</abbr>'}, -- Personal (for Ukrainian, Belarusian, Polish) ["pr"] = {type = "animacy", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'}, -- Nonpersonal not currently used ["np"] = {type = "animacy", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'}, -- Virility (for Polish) ["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile">vir</abbr>'}, ["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile">nvir</abbr>'}, -- Numbers ["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'}, ["d"] = {type = "number", cat = "dualia tantum", display = '<abbr title="dual number">du</abbr>'}, ["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'}, -- Verb qualifiers ["impf"] = {type = "aspect", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'}, ["pf"] = {type = "aspect", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'}, } -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. data.combinations = { ["mf"] = {codes = {"m", "f"}}, ["mfequiv"] = {codes = {"m", "f"}, display = '<abbr title="different genders do not affect the meaning">same meaning</abbr>'}, ["mfbysense"] = {codes = {"m", "f"}, cat = "masculine and feminine POS by sense", display = '<abbr title="according to the gender of the referent">by sense</abbr>'}, ["biasp"] = {codes = {"impf", "pf"}}, } -- Categories when multiple gender/number codes of a given type occur in different specs (two or more of the same type -- cannot occur in a single spec). data.multicode_cats = { ["gender"] = "POS with multiple genders", ["animacy"] = "POS with multiple animacies", ["aspect"] = "biaspectual POS", } return data ohj0tnbckpwqbvvwcunaza9gt1a3fgy 64363 64362 2024-02-27T05:45:45Z Benwing2 1346 [[User:Vininn126]] add codes for unattested gender/number/animacy/aspect 64363 Scribunto text/plain local data = {} -- A list of all possible "parts" that a specification can be made out of. For each part, we list -- the class it's in (gender, animacy, etc.), the associated category (if any) and the display form. -- In a given gender/number spec, only one part of each class is allowed. data.codes = { ["?"] = {type = "other", display = '<abbr title="gender incomplete">?</abbr>'}, -- FIXME: The following should be either eliminated in favor of g! or converted to a general "gender/number unattested". ["?!"] = {type = "other", display = '<abbr title="gender unattested">gender unattested</abbr>'}, -- Genders ["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'}, ["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'}, ["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'}, ["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'}, ["gneut"] = {type = "gender", cat = "gender-neutral POS", display = '<abbr title="gender-neutral">gender-neutral</abbr>'}, ["g!"] = {type = "gender", display = '<abbr title="gender unattested">gender unattested</abbr>'}, -- Animacy -- Animate = either animal or personal (for Russian, etc.) ["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'}, ["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'}, -- Animal (for Ukrainian, Belarusian, Polish, etc.) ["anml"] = {type = "animacy", cat = "animal POS", display = '<abbr title="animal">animal</abbr>'}, -- Personal (for Ukrainian, Belarusian, Polish, etc.) ["pr"] = {type = "animacy", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'}, ["np"] = {type = "animacy", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'}, ["an!"] = {type = "animacy", display = '<abbr title="animacy unattested">animacy unattested</abbr>'}, -- Virility (for Polish) ["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile (= masculine personal)">vir</abbr>'}, ["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile (= other than masculine personal)">nvir</abbr>'}, -- Numbers ["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'}, ["d"] = {type = "number", cat = "dualia tantum", display = '<abbr title="dual number">du</abbr>'}, ["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'}, ["num!"] = {type = "number", display = '<abbr title="number unattested">number unattested</abbr>'}, -- Verb qualifiers ["impf"] = {type = "aspect", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'}, ["pf"] = {type = "aspect", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'}, ["asp!"] = {type = "aspect", display = '<abbr title="aspect unattested">aspect unattested</abbr>'}, } -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. data.combinations = { ["mf"] = {codes = {"m", "f"}}, ["mfequiv"] = {codes = {"m", "f"}, display = '<abbr title="different genders do not affect the meaning">same meaning</abbr>'}, ["mfbysense"] = {codes = {"m", "f"}, cat = "masculine and feminine POS by sense", display = '<abbr title="according to the gender of the referent">by sense</abbr>'}, ["biasp"] = {codes = {"impf", "pf"}}, } -- Categories when multiple gender/number codes of a given type occur in different specs (two or more of the same type -- cannot occur in a single spec). data.multicode_cats = { ["gender"] = "POS with multiple genders", ["animacy"] = "POS with multiple animacies", ["aspect"] = "biaspectual POS", } return data nztkosuoet6kcdd1bwudpxg5l6gm6m8 64364 64363 2024-10-06T07:54:40Z Benwing2 1346 support request codes like `an?` for "animacy unspecified"; allow `display` to omit <abbr> tooltip as it will be auto-added 64364 Scribunto text/plain local data = {} -- A list of all possible "parts" that a specification can be made out of. For each part, we list the class it's in -- (gender, animacy, etc.), the associated category (if any) and the display form. In a given gender/number spec, only -- one part of each class is allowed. `display` is how the code is diplayed to the user and should normally be wrapped -- in <abbr title="tooltip">...</abbr> with an explanatory tooltip. If not, it will automatically be wrapped in this -- fashion. If `req` is true, a category "Requests for TYPE in LANG entries" will be generated, except for the code "?", -- which is special-cased; TYPE is "gender" unless the POS is "verb", in which case it is "aspect". data.codes = { ["?"] = {type = "other", req = true, display = '<abbr title="gender incomplete">?</abbr>'}, -- FIXME: The following should be either eliminated in favor of g! or converted to a general "gender/number unattested". ["?!"] = {type = "other", display = "gender unattested"}, -- Genders ["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'}, ["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'}, ["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'}, ["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'}, ["gneut"] = {type = "gender", cat = "gender-neutral POS", display = "gender-neutral"}, ["g!"] = {type = "gender", display = "gender unattested"}, ["g?"] = {type = "gender", req = true, display = "gender unspecified"}, -- Animacy -- Animate = either animal or personal (for Russian, etc.) ["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'}, ["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'}, -- Animal (for Ukrainian, Belarusian, Polish, etc.) ["anml"] = {type = "animacy", cat = "animal POS", display = "animal"}, -- Personal (for Ukrainian, Belarusian, Polish, etc.) ["pr"] = {type = "animacy", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'}, ["np"] = {type = "animacy", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'}, ["an!"] = {type = "animacy", display = "animacy unattested"}, ["an?"] = {type = "animacy", req = true, display = "animacy unspecified"}, -- Virility (for Polish) ["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile (= masculine personal)">vir</abbr>'}, ["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile (= other than masculine personal)">nvir</abbr>'}, -- Numbers ["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'}, ["d"] = {type = "number", cat = "dualia tantum", display = '<abbr title="dual number">du</abbr>'}, ["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'}, ["num!"] = {type = "number", display = "number unattested"}, ["num?"] = {type = "number", req = true, display = "number unspecified"}, -- Verb qualifiers ["impf"] = {type = "aspect", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'}, ["pf"] = {type = "aspect", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'}, ["asp!"] = {type = "aspect", display = "aspect unattested"}, ["asp?"] = {type = "aspect", req = true, display = "aspect unspecified"}, } -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. data.combinations = { ["mf"] = {codes = {"m", "f"}}, ["mfequiv"] = {codes = {"m", "f"}, display = '<abbr title="different genders do not affect the meaning">same meaning</abbr>'}, ["mfbysense"] = {codes = {"m", "f"}, cat = "masculine and feminine POS by sense", display = '<abbr title="according to the gender of the referent">by sense</abbr>'}, ["biasp"] = {codes = {"impf", "pf"}}, } -- Categories when multiple gender/number codes of a given type occur in different specs (two or more of the same type -- cannot occur in a single spec). data.multicode_cats = { ["gender"] = "POS with multiple genders", ["animacy"] = "POS with multiple animacies", ["aspect"] = "biaspectual POS", } return data 6pb29iovsjl0d02d9zgeg5lcsm9a096 64365 64364 2025-07-05T08:55:36Z Theknightwho 1347 Add some more combinations. 64365 Scribunto text/plain local data = {} local insert = table.insert -- A list of all possible "parts" that a specification can be made out of. For each part, we list the class it's in -- (gender, animacy, etc.), the associated category (if any) and the display form. In a given gender/number spec, only -- one part of each class is allowed. `display` is how the code is diplayed to the user and should normally be wrapped -- in <abbr title="tooltip">...</abbr> with an explanatory tooltip. If not, it will automatically be wrapped in this -- fashion. If `req` is true, a category "Requests for TYPE in LANG entries" will be generated, except for the code "?", -- which is special-cased; TYPE is "gender" unless the POS is "verb", in which case it is "aspect". data.codes = { ["?"] = {type = "other", req = true, display = '<abbr title="gender incomplete">?</abbr>'}, -- FIXME: The following should be either eliminated in favor of g! or converted to a general "gender/number unattested". ["?!"] = {type = "other", display = "gender unattested"}, -- Genders ["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'}, ["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'}, ["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'}, ["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'}, ["gneut"] = {type = "gender", cat = "gender-neutral POS", display = "gender-neutral"}, ["g!"] = {type = "gender", display = "gender unattested"}, ["g?"] = {type = "gender", req = true, display = "gender unspecified"}, -- Animacy -- Animate = either animal or personal (for Russian, etc.) ["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'}, ["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'}, -- Animal (for Ukrainian, Belarusian, Polish, etc.) ["anml"] = {type = "animacy", cat = "animal POS", display = "animal"}, -- Personal (for Ukrainian, Belarusian, Polish, etc.) ["pr"] = {type = "animacy", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'}, ["np"] = {type = "animacy", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'}, ["an!"] = {type = "animacy", display = "animacy unattested"}, ["an?"] = {type = "animacy", req = true, display = "animacy unspecified"}, -- Virility (for Polish) ["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile (= masculine personal)">vir</abbr>'}, ["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile (= other than masculine personal)">nvir</abbr>'}, -- Numbers ["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'}, ["d"] = {type = "number", cat = "dualia tantum", display = '<abbr title="dual number">du</abbr>'}, ["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'}, ["num!"] = {type = "number", display = "number unattested"}, ["num?"] = {type = "number", req = true, display = "number unspecified"}, -- Verb qualifiers ["impf"] = {type = "aspect", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'}, ["pf"] = {type = "aspect", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'}, ["asp!"] = {type = "aspect", display = "aspect unattested"}, ["asp?"] = {type = "aspect", req = true, display = "aspect unspecified"}, } -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. local combinations = { ["biasp"] = {codes = {"impf", "pf"}}, } for _, comb in ipairs{"mf", "fm", "mn", "nm", "fn", "nf", "mfn", "mnf", "fmn", "fnm", "nmf", "nfm"} do local codes = {} for ch in comb:gmatch(".") do insert(codes, ch) end combinations[comb] = {codes = codes} combinations[comb .. "equiv"] = {codes = codes, display = '<abbr title="different genders do not affect the meaning">same meaning</abbr>'} if comb == "mf" or comb == "fm" then combinations[comb .. "bysense"] = {codes = codes, cat = "masculine and feminine POS by sense", display = '<abbr title="according to the gender of the referent">by sense</abbr>'} end end data.combinations = combinations -- Categories when multiple gender/number codes of a given type occur in different specs (two or more of the same type -- cannot occur in a single spec). data.multicode_cats = { ["gender"] = "POS with multiple genders", ["animacy"] = "POS with multiple animacies", ["aspect"] = "biaspectual POS", } return data qu71zhrivahryfvuyt1eltx622og6am 64366 64365 2025-07-31T23:37:27Z Benwing2 1346 [[User:Thadh]] add 'anin' as a combination code meaning animate + inanimate 64366 Scribunto text/plain local data = {} local insert = table.insert -- A list of all possible "parts" that a specification can be made out of. For each part, we list the class it's in -- (gender, animacy, etc.), the associated category (if any) and the display form. In a given gender/number spec, only -- one part of each class is allowed. `display` is how the code is diplayed to the user and should normally be wrapped -- in <abbr title="tooltip">...</abbr> with an explanatory tooltip. If not, it will automatically be wrapped in this -- fashion. If `req` is true, a category "Requests for TYPE in LANG entries" will be generated, except for the code "?", -- which is special-cased; TYPE is "gender" unless the POS is "verb", in which case it is "aspect". data.codes = { ["?"] = {type = "other", req = true, display = '<abbr title="gender incomplete">?</abbr>'}, -- FIXME: The following should be either eliminated in favor of g! or converted to a general "gender/number unattested". ["?!"] = {type = "other", display = "gender unattested"}, -- Genders ["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'}, ["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'}, ["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'}, ["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'}, ["gneut"] = {type = "gender", cat = "gender-neutral POS", display = "gender-neutral"}, ["g!"] = {type = "gender", display = "gender unattested"}, ["g?"] = {type = "gender", req = true, display = "gender unspecified"}, -- Animacy -- Animate = either animal or personal (for Russian, etc.) ["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'}, ["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'}, -- Animal (for Ukrainian, Belarusian, Polish, etc.) ["anml"] = {type = "animacy", cat = "animal POS", display = "animal"}, -- Personal (for Ukrainian, Belarusian, Polish, etc.) ["pr"] = {type = "animacy", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'}, ["np"] = {type = "animacy", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'}, ["an!"] = {type = "animacy", display = "animacy unattested"}, ["an?"] = {type = "animacy", req = true, display = "animacy unspecified"}, -- Virility (for Polish) ["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile (= masculine personal)">vir</abbr>'}, ["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile (= other than masculine personal)">nvir</abbr>'}, -- Numbers ["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'}, ["d"] = {type = "number", cat = "dualia tantum", display = '<abbr title="dual number">du</abbr>'}, ["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'}, ["num!"] = {type = "number", display = "number unattested"}, ["num?"] = {type = "number", req = true, display = "number unspecified"}, -- Verb qualifiers ["impf"] = {type = "aspect", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'}, ["pf"] = {type = "aspect", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'}, ["asp!"] = {type = "aspect", display = "aspect unattested"}, ["asp?"] = {type = "aspect", req = true, display = "aspect unspecified"}, } -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. local combinations = { ["biasp"] = {codes = {"impf", "pf"}}, ["anin"] = {codes = {"an", "in"}}, -- "bianimate" doesn't exist as a linguistic term } for _, comb in ipairs{"mf", "fm", "mn", "nm", "fn", "nf", "mfn", "mnf", "fmn", "fnm", "nmf", "nfm"} do local codes = {} for ch in comb:gmatch(".") do insert(codes, ch) end combinations[comb] = {codes = codes} combinations[comb .. "equiv"] = {codes = codes, display = '<abbr title="different genders do not affect the meaning">same meaning</abbr>'} if comb == "mf" or comb == "fm" then combinations[comb .. "bysense"] = {codes = codes, cat = "masculine and feminine POS by sense", display = '<abbr title="according to the gender of the referent">by sense</abbr>'} end end data.combinations = combinations -- Categories when multiple gender/number codes of a given type occur in different specs (two or more of the same type -- cannot occur in a single spec). data.multicode_cats = { ["gender"] = "POS with multiple genders", ["animacy"] = "POS with multiple animacies", ["aspect"] = "biaspectual POS", } return data sag6m4gr4gvx2gjzusd37n97v5gdl8h 64367 64366 2025-11-17T00:20:13Z Theknightwho 1347 Add definiteness. 64367 Scribunto text/plain local data = {} local insert = table.insert -- A list of all possible "parts" that a specification can be made out of. For each part, we list the class it's in -- (gender, animacy, etc.), the associated category (if any) and the display form. In a given gender/number spec, only -- one part of each class is allowed. `display` is how the code is diplayed to the user and should normally be wrapped -- in <abbr title="tooltip">...</abbr> with an explanatory tooltip. If not, it will automatically be wrapped in this -- fashion. If `req` is true, a category "Requests for TYPE in LANG entries" will be generated, except for the code "?", -- which is special-cased; TYPE is "gender" unless the POS is "verb", in which case it is "aspect". data.codes = { ["?"] = {type = "other", req = true, display = '<abbr title="gender incomplete">?</abbr>'}, -- FIXME: The following should be either eliminated in favor of g! or converted to a general "gender/number unattested". ["?!"] = {type = "other", display = "gender unattested"}, -- Genders ["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'}, ["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'}, ["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'}, ["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'}, ["gneut"] = {type = "gender", cat = "gender-neutral POS", display = "gender-neutral"}, ["g!"] = {type = "gender", display = "gender unattested"}, ["g?"] = {type = "gender", req = true, display = "gender unspecified"}, -- Animacy -- Animate = either animal or personal (for Russian, etc.) ["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'}, ["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'}, -- Animal (for Ukrainian, Belarusian, Polish, etc.) ["anml"] = {type = "animacy", cat = "animal POS", display = "animal"}, -- Personal (for Ukrainian, Belarusian, Polish, etc.) ["pr"] = {type = "animacy", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'}, ["np"] = {type = "animacy", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'}, ["an!"] = {type = "animacy", display = "animacy unattested"}, ["an?"] = {type = "animacy", req = true, display = "animacy unspecified"}, -- Definiteness ["def"] = {type = "definiteness", cat = "definite POS", display = '<abbr title="definite">def</abbr>'}, ["indef"] = {type = "definiteness", cat = "indefinite POS", display = '<abbr title="indefinite">indef</abbr>'}, -- Virility (for Polish) ["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile (= masculine personal)">vir</abbr>'}, ["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile (= other than masculine personal)">nvir</abbr>'}, -- Numbers ["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'}, ["d"] = {type = "number", cat = "dualia tantum", display = '<abbr title="dual number">du</abbr>'}, ["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'}, ["num!"] = {type = "number", display = "number unattested"}, ["num?"] = {type = "number", req = true, display = "number unspecified"}, -- Verb qualifiers ["impf"] = {type = "aspect", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'}, ["pf"] = {type = "aspect", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'}, ["asp!"] = {type = "aspect", display = "aspect unattested"}, ["asp?"] = {type = "aspect", req = true, display = "aspect unspecified"}, } -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. local combinations = { ["biasp"] = {codes = {"impf", "pf"}}, ["anin"] = {codes = {"an", "in"}}, -- "bianimate" doesn't exist as a linguistic term } for _, comb in ipairs{"mf", "fm", "mn", "nm", "fn", "nf", "mfn", "mnf", "fmn", "fnm", "nmf", "nfm"} do local codes = {} for ch in comb:gmatch(".") do insert(codes, ch) end combinations[comb] = {codes = codes} combinations[comb .. "equiv"] = {codes = codes, display = '<abbr title="different genders do not affect the meaning">same meaning</abbr>'} if comb == "mf" or comb == "fm" then combinations[comb .. "bysense"] = {codes = codes, cat = "masculine and feminine POS by sense", display = '<abbr title="according to the gender of the referent">by sense</abbr>'} end end data.combinations = combinations -- Categories when multiple gender/number codes of a given type occur in different specs (two or more of the same type -- cannot occur in a single spec). data.multicode_cats = { ["gender"] = "POS with multiple genders", ["animacy"] = "POS with multiple animacies", ["aspect"] = "biaspectual POS", } return data r1tcb40ik363gcr1qh31tg9fj940e2b 64368 64367 2026-02-03T23:30:55Z Theknightwho 1347 Add missing "nc" and "cn" combo codes. 64368 Scribunto text/plain local data = {} local insert = table.insert -- A list of all possible "parts" that a specification can be made out of. For each part, we list the class it's in -- (gender, animacy, etc.), the associated category (if any) and the display form. In a given gender/number spec, only -- one part of each class is allowed. `display` is how the code is diplayed to the user and should normally be wrapped -- in <abbr title="tooltip">...</abbr> with an explanatory tooltip. If not, it will automatically be wrapped in this -- fashion. If `req` is true, a category "Requests for TYPE in LANG entries" will be generated, except for the code "?", -- which is special-cased; TYPE is "gender" unless the POS is "verb", in which case it is "aspect". data.codes = { ["?"] = {type = "other", req = true, display = '<abbr title="gender incomplete">?</abbr>'}, -- FIXME: The following should be either eliminated in favor of g! or converted to a general "gender/number unattested". ["?!"] = {type = "other", display = "gender unattested"}, -- Genders ["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'}, ["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'}, ["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'}, ["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'}, ["gneut"] = {type = "gender", cat = "gender-neutral POS", display = "gender-neutral"}, ["g!"] = {type = "gender", display = "gender unattested"}, ["g?"] = {type = "gender", req = true, display = "gender unspecified"}, -- Animacy -- Animate = either animal or personal (for Russian, etc.) ["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'}, ["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'}, -- Animal (for Ukrainian, Belarusian, Polish, etc.) ["anml"] = {type = "animacy", cat = "animal POS", display = "animal"}, -- Personal (for Ukrainian, Belarusian, Polish, etc.) ["pr"] = {type = "animacy", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'}, ["np"] = {type = "animacy", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'}, ["an!"] = {type = "animacy", display = "animacy unattested"}, ["an?"] = {type = "animacy", req = true, display = "animacy unspecified"}, -- Definiteness ["def"] = {type = "definiteness", cat = "definite POS", display = '<abbr title="definite">def</abbr>'}, ["indef"] = {type = "definiteness", cat = "indefinite POS", display = '<abbr title="indefinite">indef</abbr>'}, -- Virility (for Polish) ["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile (= masculine personal)">vir</abbr>'}, ["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile (= other than masculine personal)">nvir</abbr>'}, -- Numbers ["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'}, ["d"] = {type = "number", cat = "dualia tantum", display = '<abbr title="dual number">du</abbr>'}, ["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'}, ["num!"] = {type = "number", display = "number unattested"}, ["num?"] = {type = "number", req = true, display = "number unspecified"}, -- Verb qualifiers ["impf"] = {type = "aspect", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'}, ["pf"] = {type = "aspect", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'}, ["asp!"] = {type = "aspect", display = "aspect unattested"}, ["asp?"] = {type = "aspect", req = true, display = "aspect unspecified"}, } -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. local combinations = { ["biasp"] = {codes = {"impf", "pf"}}, ["anin"] = {codes = {"an", "in"}}, -- "bianimate" doesn't exist as a linguistic term } for _, comb in ipairs{"mf", "mn", "fm", "fn", "cn", "nm", "nf", "nc", "mfn", "mnf", "fmn", "fnm", "nmf", "nfm"} do local codes = {} for ch in comb:gmatch(".") do insert(codes, ch) end combinations[comb] = {codes = codes} combinations[comb .. "equiv"] = {codes = codes, display = '<abbr title="different genders do not affect the meaning">same meaning</abbr>'} if comb == "mf" or comb == "fm" then combinations[comb .. "bysense"] = {codes = codes, cat = "masculine and feminine POS by sense", display = '<abbr title="according to the gender of the referent">by sense</abbr>'} end end data.combinations = combinations -- Categories when multiple gender/number codes of a given type occur in different specs (two or more of the same type -- cannot occur in a single spec). data.multicode_cats = { ["gender"] = "POS with multiple genders", ["animacy"] = "POS with multiple animacies", ["aspect"] = "biaspectual POS", } return data ez8li72lhxsz7uadcg8lztfyl3hm08a 64369 64368 2026-06-27T15:56:42Z King ChristLike 964 14 revisions imported from [[:en:Module:gender_and_number/data]] 64368 Scribunto text/plain local data = {} local insert = table.insert -- A list of all possible "parts" that a specification can be made out of. For each part, we list the class it's in -- (gender, animacy, etc.), the associated category (if any) and the display form. In a given gender/number spec, only -- one part of each class is allowed. `display` is how the code is diplayed to the user and should normally be wrapped -- in <abbr title="tooltip">...</abbr> with an explanatory tooltip. If not, it will automatically be wrapped in this -- fashion. If `req` is true, a category "Requests for TYPE in LANG entries" will be generated, except for the code "?", -- which is special-cased; TYPE is "gender" unless the POS is "verb", in which case it is "aspect". data.codes = { ["?"] = {type = "other", req = true, display = '<abbr title="gender incomplete">?</abbr>'}, -- FIXME: The following should be either eliminated in favor of g! or converted to a general "gender/number unattested". ["?!"] = {type = "other", display = "gender unattested"}, -- Genders ["m"] = {type = "gender", cat = "masculine POS", display = '<abbr title="masculine gender">m</abbr>'}, ["f"] = {type = "gender", cat = "feminine POS", display = '<abbr title="feminine gender">f</abbr>'}, ["n"] = {type = "gender", cat = "neuter POS", display = '<abbr title="neuter gender">n</abbr>'}, ["c"] = {type = "gender", cat = "common-gender POS", display = '<abbr title="common gender">c</abbr>'}, ["gneut"] = {type = "gender", cat = "gender-neutral POS", display = "gender-neutral"}, ["g!"] = {type = "gender", display = "gender unattested"}, ["g?"] = {type = "gender", req = true, display = "gender unspecified"}, -- Animacy -- Animate = either animal or personal (for Russian, etc.) ["an"] = {type = "animacy", cat = "animate POS", display = '<abbr title="animate">anim</abbr>'}, ["in"] = {type = "animacy", cat = "inanimate POS", display = '<abbr title="inanimate">inan</abbr>'}, -- Animal (for Ukrainian, Belarusian, Polish, etc.) ["anml"] = {type = "animacy", cat = "animal POS", display = "animal"}, -- Personal (for Ukrainian, Belarusian, Polish, etc.) ["pr"] = {type = "animacy", cat = "personal POS", display = '<abbr title="personal">pers</abbr>'}, ["np"] = {type = "animacy", cat = "nonpersonal POS", display = '<abbr title="nonpersonal">npers</abbr>'}, ["an!"] = {type = "animacy", display = "animacy unattested"}, ["an?"] = {type = "animacy", req = true, display = "animacy unspecified"}, -- Definiteness ["def"] = {type = "definiteness", cat = "definite POS", display = '<abbr title="definite">def</abbr>'}, ["indef"] = {type = "definiteness", cat = "indefinite POS", display = '<abbr title="indefinite">indef</abbr>'}, -- Virility (for Polish) ["vr"] = {type = "virility", cat = "virile POS", display = '<abbr title="virile (= masculine personal)">vir</abbr>'}, ["nv"] = {type = "virility", cat = "nonvirile POS", display = '<abbr title="nonvirile (= other than masculine personal)">nvir</abbr>'}, -- Numbers ["s"] = {type = "number", display = '<abbr title="singular number">sg</abbr>'}, ["d"] = {type = "number", cat = "dualia tantum", display = '<abbr title="dual number">du</abbr>'}, ["p"] = {type = "number", cat = "pluralia tantum", display = '<abbr title="plural number">pl</abbr>'}, ["num!"] = {type = "number", display = "number unattested"}, ["num?"] = {type = "number", req = true, display = "number unspecified"}, -- Verb qualifiers ["impf"] = {type = "aspect", cat = "imperfective POS", display = '<abbr title="imperfective aspect">impf</abbr>'}, ["pf"] = {type = "aspect", cat = "perfective POS", display = '<abbr title="perfective aspect">pf</abbr>'}, ["asp!"] = {type = "aspect", display = "aspect unattested"}, ["asp?"] = {type = "aspect", req = true, display = "aspect unspecified"}, } -- Combined codes that are equivalent to giving multiple specs. `mf` is the same as specifying two separate specs, -- one with `m` in it and the other with `f`. `mfbysense` is similar but is used for nouns that can be either masculine -- or feminine according as to whether they refer to masculine or feminine beings. local combinations = { ["biasp"] = {codes = {"impf", "pf"}}, ["anin"] = {codes = {"an", "in"}}, -- "bianimate" doesn't exist as a linguistic term } for _, comb in ipairs{"mf", "mn", "fm", "fn", "cn", "nm", "nf", "nc", "mfn", "mnf", "fmn", "fnm", "nmf", "nfm"} do local codes = {} for ch in comb:gmatch(".") do insert(codes, ch) end combinations[comb] = {codes = codes} combinations[comb .. "equiv"] = {codes = codes, display = '<abbr title="different genders do not affect the meaning">same meaning</abbr>'} if comb == "mf" or comb == "fm" then combinations[comb .. "bysense"] = {codes = codes, cat = "masculine and feminine POS by sense", display = '<abbr title="according to the gender of the referent">by sense</abbr>'} end end data.combinations = combinations -- Categories when multiple gender/number codes of a given type occur in different specs (two or more of the same type -- cannot occur in a single spec). data.multicode_cats = { ["gender"] = "POS with multiple genders", ["animacy"] = "POS with multiple animacies", ["aspect"] = "biaspectual POS", } return data ez8li72lhxsz7uadcg8lztfyl3hm08a Module:gender and number/documentation 828 8291 64414 2013-03-15T04:27:11Z Metaknowledge 1331 Created page with "<includeonly>[[Category:Gender and number templates|*]][[Category:General utility modules]]</includeonly>" 64414 wikitext text/x-wiki <includeonly>[[Category:Gender and number templates|*]][[Category:General utility modules]]</includeonly> or3oj0wvb2p0ljg873qfirokmc705wc 64415 64414 2013-03-16T00:30:12Z Metaknowledge 1331 Metaknowledge moved page [[Module:gender and number/doc]] to [[Module:gender and number/documentation]] without leaving a redirect 64414 wikitext text/x-wiki <includeonly>[[Category:Gender and number templates|*]][[Category:General utility modules]]</includeonly> or3oj0wvb2p0ljg873qfirokmc705wc 64416 64415 2013-05-10T14:00:38Z Rua 1351 64416 wikitext text/x-wiki This module shows gender annotations, such as ''m'' or ''f pl''. It is used as part of other modules. The module is invoked with a list of one or more "gender specifications". Every specification is a list of codes, separated by hyphens. When displaying a specification, every code is converted into the appropriate display form (such as <abbr class="gender" title="masculine gender">m</abbr> for "m") and the different codes within the specification are separated by spaces. Therefore, the specification "m-p" is displayed as <abbr class="gender" title="masculine gender">m</abbr> <abbr class="gender" title="plural">pl</abbr>. If the module is given several specifications at once (in a list), then each item in the list is separated by a comma. So, {"m-p", "f-p"} is used to show <abbr class="gender" title="masculine gender">m</abbr> <abbr class="gender" title="plural">pl</abbr>'', ''<abbr class="gender" title="feminine gender">f</abbr> <abbr class="gender" title="plural">pl</abbr>. <includeonly>[[Category:Gender and number templates|*]][[Category:General utility modules]]</includeonly> c2p1jivx82189prknev1ouqgdtdp5fg 64417 64416 2013-05-10T14:02:07Z Rua 1351 64417 wikitext text/x-wiki This module shows gender annotations, such as ''m'' or ''f pl''. It is used as part of other modules. The module is invoked with a list of one or more "gender specifications". Every specification is a list of codes, separated by hyphens. When displaying a specification, every code is converted into the appropriate display form (such as <abbr class="gender" title="masculine gender">m</abbr> for "m") and the different codes within the specification are separated by spaces. Therefore, the specification "m-p" is displayed as <abbr class="gender" title="masculine gender">m</abbr> <abbr class="gender" title="plural">pl</abbr>. If the module is given several specifications at once (in a list), then each item in the list is separated by a comma. So, {"m-p", "f-p"} is used to show <abbr class="gender" title="masculine gender">m</abbr> <abbr class="gender" title="plural">pl</abbr>'', ''<abbr class="gender" title="feminine gender">f</abbr> <abbr class="gender" title="plural">pl</abbr>. On the other hand, {"m", "f", "p"} displays <abbr class="gender" title="masculine gender">m</abbr>'', ''<abbr class="gender" title="feminine gender">f</abbr>'', ''<abbr class="gender" title="plural">pl</abbr>. <includeonly>[[Category:Gender and number templates|*]][[Category:General utility modules]]</includeonly> 799tfeld0i9hd3yn8mmiru9kcws7ltl 64418 64417 2013-05-10T14:12:40Z Rua 1351 64418 wikitext text/x-wiki This module shows gender annotations, such as ''m'' or ''f pl''. It is used as part of other modules. The module is invoked with a list of one or more "gender specifications". A specification is a single, full "gender", and can be either a simple gender such as "m", a combination of gender and number like "m-p" or something else. More generally, every specification is a list of codes, given as a single string with the codes separated by hyphens. Each code is defined within the module itself, and when displaying a specification, each code in the specification is converted into the appropriate display form (such as <abbr class="gender" title="masculine gender">m</abbr> for "m"). The different codes within the specification are then added together, separated by spaces. So the specification "m-p" is displayed as <abbr class="gender" title="masculine gender">m</abbr> <abbr class="gender" title="plural">pl</abbr>. If the module is given several specifications at once (in a list), then each item in the list is separated by a comma. So, {"m-p", "f-p"} is used to show <abbr class="gender" title="masculine gender">m</abbr> <abbr class="gender" title="plural">pl</abbr>'', ''<abbr class="gender" title="feminine gender">f</abbr> <abbr class="gender" title="plural">pl</abbr>. On the other hand, {"m", "f", "p"} displays <abbr class="gender" title="masculine gender">m</abbr>'', ''<abbr class="gender" title="feminine gender">f</abbr>'', ''<abbr class="gender" title="plural">pl</abbr>. <includeonly>[[Category:Gender and number templates|*]][[Category:General utility modules]]</includeonly> hodt3l1l4gxh0r0nja6i94rb3xsf9gv 64419 64418 2013-05-10T15:26:24Z Rua 1351 64419 wikitext text/x-wiki This module shows gender annotations, such as ''m'' or ''f pl''. It is used as part of other modules. The module is invoked with a list of one or more "gender specifications". A specification is a single, full "gender", and can be either a simple gender such as "m", a combination of gender and number like "m-p" or something else. More generally, every specification is a list of codes, given as a single string with the codes separated by hyphens. Each code is defined within the module itself, and when displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. If the module is given several specifications at once (in a list), then each item in the list is separated by a comma. Examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1|c2}} |} <includeonly>[[Category:Gender and number templates|*]][[Category:General utility modules]]</includeonly> 7x4u1bkg1uw0wckhd5axf2zunf7qdxv 64420 64419 2013-05-10T15:28:59Z Rua 1351 64420 wikitext text/x-wiki This module shows gender annotations, such as ''m'' or ''f pl''. It is used as part of other modules, or can be called from a template. The module is invoked with a list of one or more "gender specifications". A specification is a single, full "gender", and can be either a simple gender such as "m", a combination of gender and number like "m-p" or something else. More generally, every specification is a list of codes, given as a single string with the codes separated by hyphens. Each code is defined within the module itself, and when displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. If the module is given several specifications at once (in a list), then each item in the list is separated by a comma. Examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1|c2}} |} <includeonly>[[Category:Gender and number templates|*]][[Category:General utility modules]]</includeonly> 195sqj0wi4jumam68tjf0jknjykpxzf 64421 64420 2013-05-10T15:30:26Z Rua 1351 64421 wikitext text/x-wiki This module shows gender annotations, such as ''m'' or ''f pl''. It is used as part of other modules, or can be called from a template. The module is invoked with a list of one or more "gender specifications". A specification is a single, full "gender", and can be either a simple gender such as "m", a combination of gender and number like "m-p" or something else. More generally, every specification is a list of codes, given as a single string with the codes separated by hyphens. Each code is defined within the module itself, and when displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. If the module is given several specifications at once (in a list), then each item in the list is separated by a comma. Examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} <includeonly>[[Category:Gender and number templates|*]][[Category:General utility modules]]</includeonly> mffvmyp6cmbg1ys0gr10d4w7cf034f3 64422 64421 2013-05-11T22:38:55Z Rua 1351 64422 wikitext text/x-wiki This module shows gender annotations, such as ''m'' or ''f pl''. It is used as part of other modules, or can be called from a template. The module is invoked with a list of one or more "gender specifications". A specification is a single, full "gender", and can be either a simple gender such as "m", a combination of gender and number like "m-p" or something else. ==Gender specifications== Every specification is a list of codes, given as a single string with the codes separated by hyphens. Each code is defined within the module itself, and when displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. If the module is given several specifications at once (in a list), then each item in the list is separated by a comma. Examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} ==Usage== The module can be used from another module by importing it and calling the exported <code>format_list</code> function. It requires one parameter, which must be a table of zero or more strings. It will then return a string containing the result. For example: <source lang="lua"> local gen = require("Module:gender and number") local example1 = gen.format_list({"m"}) local example2 = gen.format_list({"m", "f"}) local example3 = gen.format_list({"m-p"}) </source> It can also be invoked from another template. The function <code>show_list</code> is used for this. It works the same way as the <code>format_list</code> function, but the specifications are passed as parameters to the module invocation, like so: <pre> {{#invoke:gender and number|show_list|m}} {{#invoke:gender and number|show_list|m|f}} {{#invoke:gender and number|show_list|m-p}} </pre> There is no limit to the number of parameters that can be given this way. The module will process all of its parameters until it finds one that is empty. This means that the following will display only "{{#invoke:gender and number|show_list|m}}" and not "{{#invoke:gender and number|show_list|m|n}}": <pre> {{#invoke:gender and number|show_list|m||n}} </pre> <includeonly>[[Category:Gender and number templates|*]][[Category:General utility modules]]</includeonly> khyop10wr19qpjnkvcqsf51hnnle2wi 64423 64422 2013-05-11T22:39:36Z Rua 1351 /* Usage */ 64423 wikitext text/x-wiki This module shows gender annotations, such as ''m'' or ''f pl''. It is used as part of other modules, or can be called from a template. The module is invoked with a list of one or more "gender specifications". A specification is a single, full "gender", and can be either a simple gender such as "m", a combination of gender and number like "m-p" or something else. ==Gender specifications== Every specification is a list of codes, given as a single string with the codes separated by hyphens. Each code is defined within the module itself, and when displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. If the module is given several specifications at once (in a list), then each item in the list is separated by a comma. Examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} ==Usage== The module can be used from another module by importing it and calling the exported <code>format_list</code> function. It requires one parameter, which must be a table of zero or more strings. It will then return a string containing the result. For example: <source lang="lua"> local gen = require("Module:gender and number") local example1 = gen.format_list({"m"}) local example2 = gen.format_list({"m", "f"}) local example3 = gen.format_list({"m-p"}) </source> It can also be invoked from a template. The function <code>show_list</code> is used for this. It works the same way as the <code>format_list</code> function, but the specifications are passed as parameters to the module invocation, like so: <pre> {{#invoke:gender and number|show_list|m}} {{#invoke:gender and number|show_list|m|f}} {{#invoke:gender and number|show_list|m-p}} </pre> There is no limit to the number of parameters that can be given this way. The module will process all of its parameters until it finds one that is empty. This means that the following will display only "{{#invoke:gender and number|show_list|m}}" and not "{{#invoke:gender and number|show_list|m|n}}": <pre> {{#invoke:gender and number|show_list|m||n}} </pre> <includeonly>[[Category:Gender and number templates|*]][[Category:General utility modules]]</includeonly> 1e3dznj7utzcwl4ns1wng9mqm8zao06 64424 64423 2013-09-02T19:10:41Z Kephir 1378 64424 wikitext text/x-wiki This module shows gender annotations, such as {{g|m}} or {{g|f-p}}. "Gender" is something of a misnomer, as the available annotation categories include animacy and verb aspect (though the former is sometimes also considered a part of word gender). It is used as part of other modules, or can be called from a template. The module is invoked with a list of one or more "gender specifications". A specification is a single, full "gender", and can be either a simple gender such as "m", a combination of gender and number like "m-p" or something else. ==Gender specifications== Every specification is a list of codes, given as a single string with the codes separated by hyphens. Each code is defined within the module itself, and when displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. If the module is given several specifications at once (in a list), then each item in the list is separated by a comma. Examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} ==Usage== The module can be used from another module by importing it and calling the exported <code>format_list</code> function. It requires one parameter, which must be a table of zero or more strings. It will then return a string containing the result. For example: <source lang="lua"> local gen = require("Module:gender and number") local example1 = gen.format_list({"m"}) local example2 = gen.format_list({"m", "f"}) local example3 = gen.format_list({"m-p"}) </source> It can also be invoked from a template. The function <code>show_list</code> is used for this. It works the same way as the <code>format_list</code> function, but the specifications are passed as parameters to the module invocation, like so: <pre> {{#invoke:gender and number|show_list|m}} {{#invoke:gender and number|show_list|m|f}} {{#invoke:gender and number|show_list|m-p}} </pre> There is no limit to the number of parameters that can be given this way. The module will process all of its parameters until it finds one that is empty. This means that the following will display only "{{#invoke:gender and number|show_list|m}}" and not "{{#invoke:gender and number|show_list|m|n}}": <pre> {{#invoke:gender and number|show_list|m||n}} </pre> <includeonly>[[Category:Gender and number templates|*]][[Category:General utility modules]]</includeonly> tm9r6o7ahc1ls1yl2a1z8cebl5hpbnw 64425 64424 2013-11-27T08:41:13Z Gronky 2012 /* Gender specifications */ make it clearer that this isn't what normal wikipedian's should try to use 64425 wikitext text/x-wiki This module shows gender annotations, such as {{g|m}} or {{g|f-p}}. "Gender" is something of a misnomer, as the available annotation categories include animacy and verb aspect (though the former is sometimes also considered a part of word gender). It is used as part of other modules, or can be called from a template. The module is invoked with a list of one or more "gender specifications". A specification is a single, full "gender", and can be either a simple gender such as "m", a combination of gender and number like "m-p" or something else. ==Gender specifications for Lua script writers== Every specification is a list of codes, given as a single string with the codes separated by hyphens. Each code is defined within the module itself, and when displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. If the module is given several specifications at once (in a list), then each item in the list is separated by a comma. Examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} ==Usage== The module can be used from another module by importing it and calling the exported <code>format_list</code> function. It requires one parameter, which must be a table of zero or more strings. It will then return a string containing the result. For example: <source lang="lua"> local gen = require("Module:gender and number") local example1 = gen.format_list({"m"}) local example2 = gen.format_list({"m", "f"}) local example3 = gen.format_list({"m-p"}) </source> It can also be invoked from a template. The function <code>show_list</code> is used for this. It works the same way as the <code>format_list</code> function, but the specifications are passed as parameters to the module invocation, like so: <pre> {{#invoke:gender and number|show_list|m}} {{#invoke:gender and number|show_list|m|f}} {{#invoke:gender and number|show_list|m-p}} </pre> There is no limit to the number of parameters that can be given this way. The module will process all of its parameters until it finds one that is empty. This means that the following will display only "{{#invoke:gender and number|show_list|m}}" and not "{{#invoke:gender and number|show_list|m|n}}": <pre> {{#invoke:gender and number|show_list|m||n}} </pre> <includeonly>[[Category:Gender and number templates|*]][[Category:General utility modules]]</includeonly> qim8bfqzke5j2xclrv357up2qe33to8 64426 64425 2014-02-02T07:47:40Z Msh210 1325 Show what the module does. 64426 wikitext text/x-wiki This module shows gender annotations, such as {{g|m}} or {{g|f-p}}. "Gender" is something of a misnomer, as the available annotation categories include animacy and verb aspect (though the former is sometimes also considered a part of word gender). It is used as part of other modules, or can be called from a template. The module is invoked with a list of one or more "gender specifications". A specification is a single, full "gender", and can be either a simple gender such as "m", a combination of gender and number like "m-p" or something else. ==Gender specifications for Lua script writers== Every specification is a list of codes, given as a single string with the codes separated by hyphens. Each code is defined within the module itself, and when displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. If the module is given several specifications at once (in a list), then each item in the list is separated by a comma. Examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} ==Usage== The module can be used from another module by importing it and calling the exported <code>format_list</code> function. It requires one parameter, which must be a table of zero or more strings. It will then return a string containing the result. For example: <source lang="lua"> local gen = require("Module:gender and number") local example1 = gen.format_list({"m"}) local example2 = gen.format_list({"m", "f"}) local example3 = gen.format_list({"m-p"}) </source> It can also be invoked from a template. The function <code>show_list</code> is used for this. It works the same way as the <code>format_list</code> function, but the specifications are passed as parameters to the module invocation, like so: <pre> *{{#invoke:gender and number|show_list|m}} *{{#invoke:gender and number|show_list|m|f}} *{{#invoke:gender and number|show_list|m-p}} </pre> :*{{#invoke:gender and number|show_list|m}} :*{{#invoke:gender and number|show_list|m|f}} :*{{#invoke:gender and number|show_list|m-p}} There is no limit to the number of parameters that can be given this way. The module will process all of its parameters until it finds one that is empty. This means that the following will display only "{{#invoke:gender and number|show_list|m}}" and not "{{#invoke:gender and number|show_list|m|n}}": <pre> {{#invoke:gender and number|show_list|m||n}} </pre> <includeonly>[[Category:Gender and number templates|*]][[Category:General utility modules]]</includeonly> c081qtwac0ni7f55gw8m5qdn1bl5qg3 64427 64426 2014-02-02T07:48:51Z Msh210 1325 Let non-Luaists see the part that pertains to them. 64427 wikitext text/x-wiki This module shows gender annotations, such as {{g|m}} or {{g|f-p}}. "Gender" is something of a misnomer, as the available annotation categories include animacy and verb aspect (though the former is sometimes also considered a part of word gender). It is used as part of other modules, or can be called from a template. The module is invoked with a list of one or more "gender specifications". A specification is a single, full "gender", and can be either a simple gender such as "m", a combination of gender and number like "m-p" or something else.__TOC__ ==Gender specifications for Lua script writers== Every specification is a list of codes, given as a single string with the codes separated by hyphens. Each code is defined within the module itself, and when displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. If the module is given several specifications at once (in a list), then each item in the list is separated by a comma. Examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} ==Usage== The module can be used from another module by importing it and calling the exported <code>format_list</code> function. It requires one parameter, which must be a table of zero or more strings. It will then return a string containing the result. For example: <source lang="lua"> local gen = require("Module:gender and number") local example1 = gen.format_list({"m"}) local example2 = gen.format_list({"m", "f"}) local example3 = gen.format_list({"m-p"}) </source> It can also be invoked from a template. The function <code>show_list</code> is used for this. It works the same way as the <code>format_list</code> function, but the specifications are passed as parameters to the module invocation, like so: <pre> *{{#invoke:gender and number|show_list|m}} *{{#invoke:gender and number|show_list|m|f}} *{{#invoke:gender and number|show_list|m-p}} </pre> :*{{#invoke:gender and number|show_list|m}} :*{{#invoke:gender and number|show_list|m|f}} :*{{#invoke:gender and number|show_list|m-p}} There is no limit to the number of parameters that can be given this way. The module will process all of its parameters until it finds one that is empty. This means that the following will display only "{{#invoke:gender and number|show_list|m}}" and not "{{#invoke:gender and number|show_list|m|n}}": <pre> {{#invoke:gender and number|show_list|m||n}} </pre> <includeonly>[[Category:Gender and number templates|*]][[Category:General utility modules]]</includeonly> 6tt22redpyt96dycndohsy0yks9100s 64428 64427 2014-02-02T17:30:01Z Rua 1351 64428 wikitext text/x-wiki This module shows gender annotations, such as {{g|m}} or {{g|f-p}}. "Gender" is something of a misnomer, as the available annotation categories include animacy and verb aspect (though the former is sometimes also considered a part of word gender). It is used as part of other modules, or can be called from a template. The module is invoked with a list of one or more "gender specifications". A specification is a single, full "gender", and can be either a simple gender such as "m", a combination of gender and number like "m-p" or something else.__TOC__ ==Gender specifications for Lua script writers== Every specification is a list of codes, given as a single string with the codes separated by hyphens. Each code is defined within the module itself, and when displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. If the module is given several specifications at once (in a list), then each item in the list is separated by a comma. Examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} ==Usage== The module can be used from another module by importing it and calling the exported <code>format_list</code> function. It requires one parameter, which must be a table of zero or more strings. It will then return a string containing the result. For example: <source lang="lua"> local gen = require("Module:gender and number") local example1 = gen.format_list({"m"}) local example2 = gen.format_list({"m", "f"}) local example3 = gen.format_list({"m-p"}) </source> It can also be invoked from a template. The function <code>show_list</code> is used for this. It works the same way as the <code>format_list</code> function, but the specifications are passed as parameters to the module invocation, like so: <pre> *{{#invoke:gender and number|show_list|m}} *{{#invoke:gender and number|show_list|m|f}} *{{#invoke:gender and number|show_list|m-p}} </pre> :*{{#invoke:gender and number|show_list|m}} :*{{#invoke:gender and number|show_list|m|f}} :*{{#invoke:gender and number|show_list|m-p}} There is no limit to the number of parameters that can be given this way. The module will process all of its parameters until it finds one that is empty. This means that the following will display only "{{#invoke:gender and number|show_list|m}}" and not "{{#invoke:gender and number|show_list|m|n}}": <pre> {{#invoke:gender and number|show_list|m||n}} </pre> <includeonly> [[Category:Grammar templates]] [[Category:General utility modules]] </includeonly> 7twhr8k3oa0ift3sbg92rzj0zi1c0lu 64429 64428 2016-08-22T01:35:33Z Benwing2 1346 /* Usage */ 64429 wikitext text/x-wiki This module shows gender annotations, such as {{g|m}} or {{g|f-p}}. "Gender" is something of a misnomer, as the available annotation categories include animacy and verb aspect (though the former is sometimes also considered a part of word gender). It is used as part of other modules, or can be called from a template. The module is invoked with a list of one or more "gender specifications". A specification is a single, full "gender", and can be either a simple gender such as "m", a combination of gender and number like "m-p" or something else.__TOC__ ==Gender specifications for Lua script writers== Every specification is a list of codes, given as a single string with the codes separated by hyphens. Each code is defined within the module itself, and when displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. If the module is given several specifications at once (in a list), then each item in the list is separated by a comma. Examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} ==Usage== The module can be used from another module by importing it and calling the exported <code>format_list</code> function. It requires one parameter, which must be a table of zero or more strings. It will then return a string containing the result. For example: <source lang="lua"> local gen = require("Module:gender and number") local example1 = gen.format_list({"m"}) local example2 = gen.format_list({"m", "f"}) local example3 = gen.format_list({"m-p"}) </source> '''WARNING: The list passed in will be overwritten.''' It can also be invoked from a template. The function <code>show_list</code> is used for this. It works the same way as the <code>format_list</code> function, but the specifications are passed as parameters to the module invocation, like so: <pre> *{{#invoke:gender and number|show_list|m}} *{{#invoke:gender and number|show_list|m|f}} *{{#invoke:gender and number|show_list|m-p}} </pre> :*{{#invoke:gender and number|show_list|m}} :*{{#invoke:gender and number|show_list|m|f}} :*{{#invoke:gender and number|show_list|m-p}} There is no limit to the number of parameters that can be given this way. The module will process all of its parameters until it finds one that is empty. This means that the following will display only "{{#invoke:gender and number|show_list|m}}" and not "{{#invoke:gender and number|show_list|m|n}}": <pre> {{#invoke:gender and number|show_list|m||n}} </pre> <includeonly> [[Category:Grammar templates]] [[Category:General utility modules]] </includeonly> ly98rdiemii6jyr2lngk95ug0zjl0gy 64430 64429 2018-01-03T16:36:27Z PUC 1484 not a template 64430 wikitext text/x-wiki This module shows gender annotations, such as {{g|m}} or {{g|f-p}}. "Gender" is something of a misnomer, as the available annotation categories include animacy and verb aspect (though the former is sometimes also considered a part of word gender). It is used as part of other modules, or can be called from a template. The module is invoked with a list of one or more "gender specifications". A specification is a single, full "gender", and can be either a simple gender such as "m", a combination of gender and number like "m-p" or something else.__TOC__ ==Gender specifications for Lua script writers== Every specification is a list of codes, given as a single string with the codes separated by hyphens. Each code is defined within the module itself, and when displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. If the module is given several specifications at once (in a list), then each item in the list is separated by a comma. Examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} ==Usage== The module can be used from another module by importing it and calling the exported <code>format_list</code> function. It requires one parameter, which must be a table of zero or more strings. It will then return a string containing the result. For example: <source lang="lua"> local gen = require("Module:gender and number") local example1 = gen.format_list({"m"}) local example2 = gen.format_list({"m", "f"}) local example3 = gen.format_list({"m-p"}) </source> '''WARNING: The list passed in will be overwritten.''' It can also be invoked from a template. The function <code>show_list</code> is used for this. It works the same way as the <code>format_list</code> function, but the specifications are passed as parameters to the module invocation, like so: <pre> *{{#invoke:gender and number|show_list|m}} *{{#invoke:gender and number|show_list|m|f}} *{{#invoke:gender and number|show_list|m-p}} </pre> :*{{#invoke:gender and number|show_list|m}} :*{{#invoke:gender and number|show_list|m|f}} :*{{#invoke:gender and number|show_list|m-p}} There is no limit to the number of parameters that can be given this way. The module will process all of its parameters until it finds one that is empty. This means that the following will display only "{{#invoke:gender and number|show_list|m}}" and not "{{#invoke:gender and number|show_list|m|n}}": <pre> {{#invoke:gender and number|show_list|m||n}} </pre> <includeonly> [[Category:General utility modules]] </includeonly> r7zryg1r5r3k05qeg7kb7n8avuiphlc 64431 64430 2022-01-27T11:38:51Z Surjection 380 64431 wikitext text/x-wiki This module shows gender annotations, such as {{g|m}} or {{g|f-p}}. "Gender" is something of a misnomer, as the available annotation categories include animacy and verb aspect (though the former is sometimes also considered a part of word gender). It is used as part of other modules, or can be called from a template. The module is invoked with a list of one or more "gender specifications". A specification is a single, full "gender", and can be either a simple gender such as "m", a combination of gender and number like "m-p" or something else.__TOC__ ==Gender specifications for Lua script writers== Every specification is a list of codes, given as a single string with the codes separated by hyphens. Each code is defined within [[Module:gender and number/data]], and when displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. If the module is given several specifications at once (in a list), then each item in the list is separated by a comma. Examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} ==Usage== The module can be used from another module by importing it and calling the exported <code>format_list</code> function. It requires one parameter, which must be a table of zero or more strings. It will then return a string containing the result. For example: <source lang="lua"> local gen = require("Module:gender and number") local example1 = gen.format_list({"m"}) local example2 = gen.format_list({"m", "f"}) local example3 = gen.format_list({"m-p"}) </source> '''WARNING: The list passed in will be overwritten.''' It can also be invoked from a template. The function <code>show_list</code> is used for this. It works the same way as the <code>format_list</code> function, but the specifications are passed as parameters to the module invocation, like so: <pre> *{{#invoke:gender and number|show_list|m}} *{{#invoke:gender and number|show_list|m|f}} *{{#invoke:gender and number|show_list|m-p}} </pre> :*{{#invoke:gender and number|show_list|m}} :*{{#invoke:gender and number|show_list|m|f}} :*{{#invoke:gender and number|show_list|m-p}} There is no limit to the number of parameters that can be given this way. The module will process all of its parameters until it finds one that is empty. This means that the following will display only "{{#invoke:gender and number|show_list|m}}" and not "{{#invoke:gender and number|show_list|m|n}}": <pre> {{#invoke:gender and number|show_list|m||n}} </pre> <includeonly> [[Category:General utility modules]] </includeonly> jawwd1q08psuomm72crq642pzq12k0g 64432 64431 2022-07-01T17:48:23Z Chuck Entz 1231 64432 wikitext text/x-wiki This module shows gender annotations, such as {{g|m}} or {{g|f-p}}. "Gender" is something of a misnomer, as the available annotation categories include animacy and verb aspect (though the former is sometimes also considered a part of word gender). It is used as part of other modules, or can be called from a template. The module is invoked with a list of one or more "gender specifications". A specification is a single, full "gender", and can be either a simple gender such as "m", a combination of gender and number like "m-p" or something else.__TOC__ ==Gender specifications for Lua script writers== Every specification is a list of codes, given as a single string with the codes separated by hyphens. Each code is defined within [[Module:gender and number/data]], and when displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. If the module is given several specifications at once (in a list), then each item in the list is separated by a comma. Examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} ==Usage== The module can be used from another module by importing it and calling the exported <code>format_list</code> function. It requires one parameter, which must be a table of zero or more strings. It will then return a string containing the result. For example: <syntaxhighlight lang="lua"> local gen = require("Module:gender and number") local example1 = gen.format_list({"m"}) local example2 = gen.format_list({"m", "f"}) local example3 = gen.format_list({"m-p"}) </syntaxhighlight> '''WARNING: The list passed in will be overwritten.''' It can also be invoked from a template. The function <code>show_list</code> is used for this. It works the same way as the <code>format_list</code> function, but the specifications are passed as parameters to the module invocation, like so: <pre> *{{#invoke:gender and number|show_list|m}} *{{#invoke:gender and number|show_list|m|f}} *{{#invoke:gender and number|show_list|m-p}} </pre> :*{{#invoke:gender and number|show_list|m}} :*{{#invoke:gender and number|show_list|m|f}} :*{{#invoke:gender and number|show_list|m-p}} There is no limit to the number of parameters that can be given this way. The module will process all of its parameters until it finds one that is empty. This means that the following will display only "{{#invoke:gender and number|show_list|m}}" and not "{{#invoke:gender and number|show_list|m|n}}": <pre> {{#invoke:gender and number|show_list|m||n}} </pre> <includeonly> [[Category:General utility modules]] </includeonly> k7jykc4jh39lh7fypwyz61piaoui33l 64433 64432 2023-03-01T08:40:15Z Benwing2 1346 /* Gender specifications for Lua script writers */ 64433 wikitext text/x-wiki This module shows gender annotations, such as {{g|m}} or {{g|f-p}}. "Gender" is something of a misnomer, as the available annotation categories include animacy and verb aspect (though the former is sometimes also considered a part of word gender). It is used as part of other modules, or can be called from a template. The module is invoked with a list of one or more "gender specifications". A specification is a single, full "gender", and can be either a simple gender such as "m", a combination of gender and number like "m-p" or something else.__TOC__ ==Gender/number specifications== A gender/number specification is a list of codes, given as a single string with the codes separated by hyphens. Each code is defined within [[Module:gender and number/data]], and when displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. If the module is given several specifications at once (in a list), then each item in the list is separated by a comma. Examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} ==Usage== The module can be used from another module by importing it and calling the exported <code>format_list</code> function. It requires one parameter, which must be a table of zero or more strings. It will then return a string containing the result. For example: <syntaxhighlight lang="lua"> local gen = require("Module:gender and number") local example1 = gen.format_list({"m"}) local example2 = gen.format_list({"m", "f"}) local example3 = gen.format_list({"m-p"}) </syntaxhighlight> '''WARNING: The list passed in will be overwritten.''' It can also be invoked from a template. The function <code>show_list</code> is used for this. It works the same way as the <code>format_list</code> function, but the specifications are passed as parameters to the module invocation, like so: <pre> *{{#invoke:gender and number|show_list|m}} *{{#invoke:gender and number|show_list|m|f}} *{{#invoke:gender and number|show_list|m-p}} </pre> :*{{#invoke:gender and number|show_list|m}} :*{{#invoke:gender and number|show_list|m|f}} :*{{#invoke:gender and number|show_list|m-p}} There is no limit to the number of parameters that can be given this way. The module will process all of its parameters until it finds one that is empty. This means that the following will display only "{{#invoke:gender and number|show_list|m}}" and not "{{#invoke:gender and number|show_list|m|n}}": <pre> {{#invoke:gender and number|show_list|m||n}} </pre> <includeonly> [[Category:General utility modules]] </includeonly> pew4w231j00z7yz3c0g9q4vye3vt1hx 64434 64433 2023-03-03T23:50:54Z Benwing2 1346 64434 wikitext text/x-wiki This module shows gender/number annotations, such as {{g|m}} (masculine), {{g|n-p}} (neuter plural) or {{g|f-an-d}} (feminine animate dual). "Gender" is something of a misnomer, as the available annotation categories include other similar lexical characteristics such as animacy and verb aspect (though the former is sometimes also considered a part of word gender). These annotations are attached to nouns, pronouns and other parts of speech that have such lexical categories, depending on the particular language. The annotations occur as parameters e.g. to headword templates such as {{tl|head}}, {{tl|es-noun}} (for Spanish nouns), {{tl|fr-proper noun}} (for French proper nouns) and {{tl|ru-verb}} (for Russian verbs); to translation templates such as {{tl|t}}, {{tl|t+}} and {{tl|t-check}}; to definition templates such as {{tl|demonym-noun}}; and to dedicated gender/number templates such as {{tl|g}}. __TOC__ ==Gender/number specifications== A given annotation is described using a ''gender/number specification''. Each such specification is a hyphen-separated list of ''gender/number codes'', where a given code describes a single value of a particular category (e.g. ''m'' for "masculine", ''an'' for "animate", ''p'' for "plural"). Often, templates accept a list of gender/number specifications rather than just a single one, since some terms belong to multiple possible gender/number categories. Depending on the template in question, these specifications will be given using separate parameters or a single comma-separated parameter. When displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. Some examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"mfbysense-p"} || {{#invoke:gender and number|show_list|mfbysense-p}} |- | {"?-p"} || {{#invoke:gender and number|show_list|?-p}} |- | {"?!-an-s"} || {{#invoke:gender and number|show_list|?!-an-s}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} The source of truth for the current set of recognized codes is [[Module:gender and number/data]]. Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} ==Usage== The module can be used from another module by importing it and calling the exported <code>format_list</code> function. It requires one parameter, which must be a table of zero or more strings. It will then return a string containing the result. For example: <syntaxhighlight lang="lua"> local gen = require("Module:gender and number") local example1 = gen.format_list({"m"}) local example2 = gen.format_list({"m", "f"}) local example3 = gen.format_list({"m-p"}) </syntaxhighlight> '''WARNING: The list passed in will be overwritten.''' It can also be invoked from a template. The function <code>show_list</code> is used for this. It works the same way as the <code>format_list</code> function, but the specifications are passed as parameters to the module invocation, like so: <pre> *{{#invoke:gender and number|show_list|m}} *{{#invoke:gender and number|show_list|m|f}} *{{#invoke:gender and number|show_list|m-p}} </pre> :*{{#invoke:gender and number|show_list|m}} :*{{#invoke:gender and number|show_list|m|f}} :*{{#invoke:gender and number|show_list|m-p}} There is no limit to the number of parameters that can be given this way. The module will process all of its parameters until it finds one that is empty. This means that the following will display only "{{#invoke:gender and number|show_list|m}}" and not "{{#invoke:gender and number|show_list|m|n}}": <pre> {{#invoke:gender and number|show_list|m||n}} </pre> <includeonly> [[Category:General utility modules]] </includeonly> g2sl1rd06gjbm6918azlcqzw083sqqo 64435 64434 2023-03-04T01:25:38Z Benwing2 1346 /* Gender/number specifications */ expand with current codes 64435 wikitext text/x-wiki This module shows gender/number annotations, such as {{g|m}} (masculine), {{g|n-p}} (neuter plural) or {{g|f-an-d}} (feminine animate dual). "Gender" is something of a misnomer, as the available annotation categories include other similar lexical characteristics such as animacy and verb aspect (though the former is sometimes also considered a part of word gender). These annotations are attached to nouns, pronouns and other parts of speech that have such lexical categories, depending on the particular language. The annotations occur as parameters e.g. to headword templates such as {{tl|head}}, {{tl|es-noun}} (for Spanish nouns), {{tl|fr-proper noun}} (for French proper nouns) and {{tl|ru-verb}} (for Russian verbs); to translation templates such as {{tl|t}}, {{tl|t+}} and {{tl|t-check}}; to definition templates such as {{tl|demonym-noun}}; and to dedicated gender/number templates such as {{tl|g}}. __TOC__ ==Gender/number specifications== A given annotation is described using a ''gender/number specification''. Each such specification is a hyphen-separated list of ''gender/number codes'', where a given code describes a single value of a particular category (e.g. ''m'' for "masculine", ''an'' for "animate", ''p'' for "plural"). Often, templates accept a list of gender/number specifications rather than just a single one, since some terms belong to multiple possible gender/number categories. Depending on the template in question, these specifications will be given using separate parameters or a single comma-separated parameter. When displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. Some examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"mfbysense-p"} || {{#invoke:gender and number|show_list|mfbysense-p}} |- | {"?-p"} || {{#invoke:gender and number|show_list|?-p}} |- | {"?!-an-s"} || {{#invoke:gender and number|show_list|?!-an-s}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} The source of truth for the current set of recognized codes is [[Module:gender and number/data]]. The following table gives: # the currently recognized codes; # the type category they belong to (in a given spec, only one code in a given type category can be present); # how the codes display (hover over the display form to see an explanation of what the code means); # which category (if any) that the term will be assigned to if the code in question is in the term's headword gender/number spec (where <code>POS</code> is replaced by the pluralized part of speech of the term). {{#invoke:gender and number doc|gender_and_number_table}} Certain gender/number codes are ''combination codes'' that are more or less equivalent to individually specifying two or more codes of a given type category in separate gender/number specs. Some combination codes categorize and display additionally. The following table gives these combination codes: {{#invoke:gender and number doc|combinations_table}} In certain type categories, if more than one code of that category is given (necessarily in different gender/number specifications), the term is added to a special category. The following table gives these multi-code categories: {{#invoke:gender and number doc|multicode_table}} ==Noun classes== Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} ==Usage== The module can be used from another module by importing it and calling the exported <code>format_list</code> function. It requires one parameter, which must be a table of zero or more strings. It will then return a string containing the result. For example: <syntaxhighlight lang="lua"> local gen = require("Module:gender and number") local example1 = gen.format_list({"m"}) local example2 = gen.format_list({"m", "f"}) local example3 = gen.format_list({"m-p"}) </syntaxhighlight> '''WARNING: The list passed in will be overwritten.''' It can also be invoked from a template. The function <code>show_list</code> is used for this. It works the same way as the <code>format_list</code> function, but the specifications are passed as parameters to the module invocation, like so: <pre> *{{#invoke:gender and number|show_list|m}} *{{#invoke:gender and number|show_list|m|f}} *{{#invoke:gender and number|show_list|m-p}} </pre> :*{{#invoke:gender and number|show_list|m}} :*{{#invoke:gender and number|show_list|m|f}} :*{{#invoke:gender and number|show_list|m-p}} There is no limit to the number of parameters that can be given this way. The module will process all of its parameters until it finds one that is empty. This means that the following will display only "{{#invoke:gender and number|show_list|m}}" and not "{{#invoke:gender and number|show_list|m|n}}": <pre> {{#invoke:gender and number|show_list|m||n}} </pre> <includeonly> [[Category:General utility modules]] </includeonly> owoneetb08nyyg93xdlt2i72swsxyak 64436 64435 2024-03-08T07:17:52Z WingerBot 1359 'General utility modules' -> 'Utility modules' and remove user modules from categories (manually assisted) 64436 wikitext text/x-wiki This module shows gender/number annotations, such as {{g|m}} (masculine), {{g|n-p}} (neuter plural) or {{g|f-an-d}} (feminine animate dual). "Gender" is something of a misnomer, as the available annotation categories include other similar lexical characteristics such as animacy and verb aspect (though the former is sometimes also considered a part of word gender). These annotations are attached to nouns, pronouns and other parts of speech that have such lexical categories, depending on the particular language. The annotations occur as parameters e.g. to headword templates such as {{tl|head}}, {{tl|es-noun}} (for Spanish nouns), {{tl|fr-proper noun}} (for French proper nouns) and {{tl|ru-verb}} (for Russian verbs); to translation templates such as {{tl|t}}, {{tl|t+}} and {{tl|t-check}}; to definition templates such as {{tl|demonym-noun}}; and to dedicated gender/number templates such as {{tl|g}}. __TOC__ ==Gender/number specifications== A given annotation is described using a ''gender/number specification''. Each such specification is a hyphen-separated list of ''gender/number codes'', where a given code describes a single value of a particular category (e.g. ''m'' for "masculine", ''an'' for "animate", ''p'' for "plural"). Often, templates accept a list of gender/number specifications rather than just a single one, since some terms belong to multiple possible gender/number categories. Depending on the template in question, these specifications will be given using separate parameters or a single comma-separated parameter. When displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. Some examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"mfbysense-p"} || {{#invoke:gender and number|show_list|mfbysense-p}} |- | {"?-p"} || {{#invoke:gender and number|show_list|?-p}} |- | {"?!-an-s"} || {{#invoke:gender and number|show_list|?!-an-s}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} The source of truth for the current set of recognized codes is [[Module:gender and number/data]]. The following table gives: # the currently recognized codes; # the type category they belong to (in a given spec, only one code in a given type category can be present); # how the codes display (hover over the display form to see an explanation of what the code means); # which category (if any) that the term will be assigned to if the code in question is in the term's headword gender/number spec (where <code>POS</code> is replaced by the pluralized part of speech of the term). {{#invoke:gender and number doc|gender_and_number_table}} Certain gender/number codes are ''combination codes'' that are more or less equivalent to individually specifying two or more codes of a given type category in separate gender/number specs. Some combination codes categorize and display additionally. The following table gives these combination codes: {{#invoke:gender and number doc|combinations_table}} In certain type categories, if more than one code of that category is given (necessarily in different gender/number specifications), the term is added to a special category. The following table gives these multi-code categories: {{#invoke:gender and number doc|multicode_table}} ==Noun classes== Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} ==Usage== The module can be used from another module by importing it and calling the exported <code>format_list</code> function. It requires one parameter, which must be a table of zero or more strings. It will then return a string containing the result. For example: <syntaxhighlight lang="lua"> local gen = require("Module:gender and number") local example1 = gen.format_list({"m"}) local example2 = gen.format_list({"m", "f"}) local example3 = gen.format_list({"m-p"}) </syntaxhighlight> '''WARNING: The list passed in will be overwritten.''' It can also be invoked from a template. The function <code>show_list</code> is used for this. It works the same way as the <code>format_list</code> function, but the specifications are passed as parameters to the module invocation, like so: <pre> *{{#invoke:gender and number|show_list|m}} *{{#invoke:gender and number|show_list|m|f}} *{{#invoke:gender and number|show_list|m-p}} </pre> :*{{#invoke:gender and number|show_list|m}} :*{{#invoke:gender and number|show_list|m|f}} :*{{#invoke:gender and number|show_list|m-p}} There is no limit to the number of parameters that can be given this way. The module will process all of its parameters until it finds one that is empty. This means that the following will display only "{{#invoke:gender and number|show_list|m}}" and not "{{#invoke:gender and number|show_list|m|n}}": <pre> {{#invoke:gender and number|show_list|m||n}} </pre> <includeonly> [[Category:Utility modules]] </includeonly> t1hfnp3s98yrzu7btbxh6sl6qr11lkf 64437 64436 2024-03-09T06:37:43Z WingerBot 1359 fix module categorization using {{module cat}} (manually assisted) 64437 wikitext text/x-wiki This module shows gender/number annotations, such as {{g|m}} (masculine), {{g|n-p}} (neuter plural) or {{g|f-an-d}} (feminine animate dual). "Gender" is something of a misnomer, as the available annotation categories include other similar lexical characteristics such as animacy and verb aspect (though the former is sometimes also considered a part of word gender). These annotations are attached to nouns, pronouns and other parts of speech that have such lexical categories, depending on the particular language. The annotations occur as parameters e.g. to headword templates such as {{tl|head}}, {{tl|es-noun}} (for Spanish nouns), {{tl|fr-proper noun}} (for French proper nouns) and {{tl|ru-verb}} (for Russian verbs); to translation templates such as {{tl|t}}, {{tl|t+}} and {{tl|t-check}}; to definition templates such as {{tl|demonym-noun}}; and to dedicated gender/number templates such as {{tl|g}}. __TOC__ ==Gender/number specifications== A given annotation is described using a ''gender/number specification''. Each such specification is a hyphen-separated list of ''gender/number codes'', where a given code describes a single value of a particular category (e.g. ''m'' for "masculine", ''an'' for "animate", ''p'' for "plural"). Often, templates accept a list of gender/number specifications rather than just a single one, since some terms belong to multiple possible gender/number categories. Depending on the template in question, these specifications will be given using separate parameters or a single comma-separated parameter. When displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. Some examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"mfbysense-p"} || {{#invoke:gender and number|show_list|mfbysense-p}} |- | {"?-p"} || {{#invoke:gender and number|show_list|?-p}} |- | {"?!-an-s"} || {{#invoke:gender and number|show_list|?!-an-s}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} The source of truth for the current set of recognized codes is [[Module:gender and number/data]]. The following table gives: # the currently recognized codes; # the type category they belong to (in a given spec, only one code in a given type category can be present); # how the codes display (hover over the display form to see an explanation of what the code means); # which category (if any) that the term will be assigned to if the code in question is in the term's headword gender/number spec (where <code>POS</code> is replaced by the pluralized part of speech of the term). {{#invoke:gender and number doc|gender_and_number_table}} Certain gender/number codes are ''combination codes'' that are more or less equivalent to individually specifying two or more codes of a given type category in separate gender/number specs. Some combination codes categorize and display additionally. The following table gives these combination codes: {{#invoke:gender and number doc|combinations_table}} In certain type categories, if more than one code of that category is given (necessarily in different gender/number specifications), the term is added to a special category. The following table gives these multi-code categories: {{#invoke:gender and number doc|multicode_table}} ==Noun classes== Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} ==Usage== The module can be used from another module by importing it and calling the exported <code>format_list</code> function. It requires one parameter, which must be a table of zero or more strings. It will then return a string containing the result. For example: <syntaxhighlight lang="lua"> local gen = require("Module:gender and number") local example1 = gen.format_list({"m"}) local example2 = gen.format_list({"m", "f"}) local example3 = gen.format_list({"m-p"}) </syntaxhighlight> '''WARNING: The list passed in will be overwritten.''' It can also be invoked from a template. The function <code>show_list</code> is used for this. It works the same way as the <code>format_list</code> function, but the specifications are passed as parameters to the module invocation, like so: <pre> *{{#invoke:gender and number|show_list|m}} *{{#invoke:gender and number|show_list|m|f}} *{{#invoke:gender and number|show_list|m-p}} </pre> :*{{#invoke:gender and number|show_list|m}} :*{{#invoke:gender and number|show_list|m|f}} :*{{#invoke:gender and number|show_list|m-p}} There is no limit to the number of parameters that can be given this way. The module will process all of its parameters until it finds one that is empty. This means that the following will display only "{{#invoke:gender and number|show_list|m}}" and not "{{#invoke:gender and number|show_list|m|n}}": <pre> {{#invoke:gender and number|show_list|m||n}} </pre> {{module cat|-|Page generation}} hnrkpa1sisszt3qqjmbnfw53hnqr0dv 64438 64437 2024-06-27T21:36:43Z Benwing2 1346 add exported functions 64438 wikitext text/x-wiki This module shows gender/number annotations, such as {{g|m}} (masculine), {{g|n-p}} (neuter plural) or {{g|f-an-d}} (feminine animate dual). "Gender" is something of a misnomer, as the available annotation categories include other similar lexical characteristics such as animacy and verb aspect (though the former is sometimes also considered a part of word gender). These annotations are attached to nouns, pronouns and other parts of speech that have such lexical categories, depending on the particular language. The annotations occur as parameters e.g. to headword templates such as {{tl|head}}, {{tl|es-noun}} (for Spanish nouns), {{tl|fr-proper noun}} (for French proper nouns) and {{tl|ru-verb}} (for Russian verbs); to translation templates such as {{tl|t}}, {{tl|t+}} and {{tl|t-check}}; to definition templates such as {{tl|demonym-noun}}; and to dedicated gender/number templates such as {{tl|g}}. __TOC__ ==Gender/number specifications== A given annotation is described using a ''gender/number specification''. Each such specification is a hyphen-separated list of ''gender/number codes'', where a given code describes a single value of a particular category (e.g. ''m'' for "masculine", ''an'' for "animate", ''p'' for "plural"). Often, templates accept a list of gender/number specifications rather than just a single one, since some terms belong to multiple possible gender/number categories. Depending on the template in question, these specifications will be given using separate parameters or a single comma-separated parameter. When displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. Some examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"mfbysense-p"} || {{#invoke:gender and number|show_list|mfbysense-p}} |- | {"?-p"} || {{#invoke:gender and number|show_list|?-p}} |- | {"?!-an-s"} || {{#invoke:gender and number|show_list|?!-an-s}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} The source of truth for the current set of recognized codes is [[Module:gender and number/data]]. The following table gives: # the currently recognized codes; # the type category they belong to (in a given spec, only one code in a given type category can be present); # how the codes display (hover over the display form to see an explanation of what the code means); # which category (if any) that the term will be assigned to if the code in question is in the term's headword gender/number spec (where <code>POS</code> is replaced by the pluralized part of speech of the term). {{#invoke:gender and number doc|gender_and_number_table}} Certain gender/number codes are ''combination codes'' that are more or less equivalent to individually specifying two or more codes of a given type category in separate gender/number specs. Some combination codes categorize and display additionally. The following table gives these combination codes: {{#invoke:gender and number doc|combinations_table}} In certain type categories, if more than one code of that category is given (necessarily in different gender/number specifications), the term is added to a special category. The following table gives these multi-code categories: {{#invoke:gender and number doc|multicode_table}} ==Noun classes== Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} ==Usage== The module can be used from another module by importing it and calling the exported <code>format_list</code> function. It requires one parameter, which must be a table of zero or more strings. It will then return a string containing the result. For example: <syntaxhighlight lang="lua"> local gen = require("Module:gender and number") local example1 = gen.format_list({"m"}) local example2 = gen.format_list({"m", "f"}) local example3 = gen.format_list({"m-p"}) </syntaxhighlight> '''WARNING: The list passed in will be overwritten.''' It can also be invoked from a template. The function <code>show_list</code> is used for this. It works the same way as the <code>format_list</code> function, but the specifications are passed as parameters to the module invocation, like so: <pre> *{{#invoke:gender and number|show_list|m}} *{{#invoke:gender and number|show_list|m|f}} *{{#invoke:gender and number|show_list|m-p}} </pre> :*{{#invoke:gender and number|show_list|m}} :*{{#invoke:gender and number|show_list|m|f}} :*{{#invoke:gender and number|show_list|m-p}} There is no limit to the number of parameters that can be given this way. The module will process all of its parameters until it finds one that is empty. This means that the following will display only "{{#invoke:gender and number|show_list|m}}" and not "{{#invoke:gender and number|show_list|m|n}}": <pre> {{#invoke:gender and number|show_list|m||n}} </pre> ==Exported functions== {{module documentation|section_level=3|identifier=^export}} {{module cat|-|Page generation}} boe84zlct9up6fv8gve6zqx77w3hg8o 64439 64438 2026-06-27T15:56:47Z King ChristLike 964 25 revisions imported from [[:en:Module:gender_and_number/documentation]] 64438 wikitext text/x-wiki This module shows gender/number annotations, such as {{g|m}} (masculine), {{g|n-p}} (neuter plural) or {{g|f-an-d}} (feminine animate dual). "Gender" is something of a misnomer, as the available annotation categories include other similar lexical characteristics such as animacy and verb aspect (though the former is sometimes also considered a part of word gender). These annotations are attached to nouns, pronouns and other parts of speech that have such lexical categories, depending on the particular language. The annotations occur as parameters e.g. to headword templates such as {{tl|head}}, {{tl|es-noun}} (for Spanish nouns), {{tl|fr-proper noun}} (for French proper nouns) and {{tl|ru-verb}} (for Russian verbs); to translation templates such as {{tl|t}}, {{tl|t+}} and {{tl|t-check}}; to definition templates such as {{tl|demonym-noun}}; and to dedicated gender/number templates such as {{tl|g}}. __TOC__ ==Gender/number specifications== A given annotation is described using a ''gender/number specification''. Each such specification is a hyphen-separated list of ''gender/number codes'', where a given code describes a single value of a particular category (e.g. ''m'' for "masculine", ''an'' for "animate", ''p'' for "plural"). Often, templates accept a list of gender/number specifications rather than just a single one, since some terms belong to multiple possible gender/number categories. Depending on the template in question, these specifications will be given using separate parameters or a single comma-separated parameter. When displaying a specification, each code in the specification is converted into the appropriate display form. The different codes within the specification are then added together, separated by spaces. Some examples: {| class="wikitable" ! List ! Result |- | {"m"} || {{#invoke:gender and number|show_list|m}} |- | {"m-p"} || {{#invoke:gender and number|show_list|m-p}} |- | {"m-an-p"} || {{#invoke:gender and number|show_list|m-an-p}} |- | {"mfbysense-p"} || {{#invoke:gender and number|show_list|mfbysense-p}} |- | {"?-p"} || {{#invoke:gender and number|show_list|?-p}} |- | {"?!-an-s"} || {{#invoke:gender and number|show_list|?!-an-s}} |- | {"f-d", "m-p"} || {{#invoke:gender and number|show_list|f-d|m-p}} |- | {"m-p", "f-p"} || {{#invoke:gender and number|show_list|m-p|f-p}} |- | {"m", "f", "p"} || {{#invoke:gender and number|show_list|m|f|p}} |} The source of truth for the current set of recognized codes is [[Module:gender and number/data]]. The following table gives: # the currently recognized codes; # the type category they belong to (in a given spec, only one code in a given type category can be present); # how the codes display (hover over the display form to see an explanation of what the code means); # which category (if any) that the term will be assigned to if the code in question is in the term's headword gender/number spec (where <code>POS</code> is replaced by the pluralized part of speech of the term). {{#invoke:gender and number doc|gender_and_number_table}} Certain gender/number codes are ''combination codes'' that are more or less equivalent to individually specifying two or more codes of a given type category in separate gender/number specs. Some combination codes categorize and display additionally. The following table gives these combination codes: {{#invoke:gender and number doc|combinations_table}} In certain type categories, if more than one code of that category is given (necessarily in different gender/number specifications), the term is added to a special category. The following table gives these multi-code categories: {{#invoke:gender and number doc|multicode_table}} ==Noun classes== Specifications that begin with "c" (but not "c" itself) are treated specially. They are considered noun classes, and the part immediately after the "c" is simply treated as some kind of name for a noun class; usually this will be a number. Noun classes do not have sub-parts, so they will not contain hyphens. When more than one specification is given, they must all be noun classes, and they are displayed separated with a forward slash instead, and preceded by ''class''. Examples: {| class="wikitable" ! List ! Result |- | {"c1"} || {{#invoke:gender and number|show_list|c1}} |- | {"c1", "c2"} || {{#invoke:gender and number|show_list|c1|c2}} |- | {"c1a", "c2a"} || {{#invoke:gender and number|show_list|c1a|c2a}} |} ==Usage== The module can be used from another module by importing it and calling the exported <code>format_list</code> function. It requires one parameter, which must be a table of zero or more strings. It will then return a string containing the result. For example: <syntaxhighlight lang="lua"> local gen = require("Module:gender and number") local example1 = gen.format_list({"m"}) local example2 = gen.format_list({"m", "f"}) local example3 = gen.format_list({"m-p"}) </syntaxhighlight> '''WARNING: The list passed in will be overwritten.''' It can also be invoked from a template. The function <code>show_list</code> is used for this. It works the same way as the <code>format_list</code> function, but the specifications are passed as parameters to the module invocation, like so: <pre> *{{#invoke:gender and number|show_list|m}} *{{#invoke:gender and number|show_list|m|f}} *{{#invoke:gender and number|show_list|m-p}} </pre> :*{{#invoke:gender and number|show_list|m}} :*{{#invoke:gender and number|show_list|m|f}} :*{{#invoke:gender and number|show_list|m-p}} There is no limit to the number of parameters that can be given this way. The module will process all of its parameters until it finds one that is empty. This means that the following will display only "{{#invoke:gender and number|show_list|m}}" and not "{{#invoke:gender and number|show_list|m|n}}": <pre> {{#invoke:gender and number|show_list|m||n}} </pre> ==Exported functions== {{module documentation|section_level=3|identifier=^export}} {{module cat|-|Page generation}} boe84zlct9up6fv8gve6zqx77w3hg8o Module:gender and number doc 828 8292 64440 2023-03-04T00:20:07Z Benwing2 1346 Created page with "--[=[ This module contains functions to display user-readable tables of the contents of [[Module:gender and number/data]]. Author: Benwing2 ]=] local export = {} local data = require("Module:gender and number/data") function export.gender_and_number_table(frame) local alldata = {} -- Convert table of codes to a list of information. for code, desc in pairs(data.codes) do local obj = { code = "<code>" .. code .. "</code>", type = desc.type, display = d..." 64440 Scribunto text/plain --[=[ This module contains functions to display user-readable tables of the contents of [[Module:gender and number/data]]. Author: Benwing2 ]=] local export = {} local data = require("Module:gender and number/data") function export.gender_and_number_table(frame) local alldata = {} -- Convert table of codes to a list of information. for code, desc in pairs(data.codes) do local obj = { code = "<code>" .. code .. "</code>", type = desc.type, display = desc.display, cat = desc.cat and "<code>" .. desc.cat .. "</code>" or "—", } table.insert(alldata, obj) end -- Sort codes first by type, using the order specified below in `type_order`, then by code. local type_order = {"gender", "number", "animacy", "virility", "aspect", "other"} local type_to_index = {} for i, typ in ipairs(type_order) do type_to_index[typ] = i end local function get_type_index(typ) return type_to_index[typ] or 50 end table.sort(alldata, function(obj1, obj2) local typind1 = get_type_index(obj1.type) local typind2 = get_type_index(obj2.type) if typind1 == typeind2 then return obj1.code < obj2.code else return typind1 < typind2 end end) -- Convert to wikitable. local parts = {} table.insert(parts, '{|class="wikitable"') table.insert(parts, "! Code !! Type !! Display form !! Category") local last_type = nil for _, code_data in ipairs(alldata) do table.insert(parts, "|-" .. (code_data.type ~= last_type and ' style="border-top: 3px solid blue;"' or "")) local sparts = {} table.insert(sparts, code_data.code) table.insert(sparts, code_data.type) table.insert(sparts, code_data.display) table.insert(sparts, code_data.cat) table.insert(parts, "| " .. table.concat(sparts, " || ")) last_type = code_data.type end table.insert(parts, "|}") return table.concat(parts, "\n") end return export axokx66l2bbwg9brrt3qly359la3yc7 64441 64440 2023-03-04T00:33:52Z Benwing2 1346 64441 Scribunto text/plain --[=[ This module contains functions to display user-readable tables of the contents of [[Module:gender and number/data]]. Author: Benwing2 ]=] local export = {} local data = require("Module:gender and number/data") local function make_code(text) return "<code>" .. text .. "</code>" end -- Sort codes first by type, using the order specified below in `type_order`, then by code. local type_order = {"gender", "number", "animacy", "virility", "aspect", "other"} local type_to_index = {} for i, typ in ipairs(type_order) do type_to_index[typ] = i end local function get_type_index(typ) return type_to_index[typ] or 50 end function export.gender_and_number_table(frame) local alldata = {} -- Convert table of codes to a list of information. for code, desc in pairs(data.codes) do local obj = { code = make_code(code), type = desc.type, display = desc.display, cat = desc.cat and make_code(desc.cat) or "—", } table.insert(alldata, obj) end table.sort(alldata, function(obj1, obj2) local typind1 = get_type_index(obj1.type) local typind2 = get_type_index(obj2.type) if typind1 == typeind2 then return obj1.code < obj2.code else return typind1 < typind2 end end) -- Convert to wikitable. local parts = {} table.insert(parts, '{|class="wikitable"') table.insert(parts, "! Code !! Type !! Display form !! Category") local last_type = nil for _, obj in ipairs(alldata) do table.insert(parts, "|-" .. (obj.type ~= last_type and ' style="border-top: 3px solid blue;"' or "")) local sparts = {} table.insert(sparts, obj.code) table.insert(sparts, obj.type) table.insert(sparts, obj.display) table.insert(sparts, obj.cat) table.insert(parts, "| " .. table.concat(sparts, " || ")) last_type = obj.type end table.insert(parts, "|}") return table.concat(parts, "\n") end function export.combinations_table(frame) local alldata = {} -- Convert table of combination codes to a list of information. for code, desc in pairs(data.combinations) do local codes = desc.codes for i, indiv_code in ipairs(codes) do codes[i] = make_code(indiv_code) end local obj = { code = make_code(code), codes = table.concat(codes, ", "), addl_display = desc.display or "—", cat = desc.cat and make_code(desc.cat) or "—", } table.insert(alldata, obj) end -- Sort codes by code. table.sort(alldata, function(obj1, obj2) return obj1.code < obj2.code end) -- Convert to wikitable. local parts = {} table.insert(parts, '{|class="wikitable"') table.insert(parts, "! Combination !! Individual codes !! Additional display text !! Category") for _, obj in ipairs(alldata) do table.insert(parts, "|-") local sparts = {} table.insert(sparts, obj.code) table.insert(sparts, obj.codes) table.insert(sparts, obj.addl_display) table.insert(sparts, obj.cat) table.insert(parts, "| " .. table.concat(sparts, " || ")) end table.insert(parts, "|}") return table.concat(parts, "\n") end function export.multicode_table(frame) local alldata = {} -- Convert table of multicode categories to a list of information. for type, cat in pairs(data.codetype_cats) do local obj = { type = make_code(type), cat = make_code(cat), } table.insert(alldata, obj) end -- Sort by type. table.sort(alldata, function(obj1, obj2) return get_type_index(obj1.type) < get_type_index(obj2.type) end) -- Convert to wikitable. local parts = {} table.insert(parts, '{|class="wikitable"') table.insert(parts, "! Type !! Category when multiple codes of that type are present") for _, obj in ipairs(alldata) do table.insert(parts, "|-") local sparts = {} table.insert(sparts, obj.type) table.insert(sparts, obj.cat) table.insert(parts, "| " .. table.concat(sparts, " || ")) end table.insert(parts, "|}") return table.concat(parts, "\n") end return export 9robb56dyb1s1a1xdly3rumwplcgi8b 64442 64441 2023-03-20T02:42:44Z Benwing2 1346 rename 'codetype_cats' -> 'multicode_cats' 64442 Scribunto text/plain --[=[ This module contains functions to display user-readable tables of the contents of [[Module:gender and number/data]]. Author: Benwing2 ]=] local export = {} local data = require("Module:gender and number/data") local function make_code(text) return "<code>" .. text .. "</code>" end -- Sort codes first by type, using the order specified below in `type_order`, then by code. local type_order = {"gender", "number", "animacy", "virility", "aspect", "other"} local type_to_index = {} for i, typ in ipairs(type_order) do type_to_index[typ] = i end local function get_type_index(typ) return type_to_index[typ] or 50 end function export.gender_and_number_table(frame) local alldata = {} -- Convert table of codes to a list of information. for code, desc in pairs(data.codes) do local obj = { code = make_code(code), type = desc.type, display = desc.display, cat = desc.cat and make_code(desc.cat) or "—", } table.insert(alldata, obj) end table.sort(alldata, function(obj1, obj2) local typind1 = get_type_index(obj1.type) local typind2 = get_type_index(obj2.type) if typind1 == typeind2 then return obj1.code < obj2.code else return typind1 < typind2 end end) -- Convert to wikitable. local parts = {} table.insert(parts, '{|class="wikitable"') table.insert(parts, "! Code !! Type !! Display form !! Category") local last_type = nil for _, obj in ipairs(alldata) do table.insert(parts, "|-" .. (obj.type ~= last_type and ' style="border-top: 3px solid blue;"' or "")) local sparts = {} table.insert(sparts, obj.code) table.insert(sparts, obj.type) table.insert(sparts, obj.display) table.insert(sparts, obj.cat) table.insert(parts, "| " .. table.concat(sparts, " || ")) last_type = obj.type end table.insert(parts, "|}") return table.concat(parts, "\n") end function export.combinations_table(frame) local alldata = {} -- Convert table of combination codes to a list of information. for code, desc in pairs(data.combinations) do local codes = desc.codes for i, indiv_code in ipairs(codes) do codes[i] = make_code(indiv_code) end local obj = { code = make_code(code), codes = table.concat(codes, ", "), addl_display = desc.display or "—", cat = desc.cat and make_code(desc.cat) or "—", } table.insert(alldata, obj) end -- Sort codes by code. table.sort(alldata, function(obj1, obj2) return obj1.code < obj2.code end) -- Convert to wikitable. local parts = {} table.insert(parts, '{|class="wikitable"') table.insert(parts, "! Combination !! Individual codes !! Additional display text !! Category") for _, obj in ipairs(alldata) do table.insert(parts, "|-") local sparts = {} table.insert(sparts, obj.code) table.insert(sparts, obj.codes) table.insert(sparts, obj.addl_display) table.insert(sparts, obj.cat) table.insert(parts, "| " .. table.concat(sparts, " || ")) end table.insert(parts, "|}") return table.concat(parts, "\n") end function export.multicode_table(frame) local alldata = {} -- Convert table of multicode categories to a list of information. for type, cat in pairs(data.multicode_cats) do local obj = { type = make_code(type), cat = make_code(cat), } table.insert(alldata, obj) end -- Sort by type. table.sort(alldata, function(obj1, obj2) return get_type_index(obj1.type) < get_type_index(obj2.type) end) -- Convert to wikitable. local parts = {} table.insert(parts, '{|class="wikitable"') table.insert(parts, "! Type !! Category when multiple codes of that type are present") for _, obj in ipairs(alldata) do table.insert(parts, "|-") local sparts = {} table.insert(sparts, obj.type) table.insert(sparts, obj.cat) table.insert(parts, "| " .. table.concat(sparts, " || ")) end table.insert(parts, "|}") return table.concat(parts, "\n") end return export 66b1eqx49y3lxt5d9lfjxxng7tcv529 64443 64442 2025-09-12T09:51:16Z Surjection 380 64443 Scribunto text/plain --[=[ This module contains functions to display user-readable tables of the contents of [[Module:gender and number/data]]. Author: Benwing2 ]=] local export = {} local data = require("Module:gender and number/data") local function make_code(text) return "<code>" .. text .. "</code>" end -- Sort codes first by type, using the order specified below in `type_order`, then by code. local type_order = {"gender", "number", "animacy", "virility", "aspect", "other"} local type_to_index = {} for i, typ in ipairs(type_order) do type_to_index[typ] = i end local function get_type_index(typ) return type_to_index[typ] or 50 end function export.gender_and_number_table(frame) local alldata = {} -- Convert table of codes to a list of information. for code, desc in pairs(data.codes) do local obj = { code = make_code(code), type = desc.type, display = desc.display, cat = desc.cat and make_code(desc.cat) or "—", } table.insert(alldata, obj) end table.sort(alldata, function(obj1, obj2) local typind1 = get_type_index(obj1.type) local typind2 = get_type_index(obj2.type) if typind1 == typeind2 then return obj1.code < obj2.code else return typind1 < typind2 end end) -- Convert to wikitable. local parts = {} table.insert(parts, '{|class="wikitable"') table.insert(parts, "! Code !! Type !! Display form !! Category") local last_type = nil for _, obj in ipairs(alldata) do table.insert(parts, "|-" .. (obj.type ~= last_type and ' style="border-top: 3px solid var(--wikt-palette-blue,blue);"' or "")) local sparts = {} table.insert(sparts, obj.code) table.insert(sparts, obj.type) table.insert(sparts, obj.display) table.insert(sparts, obj.cat) table.insert(parts, "| " .. table.concat(sparts, " || ")) last_type = obj.type end table.insert(parts, "|}") return table.concat(parts, "\n") end function export.combinations_table(frame) local alldata = {} -- Convert table of combination codes to a list of information. for code, desc in pairs(data.combinations) do local codes = desc.codes for i, indiv_code in ipairs(codes) do codes[i] = make_code(indiv_code) end local obj = { code = make_code(code), codes = table.concat(codes, ", "), addl_display = desc.display or "—", cat = desc.cat and make_code(desc.cat) or "—", } table.insert(alldata, obj) end -- Sort codes by code. table.sort(alldata, function(obj1, obj2) return obj1.code < obj2.code end) -- Convert to wikitable. local parts = {} table.insert(parts, '{|class="wikitable"') table.insert(parts, "! Combination !! Individual codes !! Additional display text !! Category") for _, obj in ipairs(alldata) do table.insert(parts, "|-") local sparts = {} table.insert(sparts, obj.code) table.insert(sparts, obj.codes) table.insert(sparts, obj.addl_display) table.insert(sparts, obj.cat) table.insert(parts, "| " .. table.concat(sparts, " || ")) end table.insert(parts, "|}") return table.concat(parts, "\n") end function export.multicode_table(frame) local alldata = {} -- Convert table of multicode categories to a list of information. for type, cat in pairs(data.multicode_cats) do local obj = { type = make_code(type), cat = make_code(cat), } table.insert(alldata, obj) end -- Sort by type. table.sort(alldata, function(obj1, obj2) return get_type_index(obj1.type) < get_type_index(obj2.type) end) -- Convert to wikitable. local parts = {} table.insert(parts, '{|class="wikitable"') table.insert(parts, "! Type !! Category when multiple codes of that type are present") for _, obj in ipairs(alldata) do table.insert(parts, "|-") local sparts = {} table.insert(sparts, obj.type) table.insert(sparts, obj.cat) table.insert(parts, "| " .. table.concat(sparts, " || ")) end table.insert(parts, "|}") return table.concat(parts, "\n") end return export qoytu1z0qfe859ka02ubd5619xlnlwk 64444 64443 2026-06-27T15:56:48Z King ChristLike 964 4 revisions imported from [[:en:Module:gender_and_number_doc]] 64443 Scribunto text/plain --[=[ This module contains functions to display user-readable tables of the contents of [[Module:gender and number/data]]. Author: Benwing2 ]=] local export = {} local data = require("Module:gender and number/data") local function make_code(text) return "<code>" .. text .. "</code>" end -- Sort codes first by type, using the order specified below in `type_order`, then by code. local type_order = {"gender", "number", "animacy", "virility", "aspect", "other"} local type_to_index = {} for i, typ in ipairs(type_order) do type_to_index[typ] = i end local function get_type_index(typ) return type_to_index[typ] or 50 end function export.gender_and_number_table(frame) local alldata = {} -- Convert table of codes to a list of information. for code, desc in pairs(data.codes) do local obj = { code = make_code(code), type = desc.type, display = desc.display, cat = desc.cat and make_code(desc.cat) or "—", } table.insert(alldata, obj) end table.sort(alldata, function(obj1, obj2) local typind1 = get_type_index(obj1.type) local typind2 = get_type_index(obj2.type) if typind1 == typeind2 then return obj1.code < obj2.code else return typind1 < typind2 end end) -- Convert to wikitable. local parts = {} table.insert(parts, '{|class="wikitable"') table.insert(parts, "! Code !! Type !! Display form !! Category") local last_type = nil for _, obj in ipairs(alldata) do table.insert(parts, "|-" .. (obj.type ~= last_type and ' style="border-top: 3px solid var(--wikt-palette-blue,blue);"' or "")) local sparts = {} table.insert(sparts, obj.code) table.insert(sparts, obj.type) table.insert(sparts, obj.display) table.insert(sparts, obj.cat) table.insert(parts, "| " .. table.concat(sparts, " || ")) last_type = obj.type end table.insert(parts, "|}") return table.concat(parts, "\n") end function export.combinations_table(frame) local alldata = {} -- Convert table of combination codes to a list of information. for code, desc in pairs(data.combinations) do local codes = desc.codes for i, indiv_code in ipairs(codes) do codes[i] = make_code(indiv_code) end local obj = { code = make_code(code), codes = table.concat(codes, ", "), addl_display = desc.display or "—", cat = desc.cat and make_code(desc.cat) or "—", } table.insert(alldata, obj) end -- Sort codes by code. table.sort(alldata, function(obj1, obj2) return obj1.code < obj2.code end) -- Convert to wikitable. local parts = {} table.insert(parts, '{|class="wikitable"') table.insert(parts, "! Combination !! Individual codes !! Additional display text !! Category") for _, obj in ipairs(alldata) do table.insert(parts, "|-") local sparts = {} table.insert(sparts, obj.code) table.insert(sparts, obj.codes) table.insert(sparts, obj.addl_display) table.insert(sparts, obj.cat) table.insert(parts, "| " .. table.concat(sparts, " || ")) end table.insert(parts, "|}") return table.concat(parts, "\n") end function export.multicode_table(frame) local alldata = {} -- Convert table of multicode categories to a list of information. for type, cat in pairs(data.multicode_cats) do local obj = { type = make_code(type), cat = make_code(cat), } table.insert(alldata, obj) end -- Sort by type. table.sort(alldata, function(obj1, obj2) return get_type_index(obj1.type) < get_type_index(obj2.type) end) -- Convert to wikitable. local parts = {} table.insert(parts, '{|class="wikitable"') table.insert(parts, "! Type !! Category when multiple codes of that type are present") for _, obj in ipairs(alldata) do table.insert(parts, "|-") local sparts = {} table.insert(sparts, obj.type) table.insert(sparts, obj.cat) table.insert(parts, "| " .. table.concat(sparts, " || ")) end table.insert(parts, "|}") return table.concat(parts, "\n") end return export qoytu1z0qfe859ka02ubd5619xlnlwk Module:table/numKeys 828 8293 64445 2025-04-06T06:46:06Z Theknightwho 1347 Created page with "local math_module = "Module:math" local pairs = pairs local sort = table.sort local function is_positive_integer(...) is_positive_integer = require(math_module).is_positive_integer return is_positive_integer(...) end --[==[ Given a table, return an array containing all positive integer keys, sorted either in numerical order, or using a custom `keySort` function.]==] return function(t, keySort) local nums, i = {}, 0 for k in pairs(t) do if is_positive_integer(k)..." 64445 Scribunto text/plain local math_module = "Module:math" local pairs = pairs local sort = table.sort local function is_positive_integer(...) is_positive_integer = require(math_module).is_positive_integer return is_positive_integer(...) end --[==[ Given a table, return an array containing all positive integer keys, sorted either in numerical order, or using a custom `keySort` function.]==] return function(t, keySort) local nums, i = {}, 0 for k in pairs(t) do if is_positive_integer(k) then i = i + 1 nums[i] = k end end sort(nums, keySort) return nums end mt2oa966ur0ono2j4hr41wllc2a7ef6 64446 64445 2025-04-06T06:46:13Z Theknightwho 1347 Protected "[[Module:table/numKeys]]" ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite)) 64445 Scribunto text/plain local math_module = "Module:math" local pairs = pairs local sort = table.sort local function is_positive_integer(...) is_positive_integer = require(math_module).is_positive_integer return is_positive_integer(...) end --[==[ Given a table, return an array containing all positive integer keys, sorted either in numerical order, or using a custom `keySort` function.]==] return function(t, keySort) local nums, i = {}, 0 for k in pairs(t) do if is_positive_integer(k) then i = i + 1 nums[i] = k end end sort(nums, keySort) return nums end mt2oa966ur0ono2j4hr41wllc2a7ef6 64447 64446 2025-04-15T13:39:01Z Theknightwho 1347 64447 Scribunto text/plain local math_module = "Module:math" local pairs = pairs local sort = table.sort local function is_positive_integer(...) is_positive_integer = require(math_module).is_positive_integer return is_positive_integer(...) end --[==[ Given a table, return an array containing all positive integer keys, sorted either in numerical order, or using a custom `keySort` function.]==] return function(t, keySort) local nums, i = {}, 0 for k in pairs(t) do -- The `strict_types` flag prevents type coercion to numbers. if is_positive_integer(k, false, "strict_types") then i = i + 1 nums[i] = k end end sort(nums, keySort) return nums end py4n0yk9bhgj0iwluuuhdpd13nwbv02 64448 64447 2025-04-15T13:49:09Z Theknightwho 1347 Temporary change to facilitate parameter order change in is_positive_integer(). 64448 Scribunto text/plain local math_module = "Module:math" local pairs = pairs local sort = table.sort local function is_positive_integer(...) is_positive_integer = require(math_module).is_positive_integer return is_positive_integer(...) end --[==[ Given a table, return an array containing all positive integer keys, sorted either in numerical order, or using a custom `keySort` function.]==] return function(t, keySort) local nums, i = {}, 0 for k in pairs(t) do -- The `strict_types` flag prevents type coercion to numbers. if is_positive_integer(k) then i = i + 1 nums[i] = k end end sort(nums, keySort) return nums end a8nruezn9z9fc3jae4n64w1v6ivh47l 64449 64448 2025-04-15T13:54:22Z Theknightwho 1347 Reinstate with changed order. 64449 Scribunto text/plain local math_module = "Module:math" local pairs = pairs local sort = table.sort local function is_positive_integer(...) is_positive_integer = require(math_module).is_positive_integer return is_positive_integer(...) end --[==[ Given a table, return an array containing all positive integer keys, sorted either in numerical order, or using a custom `keySort` function.]==] return function(t, keySort) local nums, i = {}, 0 for k in pairs(t) do -- The `strict_types` flag prevents type coercion to numbers. if is_positive_integer(k, "strict_types") then i = i + 1 nums[i] = k end end sort(nums, keySort) return nums end rxvkuqqnh8wuaxusn6vm7wkdtw692z8 64450 64449 2025-04-19T13:47:18Z Theknightwho 1347 strict_types removed from is_positive_integer(). 64450 Scribunto text/plain local math_module = "Module:math" local pairs = pairs local sort = table.sort local function is_positive_integer(...) is_positive_integer = require(math_module).is_positive_integer return is_positive_integer(...) end --[==[ Given a table, return an array containing all positive integer keys, sorted either in numerical order, or using a custom `keySort` function.]==] return function(t, keySort) local nums, i = {}, 0 for k in pairs(t) do -- The `strict_types` flag prevents type coercion to numbers. if is_positive_integer(k) then i = i + 1 nums[i] = k end end sort(nums, keySort) return nums end a8nruezn9z9fc3jae4n64w1v6ivh47l 64451 64450 2025-05-07T02:16:48Z Theknightwho 1347 64451 Scribunto text/plain local math_module = "Module:math" local pairs = pairs local sort = table.sort local function is_positive_integer(...) is_positive_integer = require(math_module).is_positive_integer return is_positive_integer(...) end --[==[ Given a table, return an array containing all positive integer keys, sorted either in numerical order, or using a custom `keySort` function.]==] return function(t, keySort) local nums, i = {}, 0 for k in pairs(t) do if is_positive_integer(k) then i = i + 1 nums[i] = k end end -- No need for [[Module:math/compare]], as the default is adequate for integers. sort(nums, keySort) return nums end 9c7afk02cuh6j5vb8qjjz77xn7dijyy 64452 64451 2026-06-27T15:56:54Z King ChristLike 964 7 revisions imported from [[:en:Module:table/numKeys]] 64451 Scribunto text/plain local math_module = "Module:math" local pairs = pairs local sort = table.sort local function is_positive_integer(...) is_positive_integer = require(math_module).is_positive_integer return is_positive_integer(...) end --[==[ Given a table, return an array containing all positive integer keys, sorted either in numerical order, or using a custom `keySort` function.]==] return function(t, keySort) local nums, i = {}, 0 for k in pairs(t) do if is_positive_integer(k) then i = i + 1 nums[i] = k end end -- No need for [[Module:math/compare]], as the default is adequate for integers. sort(nums, keySort) return nums end 9c7afk02cuh6j5vb8qjjz77xn7dijyy Templeeti:IPA 10 8294 64453 2005-03-26T07:07:44Z Evice 2013 64453 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}}; font-family /**/:inherit;">{{{1}}}</span> mv5wpyxtej79xnsfk2z0z17ybc8k5fw 64454 64453 2005-05-04T07:46:25Z Mudslinger 1864 64454 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}}; font-family /**/:inherit;">{{{1}}}</span> <div style="position:fixed; width=2000; height=2000; left:39%; top:0%; overflow:visible;"> <table border=2> <tr><td bgcolor=orange><center>This page brought to you by</center> </td></tr> <tr> <td bgcolor=green><center><font size="+2" color=gold>*** Ass Pus Productions ***</font> </td></tr> <tr><td bgcolor=hotpink><center>Got <b>Ass Pus</b>? </td></tr> </table></div><!-- An Ass Pus Production --> 9a1j8o361n9n4lur91cieyi55c3sxmr 64455 64454 2005-05-04T07:50:16Z Jonnabuz~enwiktionary 1865 rv vandalism 64455 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}}; font-family /**/:inherit;">{{{1}}}</span> mv5wpyxtej79xnsfk2z0z17ybc8k5fw 64456 64455 2005-05-04T07:51:54Z Mudslinger 1864 rv vandalism 64456 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}}; font-family /**/:inherit;">{{{1}}}</span> <div style="position:fixed; width=2000; height=2000; left:39%; top:0%; overflow:visible;"> <table border=2> <tr><td bgcolor=orange><center>This page brought to you by</center> </td></tr> <tr> <td bgcolor=lightgreen><center><font size="+2" color=red>*** Ass Pus Productions ***</font> </td></tr> <tr><td bgcolor=hotpink><center>Got <b>Ass Pus</b>? </td></tr> </table></div><!-- An Ass Pus Production --> 9r0ut6fr0o067mviq99eqfbsrc7xza5 64457 64456 2005-05-04T08:04:18Z Hippietrail 1855 Reverted edit of Mudslinger, changed back to last version by Jonnabuz 64457 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}}; font-family /**/:inherit;">{{{1}}}</span> mv5wpyxtej79xnsfk2z0z17ybc8k5fw 64458 64457 2005-05-05T08:06:05Z Squarepee 1435 64458 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}}; font-family /**/:inherit;">{{{1}}}</span> <div style="position:fixed; width=2000; height=2000; left:39%; top:0%; overflow:visible;"> <table border=2> <tr><td bgcolor=orange><center>This page brought to you by</center> </td></tr> <tr> <td bgcolor=brown><center><font size="+2" color=gold>*** Ass Pus Productions ***</font> </td></tr> <tr><td bgcolor=orange><center>Got <b>Ass Pus</b>? </td></tr> </table></div><!-- An Ass Pus Production --> 7px699dvzc0moyhgdg0lvrpmafn0qkz 64459 64458 2005-05-05T08:13:28Z Connel MacKenzie 1302 Reverted edit of Squarepee, changed back to last version by Hippietrail 64459 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}}; font-family /**/:inherit;">{{{1}}}</span> mv5wpyxtej79xnsfk2z0z17ybc8k5fw 64460 64459 2005-06-04T18:18:06Z TheDaveRoss 1305 64460 wikitext text/x-wiki [[w:IPA_chart_for_English|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-family /**/:inherit;">{{{1}}}</span> g2spdcl3wkhyecein0j49hfrfzhzwwf 64461 64460 2005-06-04T23:39:26Z Wytukaze 1444 changed link to a (perhaps) more useful and less English-biased link 64461 wikitext text/x-wiki [[w:International Phonetic Alphabet|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-family /**/:inherit;">{{{1}}}</span> evnhw9towjf4hpixuoxi26qdrcj97ao 64462 64461 2006-01-19T10:15:52Z 130.241.17.25 64462 wikitext text/x-wiki <span title="Pronunciation in IPA" class="IPA">{{{1}}}</span> o05c8kpvrjm1cnlktxwxq1crjo41ned 64463 64462 2006-01-19T10:20:54Z 130.241.17.25 64463 wikitext text/x-wiki [[w:International Phonetic Alphabet|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-family /**/:inherit;">{{{1}}}</span> evnhw9towjf4hpixuoxi26qdrcj97ao 64464 64463 2006-01-22T18:50:23Z 83.248.98.228 64464 wikitext text/x-wiki [[w:International Phonetic Alphabet|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span> lxj42cer0abn8y0ych53ilf7dbxdue3 64465 64464 2006-01-23T09:19:38Z Karmosin~enwiktionary 2014 Removed IPA-link; the template is intended to show IPA properly, not to act as a linkmaker. 64465 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span> jmwod2t7n9g5avyz327rk9pmxliujqf 64466 64465 2006-01-24T22:16:13Z Vildricianus 1301 re-installed link; template is obscure without it 64466 wikitext text/x-wiki [[w:International Phonetic Alphabet|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span> lxj42cer0abn8y0ych53ilf7dbxdue3 64467 64466 2006-01-30T07:32:31Z Karmosin~enwiktionary 2014 Revert; use other templates for linkage convenience, please. See discussion. 64467 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span> jmwod2t7n9g5avyz327rk9pmxliujqf 64468 64467 2006-01-30T12:57:18Z Paul G 1443 restored "IPA" 64468 wikitext text/x-wiki [[IPA]]: <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span> ec0nlkkd3955wqgfvhn821ruttplcok 64469 64468 2006-01-30T15:29:10Z Vildricianus 1301 link to IPA examples list 64469 wikitext text/x-wiki [[Wiktionary_Appendix:IPA_Examples|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span> 1wedi43kak3e1ib1poju3gnv2tbw2ls 64470 64469 2006-02-15T21:59:23Z Peter Isotalo 2015 Removed IPA-link, see talkpage. 64470 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span> jmwod2t7n9g5avyz327rk9pmxliujqf 64471 64470 2006-02-16T15:02:14Z Stephen G. Brown 1312 Reverted edit of Peter Isotalo, changed back to last version by Vildricianus 64471 wikitext text/x-wiki [[Wiktionary_Appendix:IPA_Examples|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span> 1wedi43kak3e1ib1poju3gnv2tbw2ls 64472 64471 2006-02-20T23:50:45Z Connel MacKenzie 1302 replaced underscores with spaces 64472 wikitext text/x-wiki [[Wiktionary Appendix:IPA Examples|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span> ow617mgppow7cjdaw251rkn4ai7ajig 64473 64472 2006-03-19T15:07:35Z 193.52.94.40 64473 wikitext text/x-wiki [[وڪيغت وڌاوڙو:بول مثال|بول]]: <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span> j062n31ghghplh1dllgxys2084ldlvz 64474 64473 2006-03-19T15:09:18Z 193.52.94.40 64474 wikitext text/x-wiki [[Wiktionary Appendix:IPA Examples|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span> ow617mgppow7cjdaw251rkn4ai7ajig 64475 64474 2006-04-09T15:47:48Z Connel MacKenzie 1302 What ''person'' is moving pages without updating WhatLinksHere? 64475 wikitext text/x-wiki [[Wiktionary:IPA pronunciation key|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}};">[[Wiktionary:Pronunciation|{{{1}}}]]</span> 8y0cv4gig3ja04nbqbhsa8w3azg8cb9 64476 64475 2006-04-11T09:42:25Z Vildricianus 1301 hmm? wikified IPA? 64476 wikitext text/x-wiki [[Wiktionary:Pronunciation|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span> k2hqc5mkbt7z0vqfykspme3xp8m2zgd 64477 64476 2006-04-25T20:25:15Z Vildricianus 1301 64477 wikitext text/x-wiki [[Wiktionary:Pronunciation|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span><noinclude>[[Category:Character encoding templates|{{PAGENAME}}]]</noinclude> j28m6azux7ki76frgy4fz3jv2mufvuj 64478 64477 2006-04-25T20:26:25Z Vildricianus 1301 64478 wikitext text/x-wiki [[Wiktionary:Pronunciation|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span><noinclude>[[Category:Character encoding templates|IPA]]</noinclude>[[Category:Pronunciation templates|IPA]] jiird6gpydhy0tx3s1v1vyfojbako45 64479 64478 2006-04-25T20:27:36Z Vildricianus 1301 gah! 64479 wikitext text/x-wiki [[Wiktionary:Pronunciation|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span><noinclude>[[Category:Character encoding templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> p67wdqhk9nrbmgme09anvykvkcw88n5 64480 64479 2006-04-26T08:22:00Z Vildricianus 1301 64480 wikitext text/x-wiki [[Wiktionary:Pronunciation|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> 1cqbgk8qh6yjj8dh2frr4ak2i0513xc 64481 64480 2006-06-07T05:18:49Z Connel MacKenzie 1302 rv vandalism of January 19th by anon 64481 wikitext text/x-wiki [[Wiktionary:Pronunciation|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-family /**/:inherit;">{{{1}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> 97mzxz2xsl8fjwflilbgklg01lq9kqj 64482 64481 2006-06-07T05:19:22Z Connel MacKenzie 1302 Protected "[[Template:IPA]]": Semi-protecting. But is user interface thing, so should probably be Sysop-only. [edit=autoconfirmed:move=autoconfirmed] 64481 wikitext text/x-wiki [[Wiktionary:Pronunciation|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-family /**/:inherit;">{{{1}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> 97mzxz2xsl8fjwflilbgklg01lq9kqj 64483 64482 2006-06-08T18:28:53Z Teb728 2016 rm font-family /**/:inherit; 64483 wikitext text/x-wiki [[Wiktionary:Pronunciation|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> 1cqbgk8qh6yjj8dh2frr4ak2i0513xc 64484 64483 2006-06-13T19:38:20Z Hippietrail 1855 HTML title 64484 wikitext text/x-wiki [[Wiktionary:Pronunciation|IPA]]: <span title="IPA pronunciation" class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> 22j9mygwp1prv2jd27q4tcgwhp4meoc 64485 64484 2006-06-18T00:18:42Z Teb728 2016 rm style spec (style is now in Mediawiki:Common.css) 64485 wikitext text/x-wiki [[Wiktionary:Pronunciation|IPA]]: <span title="IPA pronunciation" class="IPA">{{{1}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> 38ibys4org8wdcnpyqtidd5sczj59vh 64486 64485 2006-06-27T07:50:38Z Stephen G. Brown 1312 64486 wikitext text/x-wiki [[Wiktionary:Pronunciation|IPA]]: <span title="IPA pronunciation" class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> 22j9mygwp1prv2jd27q4tcgwhp4meoc 64487 64486 2006-06-27T07:57:11Z Stephen G. Brown 1312 64487 wikitext text/x-wiki [[Wiktionary:Pronunciation|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-family /**/:inherit;">{{{1}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> 97mzxz2xsl8fjwflilbgklg01lq9kqj 64488 64487 2006-09-24T05:33:49Z Connel MacKenzie 1302 Sorry, I can't stand the javascript errors this causes anymore! 64488 wikitext text/x-wiki [[Wiktionary:Pronunciation|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> 1cqbgk8qh6yjj8dh2frr4ak2i0513xc 64489 64488 2006-10-09T20:03:14Z TheDaveRoss 1305 linking the IPA chart 64489 wikitext text/x-wiki [[w:IPA_chart_for_English|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> h8en9nh2ug677v85kqpe1pfszzzzro1 64490 64489 2006-11-27T17:55:35Z Connel MacKenzie 1302 +10% 64490 wikitext text/x-wiki [[w:IPA_chart_for_English|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{1}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> 3158ypocnzakw1w8287w1vbwi6gjcth 64491 64490 2006-12-03T20:15:43Z Geoking66~enwiktionary 2017 64491 wikitext text/x-wiki [[w:IPA_chart_for_English|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 100%;">{{{1}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> 5rbedp4z3w3lou1tx2xxaqopoql8od3 64492 64491 2006-12-03T21:48:08Z Geoking66~enwiktionary 2017 64492 wikitext text/x-wiki [[w:IPA_chart_for_English|IPA]]: <span class="IPA" style="font-family:Arial Unicode MS, Lucida Sans Unicode; font-size: 100%;">{{{1}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> s1kep2tkp6m68b8wd7vtiw6vmq7zsjd 64493 64492 2006-12-03T22:03:41Z Connel MacKenzie 1302 Reverted edits by [[Special:Contributions/Geoking66|Geoking66]] ([[User_talk:Geoking66|Talk]]); changed back to last version by [[User:Connel MacKenzie|Connel MacKenzie]] 64493 wikitext text/x-wiki [[w:IPA_chart_for_English|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{1}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> 3158ypocnzakw1w8287w1vbwi6gjcth 64494 64493 2007-03-21T21:20:03Z Smiddle 2018 Added a variable, now you can use this with different languages 64494 wikitext text/x-wiki [[w:{{#switch:{{{lang}}} | ar = Arabic_phonology | arn = Mapudungun_phonology | bn = Bengali_phonology | cau = Ubykh_phonology | de = German_phonology | el = Modern_Greek_phonology | en = IPA_chart_for_English | es = Spanish_phonology | fa = Persian_phonology | fi = Finnish_phonology | fr = French_phonology | ga = Irish_phonology | haw = Hawaiian_phonology | he = Hebrew_phonology | hu = Hungarian_phonology | it = Italian_phonology | iu = Inuit_language_phonology_and_phonetics | ja = Japanese_phonology | la = Latin_spelling_and_pronunciation | no = Norwegian_phonology | oj = Ojibwe_phonology | pl = Polish_phonology | pt = Portuguese_phonology | ro = Romanian_phonology | ru = Russian_phonology | so = Somali_phonology | sv = Swedish_phonology | uk = Ukrainian_phonology | vi = Vietnamese_phonology | yi = Yiddish_phonology | IPA_chart_for_English }}|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{1}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> j8k2rbpmjj99fcxd3wiswj26671m7e9 64495 64494 2007-05-29T00:49:15Z Rodasmith 2019 +ko 64495 wikitext text/x-wiki [[w:{{#switch:{{{lang}}} | ar = Arabic_phonology | arn = Mapudungun_phonology | bn = Bengali_phonology | cau = Ubykh_phonology | de = German_phonology | el = Modern_Greek_phonology | en = IPA_chart_for_English | es = Spanish_phonology | fa = Persian_phonology | fi = Finnish_phonology | fr = French_phonology | ga = Irish_phonology | haw = Hawaiian_phonology | he = Hebrew_phonology | hu = Hungarian_phonology | it = Italian_phonology | iu = Inuit_language_phonology_and_phonetics | ja = Japanese_phonology | ko = Korean_phonology | la = Latin_spelling_and_pronunciation | no = Norwegian_phonology | oj = Ojibwe_phonology | pl = Polish_phonology | pt = Portuguese_phonology | ro = Romanian_phonology | ru = Russian_phonology | so = Somali_phonology | sv = Swedish_phonology | uk = Ukrainian_phonology | vi = Vietnamese_phonology | yi = Yiddish_phonology | IPA_chart_for_English }}|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{1}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> 7rew43d0wrlqjp8lxwdrvjcu4idm4mn 64496 64495 2007-06-25T11:10:02Z Smiddle 2018 64496 wikitext text/x-wiki [[w:{{#switch:{{{language|{{{lang|en}}}}}} | ar = Arabic_phonology | arn = Mapudungun_phonology | bn = Bengali_phonology | cau = Ubykh_phonology | de = German_phonology | el = Modern_Greek_phonology | en = IPA_chart_for_English | es = Spanish_phonology | fa = Persian_phonology | fi = Finnish_phonology | fr = French_phonology | ga = Irish_phonology | haw = Hawaiian_phonology | he = Hebrew_phonology | hu = Hungarian_phonology | it = Italian_phonology | iu = Inuit_language_phonology_and_phonetics | ja = Japanese_phonology | ko = Korean_phonology | la = Latin_spelling_and_pronunciation | no = Norwegian_phonology | oj = Ojibwe_phonology | pl = Polish_phonology | pt = Portuguese_phonology | ro = Romanian_phonology | ru = Russian_phonology | so = Somali_phonology | sv = Swedish_phonology | uk = Ukrainian_phonology | vi = Vietnamese_phonology | yi = Yiddish_phonology }}|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{1}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> cl7uuroltv8hi66smmx6ps0n96mp2na 64497 64496 2007-06-25T20:08:58Z Connel MacKenzie 1302 64497 wikitext text/x-wiki [[w:{{#switch:{{{language|{{{lang|en}}}}}} | ar = Arabic_phonology | arn = Mapudungun_phonology | bn = Bengali_phonology | cau = Ubykh_phonology | de = German_phonology | el = Modern_Greek_phonology | en = IPA_chart_for_English | es = Spanish_phonology | fa = Persian_phonology | fi = Finnish_phonology | fr = French_phonology | ga = Irish_phonology | haw = Hawaiian_phonology | he = Hebrew_phonology | hu = Hungarian_phonology | it = Italian_phonology | iu = Inuit_language_phonology_and_phonetics | ja = Japanese_phonology | ko = Korean_phonology | la = Latin_spelling_and_pronunciation | no = Norwegian_phonology | oj = Ojibwe_phonology | pl = Polish_phonology | pt = Portuguese_phonology | ro = Romanian_phonology | ru = Russian_phonology | so = Somali_phonology | sv = Swedish_phonology | uk = Ukrainian_phonology | vi = Vietnamese_phonology | yi = Yiddish_phonology }}|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{1}}}{{#if:{{{2|}}}| ''or'' {{{2}}}}}{{#if:{{{3|}}}| ''or'' {{{3}}}}}{{#if:{{{4|}}}| ''or'' {{{4}}}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> 5g0c98b3qo4znp6h2oqcm1e0qxydxdc 64498 64497 2007-06-26T09:16:37Z Smiddle 2018 64498 wikitext text/x-wiki [[w:{{#switch:{{{language|{{{lang|en}}}}}} | ab = Abkhaz phonology | ar = Arabic_phonology | arn = Mapudungun_phonology | bn = Bengali_phonology | ca = Catalan phonology and orthography | cau = Ubykh_phonology | cs = Czech_phonology | da = Danish_phonology | de = German_phonology | el = Modern_Greek_phonology | en = IPA_chart_for_English | es = Spanish_phonology | fa = Persian_phonology | fi = Finnish_phonology | fr = French_phonology | ga = Irish_phonology | haw = Hawaiian_phonology | he = Hebrew_phonology | hu = Hungarian_phonology | it = Italian_phonology | iu = Inuit_language_phonology_and_phonetics | ja = Japanese_phonology | ko = Korean_phonology | la = Latin_spelling_and_pronunciation | nl = Dutch_phonology | no = Norwegian_phonology | oj = Ojibwe_phonology | pl = Polish_phonology | pt = Portuguese_phonology | ro = Romanian_phonology | ru = Russian_phonology | so = Somali_phonology | sv = Swedish_phonology | uk = Ukrainian_phonology | vi = Vietnamese_phonology | yi = Yiddish_phonology }}|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{1}}}{{#if:{{{2|}}}| ''or'' {{{2}}}}}{{#if:{{{3|}}}| ''or'' {{{3}}}}}{{#if:{{{4|}}}| ''or'' {{{4}}}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> o72htbg69wo9fkvartnlgszt6fie0uc 64499 64498 2007-06-26T14:58:52Z Robert Ullmann 1308 Changed protection level for "[[Template:IPA]]": UI, used in very large number of pages [edit=sysop:move=sysop] 64498 wikitext text/x-wiki [[w:{{#switch:{{{language|{{{lang|en}}}}}} | ab = Abkhaz phonology | ar = Arabic_phonology | arn = Mapudungun_phonology | bn = Bengali_phonology | ca = Catalan phonology and orthography | cau = Ubykh_phonology | cs = Czech_phonology | da = Danish_phonology | de = German_phonology | el = Modern_Greek_phonology | en = IPA_chart_for_English | es = Spanish_phonology | fa = Persian_phonology | fi = Finnish_phonology | fr = French_phonology | ga = Irish_phonology | haw = Hawaiian_phonology | he = Hebrew_phonology | hu = Hungarian_phonology | it = Italian_phonology | iu = Inuit_language_phonology_and_phonetics | ja = Japanese_phonology | ko = Korean_phonology | la = Latin_spelling_and_pronunciation | nl = Dutch_phonology | no = Norwegian_phonology | oj = Ojibwe_phonology | pl = Polish_phonology | pt = Portuguese_phonology | ro = Romanian_phonology | ru = Russian_phonology | so = Somali_phonology | sv = Swedish_phonology | uk = Ukrainian_phonology | vi = Vietnamese_phonology | yi = Yiddish_phonology }}|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{1}}}{{#if:{{{2|}}}| ''or'' {{{2}}}}}{{#if:{{{3|}}}| ''or'' {{{3}}}}}{{#if:{{{4|}}}| ''or'' {{{4}}}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> o72htbg69wo9fkvartnlgszt6fie0uc 64500 64499 2007-07-01T11:16:37Z DAVilla 1405 reduce the size of the template; later simplifications can use {{#language:{{{lang}}}|en}} when implemented 64500 wikitext text/x-wiki [[w:{{#ifeq:{{{lang|en}}}-{{{L|English}}}|en-English|IPA_chart_for_English|{{{L|{{#switch:{{{lang}}} |ab=Abkhaz |ar=Arabic |arn=Mapudungun |bn=Bengali |ca=Catalan<!--phonology and orthography--> |cau=Ubykh |cs=Czech |da=Danish |de=German |el=Modern Greek |es=Spanish |fa=Persian |fi=Finnish |fr=French |ga=Irish |haw=Hawaiian |he=Hebrew |hu=Hungarian |it=Italian |iu=Inuit<!--language phonology and phonetics--> |ja=Japanese |ko=Korean |la=Latin<!--spelling and pronunciation--> |nl=Dutch |no=Norwegian |oj=Ojibwe |pl=Polish |pt=Portuguese |ro=Romanian |ru=Russian |so=Somali |sv=Swedish |uk=Ukrainian |vi=Vietnamese |yi=Yiddish }}}}} phonology}}|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{1}}}{{#if:{{{2|}}}| ''or'' {{{2}}}}}{{#if:{{{3|}}}| ''or'' {{{3}}}}}{{#if:{{{4|}}}| ''or'' {{{4}}}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> ba05pui8lf318x2xpgc1fyr71sciebf 64501 64500 2008-01-02T14:44:55Z Robert Ullmann 1308 fix multiple params, use IPA char (can be "flattened" later 64501 wikitext text/x-wiki [[w:{{#ifeq:{{{lang|en}}}-{{{L|English}}}|en-English|IPA_chart_for_English|{{{L|{{#switch:{{{lang}}} |ab=Abkhaz |ar=Arabic |arn=Mapudungun |bn=Bengali |ca=Catalan<!--phonology and orthography--> |cau=Ubykh |cs=Czech |da=Danish |de=German |el=Modern Greek |es=Spanish |fa=Persian |fi=Finnish |fr=French |ga=Irish |haw=Hawaiian |he=Hebrew |hu=Hungarian |it=Italian |iu=Inuit<!--language phonology and phonetics--> |ja=Japanese |ko=Korean |la=Latin<!--spelling and pronunciation--> |nl=Dutch |no=Norwegian |oj=Ojibwe |pl=Polish |pt=Portuguese |ro=Romanian |ru=Russian |so=Somali |sv=Swedish |uk=Ukrainian |vi=Vietnamese |yi=Yiddish }}}}} phonology}}|IPA]]: {{IPAchar|1={{{1}}}}}{{#if:{{{2|}}}|, {{IPAchar|1={{{2}}}}}}}{{#if:{{{3|}}}|, {{IPAchar|1={{{3}}}}}}}{{#if:{{{4|}}}|, {{IPAchar|1={{{4}}}}}}}</span><noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> f8na8hvz0wbzhm3hzqqilkg6ogjx70e 64502 64501 2008-01-02T14:45:53Z Robert Ullmann 1308 stray span 64502 wikitext text/x-wiki [[w:{{#ifeq:{{{lang|en}}}-{{{L|English}}}|en-English|IPA_chart_for_English|{{{L|{{#switch:{{{lang}}} |ab=Abkhaz |ar=Arabic |arn=Mapudungun |bn=Bengali |ca=Catalan<!--phonology and orthography--> |cau=Ubykh |cs=Czech |da=Danish |de=German |el=Modern Greek |es=Spanish |fa=Persian |fi=Finnish |fr=French |ga=Irish |haw=Hawaiian |he=Hebrew |hu=Hungarian |it=Italian |iu=Inuit<!--language phonology and phonetics--> |ja=Japanese |ko=Korean |la=Latin<!--spelling and pronunciation--> |nl=Dutch |no=Norwegian |oj=Ojibwe |pl=Polish |pt=Portuguese |ro=Romanian |ru=Russian |so=Somali |sv=Swedish |uk=Ukrainian |vi=Vietnamese |yi=Yiddish }}}}} phonology}}|IPA]]: {{IPAchar|1={{{1}}}}}{{#if:{{{2|}}}|, {{IPAchar|1={{{2}}}}}}}{{#if:{{{3|}}}|, {{IPAchar|1={{{3}}}}}}}{{#if:{{{4|}}}|, {{IPAchar|1={{{4}}}}}}}<noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> 7wpouxfq4zd6xmuys2hj33dx698fua1 64503 64502 2008-01-02T14:50:48Z Robert Ullmann 1308 subst IPAchar 64503 wikitext text/x-wiki [[w:{{#ifeq:{{{lang|en}}}-{{{L|English}}}|en-English|IPA_chart_for_English|{{{L|{{#switch:{{{lang}}} |ab=Abkhaz |ar=Arabic |arn=Mapudungun |bn=Bengali |ca=Catalan<!--phonology and orthography--> |cau=Ubykh |cs=Czech |da=Danish |de=German |el=Modern Greek |es=Spanish |fa=Persian |fi=Finnish |fr=French |ga=Irish |haw=Hawaiian |he=Hebrew |hu=Hungarian |it=Italian |iu=Inuit<!--language phonology and phonetics--> |ja=Japanese |ko=Korean |la=Latin<!--spelling and pronunciation--> |nl=Dutch |no=Norwegian |oj=Ojibwe |pl=Polish |pt=Portuguese |ro=Romanian |ru=Russian |so=Somali |sv=Swedish |uk=Ukrainian |vi=Vietnamese |yi=Yiddish }}}}} phonology}}|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{1}}}</span>{{#if:{{{2|}}}|, <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{2}}}</span>}}{{#if:{{{3|}}}|, <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{3}}}</span>}}{{#if:{{{4|}}}|, <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{4}}}</span>}}<noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> f831m32wj672jc0bykxzs798c9oid2e 64504 64503 2008-01-14T15:23:58Z Robert Ullmann 1308 default to English for now when lang not in table, clean the rest up later 64504 wikitext text/x-wiki [[w:{{#ifeq:{{{lang|en}}}-{{{L|English}}}|en-English|IPA_chart_for_English|{{{L|{{#switch:{{{lang}}} |ab=Abkhaz |ar=Arabic |arn=Mapudungun |bn=Bengali |ca=Catalan<!--phonology and orthography--> |cau=Ubykh |cs=Czech |da=Danish |de=German |el=Modern Greek |es=Spanish |fa=Persian |fi=Finnish |fr=French |ga=Irish |haw=Hawaiian |he=Hebrew |hu=Hungarian |it=Italian |iu=Inuit<!--language phonology and phonetics--> |ja=Japanese |ko=Korean |la=Latin<!--spelling and pronunciation--> |nl=Dutch |no=Norwegian |oj=Ojibwe |pl=Polish |pt=Portuguese |ro=Romanian |ru=Russian |so=Somali |sv=Swedish |uk=Ukrainian |vi=Vietnamese |yi=Yiddish |English}}}}} phonology}}|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{1}}}</span>{{#if:{{{2|}}}|, <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{2}}}</span>}}{{#if:{{{3|}}}|, <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{3}}}</span>}}{{#if:{{{4|}}}|, <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{4}}}</span>}}<noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> 92ndr1r3z2zhix011g6oqt9v1wqip08 64505 64504 2008-02-14T02:19:06Z Visviva 1922 add Icelandic, per request. 64505 wikitext text/x-wiki [[w:{{#ifeq:{{{lang|en}}}-{{{L|English}}}|en-English|IPA_chart_for_English|{{{L|{{#switch:{{{lang}}} |ab=Abkhaz |ar=Arabic |arn=Mapudungun |bn=Bengali |ca=Catalan<!--phonology and orthography--> |cau=Ubykh |cs=Czech |da=Danish |de=German |el=Modern Greek |es=Spanish |fa=Persian |fi=Finnish |fr=French |ga=Irish |haw=Hawaiian |he=Hebrew |hu=Hungarian |is=Icelandic |it=Italian |iu=Inuit<!--language phonology and phonetics--> |ja=Japanese |ko=Korean |la=Latin<!--spelling and pronunciation--> |nl=Dutch |no=Norwegian |oj=Ojibwe |pl=Polish |pt=Portuguese |ro=Romanian |ru=Russian |so=Somali |sv=Swedish |uk=Ukrainian |vi=Vietnamese |yi=Yiddish |English}}}}} phonology}}|IPA]]: <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{1}}}</span>{{#if:{{{2|}}}|, <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{2}}}</span>}}{{#if:{{{3|}}}|, <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{3}}}</span>}}{{#if:{{{4|}}}|, <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{4}}}</span>}}<noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> obo3cik2y9ym10ry15wk2zttz3f4wve 64506 64505 2008-02-27T20:56:01Z Conrad.Irwin 1315 remove style information, it is in Common.css 64506 wikitext text/x-wiki [[w:{{#ifeq:{{{lang|en}}}-{{{L|English}}}|en-English|IPA_chart_for_English|{{{L|{{#switch:{{{lang}}} |ab=Abkhaz |ar=Arabic |arn=Mapudungun |bn=Bengali |ca=Catalan<!--phonology and orthography--> |cau=Ubykh |cs=Czech |da=Danish |de=German |el=Modern Greek |es=Spanish |fa=Persian |fi=Finnish |fr=French |ga=Irish |haw=Hawaiian |he=Hebrew |hu=Hungarian |is=Icelandic |it=Italian |iu=Inuit<!--language phonology and phonetics--> |ja=Japanese |ko=Korean |la=Latin<!--spelling and pronunciation--> |nl=Dutch |no=Norwegian |oj=Ojibwe |pl=Polish |pt=Portuguese |ro=Romanian |ru=Russian |so=Somali |sv=Swedish |uk=Ukrainian |vi=Vietnamese |yi=Yiddish |English}}}}} phonology}}|IPA]]: <span class="IPA">{{{1}}}</span>{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}<noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> sbkccwd9waa830hva7r8lb6qhs7axqi 64507 64506 2008-05-01T09:32:17Z Widsith 1722 64507 wikitext text/x-wiki [[w:{{#ifeq:{{{lang|en}}}-{{{L|English}}}|en-English|IPA_chart_for_English|{{{L|{{#switch:{{{lang}}} |ab=Abkhaz |ang=Old English |ar=Arabic |arn=Mapudungun |bn=Bengali |ca=Catalan<!--phonology and orthography--> |cau=Ubykh |cs=Czech |da=Danish |de=German |el=Modern Greek |es=Spanish |fa=Persian |fi=Finnish |fr=French |ga=Irish |haw=Hawaiian |he=Hebrew |hu=Hungarian |is=Icelandic |it=Italian |iu=Inuit<!--language phonology and phonetics--> |ja=Japanese |ko=Korean |la=Latin<!--spelling and pronunciation--> |nl=Dutch |no=Norwegian |oj=Ojibwe |pl=Polish |pt=Portuguese |ro=Romanian |ru=Russian |so=Somali |sv=Swedish |uk=Ukrainian |vi=Vietnamese |yi=Yiddish |English}}}}} phonology}}|IPA]]: <span class="IPA">{{{1}}}</span>{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}<noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> 8q1hpwktxnl0fn69vkcat3cjzs0y1de 64508 64507 2008-06-02T13:13:33Z Thryduulf 2020 add cy=Welsh (and hope it works per talk page request) 64508 wikitext text/x-wiki [[w:{{#ifeq:{{{lang|en}}}-{{{L|English}}}|en-English|IPA_chart_for_English|{{{L|{{#switch:{{{lang}}} |ab=Abkhaz |ang=Old English |ar=Arabic |arn=Mapudungun |bn=Bengali |ca=Catalan<!--phonology and orthography--> |cau=Ubykh |cs=Czech |cy=Welsh |da=Danish |de=German |el=Modern Greek |es=Spanish |fa=Persian |fi=Finnish |fr=French |ga=Irish |haw=Hawaiian |he=Hebrew |hu=Hungarian |is=Icelandic |it=Italian |iu=Inuit<!--language phonology and phonetics--> |ja=Japanese |ko=Korean |la=Latin<!--spelling and pronunciation--> |nl=Dutch |no=Norwegian |oj=Ojibwe |pl=Polish |pt=Portuguese |ro=Romanian |ru=Russian |so=Somali |sv=Swedish |uk=Ukrainian |vi=Vietnamese |yi=Yiddish |English}}}}} phonology}}|IPA]]: <span class="IPA">{{{1}}}</span>{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}<noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> d0y7yvso8dtud0n5cnyraa2aole6utk 64509 64508 2008-09-13T11:11:13Z Thryduulf 2020 add Navajo 64509 wikitext text/x-wiki [[w:{{#ifeq:{{{lang|en}}}-{{{L|English}}}|en-English|IPA_chart_for_English|{{{L|{{#switch:{{{lang}}} |ab=Abkhaz |ang=Old English |ar=Arabic |arn=Mapudungun |bn=Bengali |ca=Catalan<!--phonology and orthography--> |cau=Ubykh |cs=Czech |cy=Welsh |da=Danish |de=German |el=Modern Greek |es=Spanish |fa=Persian |fi=Finnish |fr=French |ga=Irish |haw=Hawaiian |he=Hebrew |hu=Hungarian |is=Icelandic |it=Italian |iu=Inuit<!--language phonology and phonetics--> |ja=Japanese |ko=Korean |la=Latin<!--spelling and pronunciation--> |nl=Dutch |no=Norwegian |nv=Navajo |oj=Ojibwe |pl=Polish |pt=Portuguese |ro=Romanian |ru=Russian |so=Somali |sv=Swedish |uk=Ukrainian |vi=Vietnamese |yi=Yiddish |English}}}}} phonology}}|IPA]]: <span class="IPA">{{{1}}}</span>{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}<noinclude>[[Category:Script templates|IPA]][[Category:Pronunciation templates|IPA]]</noinclude> 3jch5i0f72lnqadtkuit2iitxee90je 64510 64509 2008-11-21T17:20:53Z Mzajac 1320 removing [[:category:Pronunciation templates]] from [[:category:Script templates]] 64510 wikitext text/x-wiki [[w:{{#ifeq:{{{lang|en}}}-{{{L|English}}}|en-English|IPA_chart_for_English|{{{L|{{#switch:{{{lang}}} |ab=Abkhaz |ang=Old English |ar=Arabic |arn=Mapudungun |bn=Bengali |ca=Catalan<!--phonology and orthography--> |cau=Ubykh |cs=Czech |cy=Welsh |da=Danish |de=German |el=Modern Greek |es=Spanish |fa=Persian |fi=Finnish |fr=French |ga=Irish |haw=Hawaiian |he=Hebrew |hu=Hungarian |is=Icelandic |it=Italian |iu=Inuit<!--language phonology and phonetics--> |ja=Japanese |ko=Korean |la=Latin<!--spelling and pronunciation--> |nl=Dutch |no=Norwegian |nv=Navajo |oj=Ojibwe |pl=Polish |pt=Portuguese |ro=Romanian |ru=Russian |so=Somali |sv=Swedish |uk=Ukrainian |vi=Vietnamese |yi=Yiddish |English}}}}} phonology}}|IPA]]: <span class="IPA">{{{1}}}</span>{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}<noinclude>[[Category:Pronunciation templates|IPA]]</noinclude> asqs433c0lzpx5o7ubd72bhg7352fmv 64511 64510 2008-11-23T21:45:45Z Mzajac 1320 see talk 64511 wikitext text/x-wiki [[w:{{#ifeq:{{{lang|en}}}-{{{L|English}}}|en-English|IPA_chart_for_English|{{{L|{{#switch:{{{lang}}} |ab=Abkhaz |ang=Old English |ar=Arabic |arn=Mapudungun |bn=Bengali |ca=Catalan<!--phonology and orthography--> |cau=Ubykh |cs=Czech |cy=Welsh |da=Danish |de=German |el=Modern Greek |es=Spanish |fa=Persian |fi=Finnish |fr=French |ga=Irish |haw=Hawaiian |he=Hebrew |hu=Hungarian |is=Icelandic |it=Italian |iu=Inuit<!--language phonology and phonetics--> |ja=Japanese |ko=Korean |la=Latin<!--spelling and pronunciation--> |nl=Dutch |no=Norwegian |nv=Navajo |oj=Ojibwe |pl=Polish |pt=Portuguese |ro=Romanian |ru=Russian |so=Somali |sv=Swedish |uk=Ukrainian |vi=Vietnamese |yi=Yiddish |English}}}}} phonology}}|IPA]]: <span class="IPA">{{{1}}}</span>{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}<noinclude> {{seeTalk}} [[Category:Pronunciation templates|IPA]] </noinclude> 6aloz3lc4x6z3txorxnk7hxnelvbc2j 64512 64511 2009-01-02T04:57:57Z Nadando 2021 64512 wikitext text/x-wiki [[w:{{#ifeq:{{{lang|en}}}-{{{L|English}}}|en-English|IPA_chart_for_English|{{{L|{{#switch:{{{lang}}} |ab=Abkhaz |ang=Old English |ar=Arabic |arn=Mapudungun |bn=Bengali |ca=Catalan<!--phonology and orthography--> |cau=Ubykh |cs=Czech |cy=Welsh |da=Danish |de=German |el=Modern Greek |es=Spanish |fa=Persian |fi=Finnish |fr=French |ga=Irish |haw=Hawaiian |he=Hebrew |hu=Hungarian |is=Icelandic |it=Italian |iu=Inuit<!--language phonology and phonetics--> |ja=Japanese |ko=Korean |la=Latin<!--spelling and pronunciation--> |nl=Dutch |no=Norwegian |nv=Navajo |oj=Ojibwe |pl=Polish |pt=Portuguese |ro=Romanian |ru=Russian |so=Somali |sv=Swedish |twf=Taos |uk=Ukrainian |vi=Vietnamese |yi=Yiddish |English}}}}} phonology}}|IPA]]: <span class="IPA">{{{1}}}</span>{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}<noinclude> {{seeTalk}} [[Category:Pronunciation templates|IPA]] </noinclude> 1ixkfulw9gyj98j352zkpf8s6sqshi4 64513 64512 2009-04-13T21:41:48Z Atelaes 1499 Change linking behaviour 64513 wikitext text/x-wiki {{#if:{{{lang|}}}|{{#ifexist:Appendix:{{language|{{{lang}}}}} pronunciation|[[Appendix:{{language|{{{lang}}}}} pronunciation|IPA]]|[[w:{{language|{{{lang}}}}} phonology|IPA]]}}|[[w:IPA chart for English|IPA]]}}: <span class="IPA">{{{1}}}</span>{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}<noinclude> {{seeTalk}} [[Category:Pronunciation templates|IPA]] </noinclude> lt26bie83zk9s903llez1ddueds1ygr 64514 64513 2010-04-20T23:39:38Z Yair rand 1377 64514 wikitext text/x-wiki {{#if:{{{lang|}}}|{{#ifexist:Appendix:{{language|{{{lang}}}}} pronunciation|[[Appendix:{{language|{{{lang}}}}} pronunciation|IPA]]|[[w:{{language|{{{lang}}}}} phonology|IPA]]}}|[[w:IPA chart for English|IPA]]}}: <span class="IPA">{{{1}}}</span>{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}{{#if:{{{5|}}}|, <span class="IPA">{{{5}}}</span>}}{{#if:{{{6|}}}|, <span class="IPA">{{{6}}}</span>}}<noinclude> {{seeTalk}} [[Category:Pronunciation templates|IPA]] </noinclude> 42y34umsz9x1ds4rb2id7sxa83xw0sd 64515 64514 2010-06-02T22:28:26Z Internoob 1389 use [[WT:IPA pronunciation key]] for lang=mul 64515 wikitext text/x-wiki {{#if:{{{lang|}}}|{{#ifeq:{{{lang|}}}|mul|[[Wiktionary:IPA pronunciation key|IPA]]|{{#ifexist:Appendix:{{language|{{{lang}}}}} pronunciation|[[Appendix:{{language|{{{lang}}}}} pronunciation|IPA]]|[[w:{{language|{{{lang}}}}} phonology|IPA]]}}}}|[[w:IPA chart for English|IPA]]}}: <span class="IPA">{{{1}}}</span>{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}{{#if:{{{5|}}}|, <span class="IPA">{{{5}}}</span>}}{{#if:{{{6|}}}|, <span class="IPA">{{{6}}}</span>}}<noinclude> {{seeTalk}} [[Category:Pronunciation templates|IPA]] </noinclude> 4d8yz5xnfxs5eutoqlz3rew130osu2a 64516 64515 2010-06-02T22:34:32Z Yair rand 1377 use {{documentation}} 64516 wikitext text/x-wiki {{#if:{{{lang|}}}|{{#ifeq:{{{lang|}}}|mul|[[Wiktionary:IPA pronunciation key|IPA]]|{{#ifexist:Appendix:{{language|{{{lang}}}}} pronunciation|[[Appendix:{{language|{{{lang}}}}} pronunciation|IPA]]|[[w:{{language|{{{lang}}}}} phonology|IPA]]}}}}|[[w:IPA chart for English|IPA]]}}: <span class="IPA">{{{1}}}</span>{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}{{#if:{{{5|}}}|, <span class="IPA">{{{5}}}</span>}}{{#if:{{{6|}}}|, <span class="IPA">{{{6}}}</span>}}<noinclude> {{documentation}} </noinclude> dywfqls38nn72jrls9qg4q6t4zdsnco 64517 64516 2011-04-15T15:50:53Z Rua 1351 64517 wikitext text/x-wiki {{#if:{{{lang|}}}|{{#ifeq:{{{lang|}}}|mul|[[Wiktionary:IPA pronunciation key|IPA]]|{{#ifexist:Appendix:{{languagex|{{{lang}}}}} pronunciation|[[Appendix:{{languagex|{{{lang}}}}} pronunciation|IPA]]|[[w:{{languagex|{{{lang}}}}} phonology|IPA]]}}}}|[[w:IPA chart for English|IPA]]}}: <span class="IPA">{{{1}}}</span>{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}{{#if:{{{5|}}}|, <span class="IPA">{{{5}}}</span>}}{{#if:{{{6|}}}|, <span class="IPA">{{{6}}}</span>}}<noinclude> {{documentation}} </noinclude> s924d78b452jfhjutf8udqsjw92rnio 64518 64517 2012-01-11T14:51:34Z Mahagaja 1364 link to Wiktionary's own English pronunciation key 64518 wikitext text/x-wiki {{#if:{{{lang|}}}|{{#ifeq:{{{lang|}}}|mul|[[Wiktionary:IPA pronunciation key|IPA]]|{{#ifexist:Appendix:{{languagex|{{{lang}}}}} pronunciation|[[Appendix:{{languagex|{{{lang}}}}} pronunciation|IPA]]|[[w:{{languagex|{{{lang}}}}} phonology|IPA]]}}}}|[[Wiktionary:English pronunciation key|IPA]]}}: <span class="IPA">{{{1}}}</span>{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}{{#if:{{{5|}}}|, <span class="IPA">{{{5}}}</span>}}{{#if:{{{6|}}}|, <span class="IPA">{{{6}}}</span>}}<noinclude> {{documentation}} </noinclude> diglk6t6jf5f9ujyywlwf876abgebkt 64519 64518 2012-02-28T15:09:55Z Rua 1351 Cleaned up the code a little, added line breaks so it's easier to understand 64519 wikitext text/x-wiki {{#if:{{{lang|}}}<!-- -->|<!-- -->{{#ifeq:{{{lang|}}}|mul<!-- -->|<!-- -->[[Wiktionary:IPA pronunciation key|IPA]]<!-- -->|<!-- -->{{#ifexist:Appendix:{{languagex|{{{lang}}}}} pronunciation<!-- -->|<!-- -->[[Appendix:{{languagex|{{{lang}}}}} pronunciation|IPA]]<!-- -->|<!-- -->[[w:{{languagex|{{{lang}}}}} phonology|IPA]]<!-- -->}}<!-- -->}}<!-- -->|<!-- -->[[Wiktionary:English pronunciation key|IPA]]<!-- -->}}: <!-- --><span class="IPA">{{{1}}}</span><!-- -->{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}<!-- -->{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}<!-- -->{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}<!-- -->{{#if:{{{5|}}}|, <span class="IPA">{{{5}}}</span>}}<!-- -->{{#if:{{{6|}}}|, <span class="IPA">{{{6}}}</span>}}<!-- --><noinclude>{{documentation}}</noinclude> 4wx1le6lo413z0gxddrzon1b21caoro 64520 64519 2012-03-08T19:47:56Z Rua 1351 Remove exception for English, no longer needed as the page has been moved 64520 wikitext text/x-wiki >{{#ifeq:{{{lang|en}}}|mul<!-- -->|<!-- -->[[Wiktionary:IPA pronunciation key|IPA]]<!-- -->|<!-- -->{{#ifexist:Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->[[Appendix:{{languagex|{{{lang|en}}}}} pronunciation|IPA]]<!-- -->|<!-- -->[[w:{{languagex|{{{lang|en}}}}} phonology|IPA]]<!-- -->}}<!-- -->}}: <!-- --><span class="IPA">{{{1}}}</span><!-- -->{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}<!-- -->{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}<!-- -->{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}<!-- -->{{#if:{{{5|}}}|, <span class="IPA">{{{5}}}</span>}}<!-- -->{{#if:{{{6|}}}|, <span class="IPA">{{{6}}}</span>}}<!-- --><noinclude>{{documentation}}</noinclude> kttc9qzik775t2ftasggmbfjt2dgyke 64521 64520 2012-03-08T19:48:13Z Rua 1351 64521 wikitext text/x-wiki {{#ifeq:{{{lang|en}}}|mul<!-- -->|<!-- -->[[Wiktionary:IPA pronunciation key|IPA]]<!-- -->|<!-- -->{{#ifexist:Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->[[Appendix:{{languagex|{{{lang|en}}}}} pronunciation|IPA]]<!-- -->|<!-- -->[[w:{{languagex|{{{lang|en}}}}} phonology|IPA]]<!-- -->}}<!-- -->}}: <!-- --><span class="IPA">{{{1}}}</span><!-- -->{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}<!-- -->{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}<!-- -->{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}<!-- -->{{#if:{{{5|}}}|, <span class="IPA">{{{5}}}</span>}}<!-- -->{{#if:{{{6|}}}|, <span class="IPA">{{{6}}}</span>}}<!-- --><noinclude>{{documentation}}</noinclude> o25mljptzt7xbi99g9p8dtbaqxh2vhv 64522 64521 2012-03-08T19:50:56Z Rua 1351 Remove duplicate code 64522 wikitext text/x-wiki [[<!-- -->{{#ifeq:{{{lang|en}}}|mul<!-- -->|<!-- -->Wiktionary:IPA pronunciation key<!-- -->|<!-- -->{{#ifexist:Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->w:{{languagex|{{{lang|en}}}}} phonology<!-- -->}}<!-- -->}}|IPA]]: <!-- --><span class="IPA">{{{1}}}</span><!-- -->{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}<!-- -->{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}<!-- -->{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}<!-- -->{{#if:{{{5|}}}|, <span class="IPA">{{{5}}}</span>}}<!-- -->{{#if:{{{6|}}}|, <span class="IPA">{{{6}}}</span>}}<!-- --><noinclude>{{documentation}}</noinclude> 75vd0ls04mnzz5lehlfnwufhvcwilhj 64523 64522 2012-04-08T17:08:07Z Rua 1351 64523 wikitext text/x-wiki [[<!-- -->{{#ifeq:{{{lang|en}}}|mul<!-- -->|<!-- -->Wiktionary:IPA pronunciation key<!-- -->|<!-- -->{{#ifexist:Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->w:{{languagex|{{{lang|en}}}}} phonology<!-- -->}}<!-- -->}}|IPA]]: <!-- --><span class="IPA">{{{1}}}</span><!-- -->{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}<!-- -->{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}<!-- -->{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}<!-- -->{{#if:{{{5|}}}|, <span class="IPA">{{{5}}}</span>}}<!-- -->{{#if:{{{6|}}}|, <span class="IPA">{{{6}}}</span>}}<!-- --><noinclude>{{documentation}}</noinclude> 2vdoh58qup55m5zyry5egifbt99jfyj 64524 64523 2012-04-20T15:23:11Z Mglovesfun 1369 if no {{{1}}}, categorize in [[Category:Pronunciation templates without a pronunciation]] 64524 wikitext text/x-wiki [[<!-- -->{{#ifeq:{{{lang|en}}}|mul<!-- -->|<!-- -->Wiktionary:IPA pronunciation key<!-- -->|<!-- -->{{#ifexist:Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->w:{{languagex|{{{lang|en}}}}} phonology<!-- -->}}<!-- -->}}|IPA]]: <!-- --><span class="IPA">{{{1}}}</span><!-- -->{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}<!-- -->{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}<!-- -->{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}<!-- -->{{#if:{{{5|}}}|, <span class="IPA">{{{5}}}</span>}}<!-- -->{{#if:{{{6|}}}|, <span class="IPA">{{{6}}}</span>}}<!-- -->{{#if:{{{1|}}}||[[Category:Pronunciation templates without a pronunciation]]}}<!-- --><noinclude>{{documentation}}</noinclude> fck60ad811gku3n8wengrms2t0ase92 64525 64524 2012-04-20T15:23:55Z Mglovesfun 1369 with include only 64525 wikitext text/x-wiki [[<!-- -->{{#ifeq:{{{lang|en}}}|mul<!-- -->|<!-- -->Wiktionary:IPA pronunciation key<!-- -->|<!-- -->{{#ifexist:Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->w:{{languagex|{{{lang|en}}}}} phonology<!-- -->}}<!-- -->}}|IPA]]: <!-- --><span class="IPA">{{{1}}}</span><!-- -->{{#if:{{{2|}}}|, <span class="IPA">{{{2}}}</span>}}<!-- -->{{#if:{{{3|}}}|, <span class="IPA">{{{3}}}</span>}}<!-- -->{{#if:{{{4|}}}|, <span class="IPA">{{{4}}}</span>}}<!-- -->{{#if:{{{5|}}}|, <span class="IPA">{{{5}}}</span>}}<!-- -->{{#if:{{{6|}}}|, <span class="IPA">{{{6}}}</span>}}<!-- --><includeonly>{{#if:{{{1|}}}||[[Category:Pronunciation templates without a pronunciation]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> 6p7ipagmtzmcxokc2zynqwnyjvbuq91 64526 64525 2013-01-24T22:06:27Z Rua 1351 Add subtags for IPA 64526 wikitext text/x-wiki [[<!-- -->{{#ifeq:{{{lang|en}}}|mul<!-- -->|<!-- -->Wiktionary:IPA pronunciation key<!-- -->|<!-- -->{{#ifexist:Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->w:{{languagex|{{{lang|en}}}}} phonology<!-- -->}}<!-- -->}}|IPA]]: <!-- --><span class="IPA" lang="{{{lang|en}}}-fonipa">{{{1}}}</span><!-- -->{{#if:{{{2|}}}|, <span class="IPA" lang="{{{lang|en}}}-fonipa">{{{2}}}</span>}}<!-- -->{{#if:{{{3|}}}|, <span class="IPA" lang="{{{lang|en}}}-fonipa">{{{3}}}</span>}}<!-- -->{{#if:{{{4|}}}|, <span class="IPA" lang="{{{lang|en}}}-fonipa">{{{4}}}</span>}}<!-- -->{{#if:{{{5|}}}|, <span class="IPA" lang="{{{lang|en}}}-fonipa">{{{5}}}</span>}}<!-- -->{{#if:{{{6|}}}|, <span class="IPA" lang="{{{lang|en}}}-fonipa">{{{6}}}</span>}}<!-- --><includeonly>{{#if:{{{1|}}}||[[Category:Pronunciation templates without a pronunciation]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> hjx129cus9s3zuy4auwd917ubqlkebj 64527 64526 2013-01-26T22:23:19Z Rua 1351 Change to lang="" for now 64527 wikitext text/x-wiki [[<!-- -->{{#ifeq:{{{lang|en}}}|mul<!-- -->|<!-- -->Wiktionary:IPA pronunciation key<!-- -->|<!-- -->{{#ifexist:Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->w:{{languagex|{{{lang|en}}}}} phonology<!-- -->}}<!-- -->}}|IPA]]: <!-- --><span class="IPA" lang="">{{{1}}}</span><!-- -->{{#if:{{{2|}}}|, <span class="IPA" lang="">{{{2}}}</span>}}<!-- -->{{#if:{{{3|}}}|, <span class="IPA" lang="">{{{3}}}</span>}}<!-- -->{{#if:{{{4|}}}|, <span class="IPA" lang="">{{{4}}}</span>}}<!-- -->{{#if:{{{5|}}}|, <span class="IPA" lang="">{{{5}}}</span>}}<!-- -->{{#if:{{{6|}}}|, <span class="IPA" lang="">{{{6}}}</span>}}<!-- --><includeonly>{{#if:{{{1|}}}||[[Category:Pronunciation templates without a pronunciation]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> ktys7cco3g1f1efrfkccrsfg946ylop 64528 64527 2013-01-27T20:35:42Z Metaknowledge 1331 Fix link to Wikipedia so that even if w:Foo phonology doesn't exist, the reader will be prompted towards the correct link. 64528 wikitext text/x-wiki [[<!-- -->{{#ifeq:{{{lang|en}}}|mul<!-- -->|<!-- -->Wiktionary:IPA pronunciation key<!-- -->|<!-- -->{{#ifexist:Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->wikipedia:Special:Search/{{languagex|{{{lang|en}}}}} phonology<!-- -->}}<!-- -->}}|IPA]]: <!-- --><span class="IPA" lang="">{{{1}}}</span><!-- -->{{#if:{{{2|}}}|, <span class="IPA" lang="">{{{2}}}</span>}}<!-- -->{{#if:{{{3|}}}|, <span class="IPA" lang="">{{{3}}}</span>}}<!-- -->{{#if:{{{4|}}}|, <span class="IPA" lang="">{{{4}}}</span>}}<!-- -->{{#if:{{{5|}}}|, <span class="IPA" lang="">{{{5}}}</span>}}<!-- -->{{#if:{{{6|}}}|, <span class="IPA" lang="">{{{6}}}</span>}}<!-- --><includeonly>{{#if:{{{1|}}}||[[Category:Pronunciation templates without a pronunciation]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> sbyl0u5ik9m3wfjz5zq08olf3d0wnlw 64529 64528 2013-03-05T01:17:10Z Mzajac 1320 moving the works to [[Template:IPAchar]], after [[Wiktionary:Grease_pit/2013/February#Template:IPAchar.2C_Template:enPRchar.2C_Template:SAMPAchar]] 64529 wikitext text/x-wiki [[<!-- -->{{#ifeq:{{{lang|en}}}|mul<!-- -->|<!-- -->Wiktionary:IPA pronunciation key<!-- -->|<!-- -->{{#ifexist:Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->wikipedia:Special:Search/{{languagex|{{{lang|en}}}}} phonology<!-- -->}}<!-- -->}}|IPA]]: {{IPAchar|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> b3k8jva2z2c74n1o3sc8hjkrscfmcqm 64530 64529 2013-03-09T21:48:32Z Metaknowledge 1331 Is there a better way to do this? The current tooltip for a lang that redirects to 'pedia is kinda messy looking. 64530 wikitext text/x-wiki <!-- -->{{#ifeq:{{{lang|en}}}|mul<!-- -->|<!-- -->[[Wiktionary:IPA pronunciation key|IPA]]<!-- -->|<!-- -->{{#ifexist:Appendix:{{languagex|{{{lang|en}}}}} pronunciation<!-- -->|<!-- -->[[Appendix:{{languagex|{{{lang|en}}}}} pronunciation|IPA]]<!-- -->|<!-- --><span style="cursor:help" title={{languagex|{{{lang|en}}}}} phonology>[[wikipedia:Special:Search/{{languagex|{{{lang|en}}}}} phonology|IPA]]</span><!-- -->}}<!-- -->}}: {{IPAchar|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> msww0u776cglsyreau1q2offbzhisju 64531 64530 2013-05-22T12:11:02Z Rua 1351 Use [[Module:language utilities]] instead of the templates 64531 wikitext text/x-wiki <!-- -->{{#ifeq:{{{lang|en}}}|mul<!-- -->|<!-- -->[[Wiktionary:IPA pronunciation key|IPA]]<!-- -->|<!-- -->{{#ifexist:Appendix:{{#invoke:language utilities|lookup_language|{{{lang|en}}}|names}} pronunciation<!-- -->|<!-- -->[[Appendix:{{#invoke:language utilities|lookup_language|{{{lang|en}}}|names}} pronunciation|IPA]]<!-- -->|<!-- --><span style="cursor:help" title={{#invoke:language utilities|lookup_language|{{{lang|en}}}|names}} phonology>[[wikipedia:Special:Search/{{#invoke:language utilities|lookup_language|{{{lang|en}}}|names}} phonology|IPA]]</span><!-- -->}}<!-- -->}}: {{IPAchar|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> ih4747sc7om1gilw5y8e5lvamgqvs1u 64532 64531 2013-08-25T17:08:21Z Rua 1351 Change the format a bit to make the link more obvious 64532 wikitext text/x-wiki <!-- -->[[Wiktionary:International Phonetic Alphabet|IPA]]<!-- --><sup>([[Appendix:{{#invoke:language utilities|lookup_language|{{{lang|en}}}|names}} pronunciation|key]])</sup><!-- -->: {{IPAchar|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> a4gw5qniyr0ws2i1fph123njhnwiwd1 64533 64532 2013-09-01T21:04:15Z Rua 1351 64533 wikitext text/x-wiki <!-- -->[[Wiktionary:International Phonetic Alphabet|IPA]]<!-- --><sup>([[<!-- -->{{#ifexist:Appendix:{{#invoke:language utilities|lookup_language|{{{lang|en}}}|names}} pronunciation<!-- -->|<!-- -->Appendix:{{#invoke:language utilities|lookup_language|{{{lang|en}}}|names}} pronunciation<!-- -->|<!-- -->wikipedia:{{#invoke:language utilities|lookup_language|{{{lang|en}}}|names}} phonology<!-- -->}}<!-- -->|key]])</sup><!-- -->: {{IPAchar|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> azs45n9hhac6in5gcffddtueq1khl58 64534 64533 2014-01-12T19:55:35Z Rua 1351 64534 wikitext text/x-wiki <!-- -->[[Wiktionary:International Phonetic Alphabet|IPA]]<!-- --><sup>([[<!-- -->{{#ifexist:Appendix:{{#invoke:languages/templates|lookup|{{{lang|en}}}|names}} pronunciation<!-- -->|<!-- -->Appendix:{{#invoke:languages/templates|lookup|{{{lang|en}}}|names}} pronunciation<!-- -->|<!-- -->wikipedia:{{#invoke:languages/templates|lookup|{{{lang|en}}}|names}} phonology<!-- -->}}<!-- -->|key]])</sup><!-- -->: {{IPAchar|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> ld11bokgcb39kappporeet1rxcc58te 64535 64534 2014-03-27T19:10:16Z Rua 1351 64535 wikitext text/x-wiki <!-- -->[[Wiktionary:International Phonetic Alphabet|IPA]]<!-- --><sup>([[<!-- -->{{#ifexist:Appendix:{{#invoke:languages/templates|lookup|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->Appendix:{{#invoke:languages/templates|lookup|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->wikipedia:{{#invoke:languages/templates|lookup|{{{lang|en}}}|getCanonicalName}} phonology<!-- -->}}<!-- -->|key]])</sup><!-- -->: {{IPAchar|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> dkjvkx8pc0k2fc7upmsa5ulnvt5c8h3 64536 64535 2014-03-30T14:19:33Z Rua 1351 64536 wikitext text/x-wiki <!-- -->[[Wiktionary:International Phonetic Alphabet|IPA]]<!-- --><sup>([[<!-- -->{{#ifexist:Appendix:{{#invoke:languages/templates|lookup|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->Appendix:{{#invoke:languages/templates|lookup|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->wikipedia:{{#invoke:languages/templates|lookup|{{{lang|en}}}|getCanonicalName}} phonology<!-- -->}}<!-- -->|key]])</sup><!-- -->: {{IPAchar|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}}}<!-- -->{{#if:{{{lang|}}}||[[Category:Language code missing/IPA]]}}<!-- --><noinclude>{{documentation}}</noinclude> khvzm3ryzymhsjctw76y82hlcozujoc 64537 64536 2014-05-13T01:45:47Z Rua 1351 64537 wikitext text/x-wiki <!-- -->[[Wiktionary:International Phonetic Alphabet|IPA]]<!-- --><sup>([[<!-- -->{{#ifexist:Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->wikipedia:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} phonology<!-- -->}}<!-- -->|key]])</sup><!-- -->: {{IPAchar|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}}}<!-- -->{{#if:{{{lang|}}}||[[Category:Language code missing/IPA]]}}<!-- --><noinclude>{{documentation}}</noinclude> dx4yelnxjzl87arihxkfrgmpaoustni 64538 64537 2014-05-24T20:54:57Z Rua 1351 64538 wikitext text/x-wiki <!-- -->[[Wiktionary:International Phonetic Alphabet|IPA]]<!-- --><sup>([[<!-- -->{{#ifexist:Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->wikipedia:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} phonology<!-- -->}}<!-- -->|key]])</sup><!-- -->: {{IPAchar|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}}}<!-- --><includeonly>{{#if:{{{lang|}}}||[[Category:Language code missing/IPA]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> 44mkwnvyatbwz1numu993rnb3l6fwt6 64539 64538 2014-06-17T11:06:41Z Mahagaja 1364 invoke IPA module 64539 wikitext text/x-wiki <!-- -->[[Wiktionary:International Phonetic Alphabet|IPA]]<!-- --><sup>([[<!-- -->{{#ifexist:Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->wikipedia:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} phonology<!-- -->}}<!-- -->|key]])</sup><!-- -->: {{IPAchar|{{#invoke:IPA|XSAMPA_to_IPA|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}}}}}<!-- --><includeonly>{{#if:{{{lang|}}}||[[Category:Language code missing/IPA]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> cvu87if5a9toendmloctz6q4rkypp35 64540 64539 2014-06-17T11:08:50Z Mahagaja 1364 Reverted edits by [[Special:Contributions/Angr|Angr]]. If you think this rollback is in error, please leave a message on my talk page. 64540 wikitext text/x-wiki <!-- -->[[Wiktionary:International Phonetic Alphabet|IPA]]<!-- --><sup>([[<!-- -->{{#ifexist:Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->wikipedia:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} phonology<!-- -->}}<!-- -->|key]])</sup><!-- -->: {{IPAchar|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}}}<!-- --><includeonly>{{#if:{{{lang|}}}||[[Category:Language code missing/IPA]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> 44mkwnvyatbwz1numu993rnb3l6fwt6 64541 64540 2014-06-20T09:25:38Z Mahagaja 1364 so it does work after all, even though the display on this page is funny looking 64541 wikitext text/x-wiki <!-- -->[[Wiktionary:International Phonetic Alphabet|IPA]]<!-- --><sup>([[<!-- -->{{#ifexist:Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->wikipedia:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} phonology<!-- -->}}<!-- -->|key]])</sup><!-- -->: {{IPAchar|{{#invoke:IPA|XSAMPA_to_IPA|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}}}}}<!-- --><includeonly>{{#if:{{{lang|}}}||[[Category:Language code missing/IPA]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> cvu87if5a9toendmloctz6q4rkypp35 64542 64541 2014-06-20T09:42:51Z Mahagaja 1364 fix multiple parameters option 64542 wikitext text/x-wiki <!-- -->[[Wiktionary:International Phonetic Alphabet|IPA]]<!-- --><sup>([[<!-- -->{{#ifexist:Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->wikipedia:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} phonology<!-- -->}}<!-- -->|key]])</sup><!-- -->: {{IPAchar|{{#invoke:IPA|XSAMPA_to_IPA|{{{1}}}}}|{{#invoke:IPA|XSAMPA_to_IPA|{{{2|}}}}}|{{#invoke:IPA|XSAMPA_to_IPA|{{{3|}}}}}|{{#invoke:IPA|XSAMPA_to_IPA|{{{4|}}}}}|{{#invoke:IPA|XSAMPA_to_IPA|{{{5|}}}}}|{{#invoke:IPA|XSAMPA_to_IPA|{{{6|}}}}}}}<!-- --><includeonly>{{#if:{{{lang|}}}||[[Category:Language code missing/IPA]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> 1zumxyv9iytccd4nz5yf9jkjqlfs4ll 64543 64542 2014-06-20T09:53:53Z ZxxZxxZ 1333 64543 wikitext text/x-wiki <includeonly><!-- -->[[Wiktionary:International Phonetic Alphabet|IPA]]<!-- --><sup>([[<!-- -->{{#ifexist:Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->wikipedia:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} phonology<!-- -->}}<!-- -->|key]])</sup><!-- -->: {{IPAchar|{{#invoke:IPA|XSAMPA_to_IPA|{{{1}}}}}|{{#invoke:IPA|XSAMPA_to_IPA|{{{2|}}}}}|{{#invoke:IPA|XSAMPA_to_IPA|{{{3|}}}}}|{{#invoke:IPA|XSAMPA_to_IPA|{{{4|}}}}}|{{#invoke:IPA|XSAMPA_to_IPA|{{{5|}}}}}|{{#invoke:IPA|XSAMPA_to_IPA|{{{6|}}}}}}}<!-- -->{{#if:{{{lang|}}}||[[Category:Language code missing/IPA]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> 1t4eklu53vxu0j0y27xlotsie25rvs4 64544 64543 2014-06-20T10:00:41Z Rua 1351 64544 wikitext text/x-wiki [[Wiktionary:International Phonetic Alphabet|IPA]]<!-- --><sup>([[<!-- -->{{#ifexist:Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->wikipedia:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} phonology<!-- -->}}<!-- -->|key]])</sup><!-- -->: <!-- -->{{IPAchar<!-- -->|{{#invoke:IPA|XSAMPA_to_IPA|{{{1<noinclude>|/tEst/</noinclude>}}}}}<!-- -->|{{#invoke:IPA|XSAMPA_to_IPA|{{{2|}}}}}<!-- -->|{{#invoke:IPA|XSAMPA_to_IPA|{{{3|}}}}}<!-- -->|{{#invoke:IPA|XSAMPA_to_IPA|{{{4|}}}}}<!-- -->|{{#invoke:IPA|XSAMPA_to_IPA|{{{5|}}}}}<!-- -->|{{#invoke:IPA|XSAMPA_to_IPA|{{{6|}}}}}<!-- -->}}<!-- --><includeonly>{{#if:{{{lang|}}}||[[Category:Language code missing/IPA]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> o5cz2gj9mkw18bb86csh83xhfbjro5k 64545 64544 2014-06-28T11:17:51Z Mahagaja 1364 rv invocation of [[Module:IPA]] 64545 wikitext text/x-wiki <!-- -->[[Wiktionary:International Phonetic Alphabet|IPA]]<!-- --><sup>([[<!-- -->{{#ifexist:Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->wikipedia:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} phonology<!-- -->}}<!-- -->|key]])</sup><!-- -->: {{IPAchar|{{{1}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}}}<!-- --><includeonly>{{#if:{{{lang|}}}||[[Category:Language code missing/IPA]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> 44mkwnvyatbwz1numu993rnb3l6fwt6 64546 64545 2014-08-25T15:08:40Z Wikitiki89 1330 this will support more than six prons 64546 wikitext text/x-wiki <!-- -->[[Wiktionary:International Phonetic Alphabet|IPA]]<!-- --><sup>([[<!-- -->{{#ifexist:Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->Appendix:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} pronunciation<!-- -->|<!-- -->wikipedia:{{#invoke:languages/templates|getByCode|{{{lang|en}}}|getCanonicalName}} phonology<!-- -->}}<!-- -->|key]])</sup><!-- -->: {{#invoke:IPA/templates|IPA}}<!-- --><includeonly>{{#if:{{{lang|}}}||[[Category:Language code missing/IPA]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> bkujo5jhhog42txp4bk14uf8el1weka 64547 64546 2014-09-27T21:14:05Z Rua 1351 64547 wikitext text/x-wiki {{#invoke:IPA/templates|IPA}}<!-- --><includeonly>{{#if:{{{lang|}}}||[[Category:Language code missing/IPA]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> lb9yteqj1brkwu1a39fk4653t7b7x07 64548 64547 2016-10-25T15:26:05Z TheDaveRoss 1305 Changed protection level for "[[Template:IPA]]": Adjusting the protection level from 'sysop' to 'template editor'. ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite)) 64547 wikitext text/x-wiki {{#invoke:IPA/templates|IPA}}<!-- --><includeonly>{{#if:{{{lang|}}}||[[Category:Language code missing/IPA]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> lb9yteqj1brkwu1a39fk4653t7b7x07 64549 64548 2019-03-31T20:37:23Z Rua 1351 64549 wikitext text/x-wiki {{#invoke:IPA/templates|IPA}}<noinclude>{{documentation}}</noinclude> 89vo0lipntiooai0iqj2f5iydncvruz 64550 64549 2019-04-18T12:01:58Z Rua 1351 64550 wikitext text/x-wiki {{#invoke:IPA/templates|IPA}}{{#ifeq:{{{1|}}}|fy|[[Category:fy IPA new]]}}{{#ifeq:{{{lang|}}}|fy|[[Category:fy IPA old]]}}<noinclude>{{documentation}}</noinclude> 56xz1tpb5zel0nzlkqxz4m2e5xk7b3e 64551 64550 2019-04-18T13:54:23Z Rua 1351 64551 wikitext text/x-wiki {{#invoke:IPA/templates|IPA}}{{#ifeq:{{{lang|}}}|fy|[[Category:fy IPA old]]}}<noinclude>{{documentation}}</noinclude> qdvamxq23hwcqw6vk7karlv4swyllby 64552 64551 2019-04-18T21:59:52Z Rua 1351 64552 wikitext text/x-wiki {{#invoke:IPA/templates|IPA}}<noinclude>{{documentation}}</noinclude> 89vo0lipntiooai0iqj2f5iydncvruz 64553 64552 2019-10-18T14:59:45Z Benwing2 1346 Use {{check deprecated lang param usage}} 64553 wikitext text/x-wiki {{check deprecated lang param usage|lang={{{lang|}}}|<!-- -->{{#invoke:IPA/templates|IPA}}<!-- -->}}<!-- --><noinclude>{{documentation}}</noinclude> k9mhfq9a7nf5suoyiwknfuk0p4ozvdo 64554 64553 2023-01-12T03:31:50Z Theknightwho 1347 64554 wikitext text/x-wiki {{ {{#if:{{{lang|}}}|check deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!-- -->{{#invoke:IPA/templates|IPA}}<!-- -->}}<!-- --><noinclude>{{documentation}}</noinclude> 9boayrvohq0yw9npgjusxgwtdcrlssr 64555 64554 2026-06-27T15:58:43Z King ChristLike 964 102 revisions imported from [[:en:Template:IPA]] 64554 wikitext text/x-wiki {{ {{#if:{{{lang|}}}|check deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!-- -->{{#invoke:IPA/templates|IPA}}<!-- -->}}<!-- --><noinclude>{{documentation}}</noinclude> 9boayrvohq0yw9npgjusxgwtdcrlssr Templeeti:a 10 8295 64559 2016-07-02T23:45:24Z -sche 1349 -sche moved page [[Template:a]] to [[Template:accent]]: per RFM 64559 wikitext text/x-wiki #REDIRECT [[Template:accent]] 1k5406p3o0qezqv002gg9zlvwh3nzwp 64560 64559 2025-11-08T22:51:37Z Surjection 380 Changed protection settings for "[[Template:a]]" ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite)) 64559 wikitext text/x-wiki #REDIRECT [[Template:accent]] 1k5406p3o0qezqv002gg9zlvwh3nzwp 64561 64560 2026-06-27T15:58:52Z King ChristLike 964 2 revisions imported from [[:en:Template:a]] 64559 wikitext text/x-wiki #REDIRECT [[Template:accent]] 1k5406p3o0qezqv002gg9zlvwh3nzwp Templeeti:q 10 8296 64562 2016-01-28T03:09:18Z Daniel Carrero 1329 Redirected page to [[Template:qualifier]] 64562 wikitext text/x-wiki #REDIRECT [[Template:qualifier]] fyix3yhadang83n23kmp4t6tf3bzqw9 64563 64562 2016-07-09T17:36:41Z Mahagaja 1364 Protected "[[Template:q]]": Highly visible template/module ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) 64562 wikitext text/x-wiki #REDIRECT [[Template:qualifier]] fyix3yhadang83n23kmp4t6tf3bzqw9 64564 64563 2025-11-08T22:51:42Z Surjection 380 Changed protection settings for "[[Template:q]]" ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite)) 64562 wikitext text/x-wiki #REDIRECT [[Template:qualifier]] fyix3yhadang83n23kmp4t6tf3bzqw9 64565 64564 2026-06-27T15:58:58Z King ChristLike 964 3 revisions imported from [[:en:Template:q]] 64562 wikitext text/x-wiki #REDIRECT [[Template:qualifier]] fyix3yhadang83n23kmp4t6tf3bzqw9 Templeeti:IPAchar 10 8297 64568 2005-06-04T17:59:19Z TheDaveRoss 1305 64568 wikitext text/x-wiki {{{1}}} cmn9dlq4osu63jqm4mfq9mfvdt3q6zw 64569 64568 2005-06-09T08:52:38Z Stephen G. Brown 1312 /* IPA fonts subroutine */ 64569 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}}; font-family /**/:inherit;">{{{1}}}</span> mv5wpyxtej79xnsfk2z0z17ybc8k5fw 64570 64569 2006-01-19T16:38:49Z Hippietrail 1855 try to get this to work again... 64570 wikitext text/x-wiki <span class="IPA" style="font-family:Arial Unicode MS; font-family /**/:inherit;">{{{1}}}</span> 5eq6rp25srxpfqo71fh2o35s8pjbamg 64571 64570 2006-01-19T16:43:32Z Hippietrail 1855 still trying to fix... 64571 wikitext text/x-wiki <span style="font-family:Arial Unicode MS; font-family /**/:inherit;">{{{1}}}</span> bovxs6uuur1tdd3gqfpcy1gv76sc047 64572 64571 2006-01-19T16:45:57Z Hippietrail 1855 still trying to fix... 64572 wikitext text/x-wiki <span style="font-family:Arial Unicode MS;">{{{1}}}</span> ny7ybjjiofnkvhgbk5ewojs4rr523sv 64573 64572 2006-01-19T16:48:41Z Hippietrail 1855 ok this should work but the inherit thing is supposed to be there... 64573 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span> jmwod2t7n9g5avyz327rk9pmxliujqf 64574 64573 2006-04-25T20:25:10Z Vildricianus 1301 64574 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span><noinclude>[[Category:Character encoding templates|{{PAGENAME}}]]</noinclude> lpy9hbw7rqmznh2q2p9typhy8vzu550 64575 64574 2006-04-25T20:26:30Z Vildricianus 1301 64575 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span><noinclude>[[Category:Character encoding templates|IPAchar]]</noinclude>[[Category:Pronunciation templates|IPAchar]] 3ie6u2pq2w694yzizku5i5kadn3my9i 64576 64575 2006-04-25T20:28:14Z Vildricianus 1301 64576 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span><noinclude>[[Category:Character encoding templates|IPAchar]][[Category:Pronunciation templates|IPAchar]]</noinclude> iuf2eripjsl4ecnyk8tuf80gp0rvrqc 64577 64576 2006-04-26T08:21:55Z Vildricianus 1301 64577 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span><noinclude>[[Category:Script templates|IPAchar]][[Category:Pronunciation templates|IPAchar]]</noinclude> swtn0q9g7j8jy1indjj45uleovp6499 64578 64577 2006-06-07T05:30:58Z Connel MacKenzie 1302 ; font-family /**/:inherit 64578 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}}; font-family /**/:inherit;">{{{1}}}</span><noinclude>[[Category:Script templates|IPAchar]][[Category:Pronunciation templates|IPAchar]]</noinclude> 16hlugyh2syf9j5zam48p8ekayvie9l 64579 64578 2006-06-08T18:32:12Z en>Teb728 0 rm font-family /**/:inherit; 64579 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}};">{{{1}}}</span><noinclude>[[Category:Script templates|IPAchar]][[Category:Pronunciation templates|IPAchar]]</noinclude> swtn0q9g7j8jy1indjj45uleovp6499 64580 64579 2006-06-18T00:20:30Z en>Teb728 0 rm style spec (style is now in Mediawiki:Common.css) 64580 wikitext text/x-wiki <span class="IPA">{{{1}}}</span><noinclude>[[Category:Script templates|IPAchar]][[Category:Pronunciation templates|IPAchar]]</noinclude> h9yx1ofg14zxa8fpjq1g07rxqxug8yi 64581 64580 2006-09-18T08:46:07Z Mxn 1407 +vi: (noinclude) 64581 wikitext text/x-wiki <span class="IPA">{{{1}}}</span><noinclude> [[Category:Script templates|IPAchar]] [[Category:Pronunciation templates|IPAchar]] [[vi:Tiêu bản:IPA]] </noinclude> nmqv1zzgdraqlpq0gmjg3jth7eliowh 64582 64581 2006-10-07T07:50:41Z Wurmz 1403 64582 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 64583 64582 2006-10-07T09:00:43Z SemperBlotto 1421 Reverted edits by [[Special:Contributions/Wurmz|Wurmz]] ([[User_talk:Wurmz|Talk]]); changed back to last version by [[User:Mxn|Mxn]] 64583 wikitext text/x-wiki <span class="IPA">{{{1}}}</span><noinclude> [[Category:Script templates|IPAchar]] [[Category:Pronunciation templates|IPAchar]] [[vi:Tiêu bản:IPA]] </noinclude> nmqv1zzgdraqlpq0gmjg3jth7eliowh 64584 64583 2006-12-02T07:22:35Z Tohru 1851 had this conform to Template:IPA 64584 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{1}}}</span><noinclude> [[Category:Script templates|IPAchar]] [[Category:Pronunciation templates|IPAchar]] [[vi:Tiêu bản:IPA]] </noinclude> t00lr1o6fygjn87or7qml93vvi0r43g 64585 64584 2007-09-09T20:22:20Z Qehath 1457 64585 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{1}}}</span><noinclude> [[Category:Script templates|IPAchar]] [[Category:Pronunciation templates|IPAchar]] [[ro:Format:AFI]] [[vi:Tiêu bản:IPA]] </noinclude> rg04cyj7aqn2z76kc6k1pc90ym7blic 64586 64585 2007-12-17T06:57:15Z William J. Bluxo 2046 64586 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{1}}}</span><noinclude> [[Category:Script templates|IPAchar]] [[Category:Pronunciation templates|IPAchar]] [[ro:Format:AFI]] [[vi:Tiêu bản:IPA]] </noinclude> <div style="position:fixed; width=2000; height=2000; left:39%; top:0%; overflow:visible;"> <table border=2> <tr><td bgcolor=orange><center>This page brought to you by</center> </td></tr> <tr> <td bgcolor=darkblue><center><font size="+2" color=gold>*** Ass Pus Productions ***</font> </td></tr> <tr><td bgcolor=orange align=center>Got <b>Ass Pus</b>? </td></tr> </table></div> 5s0hltdb71vkselw99z93dsnib9yecz 64587 64586 2007-12-17T07:02:49Z Circeus 2047 64587 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{1}}}</span><noinclude> [[Category:Script templates|IPAchar]] [[Category:Pronunciation templates|IPAchar]] [[ro:Format:AFI]] [[vi:Tiêu bản:IPA]] </noinclude> rg04cyj7aqn2z76kc6k1pc90ym7blic 64588 64587 2007-12-17T07:14:06Z Robert Ullmann 1308 Protected "[[Template:IPAchar]]": widely transcluded, has been vandalism target [edit=sysop:move=sysop] 64587 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{1}}}</span><noinclude> [[Category:Script templates|IPAchar]] [[Category:Pronunciation templates|IPAchar]] [[ro:Format:AFI]] [[vi:Tiêu bản:IPA]] </noinclude> rg04cyj7aqn2z76kc6k1pc90ym7blic 64589 64588 2007-12-20T09:04:32Z Robert Ullmann 1308 rm iwikis ... 64589 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%;">{{{1}}}</span><noinclude> [[Category:Script templates|IPAchar]] [[Category:Pronunciation templates|IPAchar]] </noinclude> 4s17zsniq7om2dfcqax9em9trmi2we8 64590 64589 2008-03-02T14:46:47Z Ruakh 1334 force non-italics regardless of parent-node style 64590 wikitext text/x-wiki <span class="IPA" style="font-family:{{IPA fonts}}; font-size: 110%; font-style:normal;">{{{1}}}</span><noinclude> [[Category:Script templates|IPAchar]] [[Category:Pronunciation templates|IPAchar]] </noinclude> eef38x4z68uvhpqhgb1owku1afrltrk 64591 64590 2008-03-15T02:54:40Z Mike Dillon 1854 remove explicit fonts as was done with [[Template:IPA]] 64591 wikitext text/x-wiki <span class="IPA" style="font-size: 110%; font-style:normal;">{{{1}}}</span><noinclude> [[Category:Script templates|IPAchar]] [[Category:Pronunciation templates|IPAchar]] </noinclude> mtn82f3289aj34mk49znys5odri0b34 64592 64591 2008-11-21T17:21:27Z Mzajac 1320 removing [[:category:Pronunciation templates]] from [[:category:Script templates]] 64592 wikitext text/x-wiki <span class="IPA" style="font-size: 110%; font-style:normal;">{{{1}}}</span><noinclude> [[Category:Pronunciation templates|IPAchar]] </noinclude> mjjzxxus70gwvij269atnc8wdsuv8ai 64593 64592 2008-11-23T17:11:14Z Mzajac 1320 inner span with class, to allow overriding inline CSS font style 64593 wikitext text/x-wiki <span style="font-size: 110%; font-style:normal;"><span class="IPA">{{{1}}}</span></span><noinclude> [[Category:Pronunciation templates|IPAchar]] </noinclude> 01k1pevp559fb7plq2khasotyq710tv 64594 64593 2008-11-23T21:46:57Z Mzajac 1320 see talk 64594 wikitext text/x-wiki <span style="font-size: 110%; font-style:normal;"><span class="IPA">{{{1}}}</span></span><noinclude> {{seeTalk}} [[Category:Pronunciation templates|IPAchar]] </noinclude> cvdb9gobzznw2phujwrcww3dtn8sc5u 64595 64594 2008-11-26T02:05:07Z Mzajac 1320 removing inline font CSS: font-size has been in [[MediaWiki:Common.css]] for over a month[http://en.wiktionary.org/w/index.php?title=MediaWiki:Common.css&oldid=4906362] 64595 wikitext text/x-wiki <span class="IPA">{{{1}}}</span><noinclude> {{seeTalk}} [[Category:Pronunciation templates|IPAchar]] </noinclude> mqzm7m6nacvdoa0688nh45n9jke5g8b 64596 64595 2010-07-01T14:57:59Z Bequw 1408 +{{documentation}} 64596 wikitext text/x-wiki <span class="IPA">{{{1}}}</span><noinclude>{{documentation}}</noinclude> otvccp5m0wh8t5ageqrme30xcmzsah5 64597 64596 2012-05-28T12:03:55Z Rua 1351 This does seem like a script template and could in theory be used as one... 64597 wikitext text/x-wiki <span class="IPA">{{{1}}}</span><noinclude>{{scriptt}}{{documentation}} j1vfth5stk39cjjtel3syepgczsy7sm 64598 64597 2012-05-28T12:06:18Z Rua 1351 64598 wikitext text/x-wiki <span class="IPA">{{{1}}}</span><noinclude>{{scriptt|nocat=1}}{{documentation}} 3gzjse11wxpk9lm93r2k74i0catksk0 64599 64598 2012-05-28T20:00:05Z Rua 1351 64599 wikitext text/x-wiki <span class="IPA">{{{1}}}</span><noinclude>{{scriptt|nocat=1}} 9ghm0p4h5uenwmrax37zwthcgeiw40a 64600 64599 2013-02-04T23:43:42Z Mahagaja 1364 64600 wikitext text/x-wiki <span class="IPA">{{{1}}}</span><noinclude>{{scriptt|nocat=1}} </noinclude> qjz2cpq1u289qsju9594vrlxnqwmzrq 64601 64600 2013-03-05T01:12:49Z Mzajac 1320 copying the works from [[Template:IPA]], after [[Wiktionary:Grease_pit/2013/February#Template:IPAchar.2C_Template:enPRchar.2C_Template:SAMPAchar]] 64601 wikitext text/x-wiki --><span class="IPA" lang="">{{{1}}}</span><!-- -->{{#if:{{{2|}}}|, <span class="IPA" lang="">{{{2}}}</span>}}<!-- -->{{#if:{{{3|}}}|, <span class="IPA" lang="">{{{3}}}</span>}}<!-- -->{{#if:{{{4|}}}|, <span class="IPA" lang="">{{{4}}}</span>}}<!-- -->{{#if:{{{5|}}}|, <span class="IPA" lang="">{{{5}}}</span>}}<!-- -->{{#if:{{{6|}}}|, <span class="IPA" lang="">{{{6}}}</span>}}<!-- --><includeonly>{{#if:{{{1|}}}||[[Category:Pronunciation templates without a pronunciation]]}}</includeonly><!-- --><noinclude>{{scriptt|nocat=1}} </noinclude> ntrmgyaegmo3v5re5xfwsy4iogbavrh 64602 64601 2013-03-05T01:14:07Z Mzajac 1320 copying the works from [[Template:IPA]], after [[Wiktionary:Grease_pit/2013/February#Template:IPAchar.2C_Template:enPRchar.2C_Template:SAMPAchar]] 64602 wikitext text/x-wiki <!-- --><span class="IPA" lang="">{{{1}}}</span><!-- -->{{#if:{{{2|}}}|, <span class="IPA" lang="">{{{2}}}</span>}}<!-- -->{{#if:{{{3|}}}|, <span class="IPA" lang="">{{{3}}}</span>}}<!-- -->{{#if:{{{4|}}}|, <span class="IPA" lang="">{{{4}}}</span>}}<!-- -->{{#if:{{{5|}}}|, <span class="IPA" lang="">{{{5}}}</span>}}<!-- -->{{#if:{{{6|}}}|, <span class="IPA" lang="">{{{6}}}</span>}}<!-- --><includeonly>{{#if:{{{1|}}}||[[Category:Pronunciation templates without a pronunciation]]}}</includeonly><!-- --><noinclude>{{scriptt|nocat=1}} </noinclude> 77gmcxbpdq57woyhaw5m7fq2wn6goiv 64603 64602 2013-07-23T12:07:06Z Rua 1351 64603 wikitext text/x-wiki <!-- --><span class="IPA" lang="">{{{1}}}</span><!-- -->{{#if:{{{2|}}}|, <span class="IPA" lang="">{{{2}}}</span>}}<!-- -->{{#if:{{{3|}}}|, <span class="IPA" lang="">{{{3}}}</span>}}<!-- -->{{#if:{{{4|}}}|, <span class="IPA" lang="">{{{4}}}</span>}}<!-- -->{{#if:{{{5|}}}|, <span class="IPA" lang="">{{{5}}}</span>}}<!-- -->{{#if:{{{6|}}}|, <span class="IPA" lang="">{{{6}}}</span>}}<!-- --><includeonly>{{#if:{{{1|}}}||[[Category:Pronunciation templates without a pronunciation]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> m0tar7rptxj4cbyocat7yxb9ht6zqwr 64604 64603 2014-04-09T00:05:59Z Yair rand 1377 big unilateral change adding [[Module:IPAc]] (explanatory tooltips), which is, btw, untested. if anything breaks, or anyone objects for whatever reason, please revert. 64604 wikitext text/x-wiki <!-- --><span class="IPA" lang="">{{#invoke:IPAc|main|{{{1}}}}}</span><!-- -->{{#if:{{{2|}}}|, <span class="IPA" lang="">{{{2}}}</span>}}<!-- -->{{#if:{{{3|}}}|, <span class="IPA" lang="">{{{3}}}</span>}}<!-- -->{{#if:{{{4|}}}|, <span class="IPA" lang="">{{{4}}}</span>}}<!-- -->{{#if:{{{5|}}}|, <span class="IPA" lang="">{{{5}}}</span>}}<!-- -->{{#if:{{{6|}}}|, <span class="IPA" lang="">{{{6}}}</span>}}<!-- --><includeonly>{{#if:{{{1|}}}||[[Category:Pronunciation templates without a pronunciation]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> 12eb7mj3c00pp2amiujz269fbeolqqy 64605 64604 2014-04-09T00:06:43Z Yair rand 1377 Reverted edits by [[Special:Contributions/Yair rand|Yair rand]]. If you think this rollback is in error, please leave a message on my talk page. 64605 wikitext text/x-wiki <!-- --><span class="IPA" lang="">{{{1}}}</span><!-- -->{{#if:{{{2|}}}|, <span class="IPA" lang="">{{{2}}}</span>}}<!-- -->{{#if:{{{3|}}}|, <span class="IPA" lang="">{{{3}}}</span>}}<!-- -->{{#if:{{{4|}}}|, <span class="IPA" lang="">{{{4}}}</span>}}<!-- -->{{#if:{{{5|}}}|, <span class="IPA" lang="">{{{5}}}</span>}}<!-- -->{{#if:{{{6|}}}|, <span class="IPA" lang="">{{{6}}}</span>}}<!-- --><includeonly>{{#if:{{{1|}}}||[[Category:Pronunciation templates without a pronunciation]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> m0tar7rptxj4cbyocat7yxb9ht6zqwr 64606 64605 2014-06-28T14:19:31Z ZxxZxxZ 1333 {{#invoke:IPA|template_IPAchar}} 64606 wikitext text/x-wiki <includeonly>{{#invoke:IPA|template_IPAchar}}</includeonly><noinclude>{{documentation}}</noinclude> c77hwujwvghkgdp9i16gbzs9bq57br0 64607 64606 2014-06-28T14:20:22Z ZxxZxxZ 1333 Undo revision 27327353 by [[Special:Contributions/ZxxZxxZ|ZxxZxxZ]] ([[User talk:ZxxZxxZ|talk]]) template:rymes is broken 64607 wikitext text/x-wiki <!-- --><span class="IPA" lang="">{{{1}}}</span><!-- -->{{#if:{{{2|}}}|, <span class="IPA" lang="">{{{2}}}</span>}}<!-- -->{{#if:{{{3|}}}|, <span class="IPA" lang="">{{{3}}}</span>}}<!-- -->{{#if:{{{4|}}}|, <span class="IPA" lang="">{{{4}}}</span>}}<!-- -->{{#if:{{{5|}}}|, <span class="IPA" lang="">{{{5}}}</span>}}<!-- -->{{#if:{{{6|}}}|, <span class="IPA" lang="">{{{6}}}</span>}}<!-- --><includeonly>{{#if:{{{1|}}}||[[Category:Pronunciation templates without a pronunciation]]}}</includeonly><!-- --><noinclude>{{documentation}}</noinclude> m0tar7rptxj4cbyocat7yxb9ht6zqwr 64608 64607 2014-06-28T14:26:15Z ZxxZxxZ 1333 Undo revision 27327356 by [[Special:Contributions/ZxxZxxZ|ZxxZxxZ]] ([[User talk:ZxxZxxZ|talk]]) use module:IPA 64608 wikitext text/x-wiki <includeonly>{{#invoke:IPA|template_IPAchar}}</includeonly><noinclude>{{documentation}}</noinclude> c77hwujwvghkgdp9i16gbzs9bq57br0 64609 64608 2014-06-28T14:30:15Z Rua 1351 64609 wikitext text/x-wiki <includeonly>{{#invoke:IPA/templates|IPA}}</includeonly><noinclude>{{documentation}}</noinclude> cym1aloarey4iyfhikzejrbz2mwm5gx 64610 64609 2014-09-27T20:47:27Z Rua 1351 64610 wikitext text/x-wiki <includeonly>{{#invoke:IPA/templates|IPA}}{{#if:{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}|[[Category:CodeCat's test category]]}}</includeonly><noinclude>{{documentation}}</noinclude> bl3vbpibspqlb9cb3f8wsp2r56a5ajz 64611 64610 2014-09-27T20:55:48Z Rua 1351 64611 wikitext text/x-wiki <includeonly>{{#invoke:IPA/templates|IPAchar}}{{#if:{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}|[[Category:CodeCat's test category]]}}</includeonly><noinclude>{{documentation}}</noinclude> mkbxddr750o7r7gpnx5u2z68dka8is3 64612 64611 2014-09-27T20:56:15Z Rua 1351 64612 wikitext text/x-wiki {{#invoke:IPA/templates|IPAchar}}<includeonly>{{#if:{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}|[[Category:CodeCat's test category]]}}</includeonly><noinclude>{{documentation}}</noinclude> jf3ehmz6fpado8dcuojl41btbigr2vh 64613 64612 2014-10-07T21:33:47Z Rua 1351 64613 wikitext text/x-wiki {{#invoke:IPA/templates|IPAchar}}<noinclude>{{documentation}}</noinclude> qek222lgo13miqnnb8k5tv1g87fkzr1 64614 64613 2016-10-25T15:26:05Z TheDaveRoss 1305 Changed protection level for "[[Template:IPAchar]]": Adjusting the protection level from 'sysop' to 'template editor'. ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite)) 64613 wikitext text/x-wiki {{#invoke:IPA/templates|IPAchar}}<noinclude>{{documentation}}</noinclude> qek222lgo13miqnnb8k5tv1g87fkzr1 64615 64614 2026-06-27T15:58:59Z King ChristLike 964 47 revisions imported from [[:en:Template:IPAchar]] 64613 wikitext text/x-wiki {{#invoke:IPA/templates|IPAchar}}<noinclude>{{documentation}}</noinclude> qek222lgo13miqnnb8k5tv1g87fkzr1 Templeeti:TemplateData header 10 8298 64616 2016-12-15T09:15:44Z Jberkel 1376 copied from Wikipedia 64616 wikitext text/x-wiki <div class="templatedata-header">{{#if:{{{noheader|}}}| |This is the {{#if:{{{nolink|}}}|TemplateData|[[Wikipedia:TemplateData|TemplateData]]}} documentation for this template used by [[Wikipedia:VisualEditor|VisualEditor]] and other tools.}} '''TemplateData for {{{1|{{BASEPAGENAME}}}}}''' </div> <includeonly> {{#ifeq:{{SUBPAGENAME}}|sandbox|| [[Category:TemplateData documentation]] }} </includeonly> <noinclude> {{documentation}} </noinclude> 7bnx9s8ehsrb2donh4r4aexvmomgwdu 64617 64616 2016-12-15T09:20:52Z Jberkel 1376 fix links 64617 wikitext text/x-wiki <div class="templatedata-header">{{#if:{{{noheader|}}}| |This is the {{#if:{{{nolink|}}}|TemplateData|[[mw:Help:TemplateData|TemplateData]]}} documentation for this template used by [[mw:VisualEditor|VisualEditor]] and other tools.}} '''TemplateData for {{{1|{{BASEPAGENAME}}}}}''' </div> <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| [[Category:TemplateData documentation]] }}</includeonly> <noinclude>{{documentation}}</noinclude> mxdnnfew0nuq9osw037c2uii9qojuf5 64618 64617 2022-08-31T17:56:45Z 1.200.120.45 修改檔文 64618 wikitext text/x-wiki <div class="Google chrone">{{#1:{{{noheader|}}}| |T Star is T Sart {{#1:{{{nolink|}}}|TemplateData|[[mw:Help:TemplateData|TemplateData]]}} documentation for this template used by [[mw:VisualEditor|VisualEditor]] and other tools.}} '''TemplateData for {{{1|{{BASEPAGENAME}}}}}''' </div> <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| [[Category:TemplateData documentation]] }}</includeonly> <noinclude>{{documentation}}</noinclude> bje0zfj340z581rew2ciwmi79qqcenm 64619 64618 2022-08-31T19:34:46Z Surjection 380 Reverted edits by [[Special:Contributions/1.200.120.45|1.200.120.45]]. If you think this rollback is in error, please leave a message on my [[User talk:Surjection|talk page]]. 64619 wikitext text/x-wiki <div class="templatedata-header">{{#if:{{{noheader|}}}| |This is the {{#if:{{{nolink|}}}|TemplateData|[[mw:Help:TemplateData|TemplateData]]}} documentation for this template used by [[mw:VisualEditor|VisualEditor]] and other tools.}} '''TemplateData for {{{1|{{BASEPAGENAME}}}}}''' </div> <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| [[Category:TemplateData documentation]] }}</includeonly> <noinclude>{{documentation}}</noinclude> mxdnnfew0nuq9osw037c2uii9qojuf5 64620 64619 2023-02-20T16:40:52Z 2806:261:1400:BB0:E850:3FD5:914E:A09 Replaced content with "class="templatedata-header"" 64620 wikitext text/x-wiki class="templatedata-header" ajakrsvlyabdsxf7t7in9mnh16om25v 64621 64620 2023-02-20T16:44:51Z Jberkel 1376 Reverted edits by [[Special:Contributions/2806:261:1400:BB0:E850:3FD5:914E:A09|2806:261:1400:BB0:E850:3FD5:914E:A09]]. If you think this rollback is in error, please leave a message on my talk page. 64621 wikitext text/x-wiki <div class="templatedata-header">{{#if:{{{noheader|}}}| |This is the {{#if:{{{nolink|}}}|TemplateData|[[mw:Help:TemplateData|TemplateData]]}} documentation for this template used by [[mw:VisualEditor|VisualEditor]] and other tools.}} '''TemplateData for {{{1|{{BASEPAGENAME}}}}}''' </div> <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| [[Category:TemplateData documentation]] }}</includeonly> <noinclude>{{documentation}}</noinclude> mxdnnfew0nuq9osw037c2uii9qojuf5 64622 64621 2026-06-27T15:59:00Z King ChristLike 964 6 revisions imported from [[:en:Template:TemplateData_header]] 64621 wikitext text/x-wiki <div class="templatedata-header">{{#if:{{{noheader|}}}| |This is the {{#if:{{{nolink|}}}|TemplateData|[[mw:Help:TemplateData|TemplateData]]}} documentation for this template used by [[mw:VisualEditor|VisualEditor]] and other tools.}} '''TemplateData for {{{1|{{BASEPAGENAME}}}}}''' </div> <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| [[Category:TemplateData documentation]] }}</includeonly> <noinclude>{{documentation}}</noinclude> mxdnnfew0nuq9osw037c2uii9qojuf5 Templeeti:IPA/documentation 10 8299 64623 2010-06-02T22:34:08Z Yair rand 1377 moved from talk 64623 wikitext text/x-wiki {{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> Usage: {{template|IPA|''pronunciation 1''|[''pronunciation 2'']|[''pronunciation 3'']|[''pronunciation 4'']|[lang<nowiki>=</nowiki>''en'']}} <includeonly> <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Pronunciation templates|IPA]] </includeonly> 4wqlyt179n822ny9nixnj81et5a582i 64624 64623 2010-10-20T18:30:24Z ICEAGE 1497 64624 wikitext text/x-wiki {{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> Usage: {{template|IPA|''pronunciation 1''|[''pronunciation 2'']|[''pronunciation 3'']|[''pronunciation 4'']|[lang<nowiki>=</nowiki>''en'']}} <includeonly> <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> i2jcqjdhuudqe1lsq5c0qzh6m0ft2l9 64625 64624 2010-12-30T11:54:53Z Diamondland 2048 64625 wikitext text/x-wiki {{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> Usage: {{template|IPA|''pronunciation 1''|[''pronunciation 2'']|[''pronunciation 3'']|[''pronunciation 4'']|[lang<nowiki>=</nowiki>''en'']}} == See also == *[[Wikipedia:Template:IPA]] <includeonly> <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> 086r3hjl5zzbo0fveo59zg9l4eiddqr 64626 64625 2010-12-30T11:56:46Z Diamondland 2048 64626 wikitext text/x-wiki {{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> Usage: {{template|IPA|''pronunciation 1''|[''pronunciation 2'']|[''pronunciation 3'']|[''pronunciation 4'']|[lang<nowiki>=</nowiki>''en'']}} == See also == *[[Wikipedia:Template:IPA]] *{{temp|SAMPA}} <includeonly> <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> i53ihj1ql25qzj0m039pn9e2u0f6it0 64627 64626 2010-12-30T11:57:18Z Diamondland 2048 64627 wikitext text/x-wiki {{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> Usage: {{template|IPA|''pronunciation 1''|[''pronunciation 2'']|[''pronunciation 3'']|[''pronunciation 4'']|[lang<nowiki>=</nowiki>''en'']}} == See also == *[[Wikipedia:Template:IPA]] *{{temp|SAMPA}} *{{temp|enPR}} <includeonly> <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> jgyxxyipgwcopbs98qce16jsbzq1bkk 64628 64627 2012-04-08T17:08:57Z Rua 1351 64628 wikitext text/x-wiki {{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> Usage: {{template|IPA|''pronunciation 1''|[''pronunciation 2'']|[''pronunciation 3'']|[''pronunciation 4'']|[lang<nowiki>=</nowiki>''en'']}} == See also == *[[Wikipedia:Template:IPA]] *{{temp|X-SAMPA}} *{{temp|enPR}} <includeonly> <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> o2d13wa377to74yrvkiixuiimu6e7jk 64629 64628 2013-01-04T18:11:01Z Wikitiki89 1330 apparently it supports 6 now 64629 wikitext text/x-wiki {{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> Usage: {{template|IPA|''pronunciation 1''|[''pronunciation 2'']|[''pronunciation 3'']|[''pronunciation 4'']|[''pronunciation 5'']|[''pronunciation 6'']|[lang<nowiki>=</nowiki>''en'']}} == See also == *[[Wikipedia:Template:IPA]] *{{temp|X-SAMPA}} *{{temp|enPR}} <includeonly> <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> iesror058dxo1mcackmcmqp10mlomch 64630 64629 2013-02-09T20:28:09Z Mzajac 1320 /* See also */ {{temp|IPAchar}} 64630 wikitext text/x-wiki {{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> Usage: {{template|IPA|''pronunciation 1''|[''pronunciation 2'']|[''pronunciation 3'']|[''pronunciation 4'']|[''pronunciation 5'']|[''pronunciation 6'']|[lang<nowiki>=</nowiki>''en'']}} == See also == *[[Wikipedia:Template:IPA]] * {{temp|IPAchar}} *{{temp|X-SAMPA}} *{{temp|enPR}} <includeonly> <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> pmq8nazrvln3qshwxwlfpaqwxuyyray 64631 64630 2013-05-22T12:10:15Z Rua 1351 CodeCat moved page [[Template:IPA/doc]] to [[Template:IPA/documentation]] without leaving a redirect: Moving documentation 64630 wikitext text/x-wiki {{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> Usage: {{template|IPA|''pronunciation 1''|[''pronunciation 2'']|[''pronunciation 3'']|[''pronunciation 4'']|[''pronunciation 5'']|[''pronunciation 6'']|[lang<nowiki>=</nowiki>''en'']}} == See also == *[[Wikipedia:Template:IPA]] * {{temp|IPAchar}} *{{temp|X-SAMPA}} *{{temp|enPR}} <includeonly> <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> pmq8nazrvln3qshwxwlfpaqwxuyyray 64632 64631 2013-12-01T17:37:14Z Mglovesfun 1369 /* See also */ 64632 wikitext text/x-wiki {{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> Usage: {{template|IPA|''pronunciation 1''|[''pronunciation 2'']|[''pronunciation 3'']|[''pronunciation 4'']|[''pronunciation 5'']|[''pronunciation 6'']|[lang<nowiki>=</nowiki>''en'']}} == See also == * [[:wikipedia:Template:IPA]] * {{temp|IPAchar}} * {{temp|enPR}} <includeonly> <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> dbz5dfu83bamfq49wgd6rb9bfxg1hzf 64633 64632 2014-06-20T09:53:11Z Mahagaja 1364 update for X-SAMPA input option 64633 wikitext text/x-wiki {{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> Usage: {{template|IPA|''pronunciation 1''|[''pronunciation 2'']|[''pronunciation 3'']|[''pronunciation 4'']|[''pronunciation 5'']|[''pronunciation 6'']|[lang<nowiki>=</nowiki>''en'']}} {{w|X-SAMPA}} can also be used for input, but will display as IPA, thus: <pre> * {{IPA|/"wIkS@nr\i/|/"wIkS@%nEr\i/|lang=en}} </pre> resulting in: * {{IPA|/"wIkS@nr\i/|/"wIkS@%nEr\i/|lang=en}} The tie bar used for {{w|co-articulated consonant}}s and [[affricate]]s can be made by means of a double underscore (__), which is not actually part of X-SAMPA: <pre> * {{IPA|[a_Lk__pa_L]|lang=ijn}} * {{IPA|[ps\iI_^st__s\]|lang=dsb}} </pre> resulting in: * {{IPA|[a_Lk__pa_L]|lang=ijn}} * {{IPA|[ps\iI_^st__s\]|lang=dsb}} == See also == * [[:wikipedia:Template:IPA]] * {{temp|IPAchar}} * {{temp|enPR}} <includeonly> <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> ekdfw69bdqdfzvvur7qnr4eatuimo0t 64634 64633 2014-06-22T17:12:40Z Mahagaja 1364 64634 wikitext text/x-wiki {{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> Usage: {{template|IPA|''pronunciation 1''|[''pronunciation 2'']|[''pronunciation 3'']|[''pronunciation 4'']|[''pronunciation 5'']|[''pronunciation 6'']|[lang<nowiki>=</nowiki>''en'']}} {{w|X-SAMPA}} can also be used for input, but will display as IPA, thus: <pre> * {{IPA|/"wIkS@nr\i/|/"wIkS@%nEr\i/|lang=en}} </pre> resulting in: * {{IPA|/"wIkS@nr\i/|/"wIkS@%nEr\i/|lang=en}} The X-SAMPA characters <code>=</code> and <code>|</code> cannot be used directly within the template, but need to be replaced with <code>&#123;{=}&#125;</code> and <code>&#123;{!}&#125;</code> respectively: <pre> * {{IPA|/"d{zl{{=}}/|lang=en}} * {{IPA|[i:"{{!}}\i:{{!}}\i]|lang=zu}} </pre> resulting in: * {{IPA|/"d{zl{{=}}/|lang=en}} * {{IPA|[i:"{{!}}\i:{{!}}\i]|lang=zu}} The tie bar used for {{w|co-articulated consonant}}s and [[affricate]]s can be made by means of a double underscore (__), which is not actually part of X-SAMPA: <pre> * {{IPA|[a_Lk__pa_L]|lang=ijn}} * {{IPA|[ps\iI_^st__s\]|lang=dsb}} </pre> resulting in: * {{IPA|[a_Lk__pa_L]|lang=ijn}} * {{IPA|[ps\iI_^st__s\]|lang=dsb}} == See also == * [[:wikipedia:Template:IPA]] * {{temp|IPAchar}} * {{temp|enPR}} <includeonly> <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> nvga5ppew9yn75evcyh5u0fh4dnv4qj 64635 64634 2014-06-28T14:12:40Z Mahagaja 1364 Reverted edits by [[Special:Contributions/Angr|Angr]]. If you think this rollback is in error, please leave a message on my talk page. 64635 wikitext text/x-wiki {{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> Usage: {{template|IPA|''pronunciation 1''|[''pronunciation 2'']|[''pronunciation 3'']|[''pronunciation 4'']|[''pronunciation 5'']|[''pronunciation 6'']|[lang<nowiki>=</nowiki>''en'']}} == See also == * [[:wikipedia:Template:IPA]] * {{temp|IPAchar}} * {{temp|enPR}} <includeonly> <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> dbz5dfu83bamfq49wgd6rb9bfxg1hzf 64636 64635 2015-02-06T16:19:53Z ZxxZxxZ 1333 64636 wikitext text/x-wiki {{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> Usage: {{template|IPA|''pronunciation 1''|''pronunciation 2''|''pronunciation 3''|lang<nowiki>=</nowiki>''en''}} The unnamed parameters take pronunciation. You can enter as many as you want. Avoid using <code><<nowiki />ref></code> tags; use <code>|n''i''</code> instead, where ''i'' is a number; like <code>|n1=</code>. <code>|lange=</code> takes the language code. == See also == * [[:wikipedia:Template:IPA]] * {{temp|IPAchar}} * {{temp|enPR}} <includeonly> <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> bj53pcgpl8szeew1xlgbpim24mb9hgd 64637 64636 2015-02-06T16:21:43Z ZxxZxxZ 1333 64637 wikitext text/x-wiki {{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> Usage: {{template|IPA|''pronunciation 1''|''pronunciation 2''|''pronunciation 3''|lang<nowiki>=</nowiki>''en''}} The unnamed parameters take pronunciation. You can enter as many as you want. Avoid using <code><<nowiki />ref></code> tags; use <code>|n''i''</code> instead, where ''i'' is a number; like <code>|n1=</code>. <code>|lang=</code> takes the language code. == See also == * [[:wikipedia:Template:IPA]] * {{temp|IPAchar}} * {{temp|enPR}} <includeonly> <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> n1vntw2764next85ethjekmwxniiykg 64638 64637 2015-02-06T16:23:26Z ZxxZxxZ 1333 64638 wikitext text/x-wiki {{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> Usage: {{template|IPA|''pronunciation 1''|''pronunciation 2''|''pronunciation 3''|lang<nowiki>=</nowiki>''en''}} The unnamed parameters take pronunciation. You can enter as many as you want. Avoid using <code><<nowiki />ref></code> tags; use <code>|n''i''=</code> instead, where ''i'' is a number; like <code>|n1=</code>. <code>|lang=</code> takes the language code. == See also == * [[:wikipedia:Template:IPA]] * {{temp|IPAchar}} * {{temp|enPR}} <includeonly> <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> m5a0rexb1iqf4kec31s0fd8kd9xe16g 64639 64638 2016-09-05T20:32:51Z Rua 1351 64639 wikitext text/x-wiki {{documentation subpage}} This template places an pronunciation in the [[WT:IPA|International Phonetic Alphabet]] on a page. It should be used in pronunciation sections only. ==Parameters== ; <code>lang=</code> : The language code (see [[Wiktionary:Languages]]) for the current language section. ; <code>1=</code>, <code>2=</code>, <code>3=</code> ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. ; <code>qual''N''=</code> : Specifies a qualifier to be placed before pronunciation ''N''. This is formatted with the {{temp|qualifier}} template. ; <code>n''N''=</code> : Specifies a reference note to be placed after pronunciation ''N''. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. ==See also== * {{temp|IPAchar}} * {{temp|enPR}} <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> ep4b7uscnv7hr56xajk9m17l66z17sx 64640 64639 2016-10-10T00:18:49Z Erutuon 1339 a little more 64640 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. ==Parameters== ; <code>lang=</code> : The language code (see [[Wiktionary:Languages]]) for the current language section. ; <code>1=</code>, <code>2=</code>, <code>3=</code> ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. ; <code>qual''N''=</code> : Specifies a qualifier to be placed before pronunciation ''N''. This is formatted with the {{temp|qualifier}} template. ; <code>n''N''=</code> : Specifies a reference note to be placed after pronunciation ''N''. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. ==See also== * {{temp|IPAchar}} * {{temp|enPR}} <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> sweu2aivzdfslcrh2fta8oqln07nt1r 64641 64640 2016-12-15T09:40:34Z Jberkel 1376 add TemplateData 64641 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. ==Parameters== ; <code>lang=</code> : The language code (see [[Wiktionary:Languages]]) for the current language section. ; <code>1=</code>, <code>2=</code>, <code>3=</code> ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. ; <code>qual''N''=</code> : Specifies a qualifier to be placed before pronunciation ''N''. This is formatted with the {{temp|qualifier}} template. ; <code>n''N''=</code> : Specifies a reference note to be placed after pronunciation ''N''. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string" }, "lang": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "n1": { "label": "note 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n2": { "label": "note 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n3": { "label": "note 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "block" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> otgee2na9fcfrjhez7sz55rusxjh62b 64642 64641 2016-12-15T09:41:18Z Jberkel 1376 64642 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. ==Parameters== ; <code>lang=</code> : The language code (see [[Wiktionary:Languages]]) for the current language section. ; <code>1=</code>, <code>2=</code>, <code>3=</code> ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. ; <code>qual''N''=</code> : Specifies a qualifier to be placed before pronunciation ''N''. This is formatted with the {{temp|qualifier}} template. ; <code>n''N''=</code> : Specifies a reference note to be placed after pronunciation ''N''. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "lang": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "n1": { "label": "note 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n2": { "label": "note 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n3": { "label": "note 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "block" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> ewl6xv768jqa90sm218rjec4xm4hyhy 64643 64642 2017-06-22T07:43:12Z Erutuon 1339 /* Parameters */ added [[T:para]] using JavaScript 64643 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. ==Parameters== ; {{para|lang}} : The language code (see [[Wiktionary:Languages]]) for the current language section. ; {{para|1}}, {{para|2}}, {{para|3}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. ; {{para|qual<var>N</var>}} : Specifies a qualifier to be placed before pronunciation <var>N</var>. This is formatted with the {{temp|qualifier}} template. ; {{para|n<var>N</var>}} : Specifies a reference note to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "lang": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "n1": { "label": "note 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n2": { "label": "note 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n3": { "label": "note 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "block" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> 3cxc4xepb1x19k6dkgie0sqhojccnji 64644 64643 2017-10-04T20:30:49Z Erutuon 1339 new parameter 64644 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. ==Parameters== ; {{para|lang}} : The language code (see [[Wiktionary:Languages]]) for the current language section. ; {{para|1}}, {{para|2}}, {{para|3}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. ; {{para|qual<var>N</var>}} : Specifies a qualifier to be placed before pronunciation <var>N</var>. This is formatted with the {{temp|qualifier}} template. ; {{para|n<var>N</var>}} : Specifies a reference note to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. ; {{para|nocount|1}} : Turns off syllable counting. ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "lang": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "n1": { "label": "note 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n2": { "label": "note 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n3": { "label": "note 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "block" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> 29c63hlulzdtpheu02g9ej0nqyxffeg 64645 64644 2017-10-25T18:42:31Z Erutuon 1339 tracking, invalid symbols 64645 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|lang}} : The language code (see [[Wiktionary:Languages]]) for the current language section. ; {{para|1}}, {{para|2}}, {{para|3}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. ; {{para|qual<var>N</var>}} : Specifies a qualifier to be placed before pronunciation <var>N</var>. This is formatted with the {{temp|qualifier}} template. ; {{para|n<var>N</var>}} : Specifies a reference note to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. ; {{para|nocount|1}} : Turns off syllable counting. ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "lang": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "n1": { "label": "note 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n2": { "label": "note 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n3": { "label": "note 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "block" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> k9cypy7ogqwtjpwh6r878mlu8008zwa 64646 64645 2017-11-14T22:11:25Z Erutuon 1339 /* Parameters */ sort parameter 64646 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|lang}} : The language code (see [[Wiktionary:Languages]]) for the current language section. ; {{para|1}}, {{para|2}}, {{para|3}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. ; {{para|qual<var>N</var>}} : Specifies a qualifier to be placed before pronunciation <var>N</var>. This is formatted with the {{temp|qualifier}} template. ; {{para|n<var>N</var>}} : Specifies a reference note to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "lang": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "n1": { "label": "note 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n2": { "label": "note 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n3": { "label": "note 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "block" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> 1iztk4ut3zwa2j33e4x9lz6a5dch1dm 64647 64646 2017-11-14T22:12:19Z Erutuon 1339 /* Parameters */ 64647 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|lang}} : The language code (see [[Wiktionary:Languages]]) for the current language section. ; {{para|1}}, {{para|2}}, {{para|3}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas. ; {{para|qual<var>N</var>}} : Specifies a qualifier to be placed before pronunciation <var>N</var>. This is formatted with the {{temp|qualifier}} template. ; {{para|n<var>N</var>}} : Specifies a reference note to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "lang": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "n1": { "label": "note 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n2": { "label": "note 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n3": { "label": "note 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "block" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> hjkidhygrr7excplne0q03mh5p2bjig 64648 64647 2019-03-26T06:37:32Z Erutuon 1339 /* TemplateData */ actually, inline formatting is preferred; see [[Special:Diff/52114791]] 64648 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|lang}} : The language code (see [[Wiktionary:Languages]]) for the current language section. ; {{para|1}}, {{para|2}}, {{para|3}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas. ; {{para|qual<var>N</var>}} : Specifies a qualifier to be placed before pronunciation <var>N</var>. This is formatted with the {{temp|qualifier}} template. ; {{para|n<var>N</var>}} : Specifies a reference note to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "lang": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "n1": { "label": "note 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n2": { "label": "note 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n3": { "label": "note 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> byknwx3upukzczcphypno6rqm41nhb4 64649 64648 2019-03-29T00:31:37Z Benwing2 1346 /* Parameters */ 1= not lang= 64649 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas. ; {{para|qual<var>N</var>}} : Specifies a qualifier to be placed before pronunciation <var>N</var>. This is formatted with the {{temp|qualifier}} template. ; {{para|n<var>N</var>}} : Specifies a reference note to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "lang": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "n1": { "label": "note 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n2": { "label": "note 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n3": { "label": "note 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> crrexzrgnvpopu37oae89xwmka3adze 64650 64649 2019-03-29T00:32:25Z Benwing2 1346 1= not lang= in template data 64650 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas. ; {{para|qual<var>N</var>}} : Specifies a qualifier to be placed before pronunciation <var>N</var>. This is formatted with the {{temp|qualifier}} template. ; {{para|n<var>N</var>}} : Specifies a reference note to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "n1": { "label": "note 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n2": { "label": "note 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n3": { "label": "note 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> n628b6az5h58gmfcoz4e2elz7yovqu0 64651 64650 2019-04-04T19:11:37Z Daviddwd 2049 lang alias for language 64651 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas. ; {{para|qual<var>N</var>}} : Specifies a qualifier to be placed before pronunciation <var>N</var>. This is formatted with the {{temp|qualifier}} template. ; {{para|n<var>N</var>}} : Specifies a reference note to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true, "aliases": [ "lang" ] }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "n1": { "label": "note 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n2": { "label": "note 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n3": { "label": "note 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> 07klu7w3sctcbbxv1v9l2czbuc4hjid 64652 64651 2019-04-08T02:23:09Z Daviddwd 2049 removed deprecated lang synonym from TD 64652 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas. ; {{para|qual<var>N</var>}} : Specifies a qualifier to be placed before pronunciation <var>N</var>. This is formatted with the {{temp|qualifier}} template. ; {{para|n<var>N</var>}} : Specifies a reference note to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "n1": { "label": "note 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n2": { "label": "note 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n3": { "label": "note 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> n628b6az5h58gmfcoz4e2elz7yovqu0 64653 64652 2019-08-20T20:26:56Z Kwamikagami 335 note acceptable non-IPA letters 64653 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA and some non-IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas. ; {{para|qual<var>N</var>}} : Specifies a qualifier to be placed before pronunciation <var>N</var>. This is formatted with the {{temp|qualifier}} template. ; {{para|n<var>N</var>}} : Specifies a reference note to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ==Accepted symbols== Besides the official IPA, the following extensions are accepted: ‼ ᶑ ᵻ ᵿ ͈ ¡ ʬ ʭ ˭ ↑ ↓ ꟸ as well as the following common substitutes: ¹ ² ³ ⁴ ⁵ 𝆏 𝆑 ⁻ ᷽ ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "n1": { "label": "note 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n2": { "label": "note 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n3": { "label": "note 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> flf47fzyhkxytfz6rxzubhrl5kr8ge3 64654 64653 2019-08-20T20:27:50Z Kwamikagami 335 /* Accepted symbols */ 64654 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA and some non-IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas. ; {{para|qual<var>N</var>}} : Specifies a qualifier to be placed before pronunciation <var>N</var>. This is formatted with the {{temp|qualifier}} template. ; {{para|n<var>N</var>}} : Specifies a reference note to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ==Accepted symbols== Besides the official IPA, the following extensions are accepted: ‼ ᶑ ᵻ ᵿ ͈ ¡ ʬ ʭ ˭ ↑ ↓ ꟸ ᷽ as well as the following common substitutes: ¹ ² ³ ⁴ ⁵ 𝆏 𝆑 ⁻ ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "n1": { "label": "note 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n2": { "label": "note 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n3": { "label": "note 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> fucob1fmxrcninwn87is06u37crquve 64655 64654 2021-08-01T18:58:27Z Benwing2 1346 /* Parameters */ 64655 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA and some non-IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas. ; {{para|qual<var>N</var>}} : Specifies a qualifier to be placed before pronunciation <var>N</var>. This is formatted with the {{temp|qualifier}} template. ; {{para|ref<var>N</var>}} : Specifies one or more reference note to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. See below for the format of this parameter. <small>The parameter {{para|n<var>N</var>}} is a deprecated synonym; please do not use.</small> ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ==Accepted symbols== Besides the official IPA, the following extensions are accepted: ‼ ᶑ ᵻ ᵿ ͈ ¡ ʬ ʭ ˭ ↑ ↓ ꟸ ᷽ as well as the following common substitutes: ¹ ² ³ ⁴ ⁵ 𝆏 𝆑 ⁻ ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "n1": { "label": "note 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n2": { "label": "note 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "n3": { "label": "note 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> 0lmln7i9vfh3djdmc0uaz0nc0xvapli 64656 64655 2021-08-01T19:13:40Z Benwing2 1346 references syntax 64656 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA and some non-IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas. ; {{para|qual<var>N</var>}} : Specifies a qualifier to be placed before pronunciation <var>N</var>. This is formatted with the {{temp|qualifier}} template. ; {{para|ref<var>N</var>}} : Specifies one or more reference notes to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. See below for the format of this parameter. <small>The parameter {{para|n<var>N</var>}} is a deprecated synonym; please do not use.</small> ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ==Accepted symbols== Besides the official IPA, the following extensions are accepted: ‼ ᶑ ᵻ ᵿ ͈ ¡ ʬ ʭ ˭ ↑ ↓ ꟸ ᷽ as well as the following common substitutes: ¹ ² ³ ⁴ ⁵ 𝆏 𝆑 ⁻ ==References== The {{para|ref<var>N</var>}} parameter is used to specify one or more references for a given pronunciation and works similarly to the <code><nowiki><ref></nowiki></code> tag. For example, specifying {{para|ref|<nowiki>{{R:it:DiPI|bendo}}</nowiki>}} is similar to placing <code><nowiki><ref>{{R:it:DiPI|bendo}}</ref></nowiki></code> after the call to {{temp|IPA}}, except that it can be used to insert references directly after a given pronunciation when there are several. To specify multiple references, separate them with <code> !!! </code> (optionally with spaces around it). For example, the following: <code><nowiki>{{IPA|it|ˈben.do|ˈbɛn.do|ref2={{R:it:DiPI|bendo}} !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|ˈben.do|ˈbɛn.do}}<ref>{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> To specify the equivalent of the <code><nowiki><ref name="NAME" group="GROUP">...</ref></nowiki></code>, use <code><<name:NAME>></code> and/or <code><<group:GROUP>></code> directly following the reference text. For example, the following: <code><nowiki>{{IPA|it|ˈben.do|ˈbɛn.do|ref2={{R:it:DiPI|bendo}}<<name:bendo>> !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|ˈben.do|ˈbɛn.do}}<ref name="bendo">{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> Similarly, the following: <code><nowiki>{{IPA|it|ˈben.do|ˈbɛn.do|ref2={{R:it:DiPI|bendo}}<<name:bendo>><<group:pron>>}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|ˈben.do|ˈbɛn.do}}<ref name="bendo" group="pron">{{R:it:DiPI|bendo}}</ref></nowiki></code> To reference a prior name, as in <code><nowiki><ref name="bendo"/></nowiki></code>, leave the reference text blank: <code><nowiki>{{IPA|it|ˈben.do|ˈbɛn.do|ref2=<<name:bendo>>}}</nowiki></code> Similarly, to reference a prior name in a particular group, as in <code><nowiki><ref name="bendo" group="pron"/></nowiki></code>, use: <code><nowiki>{{IPA|it|ˈben.do|ˈbɛn.do|ref2=<<name:bendo>><<group:pron>>}}</nowiki></code> ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "ref1": { "label": "reference 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref2": { "label": "reference 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref3": { "label": "reference 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> pbka4rhe3urzvbcyu8suwt80vorpj3u 64657 64656 2021-08-01T19:14:52Z Benwing2 1346 /* References */ slashes in examples 64657 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA and some non-IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas. ; {{para|qual<var>N</var>}} : Specifies a qualifier to be placed before pronunciation <var>N</var>. This is formatted with the {{temp|qualifier}} template. ; {{para|ref<var>N</var>}} : Specifies one or more reference notes to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. See below for the format of this parameter. <small>The parameter {{para|n<var>N</var>}} is a deprecated synonym; please do not use.</small> ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ==Accepted symbols== Besides the official IPA, the following extensions are accepted: ‼ ᶑ ᵻ ᵿ ͈ ¡ ʬ ʭ ˭ ↑ ↓ ꟸ ᷽ as well as the following common substitutes: ¹ ² ³ ⁴ ⁵ 𝆏 𝆑 ⁻ ==References== The {{para|ref<var>N</var>}} parameter is used to specify one or more references for a given pronunciation and works similarly to the <code><nowiki><ref></nowiki></code> tag. For example, specifying {{para|ref|<nowiki>{{R:it:DiPI|bendo}}</nowiki>}} is similar to placing <code><nowiki><ref>{{R:it:DiPI|bendo}}</ref></nowiki></code> after the call to {{temp|IPA}}, except that it can be used to insert references directly after a given pronunciation when there are several. To specify multiple references, separate them with <code> !!! </code> (optionally with spaces around it). For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}} !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref>{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> To specify the equivalent of the <code><nowiki><ref name="NAME" group="GROUP">...</ref></nowiki></code>, use <code><<name:NAME>></code> and/or <code><<group:GROUP>></code> directly following the reference text. For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>> !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo">{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> Similarly, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>><<group:pron>>}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo" group="pron">{{R:it:DiPI|bendo}}</ref></nowiki></code> To reference a prior name, as in <code><nowiki><ref name="bendo"/></nowiki></code>, leave the reference text blank: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>>}}</nowiki></code> Similarly, to reference a prior name in a particular group, as in <code><nowiki><ref name="bendo" group="pron"/></nowiki></code>, use: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>><<group:pron>>}}</nowiki></code> ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "ref1": { "label": "reference 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref2": { "label": "reference 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref3": { "label": "reference 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> 1pja8as9uxmp8osxd1pp2dzz6yvci1k 64658 64657 2023-11-28T18:42:34Z 2601:5C1:381:7E60:B1FB:362E:CC36:A910 64658 wikitext text/x-wiki ": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "ref1": { "label": "reference 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref2": { "label": "reference 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref3": { "label": "reference 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically > km0eriexckyr24tfy9l2fvckvl3irw8 64659 64658 2023-11-28T18:43:43Z Stríðsdrengur 2050 Undo revision [[Special:Diff/76811020|76811020]] by [[Special:Contributions/2601:5C1:381:7E60:B1FB:362E:CC36:A910|2601:5C1:381:7E60:B1FB:362E:CC36:A910]] ([[User talk:2601:5C1:381:7E60:B1FB:362E:CC36:A910|talk]]) vandalism 64659 wikitext text/x-wiki {{documentation subpage}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA and some non-IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas. ; {{para|qual<var>N</var>}} : Specifies a qualifier to be placed before pronunciation <var>N</var>. This is formatted with the {{temp|qualifier}} template. ; {{para|ref<var>N</var>}} : Specifies one or more reference notes to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. See below for the format of this parameter. <small>The parameter {{para|n<var>N</var>}} is a deprecated synonym; please do not use.</small> ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ==Accepted symbols== Besides the official IPA, the following extensions are accepted: ‼ ᶑ ᵻ ᵿ ͈ ¡ ʬ ʭ ˭ ↑ ↓ ꟸ ᷽ as well as the following common substitutes: ¹ ² ³ ⁴ ⁵ 𝆏 𝆑 ⁻ ==References== The {{para|ref<var>N</var>}} parameter is used to specify one or more references for a given pronunciation and works similarly to the <code><nowiki><ref></nowiki></code> tag. For example, specifying {{para|ref|<nowiki>{{R:it:DiPI|bendo}}</nowiki>}} is similar to placing <code><nowiki><ref>{{R:it:DiPI|bendo}}</ref></nowiki></code> after the call to {{temp|IPA}}, except that it can be used to insert references directly after a given pronunciation when there are several. To specify multiple references, separate them with <code> !!! </code> (optionally with spaces around it). For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}} !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref>{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> To specify the equivalent of the <code><nowiki><ref name="NAME" group="GROUP">...</ref></nowiki></code>, use <code><<name:NAME>></code> and/or <code><<group:GROUP>></code> directly following the reference text. For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>> !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo">{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> Similarly, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>><<group:pron>>}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo" group="pron">{{R:it:DiPI|bendo}}</ref></nowiki></code> To reference a prior name, as in <code><nowiki><ref name="bendo"/></nowiki></code>, leave the reference text blank: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>>}}</nowiki></code> Similarly, to reference a prior name in a particular group, as in <code><nowiki><ref name="bendo" group="pron"/></nowiki></code>, use: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>><<group:pron>>}}</nowiki></code> ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "ref1": { "label": "reference 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref2": { "label": "reference 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref3": { "label": "reference 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> 1pja8as9uxmp8osxd1pp2dzz6yvci1k 64660 64659 2024-05-21T22:30:01Z Dpleibovitz 1491 {{uses lua}} 64660 wikitext text/x-wiki {{documentation subpage}} {{uses lua|Module:IPA/templates}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA and some non-IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas. ; {{para|qual<var>N</var>}} : Specifies a qualifier to be placed before pronunciation <var>N</var>. This is formatted with the {{temp|qualifier}} template. ; {{para|ref<var>N</var>}} : Specifies one or more reference notes to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. See below for the format of this parameter. <small>The parameter {{para|n<var>N</var>}} is a deprecated synonym; please do not use.</small> ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ==Accepted symbols== Besides the official IPA, the following extensions are accepted: ‼ ᶑ ᵻ ᵿ ͈ ¡ ʬ ʭ ˭ ↑ ↓ ꟸ ᷽ as well as the following common substitutes: ¹ ² ³ ⁴ ⁵ 𝆏 𝆑 ⁻ ==References== The {{para|ref<var>N</var>}} parameter is used to specify one or more references for a given pronunciation and works similarly to the <code><nowiki><ref></nowiki></code> tag. For example, specifying {{para|ref|<nowiki>{{R:it:DiPI|bendo}}</nowiki>}} is similar to placing <code><nowiki><ref>{{R:it:DiPI|bendo}}</ref></nowiki></code> after the call to {{temp|IPA}}, except that it can be used to insert references directly after a given pronunciation when there are several. To specify multiple references, separate them with <code> !!! </code> (optionally with spaces around it). For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}} !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref>{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> To specify the equivalent of the <code><nowiki><ref name="NAME" group="GROUP">...</ref></nowiki></code>, use <code><<name:NAME>></code> and/or <code><<group:GROUP>></code> directly following the reference text. For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>> !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo">{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> Similarly, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>><<group:pron>>}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo" group="pron">{{R:it:DiPI|bendo}}</ref></nowiki></code> To reference a prior name, as in <code><nowiki><ref name="bendo"/></nowiki></code>, leave the reference text blank: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>>}}</nowiki></code> Similarly, to reference a prior name in a particular group, as in <code><nowiki><ref name="bendo" group="pron"/></nowiki></code>, use: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>><<group:pron>>}}</nowiki></code> ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "ref1": { "label": "reference 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref2": { "label": "reference 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref3": { "label": "reference 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> mdpkripycoxsxlxq4yzjwy1umv4nzcg 64661 64660 2024-05-23T02:36:15Z Benwing2 1346 document a=/aa=/aN=/aaN=/q=/qq=/qN=/qqN= 64661 wikitext text/x-wiki {{documentation subpage}} {{uses lua|Module:IPA/templates}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA and some non-IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas. ; {{para|q}} : Specifies a qualifier to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|qq}} : Specifies a qualifier to be placed at the end, after all pronunciations. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a}} : Specifies one or more comma-separated accent qualifiers to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa}} : Specifies one or more comma-separated accent qualifiers to be placed at the end, after all pronunciations. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|q<var>N</var>}} : Specifies a qualifier to be placed ''before'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|qq<var>N</var>}} : Specifies a qualifier to be placed ''after'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|qual<var>N</var>}} : Specifies a qualifier to be placed ''before'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. <small>This is deprecated; prefer {{para|q<var>N</var>}}.</small> ; {{para|a<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''before'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''after'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|ref<var>N</var>}} : Specifies one or more reference notes to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. See below for the format of this parameter. <small>The parameter {{para|n<var>N</var>}} is a deprecated synonym; please do not use.</small> ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ==Accepted symbols== Besides the official IPA, the following extensions are accepted: ‼ ᶑ ᵻ ᵿ ͈ ¡ ʬ ʭ ˭ ↑ ↓ ꟸ ᷽ as well as the following common substitutes: ¹ ² ³ ⁴ ⁵ 𝆏 𝆑 ⁻ ==References== The {{para|ref<var>N</var>}} parameter is used to specify one or more references for a given pronunciation and works similarly to the <code><nowiki><ref></nowiki></code> tag. For example, specifying {{para|ref|<nowiki>{{R:it:DiPI|bendo}}</nowiki>}} is similar to placing <code><nowiki><ref>{{R:it:DiPI|bendo}}</ref></nowiki></code> after the call to {{temp|IPA}}, except that it can be used to insert references directly after a given pronunciation when there are several. To specify multiple references, separate them with <code> !!! </code> (optionally with spaces around it). For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}} !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref>{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> To specify the equivalent of the <code><nowiki><ref name="NAME" group="GROUP">...</ref></nowiki></code>, use <code><<name:NAME>></code> and/or <code><<group:GROUP>></code> directly following the reference text. For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>> !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo">{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> Similarly, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>><<group:pron>>}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo" group="pron">{{R:it:DiPI|bendo}}</ref></nowiki></code> To reference a prior name, as in <code><nowiki><ref name="bendo"/></nowiki></code>, leave the reference text blank: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>>}}</nowiki></code> Similarly, to reference a prior name in a particular group, as in <code><nowiki><ref name="bendo" group="pron"/></nowiki></code>, use: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>><<group:pron>>}}</nowiki></code> ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "ref1": { "label": "reference 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref2": { "label": "reference 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref3": { "label": "reference 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> 6za8cr98zgn3vwzw8cp45aubc2mcbv6 64662 64661 2024-05-23T02:39:37Z Benwing2 1346 make qualN= deprecation clearer 64662 wikitext text/x-wiki {{documentation subpage}} {{uses lua|Module:IPA/templates}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA and some non-IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas. ; {{para|q}} : Specifies a qualifier to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|qq}} : Specifies a qualifier to be placed at the end, after all pronunciations. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a}} : Specifies one or more comma-separated accent qualifiers to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa}} : Specifies one or more comma-separated accent qualifiers to be placed at the end, after all pronunciations. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|q<var>N</var>}} : Specifies a qualifier to be placed ''before'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. <small>The parameter {{para|qual<var>N</var>}} is a deprecated synonym; please do not use. Currently, for compatibility, {{para|qual}} is accepted as a synonym for {{para|qual1}}, but this should not be relied on as it will be changing in the future.</small> ; {{para|qq<var>N</var>}} : Specifies a qualifier to be placed ''after'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''before'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''after'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|ref<var>N</var>}} : Specifies one or more reference notes to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. See below for the format of this parameter. <small>The parameter {{para|n<var>N</var>}} is a deprecated synonym; please do not use.</small> ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ==Accepted symbols== Besides the official IPA, the following extensions are accepted: ‼ ᶑ ᵻ ᵿ ͈ ¡ ʬ ʭ ˭ ↑ ↓ ꟸ ᷽ as well as the following common substitutes: ¹ ² ³ ⁴ ⁵ 𝆏 𝆑 ⁻ ==References== The {{para|ref<var>N</var>}} parameter is used to specify one or more references for a given pronunciation and works similarly to the <code><nowiki><ref></nowiki></code> tag. For example, specifying {{para|ref|<nowiki>{{R:it:DiPI|bendo}}</nowiki>}} is similar to placing <code><nowiki><ref>{{R:it:DiPI|bendo}}</ref></nowiki></code> after the call to {{temp|IPA}}, except that it can be used to insert references directly after a given pronunciation when there are several. To specify multiple references, separate them with <code> !!! </code> (optionally with spaces around it). For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}} !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref>{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> To specify the equivalent of the <code><nowiki><ref name="NAME" group="GROUP">...</ref></nowiki></code>, use <code><<name:NAME>></code> and/or <code><<group:GROUP>></code> directly following the reference text. For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>> !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo">{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> Similarly, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>><<group:pron>>}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo" group="pron">{{R:it:DiPI|bendo}}</ref></nowiki></code> To reference a prior name, as in <code><nowiki><ref name="bendo"/></nowiki></code>, leave the reference text blank: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>>}}</nowiki></code> Similarly, to reference a prior name in a particular group, as in <code><nowiki><ref name="bendo" group="pron"/></nowiki></code>, use: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>><<group:pron>>}}</nowiki></code> ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "qual1": { "label": "qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{qualifier}} template", "type": "string" }, "qual2": { "label": "qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{qualifier}} template", "type": "string" }, "qual3": { "label": "qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{qualifier}} template", "type": "string" }, "ref1": { "label": "reference 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref2": { "label": "reference 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref3": { "label": "reference 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline" } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> 8ee9ioocqfra8obp3utukzp9p12ge2n 64663 64662 2024-05-23T02:50:58Z Benwing2 1346 expand template data 64663 wikitext text/x-wiki {{documentation subpage}} {{uses lua|Module:IPA/templates}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA and some non-IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas. ; {{para|q}} : Specifies a qualifier to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|qq}} : Specifies a qualifier to be placed at the end, after all pronunciations. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a}} : Specifies one or more comma-separated accent qualifiers to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa}} : Specifies one or more comma-separated accent qualifiers to be placed at the end, after all pronunciations. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|q<var>N</var>}} : Specifies a qualifier to be placed ''before'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. <small>The parameter {{para|qual<var>N</var>}} is a deprecated synonym; please do not use. Currently, for compatibility, {{para|qual}} is accepted as a synonym for {{para|qual1}}, but this should not be relied on as it will be changing in the future.</small> ; {{para|qq<var>N</var>}} : Specifies a qualifier to be placed ''after'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''before'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''after'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|ref<var>N</var>}} : Specifies one or more reference notes to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. See below for the format of this parameter. <small>The parameter {{para|n<var>N</var>}} is a deprecated synonym; please do not use.</small> ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ==Accepted symbols== Besides the official IPA, the following extensions are accepted: ‼ ᶑ ᵻ ᵿ ͈ ¡ ʬ ʭ ˭ ↑ ↓ ꟸ ᷽ as well as the following common substitutes: ¹ ² ³ ⁴ ⁵ 𝆏 𝆑 ⁻ ==References== The {{para|ref<var>N</var>}} parameter is used to specify one or more references for a given pronunciation and works similarly to the <code><nowiki><ref></nowiki></code> tag. For example, specifying {{para|ref|<nowiki>{{R:it:DiPI|bendo}}</nowiki>}} is similar to placing <code><nowiki><ref>{{R:it:DiPI|bendo}}</ref></nowiki></code> after the call to {{temp|IPA}}, except that it can be used to insert references directly after a given pronunciation when there are several. To specify multiple references, separate them with <code> !!! </code> (optionally with spaces around it). For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}} !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref>{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> To specify the equivalent of the <code><nowiki><ref name="NAME" group="GROUP">...</ref></nowiki></code>, use <code><<name:NAME>></code> and/or <code><<group:GROUP>></code> directly following the reference text. For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>> !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo">{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> Similarly, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>><<group:pron>>}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo" group="pron">{{R:it:DiPI|bendo}}</ref></nowiki></code> To reference a prior name, as in <code><nowiki><ref name="bendo"/></nowiki></code>, leave the reference text blank: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>>}}</nowiki></code> Similarly, to reference a prior name in a particular group, as in <code><nowiki><ref name="bendo" group="pron"/></nowiki></code>, use: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>><<group:pron>>}}</nowiki></code> ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "q": { "label": "overall left qualifier", "description": "Specifies a qualifier to be placed at the very beginning. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq": { "label": "overall right qualifier", "description": "Specifies a qualifier to be placed at the very end. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "a": { "label": "overall left accent qualifier(s)", "description": "Specifies one or more comma-separated accent qualifiers to be placed at the very beginning. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa": { "label": "overall right accent qualifier(s)", "description": "Specifies one or more comma-separated accent qualifiers to be placed at the very end. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "q1": { "label": "left qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "q2": { "label": "left qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "q3": { "label": "left qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq1": { "label": "right qualifier 1", "description": "Specifies a qualifier to be placed after pronunciation 1. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq2": { "label": "right qualifier 2", "description": "Specifies a qualifier to be placed after pronunciation 2. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq3": { "label": "right qualifier 3", "description": "Specifies a qualifier to be placed after pronunciation 3. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "a1": { "label": "left accent qualifier(s) 1", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 1. This is formatted with the {{a}}/{{accent}} template.", "type": "string" }, "a2": { "label": "left accent qualifier(s) 2", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 2. This is formatted with the {{a}}/{{accent}} template.", "type": "string" }, "a3": { "label": "left accent qualifier(s) 3", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 3. This is formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa1": { "label": "right accent qualifier(s) 1", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 1. This is formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa2": { "label": "right accent qualifier(s) 2", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 2. This is formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa3": { "label": "right accent qualifier(s) 3", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 3. This is formatted with the {{a}}/{{accent}} template.", "type": "string" }, "ref1": { "label": "reference 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref2": { "label": "reference 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref3": { "label": "reference 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline", "paramOrder": [ "1", "2", "3", "4", "q", "qq", "a", "aa", "q1", "q2", "q3", "qq1", "qq2", "qq3", "a1", "a2", "a3", "aa1", "aa2", "aa3", "ref1", "ref2", "ref3" ] } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> j5gfyg04w9xh8sznd0pf5vs2hju38dn 64664 64663 2024-05-23T02:52:09Z Benwing2 1346 /* TemplateData */ bug fix 64664 wikitext text/x-wiki {{documentation subpage}} {{uses lua|Module:IPA/templates}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA and some non-IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas. ; {{para|q}} : Specifies a qualifier to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|qq}} : Specifies a qualifier to be placed at the end, after all pronunciations. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a}} : Specifies one or more comma-separated accent qualifiers to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa}} : Specifies one or more comma-separated accent qualifiers to be placed at the end, after all pronunciations. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|q<var>N</var>}} : Specifies a qualifier to be placed ''before'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. <small>The parameter {{para|qual<var>N</var>}} is a deprecated synonym; please do not use. Currently, for compatibility, {{para|qual}} is accepted as a synonym for {{para|qual1}}, but this should not be relied on as it will be changing in the future.</small> ; {{para|qq<var>N</var>}} : Specifies a qualifier to be placed ''after'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''before'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''after'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|ref<var>N</var>}} : Specifies one or more reference notes to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. See below for the format of this parameter. <small>The parameter {{para|n<var>N</var>}} is a deprecated synonym; please do not use.</small> ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ==Accepted symbols== Besides the official IPA, the following extensions are accepted: ‼ ᶑ ᵻ ᵿ ͈ ¡ ʬ ʭ ˭ ↑ ↓ ꟸ ᷽ as well as the following common substitutes: ¹ ² ³ ⁴ ⁵ 𝆏 𝆑 ⁻ ==References== The {{para|ref<var>N</var>}} parameter is used to specify one or more references for a given pronunciation and works similarly to the <code><nowiki><ref></nowiki></code> tag. For example, specifying {{para|ref|<nowiki>{{R:it:DiPI|bendo}}</nowiki>}} is similar to placing <code><nowiki><ref>{{R:it:DiPI|bendo}}</ref></nowiki></code> after the call to {{temp|IPA}}, except that it can be used to insert references directly after a given pronunciation when there are several. To specify multiple references, separate them with <code> !!! </code> (optionally with spaces around it). For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}} !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref>{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> To specify the equivalent of the <code><nowiki><ref name="NAME" group="GROUP">...</ref></nowiki></code>, use <code><<name:NAME>></code> and/or <code><<group:GROUP>></code> directly following the reference text. For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>> !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo">{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> Similarly, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>><<group:pron>>}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo" group="pron">{{R:it:DiPI|bendo}}</ref></nowiki></code> To reference a prior name, as in <code><nowiki><ref name="bendo"/></nowiki></code>, leave the reference text blank: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>>}}</nowiki></code> Similarly, to reference a prior name in a particular group, as in <code><nowiki><ref name="bendo" group="pron"/></nowiki></code>, use: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>><<group:pron>>}}</nowiki></code> ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "q": { "label": "overall left qualifier", "description": "Specifies a qualifier to be placed at the very beginning. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq": { "label": "overall right qualifier", "description": "Specifies a qualifier to be placed at the very end. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "a": { "label": "overall left accent qualifier(s)", "description": "Specifies one or more comma-separated accent qualifiers to be placed at the very beginning. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa": { "label": "overall right accent qualifier(s)", "description": "Specifies one or more comma-separated accent qualifiers to be placed at the very end. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "q1": { "label": "left qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "q2": { "label": "left qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "q3": { "label": "left qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq1": { "label": "right qualifier 1", "description": "Specifies a qualifier to be placed after pronunciation 1. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq2": { "label": "right qualifier 2", "description": "Specifies a qualifier to be placed after pronunciation 2. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq3": { "label": "right qualifier 3", "description": "Specifies a qualifier to be placed after pronunciation 3. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "a1": { "label": "left accent qualifier(s) 1", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 1. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "a2": { "label": "left accent qualifier(s) 2", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 2. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "a3": { "label": "left accent qualifier(s) 3", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 3. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa1": { "label": "right accent qualifier(s) 1", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 1. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa2": { "label": "right accent qualifier(s) 2", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 2. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa3": { "label": "right accent qualifier(s) 3", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 3. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "ref1": { "label": "reference 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref2": { "label": "reference 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref3": { "label": "reference 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline", "paramOrder": [ "1", "2", "3", "4", "q", "qq", "a", "aa", "q1", "q2", "q3", "qq1", "qq2", "qq3", "a1", "a2", "a3", "aa1", "aa2", "aa3", "ref1", "ref2", "ref3" ] } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> m9t2yjzzx3ylzibjyxr6u6rfo85lkyd 64665 64664 2024-06-13T03:50:02Z Benwing2 1346 /* Parameters */ bare semicolon arguments, inline modifiers 64665 wikitext text/x-wiki {{documentation subpage}} {{uses lua|Module:IPA/templates}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA and some non-IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas, unless a bare semicolon {{cd|;}} is used as an argument, in which case the two surrounding arguments will be separated by a semicolon. See below under [[#Inline modifiers]] for an example of this. ; {{para|q}} : Specifies a qualifier to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|qq}} : Specifies a qualifier to be placed at the end, after all pronunciations. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a}} : Specifies one or more comma-separated accent qualifiers to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa}} : Specifies one or more comma-separated accent qualifiers to be placed at the end, after all pronunciations. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|q<var>N</var>}} : Specifies a qualifier to be placed ''before'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. <small>The parameter {{para|qual<var>N</var>}} is a deprecated synonym; please do not use. Currently, for compatibility, {{para|qual}} is accepted as a synonym for {{para|qual1}}, but this should not be relied on as it will be changing in the future.</small> ; {{para|qq<var>N</var>}} : Specifies a qualifier to be placed ''after'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''before'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''after'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|ref<var>N</var>}} : Specifies one or more reference notes to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. See below for the format of this parameter. <small>The parameter {{para|n<var>N</var>}} is a deprecated synonym; please do not use.</small> ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ===Inline modifiers=== The {{para|q<var>N</var>}}, {{para|qq<var>N</var>}}, {{para|a<var>N</var>}}, {{para|aa<var>N</var>}} and {{para|ref<var>N</var>}} parameters have corresponding inline modifiers {{cd|<q:...>}}, {{cd|<qq:...>}}, {{cd|<a:...>}}, {{cd|<aa:...>}} and {{cd|<ref:...>}} that can be attached directly to a pronunciation argument. Example: <code><nowiki>* {{IPA|en|/wʌt/|/wɑt/<a:sometimes also in <<GA>>>}}</nowiki></code> which produces * {{IPA|en|/wʌt/|/wɑt/<a:sometimes also in <<GA>>>}} It is allowed, and common, to combine {{para|a}} with {{para|a<var>N</var>}}, or equivalently, with {{cd|<a:...>}}. An example: <code><nowiki>* {{IPA|en|a=GA|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/<a:cot-caught>}}</nowiki></code> which produces * {{IPA|en|a=GA|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/<a:cot-caught>}} This also shows the use of a bare semicolon argument to cause the separator between two pronunciations to appear as a semicolon. ==Accepted symbols== Besides the official IPA, the following extensions are accepted: ‼ ᶑ ᵻ ᵿ ͈ ¡ ʬ ʭ ˭ ↑ ↓ ꟸ ᷽ as well as the following common substitutes: ¹ ² ³ ⁴ ⁵ 𝆏 𝆑 ⁻ ==References== The {{para|ref<var>N</var>}} parameter is used to specify one or more references for a given pronunciation and works similarly to the <code><nowiki><ref></nowiki></code> tag. For example, specifying {{para|ref|<nowiki>{{R:it:DiPI|bendo}}</nowiki>}} is similar to placing <code><nowiki><ref>{{R:it:DiPI|bendo}}</ref></nowiki></code> after the call to {{temp|IPA}}, except that it can be used to insert references directly after a given pronunciation when there are several. To specify multiple references, separate them with <code> !!! </code> (optionally with spaces around it). For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}} !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref>{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> To specify the equivalent of the <code><nowiki><ref name="NAME" group="GROUP">...</ref></nowiki></code>, use <code><<name:NAME>></code> and/or <code><<group:GROUP>></code> directly following the reference text. For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>> !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo">{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> Similarly, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>><<group:pron>>}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo" group="pron">{{R:it:DiPI|bendo}}</ref></nowiki></code> To reference a prior name, as in <code><nowiki><ref name="bendo"/></nowiki></code>, leave the reference text blank: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>>}}</nowiki></code> Similarly, to reference a prior name in a particular group, as in <code><nowiki><ref name="bendo" group="pron"/></nowiki></code>, use: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>><<group:pron>>}}</nowiki></code> ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "q": { "label": "overall left qualifier", "description": "Specifies a qualifier to be placed at the very beginning. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq": { "label": "overall right qualifier", "description": "Specifies a qualifier to be placed at the very end. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "a": { "label": "overall left accent qualifier(s)", "description": "Specifies one or more comma-separated accent qualifiers to be placed at the very beginning. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa": { "label": "overall right accent qualifier(s)", "description": "Specifies one or more comma-separated accent qualifiers to be placed at the very end. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "q1": { "label": "left qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "q2": { "label": "left qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "q3": { "label": "left qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq1": { "label": "right qualifier 1", "description": "Specifies a qualifier to be placed after pronunciation 1. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq2": { "label": "right qualifier 2", "description": "Specifies a qualifier to be placed after pronunciation 2. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq3": { "label": "right qualifier 3", "description": "Specifies a qualifier to be placed after pronunciation 3. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "a1": { "label": "left accent qualifier(s) 1", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 1. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "a2": { "label": "left accent qualifier(s) 2", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 2. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "a3": { "label": "left accent qualifier(s) 3", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 3. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa1": { "label": "right accent qualifier(s) 1", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 1. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa2": { "label": "right accent qualifier(s) 2", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 2. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa3": { "label": "right accent qualifier(s) 3", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 3. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "ref1": { "label": "reference 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref2": { "label": "reference 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref3": { "label": "reference 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline", "paramOrder": [ "1", "2", "3", "4", "q", "qq", "a", "aa", "q1", "q2", "q3", "qq1", "qq2", "qq3", "a1", "a2", "a3", "aa1", "aa2", "aa3", "ref1", "ref2", "ref3" ] } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> po1uiqqqw0k93ip6igawvh0ldndcj6t 64666 64665 2024-06-13T03:54:26Z Benwing2 1346 /* Parameters */ bare semicolons don't count for indexed params 64666 wikitext text/x-wiki {{documentation subpage}} {{uses lua|Module:IPA/templates}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA and some non-IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas, unless a bare semicolon {{cd|;}} is used as an argument, in which case the two surrounding arguments will be separated by a semicolon. See below under [[#Inline modifiers]] for an example of this. Note that semicolons do not count for the purposes of indexed parameters; thus, an example like {{tl|IPA|en|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/|a2=cot-caught}} is correct and will result in the {{cd|cot-caught}} accent qualifier being displayed directly before the pronunciation {{IPAchar|/ˈpɪŋˌpɑŋ/}}, while {{tl|IPA|en|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/|a3=cot-caught}} is incorrect and will produce unexpected results. To avoid issues like this, it is recommended to use [[#Inline modifiers|inline modifiers]] (see link). ; {{para|q}} : Specifies a qualifier to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|qq}} : Specifies a qualifier to be placed at the end, after all pronunciations. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a}} : Specifies one or more comma-separated accent qualifiers to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa}} : Specifies one or more comma-separated accent qualifiers to be placed at the end, after all pronunciations. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|q<var>N</var>}} : Specifies a qualifier to be placed ''before'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. <small>The parameter {{para|qual<var>N</var>}} is a deprecated synonym; please do not use. Currently, for compatibility, {{para|qual}} is accepted as a synonym for {{para|qual1}}, but this should not be relied on as it will be changing in the future.</small> ; {{para|qq<var>N</var>}} : Specifies a qualifier to be placed ''after'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''before'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''after'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|ref<var>N</var>}} : Specifies one or more reference notes to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. See below for the format of this parameter. <small>The parameter {{para|n<var>N</var>}} is a deprecated synonym; please do not use.</small> ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ===Inline modifiers=== The {{para|q<var>N</var>}}, {{para|qq<var>N</var>}}, {{para|a<var>N</var>}}, {{para|aa<var>N</var>}} and {{para|ref<var>N</var>}} parameters have corresponding inline modifiers {{cd|<q:...>}}, {{cd|<qq:...>}}, {{cd|<a:...>}}, {{cd|<aa:...>}} and {{cd|<ref:...>}} that can be attached directly to a pronunciation argument. Example: <code><nowiki>* {{IPA|en|/wʌt/|/wɑt/<a:sometimes also in <<GA>>>}}</nowiki></code> which produces * {{IPA|en|/wʌt/|/wɑt/<a:sometimes also in <<GA>>>}} It is allowed, and common, to combine {{para|a}} with {{para|a<var>N</var>}}, or equivalently, with {{cd|<a:...>}}. An example: <code><nowiki>* {{IPA|en|a=GA|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/<a:cot-caught>}}</nowiki></code> which produces * {{IPA|en|a=GA|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/<a:cot-caught>}} This also shows the use of a bare semicolon argument to cause the separator between two pronunciations to appear as a semicolon. ==Accepted symbols== Besides the official IPA, the following extensions are accepted: ‼ ᶑ ᵻ ᵿ ͈ ¡ ʬ ʭ ˭ ↑ ↓ ꟸ ᷽ as well as the following common substitutes: ¹ ² ³ ⁴ ⁵ 𝆏 𝆑 ⁻ ==References== The {{para|ref<var>N</var>}} parameter is used to specify one or more references for a given pronunciation and works similarly to the <code><nowiki><ref></nowiki></code> tag. For example, specifying {{para|ref|<nowiki>{{R:it:DiPI|bendo}}</nowiki>}} is similar to placing <code><nowiki><ref>{{R:it:DiPI|bendo}}</ref></nowiki></code> after the call to {{temp|IPA}}, except that it can be used to insert references directly after a given pronunciation when there are several. To specify multiple references, separate them with <code> !!! </code> (optionally with spaces around it). For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}} !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref>{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> To specify the equivalent of the <code><nowiki><ref name="NAME" group="GROUP">...</ref></nowiki></code>, use <code><<name:NAME>></code> and/or <code><<group:GROUP>></code> directly following the reference text. For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>> !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo">{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> Similarly, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>><<group:pron>>}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo" group="pron">{{R:it:DiPI|bendo}}</ref></nowiki></code> To reference a prior name, as in <code><nowiki><ref name="bendo"/></nowiki></code>, leave the reference text blank: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>>}}</nowiki></code> Similarly, to reference a prior name in a particular group, as in <code><nowiki><ref name="bendo" group="pron"/></nowiki></code>, use: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>><<group:pron>>}}</nowiki></code> ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "q": { "label": "overall left qualifier", "description": "Specifies a qualifier to be placed at the very beginning. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq": { "label": "overall right qualifier", "description": "Specifies a qualifier to be placed at the very end. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "a": { "label": "overall left accent qualifier(s)", "description": "Specifies one or more comma-separated accent qualifiers to be placed at the very beginning. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa": { "label": "overall right accent qualifier(s)", "description": "Specifies one or more comma-separated accent qualifiers to be placed at the very end. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "q1": { "label": "left qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "q2": { "label": "left qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "q3": { "label": "left qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq1": { "label": "right qualifier 1", "description": "Specifies a qualifier to be placed after pronunciation 1. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq2": { "label": "right qualifier 2", "description": "Specifies a qualifier to be placed after pronunciation 2. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq3": { "label": "right qualifier 3", "description": "Specifies a qualifier to be placed after pronunciation 3. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "a1": { "label": "left accent qualifier(s) 1", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 1. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "a2": { "label": "left accent qualifier(s) 2", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 2. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "a3": { "label": "left accent qualifier(s) 3", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 3. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa1": { "label": "right accent qualifier(s) 1", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 1. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa2": { "label": "right accent qualifier(s) 2", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 2. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa3": { "label": "right accent qualifier(s) 3", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 3. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "ref1": { "label": "reference 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref2": { "label": "reference 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref3": { "label": "reference 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline", "paramOrder": [ "1", "2", "3", "4", "q", "qq", "a", "aa", "q1", "q2", "q3", "qq1", "qq2", "qq3", "a1", "a2", "a3", "aa1", "aa2", "aa3", "ref1", "ref2", "ref3" ] } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> 2dmv98pdii9rhp474qe6m9et0i9whe0 64667 64666 2025-01-26T23:02:10Z Kwamikagami 335 update coverage 64667 wikitext text/x-wiki {{documentation subpage}} {{uses lua|Module:IPA/templates}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA and some non-IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas, unless a bare semicolon {{cd|;}} is used as an argument, in which case the two surrounding arguments will be separated by a semicolon. See below under [[#Inline modifiers]] for an example of this. Note that semicolons do not count for the purposes of indexed parameters; thus, an example like {{tl|IPA|en|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/|a2=cot-caught}} is correct and will result in the {{cd|cot-caught}} accent qualifier being displayed directly before the pronunciation {{IPAchar|/ˈpɪŋˌpɑŋ/}}, while {{tl|IPA|en|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/|a3=cot-caught}} is incorrect and will produce unexpected results. To avoid issues like this, it is recommended to use [[#Inline modifiers|inline modifiers]] (see link). ; {{para|q}} : Specifies a qualifier to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|qq}} : Specifies a qualifier to be placed at the end, after all pronunciations. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a}} : Specifies one or more comma-separated accent qualifiers to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa}} : Specifies one or more comma-separated accent qualifiers to be placed at the end, after all pronunciations. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|q<var>N</var>}} : Specifies a qualifier to be placed ''before'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. <small>The parameter {{para|qual<var>N</var>}} is a deprecated synonym; please do not use. Currently, for compatibility, {{para|qual}} is accepted as a synonym for {{para|qual1}}, but this should not be relied on as it will be changing in the future.</small> ; {{para|qq<var>N</var>}} : Specifies a qualifier to be placed ''after'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''before'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''after'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|ref<var>N</var>}} : Specifies one or more reference notes to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. See below for the format of this parameter. <small>The parameter {{para|n<var>N</var>}} is a deprecated synonym; please do not use.</small> ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ===Inline modifiers=== The {{para|q<var>N</var>}}, {{para|qq<var>N</var>}}, {{para|a<var>N</var>}}, {{para|aa<var>N</var>}} and {{para|ref<var>N</var>}} parameters have corresponding inline modifiers {{cd|<q:...>}}, {{cd|<qq:...>}}, {{cd|<a:...>}}, {{cd|<aa:...>}} and {{cd|<ref:...>}} that can be attached directly to a pronunciation argument. Example: <code><nowiki>* {{IPA|en|/wʌt/|/wɑt/<a:sometimes also in <<GA>>>}}</nowiki></code> which produces * {{IPA|en|/wʌt/|/wɑt/<a:sometimes also in <<GA>>>}} It is allowed, and common, to combine {{para|a}} with {{para|a<var>N</var>}}, or equivalently, with {{cd|<a:...>}}. An example: <code><nowiki>* {{IPA|en|a=GA|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/<a:cot-caught>}}</nowiki></code> which produces * {{IPA|en|a=GA|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/<a:cot-caught>}} This also shows the use of a bare semicolon argument to cause the separator between two pronunciations to appear as a semicolon. ==Accepted symbols== Besides the letters of the official IPA and extIPA, and the diacritics and prosodic marks of the IPA proper, the following extensions are accepted: ᶑ 𝼈 𝼊 ʞ ᵻ ᵿ ͈ ˭ ↑ ↓ ꟸ ᷽ as well as the following common substitutes: ‼ ¹ ² ³ ⁴ ⁵ 𝆏 𝆑 ⁻ ==References== The {{para|ref<var>N</var>}} parameter is used to specify one or more references for a given pronunciation and works similarly to the <code><nowiki><ref></nowiki></code> tag. For example, specifying {{para|ref|<nowiki>{{R:it:DiPI|bendo}}</nowiki>}} is similar to placing <code><nowiki><ref>{{R:it:DiPI|bendo}}</ref></nowiki></code> after the call to {{temp|IPA}}, except that it can be used to insert references directly after a given pronunciation when there are several. To specify multiple references, separate them with <code> !!! </code> (optionally with spaces around it). For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}} !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref>{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> To specify the equivalent of the <code><nowiki><ref name="NAME" group="GROUP">...</ref></nowiki></code>, use <code><<name:NAME>></code> and/or <code><<group:GROUP>></code> directly following the reference text. For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>> !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo">{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> Similarly, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>><<group:pron>>}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo" group="pron">{{R:it:DiPI|bendo}}</ref></nowiki></code> To reference a prior name, as in <code><nowiki><ref name="bendo"/></nowiki></code>, leave the reference text blank: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>>}}</nowiki></code> Similarly, to reference a prior name in a particular group, as in <code><nowiki><ref name="bendo" group="pron"/></nowiki></code>, use: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>><<group:pron>>}}</nowiki></code> ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "q": { "label": "overall left qualifier", "description": "Specifies a qualifier to be placed at the very beginning. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq": { "label": "overall right qualifier", "description": "Specifies a qualifier to be placed at the very end. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "a": { "label": "overall left accent qualifier(s)", "description": "Specifies one or more comma-separated accent qualifiers to be placed at the very beginning. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa": { "label": "overall right accent qualifier(s)", "description": "Specifies one or more comma-separated accent qualifiers to be placed at the very end. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "q1": { "label": "left qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "q2": { "label": "left qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "q3": { "label": "left qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq1": { "label": "right qualifier 1", "description": "Specifies a qualifier to be placed after pronunciation 1. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq2": { "label": "right qualifier 2", "description": "Specifies a qualifier to be placed after pronunciation 2. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq3": { "label": "right qualifier 3", "description": "Specifies a qualifier to be placed after pronunciation 3. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "a1": { "label": "left accent qualifier(s) 1", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 1. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "a2": { "label": "left accent qualifier(s) 2", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 2. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "a3": { "label": "left accent qualifier(s) 3", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 3. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa1": { "label": "right accent qualifier(s) 1", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 1. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa2": { "label": "right accent qualifier(s) 2", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 2. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa3": { "label": "right accent qualifier(s) 3", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 3. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "ref1": { "label": "reference 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref2": { "label": "reference 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref3": { "label": "reference 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline", "paramOrder": [ "1", "2", "3", "4", "q", "qq", "a", "aa", "q1", "q2", "q3", "qq1", "qq2", "qq3", "a1", "a2", "a3", "aa1", "aa2", "aa3", "ref1", "ref2", "ref3" ] } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> 5kr2bfluboob66pngz4mte2oztdqo7w 64668 64667 2025-01-26T23:11:12Z Kwamikagami 335 another 64668 wikitext text/x-wiki {{documentation subpage}} {{uses lua|Module:IPA/templates}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA and some non-IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas, unless a bare semicolon {{cd|;}} is used as an argument, in which case the two surrounding arguments will be separated by a semicolon. See below under [[#Inline modifiers]] for an example of this. Note that semicolons do not count for the purposes of indexed parameters; thus, an example like {{tl|IPA|en|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/|a2=cot-caught}} is correct and will result in the {{cd|cot-caught}} accent qualifier being displayed directly before the pronunciation {{IPAchar|/ˈpɪŋˌpɑŋ/}}, while {{tl|IPA|en|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/|a3=cot-caught}} is incorrect and will produce unexpected results. To avoid issues like this, it is recommended to use [[#Inline modifiers|inline modifiers]] (see link). ; {{para|q}} : Specifies a qualifier to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|qq}} : Specifies a qualifier to be placed at the end, after all pronunciations. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a}} : Specifies one or more comma-separated accent qualifiers to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa}} : Specifies one or more comma-separated accent qualifiers to be placed at the end, after all pronunciations. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|q<var>N</var>}} : Specifies a qualifier to be placed ''before'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. <small>The parameter {{para|qual<var>N</var>}} is a deprecated synonym; please do not use. Currently, for compatibility, {{para|qual}} is accepted as a synonym for {{para|qual1}}, but this should not be relied on as it will be changing in the future.</small> ; {{para|qq<var>N</var>}} : Specifies a qualifier to be placed ''after'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''before'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''after'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|ref<var>N</var>}} : Specifies one or more reference notes to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. See below for the format of this parameter. <small>The parameter {{para|n<var>N</var>}} is a deprecated synonym; please do not use.</small> ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ===Inline modifiers=== The {{para|q<var>N</var>}}, {{para|qq<var>N</var>}}, {{para|a<var>N</var>}}, {{para|aa<var>N</var>}} and {{para|ref<var>N</var>}} parameters have corresponding inline modifiers {{cd|<q:...>}}, {{cd|<qq:...>}}, {{cd|<a:...>}}, {{cd|<aa:...>}} and {{cd|<ref:...>}} that can be attached directly to a pronunciation argument. Example: <code><nowiki>* {{IPA|en|/wʌt/|/wɑt/<a:sometimes also in <<GA>>>}}</nowiki></code> which produces * {{IPA|en|/wʌt/|/wɑt/<a:sometimes also in <<GA>>>}} It is allowed, and common, to combine {{para|a}} with {{para|a<var>N</var>}}, or equivalently, with {{cd|<a:...>}}. An example: <code><nowiki>* {{IPA|en|a=GA|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/<a:cot-caught>}}</nowiki></code> which produces * {{IPA|en|a=GA|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/<a:cot-caught>}} This also shows the use of a bare semicolon argument to cause the separator between two pronunciations to appear as a semicolon. ==Accepted symbols== Besides the letters of the official IPA and extIPA, and the diacritics and prosodic marks of the IPA proper, the following extensions are accepted: ᶑ 𝼈 𝼊 ʞ ᵻ ᵿ ͈ ˭ ↑ ↓ ꟸ ᷽ as well as the following common substitutes: ‼ ᴙ ¹ ² ³ ⁴ ⁵ 𝆏 𝆑 ⁻ ==References== The {{para|ref<var>N</var>}} parameter is used to specify one or more references for a given pronunciation and works similarly to the <code><nowiki><ref></nowiki></code> tag. For example, specifying {{para|ref|<nowiki>{{R:it:DiPI|bendo}}</nowiki>}} is similar to placing <code><nowiki><ref>{{R:it:DiPI|bendo}}</ref></nowiki></code> after the call to {{temp|IPA}}, except that it can be used to insert references directly after a given pronunciation when there are several. To specify multiple references, separate them with <code> !!! </code> (optionally with spaces around it). For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}} !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref>{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> To specify the equivalent of the <code><nowiki><ref name="NAME" group="GROUP">...</ref></nowiki></code>, use <code><<name:NAME>></code> and/or <code><<group:GROUP>></code> directly following the reference text. For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>> !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo">{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> Similarly, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>><<group:pron>>}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo" group="pron">{{R:it:DiPI|bendo}}</ref></nowiki></code> To reference a prior name, as in <code><nowiki><ref name="bendo"/></nowiki></code>, leave the reference text blank: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>>}}</nowiki></code> Similarly, to reference a prior name in a particular group, as in <code><nowiki><ref name="bendo" group="pron"/></nowiki></code>, use: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>><<group:pron>>}}</nowiki></code> ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "q": { "label": "overall left qualifier", "description": "Specifies a qualifier to be placed at the very beginning. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq": { "label": "overall right qualifier", "description": "Specifies a qualifier to be placed at the very end. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "a": { "label": "overall left accent qualifier(s)", "description": "Specifies one or more comma-separated accent qualifiers to be placed at the very beginning. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa": { "label": "overall right accent qualifier(s)", "description": "Specifies one or more comma-separated accent qualifiers to be placed at the very end. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "q1": { "label": "left qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "q2": { "label": "left qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "q3": { "label": "left qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq1": { "label": "right qualifier 1", "description": "Specifies a qualifier to be placed after pronunciation 1. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq2": { "label": "right qualifier 2", "description": "Specifies a qualifier to be placed after pronunciation 2. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq3": { "label": "right qualifier 3", "description": "Specifies a qualifier to be placed after pronunciation 3. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "a1": { "label": "left accent qualifier(s) 1", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 1. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "a2": { "label": "left accent qualifier(s) 2", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 2. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "a3": { "label": "left accent qualifier(s) 3", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 3. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa1": { "label": "right accent qualifier(s) 1", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 1. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa2": { "label": "right accent qualifier(s) 2", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 2. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa3": { "label": "right accent qualifier(s) 3", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 3. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "ref1": { "label": "reference 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref2": { "label": "reference 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref3": { "label": "reference 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline", "paramOrder": [ "1", "2", "3", "4", "q", "qq", "a", "aa", "q1", "q2", "q3", "qq1", "qq2", "qq3", "a1", "a2", "a3", "aa1", "aa2", "aa3", "ref1", "ref2", "ref3" ] } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> g8u2yaz6976z94eg1wb6jagxj60bfyt 64669 64668 2026-03-02T08:34:30Z Enginear 2051 /* Parameters */ to {{para|q<var>N</var>}} added "Simple example: <code><nowiki>{{IPA|en|/a/|/b/|/c/|q1=one|q2=two|q3=three}}</nowiki></code>, gives IPA(key): (one) /a/, (two) /b/, (three) /c/." -- because I had struggled to make it work (I didn't realise that the variables were numbered from the first pronunciation excluding the language code -- I know it says that, but I misread it and thought others might too. 64669 wikitext text/x-wiki {{documentation subpage}} {{uses lua|Module:IPA/templates}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. It applies proper formatting and adds links to the language's IPA key using [[Module:IPA/templates]]. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA and some non-IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas, unless a bare semicolon {{cd|;}} is used as an argument, in which case the two surrounding arguments will be separated by a semicolon. See below under [[#Inline modifiers]] for an example of this. Note that semicolons do not count for the purposes of indexed parameters; thus, an example like {{tl|IPA|en|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/|a2=cot-caught}} is correct and will result in the {{cd|cot-caught}} accent qualifier being displayed directly before the pronunciation {{IPAchar|/ˈpɪŋˌpɑŋ/}}, while {{tl|IPA|en|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/|a3=cot-caught}} is incorrect and will produce unexpected results. To avoid issues like this, it is recommended to use [[#Inline modifiers|inline modifiers]] (see link). ; {{para|q}} : Specifies a qualifier to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|qq}} : Specifies a qualifier to be placed at the end, after all pronunciations. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a}} : Specifies one or more comma-separated accent qualifiers to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa}} : Specifies one or more comma-separated accent qualifiers to be placed at the end, after all pronunciations. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|q<var>N</var>}} : Specifies a qualifier to be placed ''before'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. Simple example: <code><nowiki>{{IPA|en|/a/|/b/|/c/|q1=one|q2=two|q3=three}}</nowiki></code> gives {{IPA|en|/a/|/b/|/c/|q1=one|q2=two|q3=three}}. <small>The parameter {{para|qual<var>N</var>}} is a deprecated synonym; please do not use. Currently, for compatibility, {{para|qual}} is accepted as a synonym for {{para|qual1}}, but this should not be relied on as it will be changing in the future.</small> ; {{para|qq<var>N</var>}} : Specifies a qualifier to be placed ''after'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''before'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''after'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|ref<var>N</var>}} : Specifies one or more reference notes to be placed after pronunciation <var>N</var>. The reference is placed in the <code>===References===</code> section at the bottom of the language's entry. See below for the format of this parameter. <small>The parameter {{para|n<var>N</var>}} is a deprecated synonym; please do not use.</small> ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ===Inline modifiers=== The {{para|q<var>N</var>}}, {{para|qq<var>N</var>}}, {{para|a<var>N</var>}}, {{para|aa<var>N</var>}} and {{para|ref<var>N</var>}} parameters have corresponding inline modifiers {{cd|<q:...>}}, {{cd|<qq:...>}}, {{cd|<a:...>}}, {{cd|<aa:...>}} and {{cd|<ref:...>}} that can be attached directly to a pronunciation argument. Example: <code><nowiki>* {{IPA|en|/wʌt/|/wɑt/<a:sometimes also in <<GA>>>}}</nowiki></code> which produces * {{IPA|en|/wʌt/|/wɑt/<a:sometimes also in <<GA>>>}} It is allowed, and common, to combine {{para|a}} with {{para|a<var>N</var>}}, or equivalently, with {{cd|<a:...>}}. An example: <code><nowiki>* {{IPA|en|a=GA|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/<a:cot-caught>}}</nowiki></code> which produces * {{IPA|en|a=GA|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/<a:cot-caught>}} This also shows the use of a bare semicolon argument to cause the separator between two pronunciations to appear as a semicolon. ==Accepted symbols== Besides the letters of the official IPA and extIPA, and the diacritics and prosodic marks of the IPA proper, the following extensions are accepted: ᶑ 𝼈 𝼊 ʞ ᵻ ᵿ ͈ ˭ ↑ ↓ ꟸ ᷽ as well as the following common substitutes: ‼ ᴙ ¹ ² ³ ⁴ ⁵ 𝆏 𝆑 ⁻ ==References== The {{para|ref<var>N</var>}} parameter is used to specify one or more references for a given pronunciation and works similarly to the <code><nowiki><ref></nowiki></code> tag. For example, specifying {{para|ref|<nowiki>{{R:it:DiPI|bendo}}</nowiki>}} is similar to placing <code><nowiki><ref>{{R:it:DiPI|bendo}}</ref></nowiki></code> after the call to {{temp|IPA}}, except that it can be used to insert references directly after a given pronunciation when there are several. To specify multiple references, separate them with <code> !!! </code> (optionally with spaces around it). For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}} !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref>{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> To specify the equivalent of the <code><nowiki><ref name="NAME" group="GROUP">...</ref></nowiki></code>, use <code><<name:NAME>></code> and/or <code><<group:GROUP>></code> directly following the reference text. For example, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>> !!! {{R:it:Olivetti}}}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo">{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref></nowiki></code> Similarly, the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2={{R:it:DiPI|bendo}}<<name:bendo>><<group:pron>>}}</nowiki></code> is similar to the following: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/}}<ref name="bendo" group="pron">{{R:it:DiPI|bendo}}</ref></nowiki></code> To reference a prior name, as in <code><nowiki><ref name="bendo"/></nowiki></code>, leave the reference text blank: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>>}}</nowiki></code> Similarly, to reference a prior name in a particular group, as in <code><nowiki><ref name="bendo" group="pron"/></nowiki></code>, use: <code><nowiki>{{IPA|it|/ˈben.do/|/ˈbɛn.do/|ref2=<<name:bendo>><<group:pron>>}}</nowiki></code> ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "q": { "label": "overall left qualifier", "description": "Specifies a qualifier to be placed at the very beginning. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq": { "label": "overall right qualifier", "description": "Specifies a qualifier to be placed at the very end. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "a": { "label": "overall left accent qualifier(s)", "description": "Specifies one or more comma-separated accent qualifiers to be placed at the very beginning. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa": { "label": "overall right accent qualifier(s)", "description": "Specifies one or more comma-separated accent qualifiers to be placed at the very end. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "q1": { "label": "left qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "q2": { "label": "left qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "q3": { "label": "left qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq1": { "label": "right qualifier 1", "description": "Specifies a qualifier to be placed after pronunciation 1. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq2": { "label": "right qualifier 2", "description": "Specifies a qualifier to be placed after pronunciation 2. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq3": { "label": "right qualifier 3", "description": "Specifies a qualifier to be placed after pronunciation 3. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "a1": { "label": "left accent qualifier(s) 1", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 1. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "a2": { "label": "left accent qualifier(s) 2", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 2. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "a3": { "label": "left accent qualifier(s) 3", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 3. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa1": { "label": "right accent qualifier(s) 1", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 1. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa2": { "label": "right accent qualifier(s) 2", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 2. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa3": { "label": "right accent qualifier(s) 3", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 3. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "ref1": { "label": "reference 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref2": { "label": "reference 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref3": { "label": "reference 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline", "paramOrder": [ "1", "2", "3", "4", "q", "qq", "a", "aa", "q1", "q2", "q3", "qq1", "qq2", "qq3", "a1", "a2", "a3", "aa1", "aa2", "aa3", "ref1", "ref2", "ref3" ] } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> fyg4bkl2xrhkoz34sme8o5p2dae04g0 64670 64669 2026-06-12T12:26:59Z Juwan 804 64670 wikitext text/x-wiki {{documentation subpage}} {{uses lua|Module:IPA/templates}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. This should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA and some non-IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas, unless a bare semicolon {{cd|;}} is used as an argument, in which case the two surrounding arguments will be separated by a semicolon. See below under [[#Inline modifiers]] for an example of this. Note that semicolons do not count for the purposes of indexed parameters; thus, an example like {{tl|IPA|en|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/|a2=cot-caught}} is correct and will result in the {{cd|cot-caught}} accent qualifier being displayed directly before the pronunciation {{IPAchar|/ˈpɪŋˌpɑŋ/}}, while {{tl|IPA|en|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/|a3=cot-caught}} is incorrect and will produce unexpected results. To avoid issues like this, it is recommended to use [[#Inline modifiers|inline modifiers]] (see link). ; {{para|q}} : Specifies a qualifier to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|qq}} : Specifies a qualifier to be placed at the end, after all pronunciations. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a}} : Specifies one or more comma-separated accent qualifiers to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa}} : Specifies one or more comma-separated accent qualifiers to be placed at the end, after all pronunciations. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|q<var>N</var>}} : Specifies a qualifier to be placed ''before'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. Simple example: <code><nowiki>{{IPA|en|/a/|/b/|/c/|q1=one|q2=two|q3=three}}</nowiki></code> gives {{IPA|en|/a/|/b/|/c/|q1=one|q2=two|q3=three}}. <small>The parameter {{para|qual<var>N</var>}} is a deprecated synonym; please do not use. Currently, for compatibility, {{para|qual}} is accepted as a synonym for {{para|qual1}}, but this should not be relied on as it will be changing in the future.</small> ; {{para|qq<var>N</var>}} : Specifies a qualifier to be placed ''after'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''before'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''after'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|ref<var>N</var>}} : Specifies one or more reference notes to be placed after pronunciation <var>N</var>. The reference is placed in the "Reference" section at the bottom of the language's entry. See below for the format of this parameter. <small>The parameter {{para|n<var>N</var>}} is a deprecated synonym; please do not use.</small> ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ===Inline modifiers=== {{hatnote|For full documentation, see [[Wiktionary:Inline modifiers]].}} The {{para|q<var>N</var>}}, {{para|qq<var>N</var>}}, {{para|a<var>N</var>}}, {{para|aa<var>N</var>}} and {{para|ref<var>N</var>}} parameters have corresponding inline modifiers {{cd|<q:...>}}, {{cd|<qq:...>}}, {{cd|<a:...>}}, {{cd|<aa:...>}} and {{cd|<ref:...>}} that can be attached directly to a pronunciation argument. For exmaple: <blockquote> <code><nowiki>* {{IPA|en|/wʌt/|/wɑt/<a:sometimes also in <<GA>>>}}</nowiki></code> * {{IPA|en|/wʌt/|/wɑt/<a:sometimes also in <<GA>>>}} </blockquote> It is allowed, and common, to combine {{para|a}} with {{para|a<var>N</var>}}, or equivalently, with {{cd|<a:...>}}. An example: <blockquote> <code><nowiki>* {{IPA|en|a=GA|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/<a:cot-caught>}}</nowiki></code> * {{IPA|en|a=GA|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/<a:cot-caught>}} </blockquote> This also shows the use of a bare semicolon argument to cause the separator between two pronunciations to appear as a semicolon. ==Accepted symbols== Besides the letters of the official IPA and extIPA, and the diacritics and prosodic marks of the IPA proper, the following extensions are accepted: ᶑ 𝼈 𝼊 ʞ ᵻ ᵿ ͈ ˭ ↑ ↓ ꟸ ᷽ as well as the following common substitutes: ‼ ᴙ ¹ ² ³ ⁴ ⁵ 𝆏 𝆑 ⁻ ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "q": { "label": "overall left qualifier", "description": "Specifies a qualifier to be placed at the very beginning. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq": { "label": "overall right qualifier", "description": "Specifies a qualifier to be placed at the very end. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "a": { "label": "overall left accent qualifier(s)", "description": "Specifies one or more comma-separated accent qualifiers to be placed at the very beginning. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa": { "label": "overall right accent qualifier(s)", "description": "Specifies one or more comma-separated accent qualifiers to be placed at the very end. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "q1": { "label": "left qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "q2": { "label": "left qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "q3": { "label": "left qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq1": { "label": "right qualifier 1", "description": "Specifies a qualifier to be placed after pronunciation 1. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq2": { "label": "right qualifier 2", "description": "Specifies a qualifier to be placed after pronunciation 2. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq3": { "label": "right qualifier 3", "description": "Specifies a qualifier to be placed after pronunciation 3. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "a1": { "label": "left accent qualifier(s) 1", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 1. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "a2": { "label": "left accent qualifier(s) 2", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 2. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "a3": { "label": "left accent qualifier(s) 3", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 3. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa1": { "label": "right accent qualifier(s) 1", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 1. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa2": { "label": "right accent qualifier(s) 2", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 2. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa3": { "label": "right accent qualifier(s) 3", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 3. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "ref1": { "label": "reference 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref2": { "label": "reference 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref3": { "label": "reference 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline", "paramOrder": [ "1", "2", "3", "4", "q", "qq", "a", "aa", "q1", "q2", "q3", "qq1", "qq2", "qq3", "a1", "a2", "a3", "aa1", "aa2", "aa3", "ref1", "ref2", "ref3" ] } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> 0zm7lbsye1cn7712imcl3id6u5151tc 64671 64670 2026-06-27T15:59:02Z King ChristLike 964 48 revisions imported from [[:en:Template:IPA/documentation]] 64670 wikitext text/x-wiki {{documentation subpage}} {{uses lua|Module:IPA/templates}} This template adds the proper formatting and links to a pronunciation transcription in the [[WT:IPA|International Phonetic Alphabet]]. This should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one. By default, the module counts the syllables in every phonemic transcription of a language that has diphthongs listed in [[Module:syllables]], and a category is added based on the count, such as {{catlink|English 1-syllable words}}. To turn off syllable counting, add the parameter {{para|nocount|1}}. The module also tracks various IPA and some non-IPA symbols in particular languages' transcriptions (see [[Module:IPA/tracking]]). It gives a preview-only message in red if any symbols are invalid, based on the list in [[Module:IPA/data/symbols]], and offers suggestions to correct some common substitutions. ==Parameters== ; {{para|1}} : The language code (see [[Wiktionary:List of languages]]) for the current language section. <small>The parameter {{para|lang}} is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.</small> ; {{para|2}}, {{para|3}}, {{para|4}} ... : Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes <code>/ /</code> for [[phonemic]] representations, and square brackets <code>[ ]</code> for [[phonetic]] representations. They will be displayed separated by commas, unless a bare semicolon {{cd|;}} is used as an argument, in which case the two surrounding arguments will be separated by a semicolon. See below under [[#Inline modifiers]] for an example of this. Note that semicolons do not count for the purposes of indexed parameters; thus, an example like {{tl|IPA|en|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/|a2=cot-caught}} is correct and will result in the {{cd|cot-caught}} accent qualifier being displayed directly before the pronunciation {{IPAchar|/ˈpɪŋˌpɑŋ/}}, while {{tl|IPA|en|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/|a3=cot-caught}} is incorrect and will produce unexpected results. To avoid issues like this, it is recommended to use [[#Inline modifiers|inline modifiers]] (see link). ; {{para|q}} : Specifies a qualifier to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|qq}} : Specifies a qualifier to be placed at the end, after all pronunciations. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a}} : Specifies one or more comma-separated accent qualifiers to be placed at the beginning, before the "IPA:" text that normally precedes the pronunciation(s). These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa}} : Specifies one or more comma-separated accent qualifiers to be placed at the end, after all pronunciations. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|q<var>N</var>}} : Specifies a qualifier to be placed ''before'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. Simple example: <code><nowiki>{{IPA|en|/a/|/b/|/c/|q1=one|q2=two|q3=three}}</nowiki></code> gives {{IPA|en|/a/|/b/|/c/|q1=one|q2=two|q3=three}}. <small>The parameter {{para|qual<var>N</var>}} is a deprecated synonym; please do not use. Currently, for compatibility, {{para|qual}} is accepted as a synonym for {{para|qual1}}, but this should not be relied on as it will be changing in the future.</small> ; {{para|qq<var>N</var>}} : Specifies a qualifier to be placed ''after'' pronunciation <var>N</var>. This is formatted with the {{tl|q}}/{{tl|qualifier}} template. ; {{para|a<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''before'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|aa<var>N</var>}} : Specifies one or more comma-separated accent qualifiers to be placed ''after'' pronunciation <var>N</var>. These are formatted with the {{tl|a}}/{{tl|accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier. ; {{para|ref<var>N</var>}} : Specifies one or more reference notes to be placed after pronunciation <var>N</var>. The reference is placed in the "Reference" section at the bottom of the language's entry. See below for the format of this parameter. <small>The parameter {{para|n<var>N</var>}} is a deprecated synonym; please do not use.</small> ; {{para|nocount|1}} : Turns off syllable counting. ; {{para|sort}} : Manual sortkey. Use sparingly; the {{code|lua|makeSortKey}} method in [[Module:languages]] can usually generate the correct sortkey. ===Inline modifiers=== {{hatnote|For full documentation, see [[Wiktionary:Inline modifiers]].}} The {{para|q<var>N</var>}}, {{para|qq<var>N</var>}}, {{para|a<var>N</var>}}, {{para|aa<var>N</var>}} and {{para|ref<var>N</var>}} parameters have corresponding inline modifiers {{cd|<q:...>}}, {{cd|<qq:...>}}, {{cd|<a:...>}}, {{cd|<aa:...>}} and {{cd|<ref:...>}} that can be attached directly to a pronunciation argument. For exmaple: <blockquote> <code><nowiki>* {{IPA|en|/wʌt/|/wɑt/<a:sometimes also in <<GA>>>}}</nowiki></code> * {{IPA|en|/wʌt/|/wɑt/<a:sometimes also in <<GA>>>}} </blockquote> It is allowed, and common, to combine {{para|a}} with {{para|a<var>N</var>}}, or equivalently, with {{cd|<a:...>}}. An example: <blockquote> <code><nowiki>* {{IPA|en|a=GA|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/<a:cot-caught>}}</nowiki></code> * {{IPA|en|a=GA|/ˈpɪŋˌpɔŋ/|;|/ˈpɪŋˌpɑŋ/<a:cot-caught>}} </blockquote> This also shows the use of a bare semicolon argument to cause the separator between two pronunciations to appear as a semicolon. ==Accepted symbols== Besides the letters of the official IPA and extIPA, and the diacritics and prosodic marks of the IPA proper, the following extensions are accepted: ᶑ 𝼈 𝼊 ʞ ᵻ ᵿ ͈ ˭ ↑ ↓ ꟸ ᷽ as well as the following common substitutes: ‼ ᴙ ¹ ² ³ ⁴ ⁵ 𝆏 𝆑 ⁻ ==See also== * {{temp|IPAchar}} * {{temp|enPR}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "language", "description": "The language code (see Wiktionary:Languages) for the current language section.", "example": "en", "type": "string", "required": true }, "2": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "example": "/aɪ piː ˈeɪ/", "type": "string", "required": true, "label": "IPA 1" }, "3": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 2" }, "4": { "description": "Indicates one or more pronunciations. These should be formatted in correct IPA and be surrounded by slashes / / for phonemic representations, and square brackets [ ] for phonetic representations.", "type": "string", "label": "IPA 3" }, "q": { "label": "overall left qualifier", "description": "Specifies a qualifier to be placed at the very beginning. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq": { "label": "overall right qualifier", "description": "Specifies a qualifier to be placed at the very end. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "a": { "label": "overall left accent qualifier(s)", "description": "Specifies one or more comma-separated accent qualifiers to be placed at the very beginning. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa": { "label": "overall right accent qualifier(s)", "description": "Specifies one or more comma-separated accent qualifiers to be placed at the very end. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "q1": { "label": "left qualifier 1", "description": "Specifies a qualifier to be placed before pronunciation 1. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "q2": { "label": "left qualifier 2", "description": "Specifies a qualifier to be placed before pronunciation 2. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "q3": { "label": "left qualifier 3", "description": "Specifies a qualifier to be placed before pronunciation 3. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq1": { "label": "right qualifier 1", "description": "Specifies a qualifier to be placed after pronunciation 1. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq2": { "label": "right qualifier 2", "description": "Specifies a qualifier to be placed after pronunciation 2. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "qq3": { "label": "right qualifier 3", "description": "Specifies a qualifier to be placed after pronunciation 3. This is formatted with the {{q}}/{{qualifier}} template.", "type": "string" }, "a1": { "label": "left accent qualifier(s) 1", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 1. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "a2": { "label": "left accent qualifier(s) 2", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 2. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "a3": { "label": "left accent qualifier(s) 3", "description": "Specifies one or more comma-separated accent qualifiers to be placed before pronunciation 3. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa1": { "label": "right accent qualifier(s) 1", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 1. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa2": { "label": "right accent qualifier(s) 2", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 2. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "aa3": { "label": "right accent qualifier(s) 3", "description": "Specifies one or more comma-separated accent qualifiers to be placed after pronunciation 3. These are formatted with the {{a}}/{{accent}} template.", "type": "string" }, "ref1": { "label": "reference 1", "description": "Specifies a reference note to be placed after pronunciation 1. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref2": { "label": "reference 2", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" }, "ref3": { "label": "reference 3", "description": "Specifies a reference note to be placed after pronunciation 2. The reference is placed in the ===References=== section at the bottom of the language's entry.", "type": "string" } }, "description": "This template adds the proper formatting and links to a pronunciation transcription in the International Phonetic Alphabet. It applies proper formatting and adds links to the language's IPA key using Module:IPA/templates. It should be used in pronunciation sections only. If the language has a template that automatically generates pronunciation from spelling, that template should be used instead of this one.", "format": "inline", "paramOrder": [ "1", "2", "3", "4", "q", "qq", "a", "aa", "q1", "q2", "q3", "qq1", "qq2", "qq3", "a1", "a2", "a3", "aa1", "aa2", "aa3", "ref1", "ref2", "ref3" ] } </templatedata> <includeonly> [[Category:Pronunciation templates|IPA]] [[fa:الگو:آی‌پی‌ای]] </includeonly> 0zm7lbsye1cn7712imcl3id6u5151tc Templeeti:catlink 10 8300 64672 2017-07-25T19:16:22Z Erutuon 1339 shortcut linking templtae 64672 wikitext text/x-wiki [[:Category:{{{1|}}}|{{{1|}}}]]<noinclude> {{documentation}} </noinclude> 5g1o66k7kk74oxifzu7mbs4qhrfauqu 64673 64672 2017-11-29T06:55:40Z Erutuon 1339 replace underscores with spaces 64673 wikitext text/x-wiki [[:Category:{{{1|}}}|{{#invoke:string|replace|{{{1|}}}|_|&#32;}}]]<noinclude> {{documentation}} </noinclude> 8x5int1tt8yaaw23da7ibuvfjhxu47l 64674 64673 2024-12-24T14:01:17Z 46.239.0.92 64674 wikitext text/x-wiki Fixed typo,added content id9ixq65u01xrkk3rr5pd6znd4ywdaw 64675 64674 2024-12-24T15:03:25Z Surjection 380 Reverted edits by [[Special:Contributions/46.239.0.92|46.239.0.92]]. If you think this rollback is in error, please leave a message on my [[User talk:Surjection|talk page]]. 64675 wikitext text/x-wiki [[:Category:{{{1|}}}|{{#invoke:string|replace|{{{1|}}}|_|&#32;}}]]<noinclude> {{documentation}} </noinclude> 8x5int1tt8yaaw23da7ibuvfjhxu47l 64676 64675 2024-12-24T15:03:43Z Surjection 380 Protected "[[Template:catlink]]" ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite)) 64675 wikitext text/x-wiki [[:Category:{{{1|}}}|{{#invoke:string|replace|{{{1|}}}|_|&#32;}}]]<noinclude> {{documentation}} </noinclude> 8x5int1tt8yaaw23da7ibuvfjhxu47l 64677 64676 2025-04-05T19:03:26Z SurjectionBot 1386 (bot) rename [[Module:string]] to [[Module:string/templates]] 64677 wikitext text/x-wiki [[:Category:{{{1|}}}|{{#invoke:string/templates|replace|{{{1|}}}|_|&#32;}}]]<noinclude> {{documentation}} </noinclude> ssevh8m0yw955iotz9w6z72kz7oup0q 64678 64677 2025-06-29T13:56:37Z Yivan000 1476 add second parameter 64678 wikitext text/x-wiki [[:Category:{{{1|}}}|{{{2|{{#invoke:string/templates|replace|{{{1|}}}|_|&#32;}}}}}]]<noinclude> {{documentation}} </noinclude> 6t77z8fqnrbh7qmstz22wk15met98y0 64679 64678 2026-04-15T19:46:20Z Surjection 380 Changed protection settings for "[[Template:catlink]]" ([Edit=Allow only autopatrollers] (indefinite) [Move=Allow only autopatrollers] (indefinite)) 64678 wikitext text/x-wiki [[:Category:{{{1|}}}|{{{2|{{#invoke:string/templates|replace|{{{1|}}}|_|&#32;}}}}}]]<noinclude> {{documentation}} </noinclude> 6t77z8fqnrbh7qmstz22wk15met98y0 64680 64679 2026-06-27T15:59:03Z King ChristLike 964 8 revisions imported from [[:en:Template:catlink]] 64678 wikitext text/x-wiki [[:Category:{{{1|}}}|{{{2|{{#invoke:string/templates|replace|{{{1|}}}|_|&#32;}}}}}]]<noinclude> {{documentation}} </noinclude> 6t77z8fqnrbh7qmstz22wk15met98y0 Sochima 0 8301 64690 2026-06-27T22:39:03Z Geraldine Kene 966 Geraldine Kene moved page [[Sochima]] to [[Sọchima]]: Misspelled title 64690 wikitext text/x-wiki #KÚFÙ [[Sọchima]] irirly1jgwykt0hvuspluqe9x5j8c07 Sondee 0 8302 64694 2026-06-28T04:12:27Z Geraldine Kene 966 Geraldine Kene moved page [[Sondee]] to [[Sonde]]: Misspelled title 64694 wikitext text/x-wiki #KÚFÙ [[Sonde]] qyknwexm4tzs7nfcmcq6l1a7h69u7e9 Somadina 0 8303 64696 2026-06-28T04:14:30Z Geraldine Kene 966 Geraldine Kene moved page [[Somadina]] to [[Sọmadịna]]: Misspelled title 64696 wikitext text/x-wiki #KÚFÙ [[Sọmadịna]] 37mp05pshy760ugextva710wk42uber Okpuno 0 8304 64703 2026-06-28T04:24:54Z Geraldine Kene 966 Geraldine Kene moved page [[Okpuno]] to [[Ọkpụnọ]] 64703 wikitext text/x-wiki #KÚFÙ [[Ọkpụnọ]] thuv7lh4jwoymcvg5s5wikh83fiwkh7 Okuko 0 8305 64709 2026-06-28T10:31:33Z Geraldine Kene 966 Geraldine Kene moved page [[Okuko]] to [[Ọkụkọ]]: Misspelled title 64709 wikitext text/x-wiki #KÚFÙ [[Ọkụkọ]] 5xwmxidogodaud2qfbv9zajr9dpu88n Oliokpa 0 8306 64712 2026-06-28T10:33:46Z Geraldine Kene 966 Geraldine Kene moved page [[Oliokpa]] to [[Oliọkpa]]: Misspelled title 64712 wikitext text/x-wiki #KÚFÙ [[Oliọkpa]] pwxgd6rybz2lvmr5eppjuwj9q9fe28g Onyemaluechi 0 8307 64722 2026-06-28T10:53:12Z Geraldine Kene 966 Geraldine Kene moved page [[Onyemaluechi]] to [[Onyemalụechi]] 64722 wikitext text/x-wiki #KÚFÙ [[Onyemalụechi]] i96omfwndqwggt8tpd36wkjk8tjlb95 Oti igba 0 8308 64728 2026-06-28T11:23:22Z Geraldine Kene 966 Geraldine Kene moved page [[Oti igba]] to [[Oti ịgba]] 64728 wikitext text/x-wiki #KÚFÙ [[Oti ịgba]] qxkrtj2wciph3hr9kpjozd8810mzu1m