विक्षनरी hiwiktionary https://hi.wiktionary.org/wiki/%E0%A4%AE%E0%A5%81%E0%A4%96%E0%A4%AA%E0%A5%83%E0%A4%B7%E0%A5%8D%E0%A4%A0 MediaWiki 1.47.0-wmf.18 case-sensitive मीडिया विशेष वार्ता सदस्य सदस्य वार्ता विक्षनरी विक्षनरी वार्ता चित्र चित्र वार्ता मीडियाविकि मीडियाविकि वार्ता साँचा साँचा वार्ता सहायता सहायता वार्ता श्रेणी श्रेणी वार्ता TimedText TimedText talk मॉड्यूल मॉड्यूल वार्ता Event Event talk हिन्दी 0 873 487933 483109 2026-09-03T17:15:05Z SM7 6218 अफ्री 487933 wikitext text/x-wiki === व्युत्पत्ति === {{wikipedia|lang=hi}} [[फ़ारसी]] के [[هندی]] (हेन्दी) < [[هند]] (हेन्द) भारत < संस्कृत का [[सिन्धु]] + फ़ारसी का विशेषणात्मक प्रत्यय [[ی-]]। === उच्चारण === * अ॰ध॰व॰: [ɦɪn̪d̪iː] === नामवाचक संज्ञा === # [[भारत]] में बोली जाने वाली एक प्रमुख भाषा जो देश की आधिकारिक प्रथम [[राजभाषा]] भी है। === विशेषण === # हिन्दी लोगों का या से सम्बन्धित। === यह भी देखें === * [[हिंदुस्तान]] === अन्य भाषाओं में === {{trans-top}} :*{{अफ्री}}: [[Hindoes]], [[Hindi]] [[:af:Hindoes]] :*{{am}}: [[ሐንድኛ]] :*{{ar}}: [[هندية]] :*{{hy}}: [[Հինդի]] :*{{az}}: [[Һинд]] :*{{eu}}: [[Hindi]] [[:eu:Hindi]] :*{{be}}: [[хіндзі]] :*{{bg}}: [[хинди]] :*{{ca}}: [[Hindi]] :*{{chr}}: [[ᎯᏅᏗ]] :*{{zh}}: [[印地语]] [[:zh:印地语]] :*{{hr}}: [[Indijski]] :*{{cs}}: [[hindský]] :*{{da}}: [[hindi]] [[:da:hindi]] :*{{en}}: [[Hindi]] [[:en:Hindi]] :*{{eo}}: [[hindia]] :*{{et}}: [[Hindi]] :*{{fa}}: [[هندى]] :*{{fi}}: [[hindi]] :*{{fr}}: [[hindi]] पु. [[:fr:hindi]] :*{{ka}}: [[ჰინდი]] :*{{de}}: [[Hindi]] [[:de:Hindi]] :*{{el}}: [[Χιντού]], [[Χίντι]] :*{{gu}}: [[હિન્દી]] स्त्री. [[:gu:હિન્દી]] :*{{he}}: [[הינדית]] :*{{hu}}: [[Hindi]] :*{{is}}: [[Hindí]] :*{{id}}: [[Bahasa Hindi]] :*{{ga}}: [[Hiondúis]] :*{{it}}: [[hindi]] [[:it:hindi]] :*{{ja}}: [[ヒンディー語]] [[:ja:ヒンディー語]] :*{{ko}}: [[힌디어]] :*{{kn}}: [[ಹಿಂದಿ]] :*{{lv}}: [[Hindu]] :*{{lt}}: [[Hindi]] :*{{mk}}: [[хинду]] :*{{ms}}: [[Bahasa Hindi]] :*{{mt}}: [[Ħindi]] :*{{mr}}: हिन्दी [[:mr:हिन्दी]] :*{{mdf}}: [[хинди]] :*{{mn}}: [[Энтхэг]] :*{{ne}}: हिन्दी [[:ne:हिन्दी]] :*{{nl}}: [[Hindi]] [[:nl:Hindi]] :*{{no}}: [[Hindi]] :*{{oc}}: [[Indi]] :*{{pl}}: [[Hindi]], [[Hinduski]] :*{{pt}}: [[Hindi]] :*{{ro}}: [[hindusă]] :*{{ru}}: [[хинди]] पु. [[:ru:хинди]] :*{{sr}}: [[хинди]] :*{{wen}}: [[Hindišćina]] :*{{es}}: [[hindi]] [[:es:hindi]] :*{{sw}}: [[Kihindi]] :*{{sv}}: [[hindi]] [[:sv:hindi]] :*तगालोग<!--{{tl}} तगालोग अनुवाद के लिए उपयोग्य साँचा नहीं है-->: [[Wikang Bumbáy]] :*{{ta}}: [[இந்தி]] (indhi) :*तातार: [[хинди]] :*{{th}}: [[ชาวฮินดู]], [[ภาษาฮินดู]] :*{{tr}}: [[Hintçe]] [[:tr:Hintçe]] :*{{uk}}: [[хінді]] :*{{ur}}: [[ہندي]] :*{{vi}}: [[Tiếng Hin-đi]] :*{{wa}}: [[Hindi]] :*{{cy}}: [[Hindi]] {{trans-bottom}} ftk0wid74xkjyztl884syy5kn9rogrd गुजराती 0 902 487932 467202 2026-09-03T17:14:39Z SM7 6218 अफ्री 487932 wikitext text/x-wiki {{-hi-}} {{-noun-}} # [[भारत]] की [[भाषा]] है । (स्त्री.) # [[व्यक्ति]] (पु./स्त्री.) {{-trans-}} {| border=0 width=100% |- |bgcolor="beige" valign=top width=48%| {| :*{{अफ्री}}: [[Gujaraties]] :*{{am}}: [[ጉጃራቲኛ]] :*{{ar}}: [[غوجاراتية]] :*{{bg}}: [[гуджарати]] :*{{ca}}: [[gujaraTti]] :*{{cs}}: [[gudžarátský]] :*{{cy}}: [[Gwjarati]] :*{{de}}: [[Gujaratisch]], [[Gudscharati]], [[Gudscharatisch]] :*{{el}}: [[Γκουτζαρατικά]] :*{{en}}: [[Gujarati]] [[:en:Gujarati]] (१,२) :*{{es}}: [[gujaratí]], [[guyarati]] :*{{fa}}: [[گجراتی]] :*{{fi}}: [[gudžarati]] :*{{fr}}: [[gujarati]] पु. [[:fr:gujarati]] (१), [[Gujarati]] पु. [[:fr:Gujarati]], [[Gujaratie]] स्त्री. [[:fr:Gujaratie]] (२) :*{{gu}}: ]] स्त्री. [[:gu:Gujarat] (१,२) :*{{he}}: [[גוג'רטית]] :*{{hu}}: [[Gudzsaráti]] :*{{id}}: [[Gujarati]] :*{{it}}: [[gujarati]] |} | width=1% | |bgcolor="beige" valign=top width=48%| {| :*{{ja}}: [[グジャラティ語]] [[:ja:グジャラティ語]] :*{{kn}}: [[ಗುಜರಾತಿ]] [[:kn:ಗುಜರಾತಿ]] :*{{ms}}: [[Gujarati]] :*{{mt}}: [[Guġarati]] :*{{mdf}}: [[гужарати]] :*{{mn}}: [[гуджарати]] :*{{ne}}: गुजराती :*{{nl}}: [[Gujarati]] :*{{pl}}: [[gudżarati]] :*{{pt}}: [[gujarati]] :*{{ro}}: [[gujarati]] :*{{ru}}: [[гуярати]] :*{{sw}}: [[Kigujarati]] :*{{sv}}: [[gujarati]] :*{{th}}: [[ภาษากุจราฐ]] :*{{tr}}: [[Gujarati]] :*{{uk}}: [[гуджараті]] :*{{ur}}: [[گجراتي]] :*{{wa}}: [[goudjarati]] |} |} {{-adj-}} # {{-trans-}} * {{en}} : [[Gujarati]] * {{fr}} : [[gujarati]] पु., [[gujaratie]] स्त्री. [[:fr:gujaratie]] * {{gu}} : [[ગુજરાતી]] === प्रकाशितकोशों से अर्थ === ==== शब्दसागर ==== गुजराती ^१ वि॰ [हिं॰ गुजराती] <br><br>१. गुजरात देश का । गुजरात का निवासी या रहनेवाला । गुजरात देश संबंधी । गुजरात देश में उत्पन्न । जैसे,—गुजराती इलायची । <br><br>२. गुजरात का बना हुआ । जैसे—गुजराती सेंदुर । गुजराती ^२ संज्ञा स्त्री॰ <br><br>१. गुजरात देश की भाषा । <br><br>३. छोटी इलायची । जैसे, गुजराती इलायची । गुजराती ^३ संज्ञा पुं॰ गुजरात का निवासी । गुजरात में रहनेवाला । [[श्रेणी: हिन्दी-प्रकाशितकोशों से अर्थ-शब्दसागर]] == यह भी देखिए == * [[w:गुजराती भाषा|गुजराती भाषा]] (विकिपीडिया) [[श्रेणी:भाषाएँ]] jqg87evvrhc1mahhmuow108n7pwfh5e भारत 0 963 487912 486421 2026-09-03T15:35:47Z SM7 6218 सुधार / टच हेतु 487912 wikitext text/x-wiki ==हिन्दी== {{wikipedia|lang=hi}} [[चित्र:India (orthographic projection).svg|thumb|right|240px|ग्लोब पर भारत]] ===व्युत्पत्ति=== {{bor+|hi|sa|भारत}}। ===उच्चारण=== * {{audio|hi|Hi-भारत.oga}} * {{hi-IPA}} ===नामवाचक संज्ञा=== {{hi-proper noun|g=m}} # [[दक्षिण एशिया]] में स्थित एक [[देश]] # {{w|भरत}} से संबंधित ===अनुवाद=== {{trans-top}} * {{ar|هند}} * {{बन}} : [[Indija]] {{f}} * {{बट}} : [[India]] * {{डन}} : [[Indien]] * {{कट}} : [[Índia]] * {{वल}} : [[India]] * {{de|Indien}} {{n}} * {{en|India}} * {{ऐस}} : [[Barato]], [[Hindujo]], [[Hindio]], [[Bharato]], [[Hinda Unio]] * {{एट}} : [[India]] * {{fr|Inde}} {{f}} * {{gd}} : [[Na_h-Innseachan]] * {{grc}} : [[Ἰνδία]] (इण्डिया) स्त्री. * {{gu|ભારત}} * {{फ़न}} : [[Intia]] * {{हब}} : [[הודו]] (होन्दू) * {{यन}} : [[Ινδία]] स्त्री. * {{सप}} : [[India]] स्त्री. * {{फ़स}} : [[هندوستان]] (हेन्दुस्तान) * {{हङ}} : [[India]] * {{इड}} : [[India]] * {{ia}} : [[India]] * {{इत}} : [[India]] स्त्री. * {{ja|インド}} ([[印度]], इन्दो) * {{कड़}} : [[ಭಾರತ]] * {{कश}} : [[#हिन्दी|भारत]] * {{लत}} : [[India]] स्त्री. * {{लव}} : [[Indija]] * {{मल}} : [[India]] * {{nl|India}} * {{नव}} : [[India]] * {{पल}} : [[Indie]] * {{पत}} : [[Índia]] स्त्री. * {{रम}} : [[India]] स्त्री. * {{रस}} : [[Индия]] (इन्दिजा) * {{सस}} : [[#हिन्दी|भारत]] * {{सल}} : [[Indija]] * {{सव}} : [[Indien]] * {{तम}} : [[இந்தியா]] (इन्धिया) * {{तल}} : [[భారతదేశం]] (भारत देशम) * {{थई}} : [[ประเทศอินเดีย]] * {{तर}} : [[Hindistan]] * {{यक}} : [[Індія]] * {{उद}} : [[بهارت]] (भारत) * {{चन}} : [[印度]] (यिन्दू) {{trans-bottom}} === उदाहरण वाक्य === * भारत विविधताओं से भरा हुआ देश है। * रामायण में अयोध्या नरेश दशरथ के पुत्रों में भारत एक प्रमुख पात्र थे। === संज्ञा === '''भारत''' 1. दक्षिण एशिया का एक देश, जिसे भारतवर्ष भी कहा जाता है। * उदाहरण: भारत दुनिया का सातवाँ सबसे बड़ा देश है। ===यह भी देखें=== {{विकिपीडिया}} {{एशिया/हिन्दी}} ===प्रकाशितकोशों से अर्थ=== ====शब्दसागर==== भारत संज्ञा पुं॰ [सं॰] <br><br>१. महाभारत का पूर्वरूप वा मूल जो २४००० श्लोकों का था । वि॰ दे॰ 'महाभारत' । <br><br>२. एक भूभाग (देश= वर्ष) का नाम । यह पुराणानुसार जंबु द्वीप के नौ वर्षों के अंतर्गत है । वि॰ दे॰ 'भारतवर्ष' । [[श्रेणी:हिन्दी-प्रकाशितकोशों से अर्थ-शब्दसागर]] ==मराठी== ===नामवाचक संज्ञा=== # [[#हिन्दी|भारत]] ===यह भी देखें=== {{विकिपीडिया|भाषा=mr}} [[श्रेणी:हिन्दी नामवाचक संज्ञा (स्थान नाम)]] [[श्रेणी:देश]] [[श्रेणी:मराठी नामवाचक संज्ञा (स्थान नाम)]] [[श्रेणी:मराठी:देश]] 9mh7bj673sxz0r9xnuoy66t2pm8fksz स्वीडियाई 0 980 487931 480011 2026-09-03T17:14:29Z SM7 6218 अफ्री 487931 wikitext text/x-wiki {{-hi-}} {{-noun-}} #'''स्वीडिश'''; {{-trans-}} {| border=0 width=100% |- |bgcolor="beige" valign=top width=48%| {| :*{{अफ्री}}: [[Sweeds]] :*{{sq}}: [[Suedisht]] :*{{am}}: [[ስዊድንኛ]] :*{{ar}}: [[سويدية]] :*{{hy}}: [[Չվեդական]], [[Շվեդերեն]] :*{{az}}: [[Исвеч]] :*{{eu}}: [[Suediera]] :*{{be}}: [[Швэдзкай]], [[Швэдзкая]], [[Швецкая]] :*{{br}}: [[Svedeg]] :*{{bg}}: [[Шведски]] :*{{ca}}: [[suec]] :*{{chr}}: [[ᏑᏪᏗ]] :*{{zh}}: [[瑞典语]] :*{{hr}}: [[Švedski]] :*{{cs}}: [[Švédský]] :*{{da}}: [[svensk]] :*{{en}}: [[Swedish]] :*{{eo}}: [[sveda lingvo]] :*{{et}}: [[Rootsi]] :*{{fo}}: [[Svenskt]] :*{{fa}}: [[سوئدى]] :*{{fi}}: [[ruotsi]] :*{{fr}}: [[suédois]] {{m}} :*{{fy}}: [[Sweedsk]] :*{{gl}}: [[Sueco]] :*{{gu}}: [[સ્વીડિશ]] :*{{ka}}: [[შვედური]] :*{{de}}: [[Schwedisch]] {{n}} :*{{el}}: [[Σουηδικά]] :*{{he}}: [[שוודית]] :*{{hi}}: [[स्वीडिश]] :*{{hu}}: [[Svéd]] :*{{is}}: [[Sænska]] :*{{smn}}: [[ruotakiela]] :*{{id}}: [[Bahasa Swedia]] :*{{ia}}: [[lingua svedese]] |} | width=1% | |bgcolor="beige" valign=top width=48%| {| :*{{it}}: [[svedese]] :*{{ja}}: [[スウェーデン語]] :*{{ko}}: [[스웨덴어]] :*{{ku}}: [[Svêçî]] :*{{lv}}: [[Zviedru]] :*{{lt}}: [[Švediškai]] :*{{mk}}: [[Шведски]] :*{{ms}}: [[Bahasa Sweden]], [[Sweden]] :*{{mt}}: [[Svediż]] :*{{mdf}}: [[Шведонь]] :*{{ne}}: [[स्विडिश]] :*{{no}}: [[Svensk]] :*{{oc}}: [[Suec]] :*{{pl}}: [[Szwedzki]] :*{{pt}}: [[sueco]] :*{{ro}}: [[suedeză]] {{f}} :*{{ru}}: [[Шведский]] :*{{smi}}: [[ruoŧŧa]] :*{{sr}}: [[Шведски]] :*{{sk}}: [[Švédsky]] :*{{sl}}: [[švedščina]] {{f}} :*{{es}}: [[sueco]] {{m}} :*{{sw}}: [[Kisweden]] :*{{sv}}: [[svenska]] :*{{tl}}: [[Suwiso]] :*{{ta}}: [[ஸ்வீடிஷ]] :*तातार: [[Швед]] :*{{th}}: [[ภาษาสวีเดน]] :*{{tr}}: [[İsveççe]] :*{{uk}}: [[Шведський]] :*{{ur}}: [[سويڈش]] :*{{vi}}: [[Tiếng Thuỵ-điển]], [[Tiếng Thuỵ điển]] :*{{vot}}: [[Rootsi]] :*{{wa}}: [[Suwedwès]] :*{{cy}}: [[Swedeg]] :*{{yi}}: [[שװעדיש]] |} |} imlx0cqed8v171zg6936t9s4ye5yo70 विक्षनरी:भाषाओं की सूची 4 1114 487950 465771 2026-09-03T19:13:28Z SM7 6218 nowiki / ये भाषा साँचे नहीं shortcuts हैं 487950 wikitext text/x-wiki * [[:श्रेणी:भाषाएँ]] == List of language template == {| border=0 width=100% |- |bgcolor="#f9f9f9" valign=top width=48% style="border:1px solid #aaaaaa; padding:5px;"| {| :* [[Template:aa]]: {{aa}} ([[Template:-aa-]]) :* [[Template:ab]]: {{ab}} ([[Template:-ab-]]) :* [[Template:af]]: <nowiki>{{af}}</nowiki> ([[Template:-af-]]) :* [[Template:als]]: {{als}} ([[Template:-als-]]) :* [[Template:am]]: {{am}} ([[Template:-am-]]) :* [[Template:an]]: {{an}} ([[Template:-an-]]) :* [[Template:apa]]: {{apa}} ([[Template:-apa-]]) :* [[Template:ar]]: {{ar}} ([[Template:-ar-]]) :* [[Template:as]]: {{as}} ([[Template:-as-]]) :* [[Template:ast]]: {{ast}} ([[Template:-ast-]]) :* [[Template:ay]]: {{ay}} ([[Template:-ay-]]) :* [[Template:az]]: {{az}} ([[Template:-az-]]) :* [[Template:ba]]: {{ba}} ([[Template:-ba-]]) :* [[Template:be]]: {{be}} ([[Template:-be-]]) :* [[Template:bg]]: {{bg}} ([[Template:-bg-]]) :* [[Template:bh]]: {{bh}} ([[Template:-bh-]]) :* [[Template:bho]]: {{bho}} ([[Template:-bho-]]) :* [[Template:bi]]: {{bi}} ([[Template:-bi-]]) :* [[Template:bm]]: {{bm}} ([[Template:-bm-]]) :* [[Template:bn]]: {{bn}} ([[Template:-bn-]]) :* [[Template:bo]]: {{bo}} ([[Template:-bo-]]) :* [[Template:bs]]: {{bs}} ([[Template:-bs-]]) :* [[Template:br]]: {{br}} ([[Template:-br-]]) :* [[Template:by]]: {{by}} ([[Template:-by-]]) :* [[Template:ca]]: {{ca}} ([[Template:-ca-]]) :* [[Template:ce]]: {{ce}} ([[Template:-ce-]]) :* [[Template:ch]]: {{ch}} ([[Template:-ch-]]) :* [[Template:chr]]: {{chr}} ([[Template:-chr-]]) :* [[Template:co]]: {{co}} ([[Template:-co-]]) :* [[Template:cs]]: {{cs}} ([[Template:-cs-]]) :* [[Template:cy]]: {{cy}} ([[Template:-cy-]]) :* [[Template:da]]: {{da}} ([[Template:-da-]]) :* [[Template:de]]: {{de}} ([[Template:-de-]]) :* [[Template:dz]]: {{dz}} ([[Template:-dz-]]) :* [[Template:en]]: {{en}} ([[Template:-en-]]) :* [[Template:el]]: {{el}} ([[Template:-el-]]) :* [[Template:es]]: {{es}} ([[Template:-es-]]) :* [[Template:eo]]: {{eo}} ([[Template:-eo-]]) :* [[Template:et]]: {{et}} ([[Template:-et-]]) :* [[Template:eu]]: {{eu}} ([[Template:-eu-]]) :* [[Template:fa]]: {{fa}} ([[Template:-fa-]]) :* [[Template:fi]]: {{fi}} ([[Template:-fi-]]) :* [[Template:fil]]: {{fil}} ([[Template:-fil-]]) :* [[Template:fj]]: {{fj}} ([[Template:-fj-]]) :* [[Template:fo]]: {{fo}} ([[Template:-fo-]]) :* [[Template:fr]]: {{fr}} ([[Template:-fr-]]) :* [[Template:fy]]: {{fy}} ([[Template:-fy-]]) :* [[Template:ga]]: {{ga}} ([[Template:-ga-]]) :* [[Template:gd]]: {{gd}} ([[Template:-gd-]]) :* [[Template:gl]]: {{gl}} ([[Template:-gl-]]) :* [[Template:gn]]: {{gn}} ([[Template:-gn-]]) :* [[Template:grc]]: {{grc}} ([[Template:-grc-]]) :* [[Template:gsw]]: {{gsw}} ([[Template:-gsw-]]) :* [[Template:gu]]: {{gu}} ([[Template:-gu-]]) :* [[Template:he]]: {{he}} ([[Template:-he-]]) :* [[Template:hi]]: {{hi}} ([[Template:-hi-]]) :* [[Template:hr]]: {{hr}} ([[Template:-hr-]]) :* [[Template:hu]]: {{hu}} ([[Template:-hu-]]) :* [[Template:hy]]: {{hy}} ([[Template:-hy-]]) :* [[Template:ia]]: {{ia}} ([[Template:-ia-]]) :* [[Template:io]]: {{io}} ([[Template:-io-]]) :* [[Template:is]]: {{is}} ([[Template:-is-]]) :* [[Template:id]]: {{id}} ([[Template:-id-]]) :* [[Template:it]]: {{it}} ([[Template:-it-]]) :* [[Template:ja]]: {{ja}} ([[Template:-ja-]]) :* [[Template:jv]]: {{jv}} ([[Template:-jv-]]) :* [[Template:ka]]: {{ka}} ([[Template:-ka-]]) :* [[Template:kk]]: {{kk}} ([[Template:-kk-]]) :* [[Template:ky]]: {{ky}} ([[Template:-ky-]]) :* [[Template:km]]: {{km}} ([[Template:-km-]]) :* [[Template:kn]]: {{kn}} ([[Template:-kn-]]) :* [[Template:ko]]: {{ko}} ([[Template:-ko-]]) :* [[Template:ks]]: {{ks}} ([[Template:-ks-]]) :* [[Template:ku]]: {{ku}} ([[Template:-ku-]]) |} | width=1% | |bgcolor="#f9f9f9" valign=top width=48% style="border:1px solid #aaaaaa; padding:5px;"| {| :* [[Template:la]]: {{la}} ([[Template:-la-]]) :* [[Template:lb]]: <nowiki>{{lb}}</nowiki> ([[Template:-lb-]]) :* [[Template:li]]: {{li}} ([[Template:-li-]]) :* [[Template:ln]]: {{ln}} ([[Template:-ln-]]) :* [[Template:lo]]: {{lo}} ([[Template:-lo-]]) :* [[Template:lv]]: {{lv}} ([[Template:-lv-]]) :* [[Template:lt]]: {{lt}} ([[Template:-lt-]]) :* [[Template:mdf]]: {{mdf}} ([[Template:-mdf-]]) :* [[Template:mg]]: {{mg}} ([[Template:-mg-]]) :* [[Template:mi]]: {{mi}} ([[Template:-mi-]]) :* [[Template:ml]]: {{ml}} ([[Template:-ml-]]) :* [[Template:mk]]: {{mk}} ([[Template:-mk-]]) :* [[Template:mr]]: {{mr}} ([[Template:-mr-]]) :* [[Template:ms]]: {{ms}} ([[Template:-ms-]]) :* [[Template:mt]]: {{mt}} ([[Template:-mt-]]) :* [[Template:mn]]: {{mn}} ([[Template:-mn-]]) :* [[Template:mnc]]: {{mnc}} ([[Template:-mnc-]]) :* [[Template:mo]]: {{mo}} ([[Template:-mo-]]) :* [[Template:my]]: {{my}} ([[Template:-my-]]) :* [[Template:na]]: {{na}} ([[Template:-na-]]) :* [[Template:nah]]: {{nah}} ([[Template:-nah-]]) :* [[Template:ne]]: {{ne}} ([[Template:-ne-]]) :* [[Template:nl]]: {{nl}} ([[Template:-nl-]]) :* [[Template:no]]: {{no}} ([[Template:-no-]]) :* [[Template:oc]]: {{oc}} ([[Template:-oc-]]) :* [[Template:oj]]: {{oj}} ([[Template:-oj-]]) :* [[Template:or]]: {{or}} ([[Template:-or-]]) :* [[Template:os]]: {{os}} ([[Template:-os-]]) :* [[Template:pa]]: {{pa}} ([[Template:-pa-]]) :* [[Template:pi]]: {{pi}} ([[Template:-pi-]]) :* [[Template:pl]]: {{pl}} ([[Template:-pl-]]) :* [[Template:ps]]: {{ps}} ([[Template:-ps-]]) :* [[Template:pt]]: {{pt}} ([[Template:-pt-]]) :* [[Template:qu]]: {{qu}} ([[Template:-qu-]]) :* [[Template:ro]]: {{ro}} ([[Template:-ro-]]) :* [[Template:ru]]: {{ru}} ([[Template:-ru-]]) :* [[Template:sa]]: {{sa}} ([[Template:-sa-]]) :* [[Template:sc]]: {{sc}} ([[Template:-sc-]]) :* [[Template:scn]]: {{scn}} ([[Template:-scn-]]) :* [[Template:si]]: {{si}} ([[Template:-si-]]) :* [[template:sd]]: {{sd}} ([[Template:-sd-]]) :* [[Template:sl]]: {{sl}} ([[Template:-sl-]]) :* [[Template:so]]: {{so}} ([[Template:-so-]]) :* [[Template:sq]]: {{sq}} ([[Template:-sq-]]) :* [[Template:sr]]: {{sr}} ([[Template:-sr-]]) :* [[Template:sk]]: {{sk}} ([[Template:-sk-]]) :* [[Template:su]]: {{su}} ([[Template:-su-]]) :* [[Template:sv]]: {{sv}} ([[Template:-sv-]]) :* [[Template:sw]]: {{sw}} ([[Template:-sw-]]) :* [[Template:ta]]: {{ta}} ([[Template:-ta-]]) :* [[Template:te]]: {{te}} ([[Template:-te-]]) :* [[Template:tg]]: {{tg}} ([[Template:-tg-]]) :* [[Template:th]]: {{th}} ([[Template:-th-]]) :* [[Template:tk]]: {{tk}} ([[Template:-tk-]]) :* [[Template:tl]]: <nowiki>{{tl}}</nowiki> ([[Template:-tl-]]) :* [[Template:tr]]: {{tr}} ([[Template:-tr-]]) :* [[Template:tt]]: {{tt}} ([[Template:-tt-]]) :* [[Template:ty]]: {{ty}} ([[Template:-ty-]]) :* [[Template:ug]]: {{ug}} ([[Template:-ug-]]) :* [[Template:uk]]: {{uk}} ([[Template:-uk-]]) :* [[Template:ur]]: {{ur}} ([[Template:-ur-]]) :* [[Template:uz]]: {{uz}} ([[Template:-uz-]]) :* [[Template:vi]]: {{vi}} ([[Template:-vi-]]) :* [[Template:wa]]: {{wa}} ([[Template:-wa-]]) :* [[Template:wen]]: {{wen}} ([[Template:-wen-]]) :* [[Template:wo]]: {{wo}} ([[Template:-wo-]]) :* [[Template:xh]]: {{xh}} ([[Template:-xh-]]) :* [[Template:yi]]: {{yi}} ([[Template:-yi-]]) :* [[Template:yo]]: {{yo}} ([[Template:-yo-]]) :* [[Template:za]]: {{za}} ([[Template:-za-]]) :* [[Template:zh]]: {{zh}} ([[Template:-zh-]]) :* [[Template:zu]]: {{zu}} ([[Template:-zu-]]) |} |} *[[aïnou]] - (Japan) *[[andalou]] *[[flamand]] *[[gascon]] *[[livonien]] *[[ojibwé]] *[[sarde]] *[[sicilian]] ==Categories of specialised terminology== {| border=1 |- |[[Template:-animal-|<nowiki>{{-animal-}}</nowiki>]] | {{msgnw:-animal-}} || {{-animal-}} |- |[[Template:-bio-|<nowiki>{{-bio-}}</nowiki>]] | {{msgnw:-bio-}} || {{-bio-}} |- |[[Template:-colour-|<nowiki>{{-colour-}}</nowiki>]] | {{msgnw:-colour-}} || {{-colour-}} |- |[[Template:-fig-|<nowiki>{{-fig-}}</nowiki>]] | {{msgnw:-fig-}} || {{-fig-}} |- |[[Template:-geo-|<nowiki>{{-geo-}}</nowiki>]] | {{msgnw:-geo-}} || {{-geo-}} |- |[[Template:-leg-|<nowiki>{{-leg-}}</nowiki>]] | {{msgnw:-leg-}} || {{-leg-}} |- |[[Template:-tech-|<nowiki>{{-tech-}}</nowiki>]] | {{msgnw:-tech-}} || {{-tech-}} |} == यह भी देखिए == * [[m:Complete_list_of_language_Wikipedias_available]] * [[Special:Categories]] * [[w:Template:विकिपीडिया भाषाएं|विकिपीडिया भाषाएं]] [[de:Wiktionary:Sprachen]] [[en:Wiktionary:List of languages]] [[fr:Wiktionnaire:Liste des langues]] [[gu:Wiktionary:સહુ ભાષાઓ]] [[it:Wikizionario:Template]] [[ja:Wiktionary:言語の一覧]] [[kn:ಎಲ್ಲ ಭಾಷೆಗಳು]] [[nl:WikiWoordenboek:Lijst van messages]] [[sa:विक्षनरी:भाषासूची]] s2xm49xakc7wh0kwykxbi3fhvddh6pq অসমিয়া 0 4134 487938 460160 2026-09-03T17:25:24Z SM7 6218 सफाई 487938 wikitext text/x-wiki ==असमिया== ===संज्ञा=== {{pn}} #[[आसामी]] # [[असमिया भाषा]]; [[आसाम]] में बोली जाने वाली भाषा। tfdddqu4kg1dbudi3ltaez07atf2zeo 487945 487938 2026-09-03T17:55:32Z SM7 6218 सुधार / विशेषण बाकी 487945 wikitext text/x-wiki ==असमिया== ===संज्ञा=== {{as-noun}} # [[आसामी]] # [[असमिया]] भाषा; [[आसाम]] में बोली जाने वाली भाषा। 2p5veisut58nt8koozqqx9uoms2aam3 ज़ूलू 0 4323 487930 456761 2026-09-03T17:14:20Z SM7 6218 अफ्री 487930 wikitext text/x-wiki {{-hi-}} {{-noun-}} ... देश/राज्य/प्रांत की भाषा {{-trans-}} * {{अफ्री}} : [[Zoeloe]] [[:af:Zoeloe]] * {{en}} : [[Zulu]] [[:en:Zulu]] * {{fr}} : [[zoulou]] पु. [[:fr:zoulou]] * {{gu}} : [[ઝૂલૂ]] [[:gu:ઝૂલૂ]] * {{nl}} : [[Zoeloe]] न. [[:nl:Zoeloe]] * {{zu}} : [[isiZulu]] == यह भी देखिए == * [[w:ज़ूलू|ज़ूलू]] (विकिपीडिया) [[श्रेणी:भाषाएँ]] i8m7q6wtllrn1w2iekt5jxb0fjn55r8 फ्रांसीसी 0 4623 487929 480013 2026-09-03T17:14:11Z SM7 6218 अफ्री 487929 wikitext text/x-wiki {{-hi-}} {{-noun-}} स्त्री. # [[फ़्रेन्स]] की भाषा हैं । # [[व्यक्ति]] ====अनुवाद==== {{trans-top}} :*{{अफ्री}}: [[Frans]] :*{{am}}: [[ፈረንሳይኛ]] :*{{an}}: [[franzés]] :*{{ar}}: [[فرنسية]] :*{{az}}: [[франсыз]] :*{{be}}: [[францускай]], [[французская]], [[французкая]] :*{{bg}}: [[френски]] :*{{br}}: [[galleg]] पु. :*{{ca}}: [[francès]] :*{{chr}}: [[ᎠᎦᎸᏥ]] :* {{cy}} : [[Ffrangeg]] :*{{cs}}: [[francouzský]] :*{{da}}: [[fransk]] :*{{de}}: [[Französisch]] न. [[:de:Französisch]] :*{{el}}: [[Γαλλικά]] :*{{en}}: [[French]] [[:en:French]] (१,२) :*{{es}}: [[francés]] :*{{et}}: [[prantsuse]] :*{{eu}}: [[Frantzesez]] :*{{fa}}: [[فرانسوى]] :*{{fi}}: [[ranska]] :*{{fo}}: [[Franskt]] :*{{fr}}: [[français]] पु. [[:fr:français]] (१), [[Français]] पु., [[Française]] स्त्री. (२) :*{{fy}}: [[Frânsk]] न. :*{{ga}}: [[Francés]] [[Francês]] [[Fraincis]] :*{{gd}}: [[Fràingis]] :*{{gu}}: [[ફ્રાન્સીસી]] स्त्री. [[:gu:ફ્રાન્સીસી]] :*{{he}}: [[צרפתית]] (Tzar'fa'tit) :*{{hr}}: [[francuski]] पु. :*{{hu}}: [[francia]] :*{{hy}}: [[Ֆրանսերեն]] :*{{is}}: [[franska]] :*{{id}}: [[bahasa Perancis]] :*{{ia}}: [[francese]] :*{{it}}: [[francese]] पु. :*{{ja}}: [[フランス語]] (furansu-go) :*{{ka}}: [[ფრანგული]] :*{{km}}: [[ភាសារាំង]] :*{{kw}}: [[Frynkek]] :*{{kn}}: [[ಫ್ರೆಂಚ್]] :*{{ko}}: [[불어]] :*{{ku}}: [[Ferensî]] :*{{la}}: [[Gallica]] :*{{lv}}: [[Franču]] :*{{lt}}: [[Prancūziškai]] :*{{mdf}}: [[Кранцонь]] :*{{mk}}: [[француски]] :*{{ms}}: [[Perancis]] :*{{mt}}: [[Franċiż]] :*{{mn}}: [[франц]] :*{{ne}}: [[फ्रांसिसी]] :*{{nl}}: [[Frans]] न. [[:nl:Frans]] :*{{no}}: [[fransk]] :*{{oc}}: [[francés]] :*{{pl}}: [[francuski]] :*{{pt}}: [[francês]] :*{{ra}}: [[Franzos]] :*{{ro}}: [[franceză]] स्त्री. :*{{ru}}: [[французский]] :*{{sk}}: [[Francúzsky]] :*{{sl}}: [[francoščina]] :*{{smn}}: [[ránskákiela]] :*{{so}}: [[Faransiis]] :*{{sr}}: [[француски]] :*{{sq}}: [[frëngjisht]] :*{{sw}}: [[Kifaransa]] :*{{sv}}: [[franska]] :*{{ta}}: [[பிரென்ச்]] :*{{th}}: [[ภาษาฝรั่งเศส]] :*{{tl}}: [[Pranses]] :*{{tr}}: [[Fransizca]] :*तातार: [[франсуз]] :*{{uk}}: [[французький]] :*{{ur}}: [[فرانسيسي]] :*{{vi}}: [[Tiếng Pháp]] :*{{wa}}: [[francès]] :*{{wen}}: [[Francošćina]] :*{{yi}}: [[פֿראַנצױזיש]] :*{{zh}}: [[法语]] in simplified Chinese ( ''[[pinyin]]: fǎyǔ'' ) and [[法語]] in traditional Chinese ( ''pinyin: fǎyǔ'' ) :*{{zu}}: [[Isifulentshi]] [[isiFulentshi]] {{trans-bottom}} {{-adj-}} {{trans-top}} * {{en}} : [[French]] * {{fr}} : [[français]] पु., [[française]] स्त्री. * {{gu}} : [[ફ્રાન્સીસી]] {{trans-bottom}} == प्रकाशितकोशों से अर्थ == === शब्दसागर === फ्रांसीसी वि॰ [अं॰ फ्रांस] <br><br>१. फ्रांस देश का । फ्रांस देश में उत्पन्न । <br><br>२. फ्रांस देश में रहनेवाला । फ्रांस देशवासी । [[श्रेणी: हिन्दी-प्रकाशितकोशों से अर्थ-शब्दसागर]] ntf3bozv0uzrst6ynqwje6epu7vejyt अफ़्रीकी 0 4624 487928 443985 2026-09-03T17:14:02Z SM7 6218 अफ्री 487928 wikitext text/x-wiki {{-hi-}} {{-noun-}} स्त्री. # ... देश/राज्य/प्रांत की [[भाषा]] # [[व्यक्ति]] {{-trans-}} * {{अफ्री}} : [[Afrikaans]] [[:af:Afrikaans]] * {{en}} : [[Afrikaans]] [[:en:Afrikaans]] (१,२) * {{fr}} : [[afrikaans]] पु. [[:fr:afrikaans]] * {{gu}} : [[અફ્રીકી]] स्त्री. [[:gu:અફ્રીકી]] * {{nl}} : [[Afrikaans]] न. [[:nl:Afrikaans]] {{-adj-}} * {{en}} : [[Afrikaans]] * {{fr}} : [[afrikaans]] पु./स्त्री. * {{gu}} : [[અફ્રીકી]] == यह भी देखिए == * [[w:अफ़्रीकी भाषा|अफ़्रीकी भाषा]] (विकिपीडिया) [[श्रेणी:भाषाएँ]] 1qe0ln516huj11akg1y8u1ir93oc1mn Gallica 0 4643 487948 428559 2026-09-03T19:07:39Z SM7 6218 साँचा -xx- हटा कर L2 का सीधा प्रयोग 487948 wikitext text/x-wiki ==लातीनी== {{-noun-}} * [[फ़्राँसीसी]] {{stub}} bkicx7r6yp2mzs9jbd5t71btteuvt9k श्रेणी:अंग्रेज़ी संज्ञाएँ 14 7162 487924 479172 2026-09-03T16:15:44Z SM7 6218 {{auto cat}} 487924 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx साँचा:trans-top 10 7213 487923 480001 2026-09-03T16:10:11Z SM7 6218 487923 wikitext text/x-wiki {{#invoke:translations|top}}<noinclude> </table></div></div>{{documentation}}</noinclude> hp1na2dyhhbyhk1yhtdzd1hfhnnlkig साँचा:प्रलेखीकरण 10 7214 487898 36898 2026-09-03T13:43:33Z SM7 6218 टेस्टिंग 487898 wikitext text/x-wiki <div class="documentation" style="display:block; clear:both"> ---- {{#ifexist:साँचा:{{{1|{{PAGENAME}}/doc}}}|:''The following [[Help:Documenting templates|documentation]] is located at'' [[Template:{{{1|{{PAGENAME}}/doc}}}]]. <sup class="plainlinks">[[{{fullurl:Template:{{{1|{{PAGENAME}}/doc}}}|action=edit}} edit]]</sup> {{साँचा:{{{1|{{PAGENAME}}/doc}}}}}|:''इस साँचे पर [[सहायता:साँचों का प्रलेखीकरण|प्रलेखीकरण]] और वर्गीकरण की आवश्यकता है।'' कृपया <span class="plainlinks">[{{fullurl:साँचा:{{{1|{{PAGENAME}}/doc}}}| action=edit&preload=साँचा:documentation/preload}} प्रलेखीकरण पृष्ठ निर्मित करें]।{{#if:{{{nocat|}}}||[[श्रेणी:प्रलेखन की आवश्यकता वाले साँचे|{{{sort|{{PAGENAME}}}}}]]}}}}</span> </div> liudd8n1zvzve0j8fwuwke4ccrpkqm9 श्रेणी:विक्षनरी 14 10913 487988 477585 2026-09-04T06:15:03Z SM7 6218 {{auto cat}} 487988 wikitext text/x-wiki {{auto cat}} o7i86w3jl94wokhvjtss7w8ci5ilw0f साँचा:t+ 10 11899 487917 479478 2026-09-03T16:04:28Z SM7 6218 updating... 487917 wikitext text/x-wiki <includeonly>{{#invoke:translations|show|interwiki=tpos}}</includeonly><noinclude>{{t+|mul|term}}{{documentation}}</noinclude> t7tghxrrdff3qdkjp52ljfc7yxkqagl 487919 487917 2026-09-03T16:06:27Z SM7 6218 localization... 487919 wikitext text/x-wiki <includeonly>{{#invoke:translations|show|interwiki=tpos}}</includeonly><noinclude>{{t+|mul|टर्म}}{{documentation}}</noinclude> 9xyqfpl2j4ovh6e9vletqjpd9zoo0wk साँचा:mbox 10 14974 488008 477532 2026-09-04T07:56:28Z SM7 6218 updating... 488008 wikitext text/x-wiki <templatestyles src="Template:mbox/style.css" />{{#ifeq:{{{small|}}}|yes | {{ombox/core | small = yes | type = {{{type|}}} | image = {{{smallimage|{{{image|}}}}}} | imageright = {{{smallimageright|{{{imageright|}}}}}} | class = {{{class|}}} | style = {{{style|}}} | textstyle = {{{textstyle|}}} | text = {{{smalltext|{{{text}}}}}} }} | {{ombox/core | type = {{{type|}}} | image = {{{image|}}} | imageright = {{{imageright|}}} | class = {{{class|}}} | style = {{{style|}}} | textstyle = {{{textstyle|}}} | text = {{{text}}} }} }}<noinclude> {{documentation}} </noinclude> p4xiz9lsmqrqro09axk1xuj2u85g8ps साँचा:wikipedia 10 15772 487892 487530 2026-09-03T13:29:07Z SM7 6218 487892 wikitext text/x-wiki {{#invoke:interproject|wikipedia_box}}<noinclude>{{documentation}}</noinclude> dzdi9sako2qrftzzgyx4tz1f2bxrhuy 487893 487892 2026-09-03T13:29:32Z SM7 6218 "[[साँचा:wikipedia]]" सुरक्षित किया ([सम्पादन=केवल प्रबंधक अनुमत] (हमेशा) [स्थानांतरण=केवल प्रबंधक अनुमत] (हमेशा)) 487892 wikitext text/x-wiki {{#invoke:interproject|wikipedia_box}}<noinclude>{{documentation}}</noinclude> dzdi9sako2qrftzzgyx4tz1f2bxrhuy मीडियाविकि:Gadgets-definition 8 35450 487902 183200 2026-09-03T14:08:55Z SM7 6218 +VisibilityToggles and HotCat not needed here on wikt 487902 wikitext text/x-wiki == editing-gadgets == <!--* HotCat[ResourceLoader]|HotCat.js--> * defaultVisibilityToggles[ResourceLoader|default|dependencies=ext.gadget.VisibilityToggles]|defaultVisibilityToggles.js 3w6vfbflo9tdjlicelhbg8l02ywgh7d साँचा:af 10 124057 487934 465898 2026-09-03T17:16:10Z SM7 6218 no need to create such templates with Hindi names 487934 wikitext text/x-wiki #अनुप्रेषित [[साँचा:affix]] o9z3ks9vr2wr5p1gb7kt6s3agp4ubyq साँचा:t 10 124172 487920 480000 2026-09-03T16:07:19Z SM7 6218 updating... 487920 wikitext text/x-wiki <includeonly>{{#invoke:translations|show}}</includeonly><noinclude>{{documentation}}</noinclude> ig4jddjz9748tspwwe2tltu3lvequxe श्रेणी:छुपाई हुई श्रेणियाँ 14 124841 488002 461541 2026-09-04T07:40:00Z SM7 6218 488002 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx साँचा:pn 10 137026 487943 191657 2026-09-03T17:51:57Z SM7 6218 अनुप्रेषण का लक्ष्य [[साँचा:शब्द]] से [[साँचा:pagename]] में बदला 487943 wikitext text/x-wiki #पुनर्प्रेषित [[साँचा:pagename]] brxl1zq4ktrt35lf0tysnx7khbxuce6 487944 487943 2026-09-03T17:54:02Z SM7 6218 +भविष्य के लिये 487944 wikitext text/x-wiki #पुनर्प्रेषित [[साँचा:pagename]]<!-- इस साँचे का बहुत जगह उपयोग हुआ है जहाँ से इसे हटा कर भविष्य में इसे डिलीट करना है। लोग इसे 2007 में इस्तेमाल किये थे।--> c02uhxeg3kcrybuttdzhskdt3mea88h panis 0 137169 487949 437908 2026-09-03T19:08:17Z SM7 6218 साँचा -xx- हटा कर L2 का सीधा प्रयोग 487949 wikitext text/x-wiki ==लातीनी== ===संज्ञा=== {{शब्द|लिंग=पु}} # [[रोटी]], [[डबल रोटी]] 5or4ii8suxjydtql7ld6qc1ydzbpmwj साँचा:done 10 137965 487903 194346 2026-09-03T14:11:08Z SM7 6218 SM7 ने पृष्ठ [[साँचा:पूर्ण हुआ]] को [[साँचा:done]] पर स्थानांतरित किया 194346 wikitext text/x-wiki [[File:Yes check.svg|18px|alt=Yes|link=]] '''पूर्ण हुआ''' lbpdougdc4d0aljcou80tqnjarqljdo मॉड्यूल:scripts/data 828 302127 487952 487837 2026-09-03T19:39:41Z SM7 6218 असमिया 487952 Scribunto text/plain --[=[ When adding new scripts to this file, please don't forget to add style definitons for the script in [[MediaWiki:Gadget-LanguagesAndScripts.css]]. ]=] local concat = table.concat local insert = table.insert local ipairs = ipairs local next = next local remove = table.remove local select = select local sort = table.sort -- Loaded on demand, as it may not be needed (depending on the data). local function u(...) u = require("Module:string/char") return u(...) end -- We can't use mw.loadData() on [[Module:languages/chars]] because [[Module:languages/data]] itself is sometimes loaded -- using mw.loadData(), and calling mw.loadData() on [[Module:languages/chars]] will insert metatables into the -- character tables, which the second mw.loadData() will choke on. local m_chars = require("Module:languages/chars") local c = m_chars.chars local p = m_chars.puaChars local cs = m_chars.chars_substitutions ------------------------------------------------------------------------------------ -- -- Helper functions -- ------------------------------------------------------------------------------------ -- Note: a[2] > b[2] means opens are sorted before closes if otherwise equal. local function sort_ranges(a, b) return a[1] < b[1] or a[1] == b[1] and a[2] > b[2] end -- Returns the union of two or more range tables. local function union(...) local ranges = {} for i = 1, select("#", ...) do local argt = select(i, ...) for j, v in ipairs(argt) do insert(ranges, {v, j % 2 == 1 and 1 or -1}) end end sort(ranges, sort_ranges) local ret, i = {}, 0 for _, range in ipairs(ranges) do i = i + range[2] if i == 0 and range[2] == -1 then -- close insert(ret, range[1]) elseif i == 1 and range[2] == 1 then -- open if ret[#ret] and range[1] <= ret[#ret] + 1 then remove(ret) -- merge adjacent ranges else insert(ret, range[1]) end end end return ret end -- Adds the `characters` key, which is determined by a script's `ranges` table. local function process_ranges(sc) local ranges, chars = sc.ranges, {} for i = 2, #ranges, 2 do if ranges[i] == ranges[i - 1] then insert(chars, u(ranges[i])) else insert(chars, u(ranges[i - 1])) if ranges[i] > ranges[i - 1] + 1 then insert(chars, "-") end insert(chars, u(ranges[i])) end end sc.characters = concat(chars) ranges.n = #ranges return sc end local function handle_normalization_fixes(fixes) local combiningClasses = fixes.combiningClasses if combiningClasses then local chars, i = {}, 0 for char in next, combiningClasses do i = i + 1 chars[i] = char end fixes.combiningClassCharacters = concat(chars) end return fixes end ------------------------------------------------------------------------------------ -- -- Data -- ------------------------------------------------------------------------------------ local m = {} m["Adlm"] = process_ranges{ "Adlam", 19606346, "alphabet", ranges = { 0x061F, 0x061F, 0x0640, 0x0640, 0x1E900, 0x1E94B, 0x1E950, 0x1E959, 0x1E95E, 0x1E95F, }, capitalized = true, direction = "rtl", } m["Afak"] = { "Afaka", 382019, "syllabary", -- Not in Unicode } m["Aghb"] = process_ranges{ "Caucasian Albanian", 2495716, "alphabet", ranges = { 0x10530, 0x10563, 0x1056F, 0x1056F, }, } m["Ahom"] = process_ranges{ "Ahom", 2839633, "abugida", ranges = { 0x11700, 0x1171A, 0x1171D, 0x1172B, 0x11730, 0x11746, }, } m["Arab"] = process_ranges{ "Arabic", 1828555, "abjad", -- more precisely, impure abjad varieties = {"Jawi", "Perso-Arabic", "Sulat Sūg"}, ranges = { 0x0600, 0x06FF, 0x0750, 0x077F, 0x0870, 0x088E, 0x0890, 0x0891, 0x0897, 0x08E1, 0x08E3, 0x08FF, 0xFB50, 0xFBC2, 0xFBD3, 0xFD8F, 0xFD92, 0xFDC7, 0xFDCF, 0xFDCF, 0xFDF0, 0xFDFF, 0xFE70, 0xFE74, 0xFE76, 0xFEFC, 0x102E0, 0x102FB, 0x10E60, 0x10E7E, 0x10EC2, 0x10EC4, 0x10EFC, 0x10EFF, 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, 0x1EEF0, 0x1EEF1, }, direction = "rtl", normalizationFixes = handle_normalization_fixes{ from = {"ٳ"}, to = {"اٟ"} }, } m["Aran"] = { { hnd = "Shahmukhi", -- Southern Hindko hno = "Shahmukhi", -- Northern Hindko ["inc-opa"] = "Shahmukhi", -- Old Punjabi lah = "Shahmukhi", -- Lahnda pa = "Shahmukhi", -- Punjabi phr = "Shahmukhi", -- Pahari-Potwari skr = "Shahmukhi", -- Saraiki default = "Arabic", }, 1133121, -- FIXME: 133800 for Shahmukhi m["Arab"][3], ranges = m["Arab"].ranges, characters = m["Arab"].characters, aliases = {"Nastaliq", "Nastaleeq"}, direction = "rtl", parent = "Arab", normalizationFixes = m["Arab"].normalizationFixes, } m["Armi"] = process_ranges{ "Imperial Aramaic", 26978, "abjad", ranges = { 0x10840, 0x10855, 0x10857, 0x1085F, }, direction = "rtl", } m["Armn"] = process_ranges{ "Armenian", 11932, "alphabet", ranges = { 0x0531, 0x0556, 0x0559, 0x058A, 0x058D, 0x058F, 0xFB13, 0xFB17, }, capitalized = true, translit = "Armn-translit", } m["Avst"] = process_ranges{ "Avestan", 790681, "alphabet", ranges = { 0x10B00, 0x10B35, 0x10B39, 0x10B3F, }, direction = "rtl", } m["pal-Avst"] = { "Pazend", 4925073, m["Avst"][3], ranges = m["Avst"].ranges, characters = m["Avst"].characters, direction = "rtl", parent = "Avst", } m["Bali"] = process_ranges{ "Balinese", 804984, "abugida", ranges = { 0x1B00, 0x1B4C, 0x1B4E, 0x1B7F, }, } m["Bamu"] = process_ranges{ "Bamum", 806024, "syllabary", ranges = { 0xA6A0, 0xA6F7, 0x16800, 0x16A38, }, } m["Bass"] = process_ranges{ "Bassa", 810458, "alphabet", aliases = {"Bassa Vah", "Vah"}, ranges = { 0x16AD0, 0x16AED, 0x16AF0, 0x16AF5, }, } m["Batk"] = process_ranges{ "Batak", 51592, "abugida", ranges = { 0x1BC0, 0x1BF3, 0x1BFC, 0x1BFF, }, } m["Beng"] = process_ranges{ "Bengali", 756802, "abugida", ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0980, 0x0983, 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, 0x09AA, 0x09B0, 0x09B2, 0x09B2, 0x09B6, 0x09B9, 0x09BC, 0x09C4, 0x09C7, 0x09C8, 0x09CB, 0x09CE, 0x09D7, 0x09D7, 0x09DC, 0x09DD, 0x09DF, 0x09E3, 0x09E6, 0x09EF, 0x09F2, 0x09FE, 0x1CD0, 0x1CD0, 0x1CD2, 0x1CD2, 0x1CD5, 0x1CD6, 0x1CD8, 0x1CD8, 0x1CE1, 0x1CE1, 0x1CEA, 0x1CEA, 0x1CED, 0x1CED, 0x1CF2, 0x1CF2, 0x1CF5, 0x1CF7, 0xA8F1, 0xA8F1, }, normalizationFixes = handle_normalization_fixes{ from = {"অা", "ঋৃ", "ঌৢ"}, to = {"আ", "ৠ", "ৡ"} }, } m["as-Beng"] = process_ranges{ "असमिया", 191272, m["Beng"][3], other_names = {"Eastern Nagari"}, ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0980, 0x0983, 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, 0x09AA, 0x09AF, 0x09B2, 0x09B2, 0x09B6, 0x09B9, 0x09BC, 0x09C4, 0x09C7, 0x09C8, 0x09CB, 0x09CE, 0x09D7, 0x09D7, 0x09DC, 0x09DD, 0x09DF, 0x09E3, 0x09E6, 0x09FE, 0x1CD0, 0x1CD0, 0x1CD2, 0x1CD2, 0x1CD5, 0x1CD6, 0x1CD8, 0x1CD8, 0x1CE1, 0x1CE1, 0x1CEA, 0x1CEA, 0x1CED, 0x1CED, 0x1CF2, 0x1CF2, 0x1CF5, 0x1CF7, 0xA8F1, 0xA8F1, }, normalizationFixes = m["Beng"].normalizationFixes, } m["Bhks"] = process_ranges{ "Bhaiksuki", 17017839, "abugida", ranges = { 0x11C00, 0x11C08, 0x11C0A, 0x11C36, 0x11C38, 0x11C45, 0x11C50, 0x11C6C, }, } m["Blis"] = { "Blissymbolic", 609817, "logography", aliases = {"Blissymbols"}, -- Not in Unicode } m["Bopo"] = process_ranges{ "Zhuyin", 198269, "semisyllabary", aliases = {"Zhuyin Fuhao", "Bopomofo"}, ranges = { 0x02EA, 0x02EB, 0x3001, 0x3003, 0x3008, 0x3011, 0x3013, 0x301F, 0x302A, 0x302D, 0x3030, 0x3030, 0x3037, 0x3037, 0x30FB, 0x30FB, 0x3105, 0x312F, 0x31A0, 0x31BF, 0xFE45, 0xFE46, 0xFF61, 0xFF65, }, } m["Brah"] = process_ranges{ "Brahmi", 185083, "abugida", ranges = { 0x11000, 0x1104D, 0x11052, 0x11075, 0x1107F, 0x1107F, }, normalizationFixes = handle_normalization_fixes{ from = {"𑀅𑀸", "𑀋𑀾", "𑀏𑁂"}, to = {"𑀆", "𑀌", "𑀐"} }, translit = "Brah-translit", } m["Brai"] = process_ranges{ "Braille", 79894, "alphabet", ranges = { 0x2800, 0x28FF, }, } m["Bugi"] = process_ranges{ "Lontara", 1074947, "abugida", aliases = {"Buginese"}, ranges = { 0x1A00, 0x1A1B, 0x1A1E, 0x1A1F, 0xA9CF, 0xA9CF, }, } m["Buhd"] = process_ranges{ "Buhid", 1002969, "abugida", ranges = { 0x1735, 0x1736, 0x1740, 0x1751, 0x1752, 0x1753, }, } m["Cakm"] = process_ranges{ "Chakma", 1059328, "abugida", ranges = { 0x09E6, 0x09EF, 0x1040, 0x1049, 0x11100, 0x11134, 0x11136, 0x11147, }, } m["Cans"] = process_ranges{ "Canadian syllabic", 2479183, "abugida", ranges = { 0x1400, 0x167F, 0x18B0, 0x18F5, 0x11AB0, 0x11ABF, }, } m["Cari"] = process_ranges{ "Carian", 1094567, "alphabet", ranges = { 0x102A0, 0x102D0, }, } m["Cham"] = process_ranges{ "Cham", 1060381, "abugida", ranges = { 0xAA00, 0xAA36, 0xAA40, 0xAA4D, 0xAA50, 0xAA59, 0xAA5C, 0xAA5F, }, } m["Cher"] = process_ranges{ "Cherokee", 26549, "syllabary", ranges = { 0x13A0, 0x13F5, 0x13F8, 0x13FD, 0xAB70, 0xABBF, }, } m["Chis"] = { "Chisoi", 123173777, "abugida", -- Not in Unicode } m["Chrs"] = process_ranges{ "Khwarezmian", 72386710, "abjad", aliases = {"Chorasmian"}, ranges = { 0x10FB0, 0x10FCB, }, direction = "rtl", } m["Copt"] = process_ranges{ "Coptic", 321083, "alphabet", ranges = { 0x03E2, 0x03EF, 0x2C80, 0x2CF3, 0x2CF9, 0x2CFF, 0x102E0, 0x102FB, }, capitalized = true, } m["Cpmn"] = process_ranges{ "Cypro-Minoan", 1751985, "syllabary", aliases = {"Cypro Minoan"}, ranges = { 0x10100, 0x10101, 0x12F90, 0x12FF2, }, } m["Cprt"] = process_ranges{ "Cypriot", 1757689, "syllabary", ranges = { 0x10100, 0x10102, 0x10107, 0x10133, 0x10137, 0x1013F, 0x10800, 0x10805, 0x10808, 0x10808, 0x1080A, 0x10835, 0x10837, 0x10838, 0x1083C, 0x1083C, 0x1083F, 0x1083F, }, direction = "rtl", } m["Cyrl"] = process_ranges{ "Cyrillic", 8209, "alphabet", ranges = { 0x0400, 0x052F, 0x1C80, 0x1C8A, 0x1D2B, 0x1D2B, 0x1D78, 0x1D78, 0x1DF8, 0x1DF8, 0x2DE0, 0x2DFF, 0x2E43, 0x2E43, 0xA640, 0xA69F, 0xFE2E, 0xFE2F, 0x1E030, 0x1E06D, 0x1E08F, 0x1E08F, }, capitalized = true, } m["Cyrs"] = { "Old Cyrillic", 442244, m["Cyrl"][3], aliases = {"Early Cyrillic"}, ranges = m["Cyrl"].ranges, characters = m["Cyrl"].characters, capitalized = m["Cyrl"].capitalized, wikipedia_article = "Early Cyrillic alphabet", normalizationFixes = handle_normalization_fixes{ from = {"Ѹ", "ѹ"}, to = {"Ꙋ", "ꙋ"} }, strip_diacritics = {remove_diacritics = cs.Cyrs_remove_diacritics}, sort_key = { remove_diacritics = cs.Cyrs_remove_diacritics, from = { "ї", "оу", -- 2 chars "[ґꙣєѕꙃꙅꙁіꙇђꙉѻꙩꙫꙭꙮꚙꚛꙋѡѿꙍѽꙑѣꙗѥꙕѧꙙѩꙝꙛѫѭѯѱѳѵҁ]" }, to = { "и" .. p[1], "у", { ["ґ"] = "г" .. p[1], ["ꙣ"] = "д" .. p[1], ["є"] = "е", ["ѕ"] = "ж" .. p[1], ["ꙃ"] = "ж" .. p[1], ["ꙅ"] = "ж" .. p[1], ["ꙁ"] = "з", ["і"] = "и" .. p[1], ["ꙇ"] = "и" .. p[1], ["ђ"] = "и" .. p[2], ["ꙉ"] = "и" .. p[2], ["ѻ"] = "о", ["ꙩ"] = "о", ["ꙫ"] = "о", ["ꙭ"] = "о", ["ꙮ"] = "о", ["ꚙ"] = "о", ["ꚛ"] = "о", ["ꙋ"] = "у", ["ѡ"] = "х" .. p[1], ["ѿ"] = "х" .. p[1], ["ꙍ"] = "х" .. p[1], ["ѽ"] = "х" .. p[1], ["ꙑ"] = "ы", ["ѣ"] = "ь" .. p[1], ["ꙗ"] = "ь" .. p[2], ["ѥ"] = "ь" .. p[3], ["ꙕ"] = "ю", ["ѧ"] = "я", ["ꙙ"] = "я", ["ѩ"] = "я" .. p[1], ["ꙝ"] = "я" .. p[1], ["ꙛ"] = "я" .. p[2], ["ѫ"] = "я" .. p[3], ["ѭ"] = "я" .. p[4], ["ѯ"] = "я" .. p[5], ["ѱ"] = "я" .. p[6], ["ѳ"] = "я" .. p[7], ["ѵ"] = "я" .. p[8], ["ҁ"] = "я" .. p[9], } }, } } m["Deva"] = process_ranges{ { ahr = "Balbodh", -- Ahirani kfq = "Balbodh", -- Korku kok = "Balbodh", -- Konkani mr = "Balbodh", -- Marathi omr = "Balbodh", -- Old Marathi vah = "Balbodh", -- Varhadi default = "Devanagari", }, 38592, -- FIXME: 16948817 for Balbodh "abugida", ranges = { 0x0900, 0x097F, 0x1CD0, 0x1CF6, 0x1CF8, 0x1CF9, 0x20F0, 0x20F0, 0xA830, 0xA839, 0xA8E0, 0xA8FF, 0x11B00, 0x11B09, }, normalizationFixes = handle_normalization_fixes{ from = {"ॆॆ", "ेे", "ाॅ", "ाॆ", "ाꣿ", "ॊॆ", "ाे", "ाै", "ोे", "ाऺ", "ॖॖ", "अॅ", "अॆ", "अा", "एॅ", "एॆ", "एे", "एꣿ", "ऎॆ", "अॉ", "आॅ", "अॊ", "आॆ", "अो", "आे", "अौ", "आै", "ओे", "अऺ", "अऻ", "आऺ", "अाꣿ", "आꣿ", "ऒॆ", "अॖ", "अॗ", "ॶॖ", "्‍?ा"}, to = {"ꣿ", "ै", "ॉ", "ॊ", "ॏ", "ॏ", "ो", "ौ", "ौ", "ऻ", "ॗ", "ॲ", "ऄ", "आ", "ऍ", "ऎ", "ऐ", "ꣾ", "ꣾ", "ऑ", "ऑ", "ऒ", "ऒ", "ओ", "ओ", "औ", "औ", "औ", "ॳ", "ॴ", "ॴ", "ॵ", "ॵ", "ॵ", "ॶ", "ॷ", "ॷ"} }, } m["Diak"] = process_ranges{ "Dhives Akuru", 3307073, "abugida", aliases = {"Dhivehi Akuru", "Dives Akuru", "Divehi Akuru"}, ranges = { 0x11900, 0x11906, 0x11909, 0x11909, 0x1190C, 0x11913, 0x11915, 0x11916, 0x11918, 0x11935, 0x11937, 0x11938, 0x1193B, 0x11946, 0x11950, 0x11959, }, } m["Dogr"] = process_ranges{ "Dogra", 72402987, "abugida", ranges = { 0x0964, 0x096F, 0xA830, 0xA839, 0x11800, 0x1183B, }, } m["Dsrt"] = process_ranges{ "Deseret", 1200582, "alphabet", ranges = { 0x10400, 0x1044F, }, capitalized = true, } m["Dupl"] = process_ranges{ "Duployan", 5316025, "alphabet", ranges = { 0x1BC00, 0x1BC6A, 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, 0x1BC90, 0x1BC99, 0x1BC9C, 0x1BCA3, }, } m["Egyd"] = { "Demotic", 188519, "abjad, logography", -- Not in Unicode } m["Egyh"] = { "Hieratic", 208111, "abjad, logography", -- Unified with Egyptian hieroglyphic in Unicode } m["Egyp"] = process_ranges{ "Egyptian hieroglyphic", 132659, "abjad, logography", ranges = { 0x13000, 0x13455, 0x13460, 0x143FA, }, varieties = {"Hieratic"}, wikipedia_article = "Egyptian hieroglyphs", normalizationFixes = handle_normalization_fixes{ from = {"𓃁", "𓆖"}, to = {"𓃀𓐶𓂝", "𓆓𓐳𓐷𓏏𓐰𓇿𓐸"} }, } m["Elba"] = process_ranges{ "Elbasan", 1036714, "alphabet", ranges = { 0x10500, 0x10527, }, } m["Elym"] = process_ranges{ "Elymaic", 60744423, "abjad", ranges = { 0x10FE0, 0x10FF6, }, direction = "rtl", } m["Ethi"] = process_ranges{ "Ethiopic", 257634, "abugida", aliases = {"Ge'ez", "Geʽez"}, ranges = { 0x1200, 0x1248, 0x124A, 0x124D, 0x1250, 0x1256, 0x1258, 0x1258, 0x125A, 0x125D, 0x1260, 0x1288, 0x128A, 0x128D, 0x1290, 0x12B0, 0x12B2, 0x12B5, 0x12B8, 0x12BE, 0x12C0, 0x12C0, 0x12C2, 0x12C5, 0x12C8, 0x12D6, 0x12D8, 0x1310, 0x1312, 0x1315, 0x1318, 0x135A, 0x135D, 0x137C, 0x1380, 0x1399, 0x2D80, 0x2D96, 0x2DA0, 0x2DA6, 0x2DA8, 0x2DAE, 0x2DB0, 0x2DB6, 0x2DB8, 0x2DBE, 0x2DC0, 0x2DC6, 0x2DC8, 0x2DCE, 0x2DD0, 0x2DD6, 0x2DD8, 0x2DDE, 0xAB01, 0xAB06, 0xAB09, 0xAB0E, 0xAB11, 0xAB16, 0xAB20, 0xAB26, 0xAB28, 0xAB2E, 0x1E7E0, 0x1E7E6, 0x1E7E8, 0x1E7EB, 0x1E7ED, 0x1E7EE, 0x1E7F0, 0x1E7FE, }, sort_key = "Ethi-sortkey", strip_diacritics = {remove_diacritics = u(0x135D) .. u(0x135E) .. u(0x135F)} } m["Gara"] = process_ranges{ "Garay", 3095302, "alphabet", capitalized = true, direction = "rtl", ranges = { 0x060C, 0x060C, 0x061B, 0x061B, 0x061F, 0x061F, 0x10D40, 0x10D65, 0x10D69, 0x10D85, 0x10D8E, 0x10D8F, }, } m["Geok"] = process_ranges{ "Khutsuri", 1090055, "alphabet", ranges = { -- Ⴀ-Ⴭ is Asomtavruli, ⴀ-ⴭ is Nuskhuri 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10FB, 0x10FB, 0x2D00, 0x2D25, 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, }, varieties = {"Nuskhuri", "Asomtavruli"}, capitalized = true, translit = "Geok-translit", } m["Geor"] = process_ranges{ "Georgian", 3317411, "alphabet", ranges = { -- ა-ჿ is lowercase Mkhedruli; Ა-Ჿ is uppercase Mkhedruli (Mtavruli) 0x0589, 0x0589, 0x10D0, 0x10FF, 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, }, varieties = {"Mkhedruli", "Mtavruli"}, capitalized = true, translit = "Geor-translit", } m["Glag"] = process_ranges{ "Glagolitic", 145625, "alphabet", ranges = { 0x0484, 0x0484, 0x0487, 0x0487, 0x0589, 0x0589, 0x10FB, 0x10FB, 0x2C00, 0x2C5F, 0x2E43, 0x2E43, 0xA66F, 0xA66F, 0x1E000, 0x1E006, 0x1E008, 0x1E018, 0x1E01B, 0x1E021, 0x1E023, 0x1E024, 0x1E026, 0x1E02A, }, capitalized = true, } m["Gong"] = process_ranges{ "Gunjala Gondi", 18125340, "abugida", ranges = { 0x0964, 0x0965, 0x11D60, 0x11D65, 0x11D67, 0x11D68, 0x11D6A, 0x11D8E, 0x11D90, 0x11D91, 0x11D93, 0x11D98, 0x11DA0, 0x11DA9, }, } m["Gonm"] = process_ranges{ "Masaram Gondi", 16977603, "abugida", ranges = { 0x0964, 0x0965, 0x11D00, 0x11D06, 0x11D08, 0x11D09, 0x11D0B, 0x11D36, 0x11D3A, 0x11D3A, 0x11D3C, 0x11D3D, 0x11D3F, 0x11D47, 0x11D50, 0x11D59, }, } m["Goth"] = process_ranges{ "Gothic", 467784, "alphabet", ranges = { 0x10330, 0x1034A, }, wikipedia_article = "Gothic alphabet", } m["Gran"] = process_ranges{ "Grantha", 1119274, "abugida", ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0BE6, 0x0BF3, 0x1CD0, 0x1CD0, 0x1CD2, 0x1CD3, 0x1CF2, 0x1CF4, 0x1CF8, 0x1CF9, 0x20F0, 0x20F0, 0x11300, 0x11303, 0x11305, 0x1130C, 0x1130F, 0x11310, 0x11313, 0x11328, 0x1132A, 0x11330, 0x11332, 0x11333, 0x11335, 0x11339, 0x1133B, 0x11344, 0x11347, 0x11348, 0x1134B, 0x1134D, 0x11350, 0x11350, 0x11357, 0x11357, 0x1135D, 0x11363, 0x11366, 0x1136C, 0x11370, 0x11374, 0x11FD0, 0x11FD1, 0x11FD3, 0x11FD3, }, } m["Grek"] = process_ranges{ "Greek", 8216, "alphabet", ranges = { 0x0341, 0x0341, 0x0374, 0x0375, 0x037E, 0x037E, 0x0384, 0x038A, 0x038C, 0x038C, 0x038E, 0x03A1, 0x03A3, 0x03D7, 0x03DA, 0x03DB, 0x03DE, 0x03E1, 0x03F0, 0x03F1, 0x03F4, 0x03F4, 0x03FC, 0x03FC, 0x1D26, 0x1D2A, 0x1D5D, 0x1D61, 0x1D66, 0x1D6A, 0x1DBF, 0x1DBF, 0x2126, 0x2127, 0x2129, 0x2129, 0x213C, 0x2140, 0xAB65, 0xAB65, 0x10140, 0x1018E, 0x101A0, 0x101A0, 0x1D200, 0x1D245, }, capitalized = true, display_text = "Grek-common", strip_diacritics = "Grek-common", sort_key = { remove_diacritics = "'ʼ;·`¨´῀" .. c.grave .. c.acute .. c.diaer .. c.caron .. c.turnedcommaabove .. c.commaabove .. c.revcommaabove .. c.macron .. c.breve .. c.diaerbelow .. c.brevebelow .. c.perispomeni .. c.ypogegrammeni .. c.RSQuo .. c.prime .. c.keraia .. c.lowerkeraia .. c.tonos .. c.coronis .. c.psili .. c.dasia, from = {"ϝ", "ͷ", "ϛ", "ͱ", "ͺ", "ϳ", "ϻ", "[ϟϙ]", "[ςϲ]", "ͳ"}, to = {"ε" .. p[1], "ε" .. p[2], "ε" .. p[3], "ζ" .. p[1], "ι", "ι" .. p[1], "π" .. p[1], "π" .. p[2], "σ", "ϡ"}, }, } m["Polyt"] = process_ranges{ "Greek", 1475332, m["Grek"][3], ranges = union(m["Grek"].ranges, { 0x0340, 0x0340, 0x0342, 0x0345, 0x0370, 0x0373, 0x0376, 0x0377, 0x037A, 0x037D, 0x037F, 0x037F, 0x03D8, 0x03D9, 0x03DC, 0x03DD, 0x03F2, 0x03F3, 0x03F5, 0x03FB, 0x03FD, 0x03FF, 0x1F00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, 0x1F48, 0x1F4D, 0x1F50, 0x1F57, 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FC4, 0x1FC6, 0x1FD3, 0x1FD6, 0x1FDB, 0x1FDD, 0x1FEF, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFE, }), ietf_subtag = "Grek", capitalized = m["Grek"].capitalized, parent = "Grek", display_text = m["Grek"].display_text, strip_diacritics = "Polyt-stripdiacritics", sort_key = m["Grek"].sort_key, translit = "grc-translit", } m["Gujr"] = process_ranges{ "Gujarati", 733944, "abugida", ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0A81, 0x0A83, 0x0A85, 0x0A8D, 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, 0x0AB5, 0x0AB9, 0x0ABC, 0x0AC5, 0x0AC7, 0x0AC9, 0x0ACB, 0x0ACD, 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE3, 0x0AE6, 0x0AF1, 0x0AF9, 0x0AFF, 0xA830, 0xA839, }, normalizationFixes = handle_normalization_fixes{ from = {"ઓ", "અાૈ", "અા", "અૅ", "અે", "અૈ", "અૉ", "અો", "અૌ", "આૅ", "આૈ", "ૅા"}, to = {"અાૅ", "ઔ", "આ", "ઍ", "એ", "ઐ", "ઑ", "ઓ", "ઔ", "ઓ", "ઔ", "ૉ"} }, } m["Gukh"] = process_ranges{ "Khema", 110064239, "abugida", aliases = {"Gurung Khema", "Khema Phri", "Khema Lipi"}, ranges = { 0x0965, 0x0965, 0x16100, 0x16139, }, } m["Guru"] = process_ranges{ "Gurmukhi", 689894, "abugida", ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0A01, 0x0A03, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10, 0x0A13, 0x0A28, 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36, 0x0A38, 0x0A39, 0x0A3C, 0x0A3C, 0x0A3E, 0x0A42, 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, 0x0A51, 0x0A51, 0x0A59, 0x0A5C, 0x0A5E, 0x0A5E, 0x0A66, 0x0A76, 0xA830, 0xA839, }, normalizationFixes = handle_normalization_fixes{ from = {"ਅਾ", "ਅੈ", "ਅੌ", "ੲਿ", "ੲੀ", "ੲੇ", "ੳੁ", "ੳੂ", "ੳੋ"}, to = {"ਆ", "ਐ", "ਔ", "ਇ", "ਈ", "ਏ", "ਉ", "ਊ", "ਓ"} }, } m["Hang"] = process_ranges{ "Hangul", 8222, "syllabary", aliases = {"Hangeul"}, ranges = { 0x1100, 0x11FF, 0x3001, 0x3003, 0x3008, 0x3011, 0x3013, 0x301F, 0x302E, 0x3030, 0x3037, 0x3037, 0x30FB, 0x30FB, 0x3131, 0x318E, 0x3200, 0x321E, 0x3260, 0x327E, 0xA960, 0xA97C, 0xAC00, 0xD7A3, 0xD7B0, 0xD7C6, 0xD7CB, 0xD7FB, 0xFE45, 0xFE46, 0xFF61, 0xFF65, 0xFFA0, 0xFFBE, 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, 0xFFD2, 0xFFD7, 0xFFDA, 0xFFDC, }, } m["Hani"] = process_ranges{ "Han", 8201, "logography", ranges = { 0x2E80, 0x2E99, 0x2E9B, 0x2EF3, 0x2F00, 0x2FD5, 0x2FF0, 0x2FFF, 0x3001, 0x3003, 0x3005, 0x3011, 0x3013, 0x301F, 0x3021, 0x302D, 0x3030, 0x3030, 0x3037, 0x303F, 0x3190, 0x319F, 0x31C0, 0x31E5, 0x31EF, 0x31EF, 0x3220, 0x3247, 0x3280, 0x32B0, 0x32C0, 0x32CB, 0x30FB, 0x30FB, 0x32FF, 0x32FF, 0x3358, 0x3370, 0x337B, 0x337F, 0x33E0, 0x33FE, 0x3400, 0x4DBF, 0x4E00, 0x9FFF, 0xA700, 0xA707, 0xF900, 0xFA6D, 0xFA70, 0xFAD9, 0xFE45, 0xFE46, 0xFF61, 0xFF65, 0x16FE2, 0x16FE3, 0x16FF0, 0x16FF1, 0x1D360, 0x1D371, 0x1F250, 0x1F251, 0x20000, 0x2A6DF, 0x2A700, 0x2B739, 0x2B740, 0x2B81D, 0x2B820, 0x2CEA1, 0x2CEB0, 0x2EBE0, 0x2EBF0, 0x2EE5D, 0x2F800, 0x2FA1D, 0x30000, 0x3134A, 0x31350, 0x3347F, }, varieties = {"Hanzi", "Kanji", "Hanja", "Chu Nom"}, spaces = false, } m["Hans"] = { "Simplified Han", 185614, m["Hani"][3], ranges = m["Hani"].ranges, characters = m["Hani"].characters, spaces = m["Hani"].spaces, parent = "Hani", } m["Hant"] = { "Traditional Han", 178528, m["Hani"][3], ranges = m["Hani"].ranges, characters = m["Hani"].characters, spaces = m["Hani"].spaces, parent = "Hani", } m["Hano"] = process_ranges{ "Hanunoo", 1584045, "abugida", aliases = {"Hanunó'o", "Hanuno'o"}, ranges = { 0x1720, 0x1736, }, } m["Hatr"] = process_ranges{ "Hatran", 20813038, "abjad", ranges = { 0x108E0, 0x108F2, 0x108F4, 0x108F5, 0x108FB, 0x108FF, }, direction = "rtl", } m["Hebr"] = process_ranges{ "Hebrew", 33513, "abjad", -- more precisely, impure abjad ranges = { 0x0591, 0x05C7, 0x05D0, 0x05EA, 0x05EF, 0x05F4, 0x2135, 0x2138, 0xFB1D, 0xFB36, 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, 0xFB40, 0xFB41, 0xFB43, 0xFB44, 0xFB46, 0xFB4F, }, direction = "rtl", display_text = "Hebr-common", sort_key = "Hebr-common", strip_diacritics = "Hebr-common", } m["Hira"] = process_ranges{ "Hiragana", 48332, "syllabary", ranges = { 0x3001, 0x3003, 0x3008, 0x3011, 0x3013, 0x301F, 0x3030, 0x3035, 0x3037, 0x3037, 0x303C, 0x303D, 0x3041, 0x3096, 0x3099, 0x30A0, 0x30FB, 0x30FC, 0xFE45, 0xFE46, 0xFF61, 0xFF65, 0xFF70, 0xFF70, 0xFF9E, 0xFF9F, 0x1B001, 0x1B11F, 0x1B132, 0x1B132, 0x1B150, 0x1B152, 0x1F200, 0x1F200, }, varieties = {"Hentaigana"}, spaces = false, } m["Hluw"] = process_ranges{ "Anatolian hieroglyphic", 521323, "logography, syllabary", ranges = { 0x14400, 0x14646, }, wikipedia_article = "Anatolian hieroglyphs", } m["Hmng"] = process_ranges{ "Pahawh Hmong", 365954, "semisyllabary", aliases = {"Hmong"}, ranges = { 0x16B00, 0x16B45, 0x16B50, 0x16B59, 0x16B5B, 0x16B61, 0x16B63, 0x16B77, 0x16B7D, 0x16B8F, }, } m["Hmnp"] = process_ranges{ "Nyiakeng Puachue Hmong", 33712499, "alphabet", ranges = { 0x1E100, 0x1E12C, 0x1E130, 0x1E13D, 0x1E140, 0x1E149, 0x1E14E, 0x1E14F, }, } m["Hung"] = process_ranges{ "Old Hungarian", 446224, "alphabet", aliases = {"Hungarian runic"}, ranges = { 0x10C80, 0x10CB2, 0x10CC0, 0x10CF2, 0x10CFA, 0x10CFF, }, capitalized = true, direction = "rtl", } m["Ibrnn"] = { "Northeastern Iberian", 1113155, "semisyllabary", ietf_subtag = "Zzzz", -- Not in Unicode } m["Ibrns"] = { "Southeastern Iberian", 2305351, "semisyllabary", ietf_subtag = "Zzzz", -- Not in Unicode } m["Image"] = { -- To be used to avoid any formatting or link processing "Image-rendered", 478798, -- This should not have any characters listed ietf_subtag = "Zyyy", translit = false, character_category = false, -- none } m["Inds"] = { "Indus", 601388, aliases = {"Harappan", "Indus Valley"}, } m["Ipach"] = { "International Phonetic Alphabet", 21204, aliases = {"IPA"}, ietf_subtag = "Latn", } m["Ital"] = process_ranges{ "Old Italic", 4891256, "alphabet", ranges = { 0x10300, 0x10323, 0x1032D, 0x1032F, }, translit = "Ital-translit", } m["Java"] = process_ranges{ "Javanese", 879704, "abugida", ranges = { 0xA980, 0xA9CD, 0xA9CF, 0xA9D9, 0xA9DE, 0xA9DF, }, } m["Jurc"] = { "Jurchen", 912240, "logography", spaces = false, } m["Kali"] = process_ranges{ "Kayah Li", 4919239, "abugida", ranges = { 0xA900, 0xA92F, }, } m["Kana"] = process_ranges{ "Katakana", 82946, "syllabary", ranges = { 0x3001, 0x3003, 0x3008, 0x3011, 0x3013, 0x301F, 0x3030, 0x3035, 0x3037, 0x3037, 0x303C, 0x303D, 0x3099, 0x309C, 0x30A0, 0x30FF, 0x31F0, 0x31FF, 0x32D0, 0x32FE, 0x3300, 0x3357, 0xFE45, 0xFE46, 0xFF61, 0xFF9F, 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, 0x1B000, 0x1B000, 0x1B120, 0x1B122, 0x1B155, 0x1B155, 0x1B164, 0x1B167, }, spaces = false, } m["Kawi"] = process_ranges{ "Kawi", 975802, "abugida", ranges = { 0x11F00, 0x11F10, 0x11F12, 0x11F3A, 0x11F3E, 0x11F5A, }, } m["Khar"] = process_ranges{ "Kharoshthi", 1161266, "abugida", ranges = { 0x10A00, 0x10A03, 0x10A05, 0x10A06, 0x10A0C, 0x10A13, 0x10A15, 0x10A17, 0x10A19, 0x10A35, 0x10A38, 0x10A3A, 0x10A3F, 0x10A48, 0x10A50, 0x10A58, }, direction = "rtl", } m["Khmr"] = process_ranges{ "Khmer", 1054190, "abugida", ranges = { 0x1780, 0x17DD, 0x17E0, 0x17E9, 0x17F0, 0x17F9, 0x19E0, 0x19FF, }, spaces = false, normalizationFixes = handle_normalization_fixes{ from = {"ឣ", "ឤ"}, to = {"អ", "អា"} }, } m["Khoj"] = process_ranges{ "Khojki", 1740656, "abugida", ranges = { 0x0AE6, 0x0AEF, 0xA830, 0xA839, 0x11200, 0x11211, 0x11213, 0x11241, }, normalizationFixes = handle_normalization_fixes{ from = {"𑈀𑈬𑈱", "𑈀𑈬", "𑈀𑈱", "𑈀𑈳", "𑈁𑈱", "𑈆𑈬", "𑈬𑈰", "𑈬𑈱", "𑉀𑈮"}, to = {"𑈇", "𑈁", "𑈅", "𑈇", "𑈇", "𑈃", "𑈲", "𑈳", "𑈂"} }, } m["Khomt"] = { "Khom Thai", 13023788, "abugida", -- Not in Unicode } m["Kitl"] = { "Khitan large", 6401797, "logography", spaces = false, } m["Kits"] = process_ranges{ "Khitan small", 6401800, "logography, syllabary", ranges = { 0x16FE4, 0x16FE4, 0x18B00, 0x18CD5, 0x18CFF, 0x18CFF, }, spaces = false, } m["Knda"] = process_ranges{ "Kannada", 839666, "abugida", ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0C80, 0x0C8C, 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, 0x0CBC, 0x0CC4, 0x0CC6, 0x0CC8, 0x0CCA, 0x0CCD, 0x0CD5, 0x0CD6, 0x0CDD, 0x0CDE, 0x0CE0, 0x0CE3, 0x0CE6, 0x0CEF, 0x0CF1, 0x0CF3, 0x1CD0, 0x1CD0, 0x1CD2, 0x1CD3, 0x1CDA, 0x1CDA, 0x1CF2, 0x1CF2, 0x1CF4, 0x1CF4, 0xA830, 0xA835, }, normalizationFixes = handle_normalization_fixes{ from = {"ಉಾ", "ಋಾ", "ಒೌ"}, to = {"ಊ", "ೠ", "ಔ"} }, translit = "kn-translit", } m["Kpel"] = { "Kpelle", 1586299, "syllabary", -- Not in Unicode } m["Krai"] = process_ranges{ "Kirat Rai", 123173834, "abugida", aliases = {"Rai", "Khambu Rai", "Rai Barṇamālā", "Kirat Khambu Rai"}, ranges = { 0x16D40, 0x16D79, }, } m["Kthi"] = process_ranges{ "Kaithi", 1253814, "abugida", ranges = { 0x0966, 0x096F, 0xA830, 0xA839, 0x11080, 0x110C2, 0x110CD, 0x110CD, }, } m["Kulit"] = { "Kulitan", 6443044, "abugida", -- Not in Unicode } m["Lana"] = process_ranges{ "Tai Tham", 1314503, "abugida", aliases = {"Tham", "Tua Mueang", "Lanna"}, ranges = { 0x1A20, 0x1A5E, 0x1A60, 0x1A7C, 0x1A7F, 0x1A89, 0x1A90, 0x1A99, 0x1AA0, 0x1AAD, }, spaces = false, } m["Laoo"] = process_ranges{ "Lao", 1815229, "abugida", ranges = { 0x0E81, 0x0E82, 0x0E84, 0x0E84, 0x0E86, 0x0E8A, 0x0E8C, 0x0EA3, 0x0EA5, 0x0EA5, 0x0EA7, 0x0EBD, 0x0EC0, 0x0EC4, 0x0EC6, 0x0EC6, 0x0EC8, 0x0ECE, 0x0ED0, 0x0ED9, 0x0EDC, 0x0EDF, }, spaces = false, } m["Latn"] = process_ranges{ "Latin", 8229, "alphabet", aliases = {"Roman"}, ranges = { 0x0041, 0x005A, 0x0061, 0x007A, 0x00AA, 0x00AA, 0x00BA, 0x00BA, 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x02B8, 0x02C0, 0x02C1, 0x02E0, 0x02E4, 0x0363, 0x036F, 0x0485, 0x0486, 0x0951, 0x0952, 0x10FB, 0x10FB, 0x1D00, 0x1D25, 0x1D2C, 0x1D5C, 0x1D62, 0x1D65, 0x1D6B, 0x1D77, 0x1D79, 0x1DBE, 0x1DF8, 0x1DF8, 0x1E00, 0x1EFF, 0x202F, 0x202F, 0x2071, 0x2071, 0x207F, 0x207F, 0x2090, 0x209C, 0x20F0, 0x20F0, 0x2100, 0x2125, 0x2128, 0x2128, 0x212A, 0x2134, 0x2139, 0x213B, 0x2141, 0x214E, 0x2160, 0x2188, 0x2C60, 0x2C7F, 0xA700, 0xA707, 0xA722, 0xA787, 0xA78B, 0xA7CD, 0xA7D0, 0xA7D1, 0xA7D3, 0xA7D3, 0xA7D5, 0xA7DC, 0xA7F2, 0xA7FF, 0xA92E, 0xA92E, 0xAB30, 0xAB5A, 0xAB5C, 0xAB64, 0xAB66, 0xAB69, 0xFB00, 0xFB06, 0xFF21, 0xFF3A, 0xFF41, 0xFF5A, 0x10780, 0x10785, 0x10787, 0x107B0, 0x107B2, 0x107BA, 0x1DF00, 0x1DF1E, 0x1DF25, 0x1DF2A, }, varieties = {"Rumi", "Romaji", "Rōmaji", "Romaja"}, capitalized = true, translit = false, } m["Latf"] = { "Fraktur", 148443, m["Latn"][3], ranges = m["Latn"].ranges, characters = m["Latn"].characters, other_names = {"Blackletter"}, -- Blackletter is actually the parent "script" capitalized = m["Latn"].capitalized, translit = m["Latn"].translit, parent = "Latn", } m["Latg"] = { "Gaelic", 1432616, m["Latn"][3], ranges = m["Latn"].ranges, characters = m["Latn"].characters, other_names = {"Irish"}, capitalized = m["Latn"].capitalized, translit = m["Latn"].translit, parent = "Latn", } m["pjt-Latn"] = { "Latin", nil, m["Latn"][3], ranges = m["Latn"].ranges, characters = m["Latn"].characters, capitalized = m["Latn"].capitalized, translit = m["Latn"].translit, parent = "Latn", } m["Leke"] = { "Leke", 19572613, "abugida", -- Not in Unicode } m["Lepc"] = process_ranges{ "Lepcha", 1481626, "abugida", aliases = {"Róng"}, ranges = { 0x1C00, 0x1C37, 0x1C3B, 0x1C49, 0x1C4D, 0x1C4F, }, } m["Limb"] = process_ranges{ "Limbu", 933796, "abugida", ranges = { 0x0965, 0x0965, 0x1900, 0x191E, 0x1920, 0x192B, 0x1930, 0x193B, 0x1940, 0x1940, 0x1944, 0x194F, }, } m["Lina"] = process_ranges{ "Linear A", 30972, ranges = { 0x10107, 0x10133, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, }, } m["Linb"] = process_ranges{ "Linear B", 190102, ranges = { 0x10000, 0x1000B, 0x1000D, 0x10026, 0x10028, 0x1003A, 0x1003C, 0x1003D, 0x1003F, 0x1004D, 0x10050, 0x1005D, 0x10080, 0x100FA, 0x10100, 0x10102, 0x10107, 0x10133, 0x10137, 0x1013F, }, } m["Lisu"] = process_ranges{ "Fraser", 1194621, "alphabet", aliases = {"Old Lisu", "Lisu"}, ranges = { 0x300A, 0x300B, 0xA4D0, 0xA4FF, 0x11FB0, 0x11FB0, }, normalizationFixes = handle_normalization_fixes{ from = {"['’]", "[.ꓸ][.ꓸ]", "[.ꓸ][,ꓹ]"}, to = {"ʼ", "ꓺ", "ꓻ"} }, translit = "Lisu-translit", sort_key = { from = {"𑾰"}, to = {"ꓬ" .. p[1]} }, } m["Loma"] = { "Loma", 13023816, "syllabary", -- Not in Unicode } m["Lyci"] = process_ranges{ "Lycian", 913587, "alphabet", ranges = { 0x10280, 0x1029C, }, } m["Lydi"] = process_ranges{ "Lydian", 4261300, "alphabet", ranges = { 0x10920, 0x10939, 0x1093F, 0x1093F, }, direction = "rtl", } m["Mahj"] = process_ranges{ "Mahajani", 6732850, "abugida", ranges = { 0x0964, 0x096F, 0xA830, 0xA839, 0x11150, 0x11176, }, } m["Maka"] = process_ranges{ "Makasar", 72947229, "abugida", aliases = {"Old Makasar"}, ranges = { 0x11EE0, 0x11EF8, }, } m["Mand"] = process_ranges{ "Mandaic", 1812130, aliases = {"Mandaean"}, ranges = { 0x0640, 0x0640, 0x0840, 0x085B, 0x085E, 0x085E, }, direction = "rtl", } m["Mani"] = process_ranges{ "Manichaean", 3544702, "abjad", ranges = { 0x0640, 0x0640, 0x10AC0, 0x10AE6, 0x10AEB, 0x10AF6, }, direction = "rtl", translit = "Mani-translit", } m["Marc"] = process_ranges{ "Marchen", 72403709, "abugida", ranges = { 0x11C70, 0x11C8F, 0x11C92, 0x11CA7, 0x11CA9, 0x11CB6, }, } m["Maya"] = process_ranges{ "Maya", 211248, aliases = {"Maya hieroglyphic", "Mayan", "Mayan hieroglyphic"}, ranges = { 0x1D2E0, 0x1D2F3, }, } m["Medf"] = process_ranges{ "Medefaidrin", 1519764, aliases = {"Oberi Okaime", "Oberi Ɔkaimɛ"}, ranges = { 0x16E40, 0x16E9A, }, capitalized = true, } m["Mend"] = process_ranges{ "Mende", 951069, aliases = {"Mende Kikakui"}, ranges = { 0x1E800, 0x1E8C4, 0x1E8C7, 0x1E8D6, }, direction = "rtl", } m["Merc"] = process_ranges{ "Meroitic cursive", 73028124, "abugida", ranges = { 0x109A0, 0x109B7, 0x109BC, 0x109CF, 0x109D2, 0x109FF, }, direction = "rtl", } m["Mero"] = process_ranges{ "Meroitic hieroglyphic", 73028623, "abugida", ranges = { 0x10980, 0x1099F, }, direction = "rtl", wikipedia_article = "Meroitic hieroglyphs", } m["Mlym"] = process_ranges{ "Malayalam", 1164129, "abugida", ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0D00, 0x0D0C, 0x0D0E, 0x0D10, 0x0D12, 0x0D44, 0x0D46, 0x0D48, 0x0D4A, 0x0D4F, 0x0D54, 0x0D63, 0x0D66, 0x0D7F, 0x1CDA, 0x1CDA, 0x1CF2, 0x1CF2, 0xA830, 0xA832, }, normalizationFixes = handle_normalization_fixes{ from = {"ഇൗ", "ഉൗ", "എെ", "ഒാ", "ഒൗ", "ക്‍", "ണ്‍", "ന്‍റ", "ന്‍", "മ്‍", "യ്‍", "ര്‍", "ല്‍", "ള്‍", "ഴ്‍", "െെ", "ൻ്റ"}, to = {"ഈ", "ഊ", "ഐ", "ഓ", "ഔ", "ൿ", "ൺ", "ൻറ", "ൻ", "ൔ", "ൕ", "ർ", "ൽ", "ൾ", "ൖ", "ൈ", "ന്റ"} }, translit = "ml-translit", } m["Modi"] = process_ranges{ "Modi", 1703713, "abugida", ranges = { 0xA830, 0xA839, 0x11600, 0x11644, 0x11650, 0x11659, }, normalizationFixes = handle_normalization_fixes{ from = {"𑘀𑘹", "𑘀𑘺", "𑘁𑘹", "𑘁𑘺"}, to = {"𑘊", "𑘋", "𑘌", "𑘍"} }, } do local Mong_displaytext = { from = {"([ᠨ-ᡂᡸ])ᠶ([ᠨ-ᡂᡸ])", "([ᠠ-ᡂᡸ])ᠸ([^᠋ᠠ-ᠧ])", "([ᠠ-ᡂᡸ])ᠸ$"}, to = {"%1ᠢ%2", "%1ᠧ%2", "%1ᠧ"} } m["Mong"] = process_ranges{ "Mongolian", 1055705, "alphabet", aliases = {"Mongol bichig", "Hudum Mongol bichig"}, ranges = { 0x1800, 0x1805, 0x180A, 0x1819, 0x1820, 0x1842, 0x1878, 0x1878, 0x1880, 0x1897, 0x18A6, 0x18A6, 0x18A9, 0x18A9, 0x200C, 0x200D, 0x202F, 0x202F, 0x3001, 0x3002, 0x3008, 0x300B, 0x11660, 0x11668, }, direction = "vertical-ltr", display_text = Mong_displaytext, strip_diacritics = Mong_displaytext, translit = "Mong-translit", } m["mnc-Mong"] = process_ranges{ "Manchu", 122888, m["Mong"][3], ranges = { 0x1801, 0x1801, 0x1804, 0x1804, 0x1808, 0x180F, 0x1820, 0x1820, 0x1823, 0x1823, 0x1828, 0x182A, 0x182E, 0x1830, 0x1834, 0x1838, 0x183A, 0x183A, 0x185D, 0x185D, 0x185F, 0x1861, 0x1864, 0x1869, 0x186C, 0x1871, 0x1873, 0x1877, 0x1880, 0x1888, 0x188F, 0x188F, 0x189A, 0x18A5, 0x18A8, 0x18A8, 0x18AA, 0x18AA, 0x200C, 0x200D, 0x202F, 0x202F, }, direction = "vertical-ltr", parent = "Mong", translit = "mnc-translit", } m["sjo-Mong"] = process_ranges{ "Xibe", 113624153, m["Mong"][3], aliases = {"Sibe"}, ranges = { 0x1804, 0x1804, 0x1807, 0x1807, 0x180A, 0x180F, 0x1820, 0x1820, 0x1823, 0x1823, 0x1828, 0x1828, 0x182A, 0x182A, 0x182E, 0x1830, 0x1834, 0x1838, 0x183A, 0x183A, 0x185D, 0x1872, 0x200C, 0x200D, 0x202F, 0x202F, }, direction = "vertical-ltr", parent = "mnc-Mong", } m["xwo-Mong"] = process_ranges{ "Clear Script", 529085, m["Mong"][3], aliases = {"Todo", "Todo bichig"}, ranges = { 0x1800, 0x1801, 0x1804, 0x1806, 0x180A, 0x1820, 0x1828, 0x1828, 0x182F, 0x1831, 0x1834, 0x1834, 0x1837, 0x1838, 0x183A, 0x183B, 0x1840, 0x1840, 0x1843, 0x185C, 0x1880, 0x1887, 0x1889, 0x188F, 0x1894, 0x1894, 0x1896, 0x1899, 0x18A7, 0x18A7, 0x200C, 0x200D, 0x202F, 0x202F, 0x11669, 0x1166C, }, direction = "vertical-ltr", parent = "Mong", translit = "xwo-translit", } end m["Moon"] = { "Moon", 918391, "alphabet", aliases = {"Moon System of Embossed Reading", "Moon type", "Moon writing", "Moon alphabet", "Moon code"}, -- Not in Unicode } m["Morse"] = { "Morse code", 79897, ietf_subtag = "Zsym", } m["Mroo"] = process_ranges{ "Mru", 75919253, aliases = {"Mro", "Mrung"}, ranges = { 0x16A40, 0x16A5E, 0x16A60, 0x16A69, 0x16A6E, 0x16A6F, }, } m["Mtei"] = process_ranges{ "Meitei Mayek", 2981413, "abugida", aliases = {"Meetei Mayek", "Manipuri"}, ranges = { 0xAAE0, 0xAAF6, 0xABC0, 0xABED, 0xABF0, 0xABF9, }, } m["Mult"] = process_ranges{ "Multani", 17047906, "abugida", ranges = { 0x0A66, 0x0A6F, 0x11280, 0x11286, 0x11288, 0x11288, 0x1128A, 0x1128D, 0x1128F, 0x1129D, 0x1129F, 0x112A9, }, } m["Music"] = process_ranges{ "musical notation", 233861, "pictography", ranges = { 0x2669, 0x266F, 0x1D100, 0x1D126, 0x1D129, 0x1D1EA, }, ietf_subtag = "Zsym", translit = false, } m["Mymr"] = process_ranges{ "Burmese", 43887939, "abugida", aliases = {"Myanmar"}, ranges = { 0x1000, 0x109F, 0xA92E, 0xA92E, 0xA9E0, 0xA9FE, 0xAA60, 0xAA7F, 0x116D0, 0x116E3, }, spaces = false, } m["Nagm"] = process_ranges{ "Mundari Bani", 106917274, "alphabet", aliases = {"Nag Mundari"}, ranges = { 0x1E4D0, 0x1E4F9, }, } m["Nand"] = process_ranges{ "Nandinagari", 6963324, "abugida", ranges = { 0x0964, 0x0965, 0x0CE6, 0x0CEF, 0x1CE9, 0x1CE9, 0x1CF2, 0x1CF2, 0x1CFA, 0x1CFA, 0xA830, 0xA835, 0x119A0, 0x119A7, 0x119AA, 0x119D7, 0x119DA, 0x119E4, }, } m["Narb"] = process_ranges{ "Ancient North Arabian", 1472213, "abjad", aliases = {"Old North Arabian"}, ranges = { 0x10A80, 0x10A9F, }, direction = "rtl", translit = "Narb-translit", } m["Nbat"] = process_ranges{ "Nabataean", 855624, "abjad", aliases = {"Nabatean"}, ranges = { 0x10880, 0x1089E, 0x108A7, 0x108AF, }, direction = "rtl", } m["Newa"] = process_ranges{ "Newa", 7237292, "abugida", aliases = {"Newar", "Newari", "Prachalit Nepal"}, ranges = { 0x11400, 0x1145B, 0x1145D, 0x11461, }, } m["Nkdb"] = { "Dongba", 1190953, "pictography", aliases = {"Naxi Dongba", "Nakhi Dongba", "Tomba", "Tompa", "Mo-so"}, spaces = false, -- Not in Unicode } m["Nkgb"] = { "Geba", 731189, "syllabary", aliases = {"Nakhi Geba", "Naxi Geba"}, spaces = false, -- Not in Unicode } m["Nkoo"] = process_ranges{ "N'Ko", 1062587, "alphabet", ranges = { 0x060C, 0x060C, 0x061B, 0x061B, 0x061F, 0x061F, 0x07C0, 0x07FA, 0x07FD, 0x07FF, 0xFD3E, 0xFD3F, }, direction = "rtl", } m["None"] = { "unspecified", nil, -- This should not have any characters listed ietf_subtag = "Zyyy", translit = false, character_category = false, -- none } m["Nshu"] = process_ranges{ "Nüshu", 56436, "syllabary", aliases = {"Nushu"}, ranges = { 0x16FE1, 0x16FE1, 0x1B170, 0x1B2FB, }, spaces = false, } m["Ogam"] = process_ranges{ "Ogham", 184661, ranges = { 0x1680, 0x169C, }, } m["Olck"] = process_ranges{ "Ol Chiki", 201688, aliases = {"Ol Chemetʼ", "Ol", "Santali"}, ranges = { 0x1C50, 0x1C7F, }, } m["Onao"] = process_ranges{ "Ol Onal", 108607084, "alphabet", ranges = { 0x0964, 0x0965, 0x1E5D0, 0x1E5FA, 0x1E5FF, 0x1E5FF, }, } m["Orkh"] = process_ranges{ "Old Turkic", 5058305, aliases = {"Orkhon runic"}, ranges = { 0x10C00, 0x10C48, }, direction = "rtl", translit = "Orkh-translit", } m["Orya"] = process_ranges{ "Odia", 1760127, "abugida", aliases = {"Oriya"}, ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0B01, 0x0B03, 0x0B05, 0x0B0C, 0x0B0F, 0x0B10, 0x0B13, 0x0B28, 0x0B2A, 0x0B30, 0x0B32, 0x0B33, 0x0B35, 0x0B39, 0x0B3C, 0x0B44, 0x0B47, 0x0B48, 0x0B4B, 0x0B4D, 0x0B55, 0x0B57, 0x0B5C, 0x0B5D, 0x0B5F, 0x0B63, 0x0B66, 0x0B77, 0x1CDA, 0x1CDA, 0x1CF2, 0x1CF2, }, normalizationFixes = handle_normalization_fixes{ from = {"ଅା", "ଏୗ", "ଓୗ"}, to = {"ଆ", "ଐ", "ଔ"} }, } m["Osge"] = process_ranges{ "Osage", 7105529, ranges = { 0x104B0, 0x104D3, 0x104D8, 0x104FB, }, capitalized = true, translit = "Osge-translit", } m["Osma"] = process_ranges{ "Osmanya", 1377866, ranges = { 0x10480, 0x1049D, 0x104A0, 0x104A9, }, } m["Ougr"] = process_ranges{ "Old Uyghur", 1998938, "abjad, alphabet", ranges = { 0x0640, 0x0640, 0x10AF2, 0x10AF2, 0x10F70, 0x10F89, }, -- This should ideally be "vertical-ltr", but getting the CSS right is tricky because it's right-to-left horizontally, but left-to-right vertically. Currently, displaying it vertically causes it to display bottom-to-top. direction = "rtl", } m["Palm"] = process_ranges{ "Palmyrene", 17538100, ranges = { 0x10860, 0x1087F, }, direction = "rtl", } m["Pauc"] = process_ranges{ "Pau Cin Hau", 25339852, ranges = { 0x11AC0, 0x11AF8, }, } m["Pcun"] = { "Proto-Cuneiform", 1650699, "pictography", -- Not in Unicode } m["Pelm"] = { "Proto-Elamite", 56305763, "pictography", -- Not in Unicode } m["Perm"] = process_ranges{ "Old Permic", 147899, ranges = { 0x0483, 0x0483, 0x10350, 0x1037A, }, } m["Phag"] = process_ranges{ "Phags-pa", 822836, "abugida", ranges = { 0x1802, 0x1803, 0x1805, 0x1805, 0x200C, 0x200D, 0x202F, 0x202F, 0x3002, 0x3002, 0xA840, 0xA877, }, direction = "vertical-ltr", } m["Phli"] = process_ranges{ "Inscriptional Pahlavi", 24089793, "abjad", ranges = { 0x10B60, 0x10B72, 0x10B78, 0x10B7F, }, direction = "rtl", } m["Phlp"] = process_ranges{ "Psalter Pahlavi", 7253954, "abjad", ranges = { 0x0640, 0x0640, 0x10B80, 0x10B91, 0x10B99, 0x10B9C, 0x10BA9, 0x10BAF, }, direction = "rtl", } m["Phlv"] = { "Book Pahlavi", 72403118, "abjad", direction = "rtl", wikipedia_article = "Pahlavi scripts#Book Pahlavi", -- Not in Unicode } m["Phnx"] = process_ranges{ "Phoenician", 26752, "abjad", ranges = { 0x10900, 0x1091B, 0x1091F, 0x1091F, }, direction = "rtl", translit = "Phnx-translit", } m["Plrd"] = process_ranges{ "Pollard", 601734, "abugida", aliases = {"Miao"}, ranges = { 0x16F00, 0x16F4A, 0x16F4F, 0x16F87, 0x16F8F, 0x16F9F, }, } m["Prti"] = process_ranges{ "Inscriptional Parthian", 13023804, ranges = { 0x10B40, 0x10B55, 0x10B58, 0x10B5F, }, direction = "rtl", } m["Psin"] = { "Proto-Sinaitic", 1065250, "abjad", direction = "rtl", -- Not in Unicode } m["Ranj"] = { "Ranjana", 2385276, "abugida", -- Not in Unicode } m["Rjng"] = process_ranges{ "Rejang", 2007960, "abugida", ranges = { 0xA930, 0xA953, 0xA95F, 0xA95F, }, } m["Rohg"] = process_ranges{ "Hanifi Rohingya", 21028705, "alphabet", ranges = { 0x060C, 0x060C, 0x061B, 0x061B, 0x061F, 0x061F, 0x0640, 0x0640, 0x06D4, 0x06D4, 0x10D00, 0x10D27, 0x10D30, 0x10D39, }, direction = "rtl", } m["Roro"] = { "Rongorongo", 209764, -- Not in Unicode } m["Rumin"] = process_ranges{ "Rumi numerals", nil, ranges = { 0x10E60, 0x10E7E, }, ietf_subtag = "Arab", } m["Runr"] = process_ranges{ "Runic", 82996, "alphabet", ranges = { 0x16A0, 0x16EA, 0x16EE, 0x16F8, }, } do local Samr_stripdiacritics = { remove_diacritics = c.CGJ .. u(0x0816) .. "-" .. u(0x082D), } m["Samr"] = process_ranges{ "Samaritan", 1550930, "abjad", ranges = { 0x0800, 0x082D, 0x0830, 0x083E, }, direction = "rtl", strip_diacritics = Samr_stripdiacritics, sort_key = Samr_stripdiacritics, } end m["Sarb"] = process_ranges{ "Ancient South Arabian", 446074, "abjad", aliases = {"Old South Arabian"}, ranges = { 0x10A60, 0x10A7F, }, direction = "rtl", translit = "Sarb-translit", } m["Saur"] = process_ranges{ "Saurashtra", 3535165, "abugida", ranges = { 0xA880, 0xA8C5, 0xA8CE, 0xA8D9, }, } m["Semap"] = { "flag semaphore", 250796, "pictography", ietf_subtag = "Zsym", } m["Sgnw"] = process_ranges{ "SignWriting", 1497335, "pictography", aliases = {"Sutton SignWriting"}, ranges = { 0x1D800, 0x1DA8B, 0x1DA9B, 0x1DA9F, 0x1DAA1, 0x1DAAF, }, translit = false, } m["Shaw"] = process_ranges{ "Shavian", 1970098, aliases = {"Shaw"}, ranges = { 0x10450, 0x1047F, }, } m["Shrd"] = process_ranges{ "Sharada", 2047117, "abugida", ranges = { 0x0951, 0x0951, 0x1CD7, 0x1CD7, 0x1CD9, 0x1CD9, 0x1CDC, 0x1CDD, 0x1CE0, 0x1CE0, 0xA830, 0xA835, 0xA838, 0xA838, 0x11180, 0x111DF, }, translit = "Shrd-translit", } m["Shui"] = { "Sui", 752854, "logography", spaces = false, -- Not in Unicode } m["Sidd"] = process_ranges{ "Siddham", 250379, "abugida", ranges = { 0x11580, 0x115B5, 0x115B8, 0x115DD, }, translit = "Sidd-translit", } m["Sidt"] = { "Sidetic", 36659, "alphabet", direction = "rtl", -- Not in Unicode } m["Sind"] = process_ranges{ "Khudabadi", 6402810, "abugida", aliases = {"Khudawadi"}, ranges = { 0x0964, 0x0965, 0xA830, 0xA839, 0x112B0, 0x112EA, 0x112F0, 0x112F9, }, normalizationFixes = handle_normalization_fixes{ from = {"𑊰𑋠", "𑊰𑋥", "𑊰𑋦", "𑊰𑋧", "𑊰𑋨"}, to = {"𑊱", "𑊶", "𑊷", "𑊸", "𑊹"} }, } m["Sinh"] = process_ranges{ "Sinhalese", 1574992, "abugida", aliases = {"Sinhala"}, ranges = { 0x0964, 0x0965, 0x0D81, 0x0D83, 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, 0x0DB3, 0x0DBB, 0x0DBD, 0x0DBD, 0x0DC0, 0x0DC6, 0x0DCA, 0x0DCA, 0x0DCF, 0x0DD4, 0x0DD6, 0x0DD6, 0x0DD8, 0x0DDF, 0x0DE6, 0x0DEF, 0x0DF2, 0x0DF4, 0x1CF2, 0x1CF2, 0x111E1, 0x111F4, }, normalizationFixes = handle_normalization_fixes{ from = {"අා", "අැ", "අෑ", "උෟ", "ඍෘ", "ඏෟ", "එ්", "එෙ", "ඔෟ", "ෘෘ"}, to = {"ආ", "ඇ", "ඈ", "ඌ", "ඎ", "ඐ", "ඒ", "ඓ", "ඖ", "ෲ"} }, } m["Sogd"] = process_ranges{ "Sogdian", 578359, "abjad", ranges = { 0x0640, 0x0640, 0x10F30, 0x10F59, }, direction = "rtl", } m["Sogo"] = process_ranges{ "Old Sogdian", 72403254, "abjad", ranges = { 0x10F00, 0x10F27, }, direction = "rtl", } m["Sora"] = process_ranges{ "Sorang Sompeng", 7563292, aliases = {"Sora Sompeng"}, ranges = { 0x110D0, 0x110E8, 0x110F0, 0x110F9, }, } m["Soyo"] = process_ranges{ "Soyombo", 8009382, "abugida", ranges = { 0x11A50, 0x11AA2, }, } m["Sund"] = process_ranges{ "Sundanese", 51589, "abugida", ranges = { 0x1B80, 0x1BBF, 0x1CC0, 0x1CC7, }, } m["Sunu"] = process_ranges{ "Sunuwar", 109984965, "alphabet", ranges = { 0x11BC0, 0x11BE1, 0x11BF0, 0x11BF9, }, } m["Sylo"] = process_ranges{ "Sylheti Nagri", 144128, "abugida", aliases = {"Sylheti Nāgarī", "Syloti Nagri"}, ranges = { 0x0964, 0x0965, 0x09E6, 0x09EF, 0xA800, 0xA82C, }, } m["Syrc"] = process_ranges{ "Syriac", 26567, "abjad", -- more precisely, impure abjad ranges = { 0x060C, 0x060C, 0x061B, 0x061C, 0x061F, 0x061F, 0x0640, 0x0640, 0x064B, 0x0655, 0x0670, 0x0670, 0x0700, 0x070D, 0x070F, 0x074A, 0x074D, 0x074F, 0x0860, 0x086A, 0x1DF8, 0x1DF8, 0x1DFA, 0x1DFA, }, direction = "rtl", } -- Syre, Syrj, Syrn are apparently subsumed into Syrc; discuss if this causes issues m["Tagb"] = process_ranges{ "Tagbanwa", 977444, "abugida", ranges = { 0x1735, 0x1736, 0x1760, 0x176C, 0x176E, 0x1770, 0x1772, 0x1773, }, } m["Takr"] = process_ranges{ "Takri", 759202, "abugida", ranges = { 0x0964, 0x0965, 0xA830, 0xA839, 0x11680, 0x116B9, 0x116C0, 0x116C9, }, normalizationFixes = handle_normalization_fixes{ from = {"𑚀𑚭", "𑚀𑚴", "𑚀𑚵", "𑚆𑚲"}, to = {"𑚁", "𑚈", "𑚉", "𑚇"} }, } m["Tale"] = process_ranges{ "Tai Nüa", 2566326, "abugida", aliases = {"Tai Nuea", "New Tai Nüa", "New Tai Nuea", "Dehong Dai", "Tai Dehong", "Tai Le"}, ranges = { 0x1040, 0x1049, 0x1950, 0x196D, 0x1970, 0x1974, }, spaces = false, } m["Talu"] = process_ranges{ "New Tai Lue", 3498863, "abugida", ranges = { 0x1980, 0x19AB, 0x19B0, 0x19C9, 0x19D0, 0x19DA, 0x19DE, 0x19DF, }, spaces = false, } m["Taml"] = process_ranges{ "Tamil", 26803, "abugida", ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0B82, 0x0B83, 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, 0x0B92, 0x0B95, 0x0B99, 0x0B9A, 0x0B9C, 0x0B9C, 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, 0x0BAE, 0x0BB9, 0x0BBE, 0x0BC2, 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCD, 0x0BD0, 0x0BD0, 0x0BD7, 0x0BD7, 0x0BE6, 0x0BFA, 0x1CDA, 0x1CDA, 0xA8F3, 0xA8F3, 0x11301, 0x11301, 0x11303, 0x11303, 0x1133B, 0x1133C, 0x11FC0, 0x11FF1, 0x11FFF, 0x11FFF, }, normalizationFixes = handle_normalization_fixes{ from = {"அூ", "ஸ்ரீ"}, to = {"ஆ", "ஶ்ரீ"} }, } m["Tang"] = process_ranges{ "Tangut", 1373610, "logography, syllabary", ranges = { 0x31EF, 0x31EF, 0x16FE0, 0x16FE0, 0x17000, 0x187F7, 0x18800, 0x18AFF, 0x18D00, 0x18D08, }, spaces = false, translit = "txg-translit", } m["Tavt"] = process_ranges{ "Tai Viet", 11818517, "abugida", ranges = { 0xAA80, 0xAAC2, 0xAADB, 0xAADF, }, spaces = false, } m["Tayo"] = process_ranges{ "Lai Tay", 16306701, "abugida", aliases = {"Tai Yo"}, direction = "vertical-rtl", ranges = { 0x1E6C0, 0x1E6DE, 0x1E6E0, 0x1E6F5, 0x1E6FE, 0x1E6FF, }, spaces = false, } m["Telu"] = process_ranges{ "Telugu", 570450, "abugida", ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0C00, 0x0C0C, 0x0C0E, 0x0C10, 0x0C12, 0x0C28, 0x0C2A, 0x0C39, 0x0C3C, 0x0C44, 0x0C46, 0x0C48, 0x0C4A, 0x0C4D, 0x0C55, 0x0C56, 0x0C58, 0x0C5A, 0x0C5D, 0x0C5D, 0x0C60, 0x0C63, 0x0C66, 0x0C6F, 0x0C77, 0x0C7F, 0x1CDA, 0x1CDA, 0x1CF2, 0x1CF2, }, normalizationFixes = handle_normalization_fixes{ from = {"ఒౌ", "ఒౕ", "ిౕ", "ెౕ", "ొౕ"}, to = {"ఔ", "ఓ", "ీ", "ే", "ో"} }, } m["Teng"] = { "Tengwar", 473725, } m["Tfng"] = process_ranges{ "Tifinagh", 208503, "abjad, alphabet", ranges = { 0x2D30, 0x2D67, 0x2D6F, 0x2D70, 0x2D7F, 0x2D7F, }, other_names = {"Libyco-Berber", "Berber"}, -- per Wikipedia, Libyco-Berber is the parent } m["Tglg"] = process_ranges{ "Baybayin", 812124, "abugida", aliases = {"Tagalog"}, varieties = {"Badlit", "Basahan", "Kur-itan"}, ranges = { 0x1700, 0x1715, 0x171F, 0x171F, 0x1735, 0x1736, }, } m["Thaa"] = process_ranges{ "Thaana", 877906, "abugida", ranges = { 0x060C, 0x060C, 0x061B, 0x061C, 0x061F, 0x061F, 0x0660, 0x0669, 0x0780, 0x07B1, 0xFDF2, 0xFDF2, 0xFDFD, 0xFDFD, }, direction = "rtl", } m["Thai"] = process_ranges{ "Thai", 236376, "abugida", ranges = { 0x0E01, 0x0E3A, 0x0E40, 0x0E5B, }, spaces = false, } do local Tibt_displaytext = { from = {"ༀ", "༌", "།།", "༚༚", "༚༝", "༝༚", "༝༝", "ཷ", "ཹ", "ེེ", "ོོ"}, to = {"ཨོཾ", "་", "༎", "༛", "༟", "࿎", "༞", "ྲཱྀ", "ླཱྀ", "ཻ", "ཽ"} } m["Tibt"] = process_ranges{ "Tibetan", 46861, "abugida", ranges = { 0x0F00, 0x0F47, 0x0F49, 0x0F6C, 0x0F71, 0x0F97, 0x0F99, 0x0FBC, 0x0FBE, 0x0FCC, 0x0FCE, 0x0FD4, 0x0FD9, 0x0FDA, 0x3008, 0x300B, }, normalizationFixes = handle_normalization_fixes{ combiningClasses = {["༹"] = 1}, from = {"ཷ", "ཹ"}, to = {"ྲཱྀ", "ླཱྀ"} }, display_text = Tibt_displaytext, strip_diacritics = Tibt_displaytext, sort_key = "Tibt-sortkey", translit = "Tibt-translit", } m["sit-tam-Tibt"] = { "Tamyig", 109875213, m["Tibt"][3], -- There is no inheritance of properties currently implemented for scripts. Per [[User:Theknightwho]], this -- is because it's tricky to do since there are several types of child scripts: those that are mere display -- variants (like fa-Arab), which should be eliminated in favor of CSS language selectors to -- handle the font differences; those that are genuinely different scripts that happen to share the same -- Unicode codepoints but have mostly different properties (e.g. Manchu vs. Mongolian); and those that are -- somewhere in between (like Tamyig vs. Tibetan). As a result, we currently have to manually specify -- which properties we want inherited as follows. ranges = m["Tibt"].ranges, characters = m["Tibt"].characters, parent = "Tibt", normalizationFixes = m["Tibt"].normalizationFixes, display_text = m["Tibt"].display_text, strip_diacritics = m["Tibt"].strip_diacritics, sort_key = m["Tibt"].sort_key, translit = m["Tibt"].translit, } end m["Tirh"] = process_ranges{ "Tirhuta", 1765752, "abugida", ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x1CF2, 0x1CF2, 0xA830, 0xA839, 0x11480, 0x114C7, 0x114D0, 0x114D9, }, normalizationFixes = handle_normalization_fixes{ from = {"𑒁𑒰", "𑒋𑒺", "𑒍𑒺", "𑒪𑒵", "𑒪𑒶"}, to = {"𑒂", "𑒌", "𑒎", "𑒉", "𑒊"} }, } m["Tnsa"] = process_ranges{ "Tangsa", 105576311, "alphabet", ranges = { 0x16A70, 0x16ABE, 0x16AC0, 0x16AC9, }, } m["Todr"] = process_ranges{ "Todhri", 10274731, "alphabet", direction = "rtl", ranges = { 0x105C0, 0x105F3, }, } m["Tols"] = { "Tolong Siki", 4459822, "alphabet", -- Not in Unicode } m["Toto"] = process_ranges{ "Toto", 104837516, "abugida", ranges = { 0x1E290, 0x1E2AE, }, } m["Tutg"] = process_ranges{ "Tigalari", 2604990, "abugida", aliases = {"Tulu"}, ranges = { 0x1CF2, 0x1CF2, 0x1CF4, 0x1CF4, 0xA8F1, 0xA8F1, 0x11380, 0x11389, 0x1138B, 0x1138B, 0x1138E, 0x1138E, 0x11390, 0x113B5, 0x113B7, 0x113C0, 0x113C2, 0x113C2, 0x113C5, 0x113C5, 0x113C7, 0x113CA, 0x113CC, 0x113D5, 0x113D7, 0x113D8, 0x113E1, 0x113E2, }, } m["Ugar"] = process_ranges{ "Ugaritic", 332652, "abjad", ranges = { 0x10380, 0x1039D, 0x1039F, 0x1039F, }, } m["Vaii"] = process_ranges{ "Vai", 523078, "syllabary", ranges = { 0xA500, 0xA62B, }, } m["Visp"] = { "Visible Speech", 1303365, "alphabet", -- Not in Unicode } m["Vith"] = process_ranges{ "Vithkuqi", 3301993, "alphabet", ranges = { 0x10570, 0x1057A, 0x1057C, 0x1058A, 0x1058C, 0x10592, 0x10594, 0x10595, 0x10597, 0x105A1, 0x105A3, 0x105B1, 0x105B3, 0x105B9, 0x105BB, 0x105BC, }, capitalized = true, } m["Wara"] = process_ranges{ "Varang Kshiti", 79199, aliases = {"Warang Citi"}, ranges = { 0x118A0, 0x118F2, 0x118FF, 0x118FF, }, capitalized = true, } m["Wcho"] = process_ranges{ "Wancho", 33713728, "alphabet", ranges = { 0x1E2C0, 0x1E2F9, 0x1E2FF, 0x1E2FF, }, } m["Wole"] = { "Woleai", 6643710, "syllabary", -- Not in Unicode } m["Xpeo"] = process_ranges{ "Old Persian", 1471822, ranges = { 0x103A0, 0x103C3, 0x103C8, 0x103D5, }, } m["Xsux"] = process_ranges{ "Cuneiform", 401, aliases = {"Sumero-Akkadian Cuneiform"}, ranges = { 0x12000, 0x12399, 0x12400, 0x1246E, 0x12470, 0x12474, 0x12480, 0x12543, }, } m["Yezi"] = process_ranges{ "Yezidi", 13175481, "alphabet", ranges = { 0x060C, 0x060C, 0x061B, 0x061B, 0x061F, 0x061F, 0x0660, 0x0669, 0x10E80, 0x10EA9, 0x10EAB, 0x10EAD, 0x10EB0, 0x10EB1, }, direction = "rtl", } m["Yiii"] = process_ranges{ "Yi", 1197646, "syllabary", ranges = { 0x3001, 0x3002, 0x3008, 0x3011, 0x3014, 0x301B, 0x30FB, 0x30FB, 0xA000, 0xA48C, 0xA490, 0xA4C6, 0xFF61, 0xFF65, }, } m["Zanb"] = process_ranges{ "Zanabazar Square", 50809208, "abugida", ranges = { 0x11A00, 0x11A47, }, } m["Zmth"] = process_ranges{ "mathematical notation", 1140046, ranges = { 0x00AC, 0x00AC, 0x00B1, 0x00B1, 0x00D7, 0x00D7, 0x00F7, 0x00F7, 0x03D0, 0x03D2, 0x03D5, 0x03D5, 0x03F0, 0x03F1, 0x03F4, 0x03F6, 0x0606, 0x0608, 0x2016, 0x2016, 0x2032, 0x2034, 0x2040, 0x2040, 0x2044, 0x2044, 0x2052, 0x2052, 0x205F, 0x205F, 0x2061, 0x2064, 0x207A, 0x207E, 0x208A, 0x208E, 0x20D0, 0x20DC, 0x20E1, 0x20E1, 0x20E5, 0x20E6, 0x20EB, 0x20EF, 0x2102, 0x2102, 0x2107, 0x2107, 0x210A, 0x2113, 0x2115, 0x2115, 0x2118, 0x211D, 0x2124, 0x2124, 0x2128, 0x2129, 0x212C, 0x212D, 0x212F, 0x2131, 0x2133, 0x2138, 0x213C, 0x2149, 0x214B, 0x214B, 0x2190, 0x21A7, 0x21A9, 0x21AE, 0x21B0, 0x21B1, 0x21B6, 0x21B7, 0x21BC, 0x21DB, 0x21DD, 0x21DD, 0x21E4, 0x21E5, 0x21F4, 0x22FF, 0x2308, 0x230B, 0x2320, 0x2321, 0x237C, 0x237C, 0x239B, 0x23B5, 0x23B7, 0x23B7, 0x23D0, 0x23D0, 0x23DC, 0x23E2, 0x25A0, 0x25A1, 0x25AE, 0x25B7, 0x25BC, 0x25C1, 0x25C6, 0x25C7, 0x25CA, 0x25CB, 0x25CF, 0x25D3, 0x25E2, 0x25E2, 0x25E4, 0x25E4, 0x25E7, 0x25EC, 0x25F8, 0x25FF, 0x2605, 0x2606, 0x2640, 0x2640, 0x2642, 0x2642, 0x2660, 0x2663, 0x266D, 0x266F, 0x27C0, 0x27FF, 0x2900, 0x2AFF, 0x2B30, 0x2B44, 0x2B47, 0x2B4C, 0xFB29, 0xFB29, 0xFE61, 0xFE66, 0xFE68, 0xFE68, 0xFF0B, 0xFF0B, 0xFF1C, 0xFF1E, 0xFF3C, 0xFF3C, 0xFF3E, 0xFF3E, 0xFF5C, 0xFF5C, 0xFF5E, 0xFF5E, 0xFFE2, 0xFFE2, 0xFFE9, 0xFFEC, 0x1D400, 0x1D454, 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, 0x1D546, 0x1D546, 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, 0x1D6A8, 0x1D7CB, 0x1D7CE, 0x1D7FF, 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, 0x1EEF0, 0x1EEF1, }, translit = false, } m["Zname"] = process_ranges{ "Znamenny musical notation", 965834, "pictography", ranges = { 0x1CF00, 0x1CF2D, 0x1CF30, 0x1CF46, 0x1CF50, 0x1CFC3, }, ietf_subtag = "Zsym", translit = false, } m["Zsym"] = process_ranges{ "symbolic", 80071, "pictography", ranges = { 0x20DD, 0x20E0, 0x20E2, 0x20E4, 0x20E7, 0x20EA, 0x20F0, 0x20F0, 0x2100, 0x2101, 0x2103, 0x2106, 0x2108, 0x2109, 0x2114, 0x2114, 0x2116, 0x2117, 0x211E, 0x2123, 0x2125, 0x2127, 0x212A, 0x212B, 0x212E, 0x212E, 0x2132, 0x2132, 0x2139, 0x213B, 0x214A, 0x214A, 0x214C, 0x214F, 0x21A8, 0x21A8, 0x21AF, 0x21AF, 0x21B2, 0x21B5, 0x21B8, 0x21BB, 0x21DC, 0x21DC, 0x21DE, 0x21E3, 0x21E6, 0x21F3, 0x2300, 0x2307, 0x230C, 0x231F, 0x2322, 0x237B, 0x237D, 0x239A, 0x23B6, 0x23B6, 0x23B8, 0x23CF, 0x23D1, 0x23DB, 0x23E3, 0x23FF, 0x2500, 0x259F, 0x25A2, 0x25AD, 0x25B8, 0x25BB, 0x25C2, 0x25C5, 0x25C8, 0x25C9, 0x25CC, 0x25CE, 0x25D4, 0x25E1, 0x25E3, 0x25E3, 0x25E5, 0x25E6, 0x25ED, 0x25F7, 0x2600, 0x2604, 0x2607, 0x263F, 0x2641, 0x2641, 0x2643, 0x265F, 0x2664, 0x266C, 0x2670, 0x27BF, 0x2B00, 0x2B2F, 0x2B45, 0x2B46, 0x2B4D, 0x2B73, 0x2B76, 0x2B95, 0x2B97, 0x2BFF, 0x4DC0, 0x4DFF, 0x1F000, 0x1F02B, 0x1F030, 0x1F093, 0x1F0A0, 0x1F0AE, 0x1F0B1, 0x1F0BF, 0x1F0C1, 0x1F0CF, 0x1F0D1, 0x1F0F5, 0x1F300, 0x1F6D7, 0x1F6DC, 0x1F6EC, 0x1F6F0, 0x1F6FC, 0x1F700, 0x1F776, 0x1F77B, 0x1F7D9, 0x1F7E0, 0x1F7EB, 0x1F7F0, 0x1F7F0, 0x1F800, 0x1F80B, 0x1F810, 0x1F847, 0x1F850, 0x1F859, 0x1F860, 0x1F887, 0x1F890, 0x1F8AD, 0x1F8B0, 0x1F8B1, 0x1F900, 0x1FA53, 0x1FA60, 0x1FA6D, 0x1FA70, 0x1FA7C, 0x1FA80, 0x1FA88, 0x1FA90, 0x1FABD, 0x1FABF, 0x1FAC5, 0x1FACE, 0x1FADB, 0x1FAE0, 0x1FAE8, 0x1FAF0, 0x1FAF8, 0x1FB00, 0x1FB92, 0x1FB94, 0x1FBCA, 0x1FBF0, 0x1FBF9, }, translit = false, character_category = false, -- none } m["Zxxx"] = { "unwritten", 104839715, -- This should not have any characters listed translit = false, character_category = false, -- none } m["Zyyy"] = { "undetermined", 104839687, -- This should not have any characters listed, probably translit = false, character_category = false, -- none } m["Zzzz"] = { "uncoded", 104839675, -- This should not have any characters listed translit = false, character_category = false, -- none } -- These should be defined after the scripts they are composed of. m["Hrkt"] = process_ranges{ "Kana", 187659, "syllabary", aliases = {"Japanese syllabaries"}, ranges = union( m["Hira"].ranges, m["Kana"].ranges ), spaces = false, } m["Jpan"] = process_ranges{ "Japanese", 190502, "logography, syllabary", ranges = union( m["Hrkt"].ranges, m["Hani"].ranges, m["Latn"].ranges ), spaces = false, sort_by_scraping = true, } m["Kore"] = process_ranges{ "Korean", 711797, "logography, syllabary", ranges = union( m["Hang"].ranges, m["Hani"].ranges, m["Latn"].ranges ), -- `漢字(한자)`→`漢字` -- `가-나-다`→`가나다`, `가--나--다`→`가-나-다` -- `온돌(溫突/溫堗)`→`온돌` ([[ondol]]) strip_diacritics = { remove_diacritics = u(0x302E) .. u(0x302F), from = {"([" .. m["Hani"].characters .. "])%(.-%)", "^%-", "%-$", "%-(%-?)", "\1", "%([" .. m["Hani"].characters .. "/]+%)"}, to = {"%1", "\1", "\1", "%1", "-"} } } return require("Module:languages").finalizeData(m, "script") 4m4k9nj3w9rbn5vxmgph4c5cct618kh 487970 487952 2026-09-04T04:59:49Z SM7 6218 देवनागरी 487970 Scribunto text/plain --[=[ When adding new scripts to this file, please don't forget to add style definitons for the script in [[MediaWiki:Gadget-LanguagesAndScripts.css]]. ]=] local concat = table.concat local insert = table.insert local ipairs = ipairs local next = next local remove = table.remove local select = select local sort = table.sort -- Loaded on demand, as it may not be needed (depending on the data). local function u(...) u = require("Module:string/char") return u(...) end -- We can't use mw.loadData() on [[Module:languages/chars]] because [[Module:languages/data]] itself is sometimes loaded -- using mw.loadData(), and calling mw.loadData() on [[Module:languages/chars]] will insert metatables into the -- character tables, which the second mw.loadData() will choke on. local m_chars = require("Module:languages/chars") local c = m_chars.chars local p = m_chars.puaChars local cs = m_chars.chars_substitutions ------------------------------------------------------------------------------------ -- -- Helper functions -- ------------------------------------------------------------------------------------ -- Note: a[2] > b[2] means opens are sorted before closes if otherwise equal. local function sort_ranges(a, b) return a[1] < b[1] or a[1] == b[1] and a[2] > b[2] end -- Returns the union of two or more range tables. local function union(...) local ranges = {} for i = 1, select("#", ...) do local argt = select(i, ...) for j, v in ipairs(argt) do insert(ranges, {v, j % 2 == 1 and 1 or -1}) end end sort(ranges, sort_ranges) local ret, i = {}, 0 for _, range in ipairs(ranges) do i = i + range[2] if i == 0 and range[2] == -1 then -- close insert(ret, range[1]) elseif i == 1 and range[2] == 1 then -- open if ret[#ret] and range[1] <= ret[#ret] + 1 then remove(ret) -- merge adjacent ranges else insert(ret, range[1]) end end end return ret end -- Adds the `characters` key, which is determined by a script's `ranges` table. local function process_ranges(sc) local ranges, chars = sc.ranges, {} for i = 2, #ranges, 2 do if ranges[i] == ranges[i - 1] then insert(chars, u(ranges[i])) else insert(chars, u(ranges[i - 1])) if ranges[i] > ranges[i - 1] + 1 then insert(chars, "-") end insert(chars, u(ranges[i])) end end sc.characters = concat(chars) ranges.n = #ranges return sc end local function handle_normalization_fixes(fixes) local combiningClasses = fixes.combiningClasses if combiningClasses then local chars, i = {}, 0 for char in next, combiningClasses do i = i + 1 chars[i] = char end fixes.combiningClassCharacters = concat(chars) end return fixes end ------------------------------------------------------------------------------------ -- -- Data -- ------------------------------------------------------------------------------------ local m = {} m["Adlm"] = process_ranges{ "Adlam", 19606346, "alphabet", ranges = { 0x061F, 0x061F, 0x0640, 0x0640, 0x1E900, 0x1E94B, 0x1E950, 0x1E959, 0x1E95E, 0x1E95F, }, capitalized = true, direction = "rtl", } m["Afak"] = { "Afaka", 382019, "syllabary", -- Not in Unicode } m["Aghb"] = process_ranges{ "Caucasian Albanian", 2495716, "alphabet", ranges = { 0x10530, 0x10563, 0x1056F, 0x1056F, }, } m["Ahom"] = process_ranges{ "Ahom", 2839633, "abugida", ranges = { 0x11700, 0x1171A, 0x1171D, 0x1172B, 0x11730, 0x11746, }, } m["Arab"] = process_ranges{ "Arabic", 1828555, "abjad", -- more precisely, impure abjad varieties = {"Jawi", "Perso-Arabic", "Sulat Sūg"}, ranges = { 0x0600, 0x06FF, 0x0750, 0x077F, 0x0870, 0x088E, 0x0890, 0x0891, 0x0897, 0x08E1, 0x08E3, 0x08FF, 0xFB50, 0xFBC2, 0xFBD3, 0xFD8F, 0xFD92, 0xFDC7, 0xFDCF, 0xFDCF, 0xFDF0, 0xFDFF, 0xFE70, 0xFE74, 0xFE76, 0xFEFC, 0x102E0, 0x102FB, 0x10E60, 0x10E7E, 0x10EC2, 0x10EC4, 0x10EFC, 0x10EFF, 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, 0x1EEF0, 0x1EEF1, }, direction = "rtl", normalizationFixes = handle_normalization_fixes{ from = {"ٳ"}, to = {"اٟ"} }, } m["Aran"] = { { hnd = "Shahmukhi", -- Southern Hindko hno = "Shahmukhi", -- Northern Hindko ["inc-opa"] = "Shahmukhi", -- Old Punjabi lah = "Shahmukhi", -- Lahnda pa = "Shahmukhi", -- Punjabi phr = "Shahmukhi", -- Pahari-Potwari skr = "Shahmukhi", -- Saraiki default = "Arabic", }, 1133121, -- FIXME: 133800 for Shahmukhi m["Arab"][3], ranges = m["Arab"].ranges, characters = m["Arab"].characters, aliases = {"Nastaliq", "Nastaleeq"}, direction = "rtl", parent = "Arab", normalizationFixes = m["Arab"].normalizationFixes, } m["Armi"] = process_ranges{ "Imperial Aramaic", 26978, "abjad", ranges = { 0x10840, 0x10855, 0x10857, 0x1085F, }, direction = "rtl", } m["Armn"] = process_ranges{ "Armenian", 11932, "alphabet", ranges = { 0x0531, 0x0556, 0x0559, 0x058A, 0x058D, 0x058F, 0xFB13, 0xFB17, }, capitalized = true, translit = "Armn-translit", } m["Avst"] = process_ranges{ "Avestan", 790681, "alphabet", ranges = { 0x10B00, 0x10B35, 0x10B39, 0x10B3F, }, direction = "rtl", } m["pal-Avst"] = { "Pazend", 4925073, m["Avst"][3], ranges = m["Avst"].ranges, characters = m["Avst"].characters, direction = "rtl", parent = "Avst", } m["Bali"] = process_ranges{ "Balinese", 804984, "abugida", ranges = { 0x1B00, 0x1B4C, 0x1B4E, 0x1B7F, }, } m["Bamu"] = process_ranges{ "Bamum", 806024, "syllabary", ranges = { 0xA6A0, 0xA6F7, 0x16800, 0x16A38, }, } m["Bass"] = process_ranges{ "Bassa", 810458, "alphabet", aliases = {"Bassa Vah", "Vah"}, ranges = { 0x16AD0, 0x16AED, 0x16AF0, 0x16AF5, }, } m["Batk"] = process_ranges{ "Batak", 51592, "abugida", ranges = { 0x1BC0, 0x1BF3, 0x1BFC, 0x1BFF, }, } m["Beng"] = process_ranges{ "Bengali", 756802, "abugida", ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0980, 0x0983, 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, 0x09AA, 0x09B0, 0x09B2, 0x09B2, 0x09B6, 0x09B9, 0x09BC, 0x09C4, 0x09C7, 0x09C8, 0x09CB, 0x09CE, 0x09D7, 0x09D7, 0x09DC, 0x09DD, 0x09DF, 0x09E3, 0x09E6, 0x09EF, 0x09F2, 0x09FE, 0x1CD0, 0x1CD0, 0x1CD2, 0x1CD2, 0x1CD5, 0x1CD6, 0x1CD8, 0x1CD8, 0x1CE1, 0x1CE1, 0x1CEA, 0x1CEA, 0x1CED, 0x1CED, 0x1CF2, 0x1CF2, 0x1CF5, 0x1CF7, 0xA8F1, 0xA8F1, }, normalizationFixes = handle_normalization_fixes{ from = {"অা", "ঋৃ", "ঌৢ"}, to = {"আ", "ৠ", "ৡ"} }, } m["as-Beng"] = process_ranges{ "असमिया", 191272, m["Beng"][3], other_names = {"Eastern Nagari"}, ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0980, 0x0983, 0x0985, 0x098C, 0x098F, 0x0990, 0x0993, 0x09A8, 0x09AA, 0x09AF, 0x09B2, 0x09B2, 0x09B6, 0x09B9, 0x09BC, 0x09C4, 0x09C7, 0x09C8, 0x09CB, 0x09CE, 0x09D7, 0x09D7, 0x09DC, 0x09DD, 0x09DF, 0x09E3, 0x09E6, 0x09FE, 0x1CD0, 0x1CD0, 0x1CD2, 0x1CD2, 0x1CD5, 0x1CD6, 0x1CD8, 0x1CD8, 0x1CE1, 0x1CE1, 0x1CEA, 0x1CEA, 0x1CED, 0x1CED, 0x1CF2, 0x1CF2, 0x1CF5, 0x1CF7, 0xA8F1, 0xA8F1, }, normalizationFixes = m["Beng"].normalizationFixes, } m["Bhks"] = process_ranges{ "Bhaiksuki", 17017839, "abugida", ranges = { 0x11C00, 0x11C08, 0x11C0A, 0x11C36, 0x11C38, 0x11C45, 0x11C50, 0x11C6C, }, } m["Blis"] = { "Blissymbolic", 609817, "logography", aliases = {"Blissymbols"}, -- Not in Unicode } m["Bopo"] = process_ranges{ "Zhuyin", 198269, "semisyllabary", aliases = {"Zhuyin Fuhao", "Bopomofo"}, ranges = { 0x02EA, 0x02EB, 0x3001, 0x3003, 0x3008, 0x3011, 0x3013, 0x301F, 0x302A, 0x302D, 0x3030, 0x3030, 0x3037, 0x3037, 0x30FB, 0x30FB, 0x3105, 0x312F, 0x31A0, 0x31BF, 0xFE45, 0xFE46, 0xFF61, 0xFF65, }, } m["Brah"] = process_ranges{ "Brahmi", 185083, "abugida", ranges = { 0x11000, 0x1104D, 0x11052, 0x11075, 0x1107F, 0x1107F, }, normalizationFixes = handle_normalization_fixes{ from = {"𑀅𑀸", "𑀋𑀾", "𑀏𑁂"}, to = {"𑀆", "𑀌", "𑀐"} }, translit = "Brah-translit", } m["Brai"] = process_ranges{ "Braille", 79894, "alphabet", ranges = { 0x2800, 0x28FF, }, } m["Bugi"] = process_ranges{ "Lontara", 1074947, "abugida", aliases = {"Buginese"}, ranges = { 0x1A00, 0x1A1B, 0x1A1E, 0x1A1F, 0xA9CF, 0xA9CF, }, } m["Buhd"] = process_ranges{ "Buhid", 1002969, "abugida", ranges = { 0x1735, 0x1736, 0x1740, 0x1751, 0x1752, 0x1753, }, } m["Cakm"] = process_ranges{ "Chakma", 1059328, "abugida", ranges = { 0x09E6, 0x09EF, 0x1040, 0x1049, 0x11100, 0x11134, 0x11136, 0x11147, }, } m["Cans"] = process_ranges{ "Canadian syllabic", 2479183, "abugida", ranges = { 0x1400, 0x167F, 0x18B0, 0x18F5, 0x11AB0, 0x11ABF, }, } m["Cari"] = process_ranges{ "Carian", 1094567, "alphabet", ranges = { 0x102A0, 0x102D0, }, } m["Cham"] = process_ranges{ "Cham", 1060381, "abugida", ranges = { 0xAA00, 0xAA36, 0xAA40, 0xAA4D, 0xAA50, 0xAA59, 0xAA5C, 0xAA5F, }, } m["Cher"] = process_ranges{ "Cherokee", 26549, "syllabary", ranges = { 0x13A0, 0x13F5, 0x13F8, 0x13FD, 0xAB70, 0xABBF, }, } m["Chis"] = { "Chisoi", 123173777, "abugida", -- Not in Unicode } m["Chrs"] = process_ranges{ "Khwarezmian", 72386710, "abjad", aliases = {"Chorasmian"}, ranges = { 0x10FB0, 0x10FCB, }, direction = "rtl", } m["Copt"] = process_ranges{ "Coptic", 321083, "alphabet", ranges = { 0x03E2, 0x03EF, 0x2C80, 0x2CF3, 0x2CF9, 0x2CFF, 0x102E0, 0x102FB, }, capitalized = true, } m["Cpmn"] = process_ranges{ "Cypro-Minoan", 1751985, "syllabary", aliases = {"Cypro Minoan"}, ranges = { 0x10100, 0x10101, 0x12F90, 0x12FF2, }, } m["Cprt"] = process_ranges{ "Cypriot", 1757689, "syllabary", ranges = { 0x10100, 0x10102, 0x10107, 0x10133, 0x10137, 0x1013F, 0x10800, 0x10805, 0x10808, 0x10808, 0x1080A, 0x10835, 0x10837, 0x10838, 0x1083C, 0x1083C, 0x1083F, 0x1083F, }, direction = "rtl", } m["Cyrl"] = process_ranges{ "Cyrillic", 8209, "alphabet", ranges = { 0x0400, 0x052F, 0x1C80, 0x1C8A, 0x1D2B, 0x1D2B, 0x1D78, 0x1D78, 0x1DF8, 0x1DF8, 0x2DE0, 0x2DFF, 0x2E43, 0x2E43, 0xA640, 0xA69F, 0xFE2E, 0xFE2F, 0x1E030, 0x1E06D, 0x1E08F, 0x1E08F, }, capitalized = true, } m["Cyrs"] = { "Old Cyrillic", 442244, m["Cyrl"][3], aliases = {"Early Cyrillic"}, ranges = m["Cyrl"].ranges, characters = m["Cyrl"].characters, capitalized = m["Cyrl"].capitalized, wikipedia_article = "Early Cyrillic alphabet", normalizationFixes = handle_normalization_fixes{ from = {"Ѹ", "ѹ"}, to = {"Ꙋ", "ꙋ"} }, strip_diacritics = {remove_diacritics = cs.Cyrs_remove_diacritics}, sort_key = { remove_diacritics = cs.Cyrs_remove_diacritics, from = { "ї", "оу", -- 2 chars "[ґꙣєѕꙃꙅꙁіꙇђꙉѻꙩꙫꙭꙮꚙꚛꙋѡѿꙍѽꙑѣꙗѥꙕѧꙙѩꙝꙛѫѭѯѱѳѵҁ]" }, to = { "и" .. p[1], "у", { ["ґ"] = "г" .. p[1], ["ꙣ"] = "д" .. p[1], ["є"] = "е", ["ѕ"] = "ж" .. p[1], ["ꙃ"] = "ж" .. p[1], ["ꙅ"] = "ж" .. p[1], ["ꙁ"] = "з", ["і"] = "и" .. p[1], ["ꙇ"] = "и" .. p[1], ["ђ"] = "и" .. p[2], ["ꙉ"] = "и" .. p[2], ["ѻ"] = "о", ["ꙩ"] = "о", ["ꙫ"] = "о", ["ꙭ"] = "о", ["ꙮ"] = "о", ["ꚙ"] = "о", ["ꚛ"] = "о", ["ꙋ"] = "у", ["ѡ"] = "х" .. p[1], ["ѿ"] = "х" .. p[1], ["ꙍ"] = "х" .. p[1], ["ѽ"] = "х" .. p[1], ["ꙑ"] = "ы", ["ѣ"] = "ь" .. p[1], ["ꙗ"] = "ь" .. p[2], ["ѥ"] = "ь" .. p[3], ["ꙕ"] = "ю", ["ѧ"] = "я", ["ꙙ"] = "я", ["ѩ"] = "я" .. p[1], ["ꙝ"] = "я" .. p[1], ["ꙛ"] = "я" .. p[2], ["ѫ"] = "я" .. p[3], ["ѭ"] = "я" .. p[4], ["ѯ"] = "я" .. p[5], ["ѱ"] = "я" .. p[6], ["ѳ"] = "я" .. p[7], ["ѵ"] = "я" .. p[8], ["ҁ"] = "я" .. p[9], } }, } } m["Deva"] = process_ranges{ { ahr = "Balbodh", -- Ahirani kfq = "Balbodh", -- Korku kok = "Balbodh", -- Konkani mr = "Balbodh", -- Marathi omr = "Balbodh", -- Old Marathi vah = "Balbodh", -- Varhadi default = "देवनागरी", }, 38592, -- FIXME: 16948817 for Balbodh "abugida", ranges = { 0x0900, 0x097F, 0x1CD0, 0x1CF6, 0x1CF8, 0x1CF9, 0x20F0, 0x20F0, 0xA830, 0xA839, 0xA8E0, 0xA8FF, 0x11B00, 0x11B09, }, normalizationFixes = handle_normalization_fixes{ from = {"ॆॆ", "ेे", "ाॅ", "ाॆ", "ाꣿ", "ॊॆ", "ाे", "ाै", "ोे", "ाऺ", "ॖॖ", "अॅ", "अॆ", "अा", "एॅ", "एॆ", "एे", "एꣿ", "ऎॆ", "अॉ", "आॅ", "अॊ", "आॆ", "अो", "आे", "अौ", "आै", "ओे", "अऺ", "अऻ", "आऺ", "अाꣿ", "आꣿ", "ऒॆ", "अॖ", "अॗ", "ॶॖ", "्‍?ा"}, to = {"ꣿ", "ै", "ॉ", "ॊ", "ॏ", "ॏ", "ो", "ौ", "ौ", "ऻ", "ॗ", "ॲ", "ऄ", "आ", "ऍ", "ऎ", "ऐ", "ꣾ", "ꣾ", "ऑ", "ऑ", "ऒ", "ऒ", "ओ", "ओ", "औ", "औ", "औ", "ॳ", "ॴ", "ॴ", "ॵ", "ॵ", "ॵ", "ॶ", "ॷ", "ॷ"} }, } m["Diak"] = process_ranges{ "Dhives Akuru", 3307073, "abugida", aliases = {"Dhivehi Akuru", "Dives Akuru", "Divehi Akuru"}, ranges = { 0x11900, 0x11906, 0x11909, 0x11909, 0x1190C, 0x11913, 0x11915, 0x11916, 0x11918, 0x11935, 0x11937, 0x11938, 0x1193B, 0x11946, 0x11950, 0x11959, }, } m["Dogr"] = process_ranges{ "Dogra", 72402987, "abugida", ranges = { 0x0964, 0x096F, 0xA830, 0xA839, 0x11800, 0x1183B, }, } m["Dsrt"] = process_ranges{ "Deseret", 1200582, "alphabet", ranges = { 0x10400, 0x1044F, }, capitalized = true, } m["Dupl"] = process_ranges{ "Duployan", 5316025, "alphabet", ranges = { 0x1BC00, 0x1BC6A, 0x1BC70, 0x1BC7C, 0x1BC80, 0x1BC88, 0x1BC90, 0x1BC99, 0x1BC9C, 0x1BCA3, }, } m["Egyd"] = { "Demotic", 188519, "abjad, logography", -- Not in Unicode } m["Egyh"] = { "Hieratic", 208111, "abjad, logography", -- Unified with Egyptian hieroglyphic in Unicode } m["Egyp"] = process_ranges{ "Egyptian hieroglyphic", 132659, "abjad, logography", ranges = { 0x13000, 0x13455, 0x13460, 0x143FA, }, varieties = {"Hieratic"}, wikipedia_article = "Egyptian hieroglyphs", normalizationFixes = handle_normalization_fixes{ from = {"𓃁", "𓆖"}, to = {"𓃀𓐶𓂝", "𓆓𓐳𓐷𓏏𓐰𓇿𓐸"} }, } m["Elba"] = process_ranges{ "Elbasan", 1036714, "alphabet", ranges = { 0x10500, 0x10527, }, } m["Elym"] = process_ranges{ "Elymaic", 60744423, "abjad", ranges = { 0x10FE0, 0x10FF6, }, direction = "rtl", } m["Ethi"] = process_ranges{ "Ethiopic", 257634, "abugida", aliases = {"Ge'ez", "Geʽez"}, ranges = { 0x1200, 0x1248, 0x124A, 0x124D, 0x1250, 0x1256, 0x1258, 0x1258, 0x125A, 0x125D, 0x1260, 0x1288, 0x128A, 0x128D, 0x1290, 0x12B0, 0x12B2, 0x12B5, 0x12B8, 0x12BE, 0x12C0, 0x12C0, 0x12C2, 0x12C5, 0x12C8, 0x12D6, 0x12D8, 0x1310, 0x1312, 0x1315, 0x1318, 0x135A, 0x135D, 0x137C, 0x1380, 0x1399, 0x2D80, 0x2D96, 0x2DA0, 0x2DA6, 0x2DA8, 0x2DAE, 0x2DB0, 0x2DB6, 0x2DB8, 0x2DBE, 0x2DC0, 0x2DC6, 0x2DC8, 0x2DCE, 0x2DD0, 0x2DD6, 0x2DD8, 0x2DDE, 0xAB01, 0xAB06, 0xAB09, 0xAB0E, 0xAB11, 0xAB16, 0xAB20, 0xAB26, 0xAB28, 0xAB2E, 0x1E7E0, 0x1E7E6, 0x1E7E8, 0x1E7EB, 0x1E7ED, 0x1E7EE, 0x1E7F0, 0x1E7FE, }, sort_key = "Ethi-sortkey", strip_diacritics = {remove_diacritics = u(0x135D) .. u(0x135E) .. u(0x135F)} } m["Gara"] = process_ranges{ "Garay", 3095302, "alphabet", capitalized = true, direction = "rtl", ranges = { 0x060C, 0x060C, 0x061B, 0x061B, 0x061F, 0x061F, 0x10D40, 0x10D65, 0x10D69, 0x10D85, 0x10D8E, 0x10D8F, }, } m["Geok"] = process_ranges{ "Khutsuri", 1090055, "alphabet", ranges = { -- Ⴀ-Ⴭ is Asomtavruli, ⴀ-ⴭ is Nuskhuri 0x10A0, 0x10C5, 0x10C7, 0x10C7, 0x10CD, 0x10CD, 0x10FB, 0x10FB, 0x2D00, 0x2D25, 0x2D27, 0x2D27, 0x2D2D, 0x2D2D, }, varieties = {"Nuskhuri", "Asomtavruli"}, capitalized = true, translit = "Geok-translit", } m["Geor"] = process_ranges{ "Georgian", 3317411, "alphabet", ranges = { -- ა-ჿ is lowercase Mkhedruli; Ა-Ჿ is uppercase Mkhedruli (Mtavruli) 0x0589, 0x0589, 0x10D0, 0x10FF, 0x1C90, 0x1CBA, 0x1CBD, 0x1CBF, }, varieties = {"Mkhedruli", "Mtavruli"}, capitalized = true, translit = "Geor-translit", } m["Glag"] = process_ranges{ "Glagolitic", 145625, "alphabet", ranges = { 0x0484, 0x0484, 0x0487, 0x0487, 0x0589, 0x0589, 0x10FB, 0x10FB, 0x2C00, 0x2C5F, 0x2E43, 0x2E43, 0xA66F, 0xA66F, 0x1E000, 0x1E006, 0x1E008, 0x1E018, 0x1E01B, 0x1E021, 0x1E023, 0x1E024, 0x1E026, 0x1E02A, }, capitalized = true, } m["Gong"] = process_ranges{ "Gunjala Gondi", 18125340, "abugida", ranges = { 0x0964, 0x0965, 0x11D60, 0x11D65, 0x11D67, 0x11D68, 0x11D6A, 0x11D8E, 0x11D90, 0x11D91, 0x11D93, 0x11D98, 0x11DA0, 0x11DA9, }, } m["Gonm"] = process_ranges{ "Masaram Gondi", 16977603, "abugida", ranges = { 0x0964, 0x0965, 0x11D00, 0x11D06, 0x11D08, 0x11D09, 0x11D0B, 0x11D36, 0x11D3A, 0x11D3A, 0x11D3C, 0x11D3D, 0x11D3F, 0x11D47, 0x11D50, 0x11D59, }, } m["Goth"] = process_ranges{ "Gothic", 467784, "alphabet", ranges = { 0x10330, 0x1034A, }, wikipedia_article = "Gothic alphabet", } m["Gran"] = process_ranges{ "Grantha", 1119274, "abugida", ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0BE6, 0x0BF3, 0x1CD0, 0x1CD0, 0x1CD2, 0x1CD3, 0x1CF2, 0x1CF4, 0x1CF8, 0x1CF9, 0x20F0, 0x20F0, 0x11300, 0x11303, 0x11305, 0x1130C, 0x1130F, 0x11310, 0x11313, 0x11328, 0x1132A, 0x11330, 0x11332, 0x11333, 0x11335, 0x11339, 0x1133B, 0x11344, 0x11347, 0x11348, 0x1134B, 0x1134D, 0x11350, 0x11350, 0x11357, 0x11357, 0x1135D, 0x11363, 0x11366, 0x1136C, 0x11370, 0x11374, 0x11FD0, 0x11FD1, 0x11FD3, 0x11FD3, }, } m["Grek"] = process_ranges{ "Greek", 8216, "alphabet", ranges = { 0x0341, 0x0341, 0x0374, 0x0375, 0x037E, 0x037E, 0x0384, 0x038A, 0x038C, 0x038C, 0x038E, 0x03A1, 0x03A3, 0x03D7, 0x03DA, 0x03DB, 0x03DE, 0x03E1, 0x03F0, 0x03F1, 0x03F4, 0x03F4, 0x03FC, 0x03FC, 0x1D26, 0x1D2A, 0x1D5D, 0x1D61, 0x1D66, 0x1D6A, 0x1DBF, 0x1DBF, 0x2126, 0x2127, 0x2129, 0x2129, 0x213C, 0x2140, 0xAB65, 0xAB65, 0x10140, 0x1018E, 0x101A0, 0x101A0, 0x1D200, 0x1D245, }, capitalized = true, display_text = "Grek-common", strip_diacritics = "Grek-common", sort_key = { remove_diacritics = "'ʼ;·`¨´῀" .. c.grave .. c.acute .. c.diaer .. c.caron .. c.turnedcommaabove .. c.commaabove .. c.revcommaabove .. c.macron .. c.breve .. c.diaerbelow .. c.brevebelow .. c.perispomeni .. c.ypogegrammeni .. c.RSQuo .. c.prime .. c.keraia .. c.lowerkeraia .. c.tonos .. c.coronis .. c.psili .. c.dasia, from = {"ϝ", "ͷ", "ϛ", "ͱ", "ͺ", "ϳ", "ϻ", "[ϟϙ]", "[ςϲ]", "ͳ"}, to = {"ε" .. p[1], "ε" .. p[2], "ε" .. p[3], "ζ" .. p[1], "ι", "ι" .. p[1], "π" .. p[1], "π" .. p[2], "σ", "ϡ"}, }, } m["Polyt"] = process_ranges{ "Greek", 1475332, m["Grek"][3], ranges = union(m["Grek"].ranges, { 0x0340, 0x0340, 0x0342, 0x0345, 0x0370, 0x0373, 0x0376, 0x0377, 0x037A, 0x037D, 0x037F, 0x037F, 0x03D8, 0x03D9, 0x03DC, 0x03DD, 0x03F2, 0x03F3, 0x03F5, 0x03FB, 0x03FD, 0x03FF, 0x1F00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, 0x1F48, 0x1F4D, 0x1F50, 0x1F57, 0x1F59, 0x1F59, 0x1F5B, 0x1F5B, 0x1F5D, 0x1F5D, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FC4, 0x1FC6, 0x1FD3, 0x1FD6, 0x1FDB, 0x1FDD, 0x1FEF, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFE, }), ietf_subtag = "Grek", capitalized = m["Grek"].capitalized, parent = "Grek", display_text = m["Grek"].display_text, strip_diacritics = "Polyt-stripdiacritics", sort_key = m["Grek"].sort_key, translit = "grc-translit", } m["Gujr"] = process_ranges{ "Gujarati", 733944, "abugida", ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0A81, 0x0A83, 0x0A85, 0x0A8D, 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3, 0x0AB5, 0x0AB9, 0x0ABC, 0x0AC5, 0x0AC7, 0x0AC9, 0x0ACB, 0x0ACD, 0x0AD0, 0x0AD0, 0x0AE0, 0x0AE3, 0x0AE6, 0x0AF1, 0x0AF9, 0x0AFF, 0xA830, 0xA839, }, normalizationFixes = handle_normalization_fixes{ from = {"ઓ", "અાૈ", "અા", "અૅ", "અે", "અૈ", "અૉ", "અો", "અૌ", "આૅ", "આૈ", "ૅા"}, to = {"અાૅ", "ઔ", "આ", "ઍ", "એ", "ઐ", "ઑ", "ઓ", "ઔ", "ઓ", "ઔ", "ૉ"} }, } m["Gukh"] = process_ranges{ "Khema", 110064239, "abugida", aliases = {"Gurung Khema", "Khema Phri", "Khema Lipi"}, ranges = { 0x0965, 0x0965, 0x16100, 0x16139, }, } m["Guru"] = process_ranges{ "Gurmukhi", 689894, "abugida", ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0A01, 0x0A03, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10, 0x0A13, 0x0A28, 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36, 0x0A38, 0x0A39, 0x0A3C, 0x0A3C, 0x0A3E, 0x0A42, 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, 0x0A51, 0x0A51, 0x0A59, 0x0A5C, 0x0A5E, 0x0A5E, 0x0A66, 0x0A76, 0xA830, 0xA839, }, normalizationFixes = handle_normalization_fixes{ from = {"ਅਾ", "ਅੈ", "ਅੌ", "ੲਿ", "ੲੀ", "ੲੇ", "ੳੁ", "ੳੂ", "ੳੋ"}, to = {"ਆ", "ਐ", "ਔ", "ਇ", "ਈ", "ਏ", "ਉ", "ਊ", "ਓ"} }, } m["Hang"] = process_ranges{ "Hangul", 8222, "syllabary", aliases = {"Hangeul"}, ranges = { 0x1100, 0x11FF, 0x3001, 0x3003, 0x3008, 0x3011, 0x3013, 0x301F, 0x302E, 0x3030, 0x3037, 0x3037, 0x30FB, 0x30FB, 0x3131, 0x318E, 0x3200, 0x321E, 0x3260, 0x327E, 0xA960, 0xA97C, 0xAC00, 0xD7A3, 0xD7B0, 0xD7C6, 0xD7CB, 0xD7FB, 0xFE45, 0xFE46, 0xFF61, 0xFF65, 0xFFA0, 0xFFBE, 0xFFC2, 0xFFC7, 0xFFCA, 0xFFCF, 0xFFD2, 0xFFD7, 0xFFDA, 0xFFDC, }, } m["Hani"] = process_ranges{ "Han", 8201, "logography", ranges = { 0x2E80, 0x2E99, 0x2E9B, 0x2EF3, 0x2F00, 0x2FD5, 0x2FF0, 0x2FFF, 0x3001, 0x3003, 0x3005, 0x3011, 0x3013, 0x301F, 0x3021, 0x302D, 0x3030, 0x3030, 0x3037, 0x303F, 0x3190, 0x319F, 0x31C0, 0x31E5, 0x31EF, 0x31EF, 0x3220, 0x3247, 0x3280, 0x32B0, 0x32C0, 0x32CB, 0x30FB, 0x30FB, 0x32FF, 0x32FF, 0x3358, 0x3370, 0x337B, 0x337F, 0x33E0, 0x33FE, 0x3400, 0x4DBF, 0x4E00, 0x9FFF, 0xA700, 0xA707, 0xF900, 0xFA6D, 0xFA70, 0xFAD9, 0xFE45, 0xFE46, 0xFF61, 0xFF65, 0x16FE2, 0x16FE3, 0x16FF0, 0x16FF1, 0x1D360, 0x1D371, 0x1F250, 0x1F251, 0x20000, 0x2A6DF, 0x2A700, 0x2B739, 0x2B740, 0x2B81D, 0x2B820, 0x2CEA1, 0x2CEB0, 0x2EBE0, 0x2EBF0, 0x2EE5D, 0x2F800, 0x2FA1D, 0x30000, 0x3134A, 0x31350, 0x3347F, }, varieties = {"Hanzi", "Kanji", "Hanja", "Chu Nom"}, spaces = false, } m["Hans"] = { "Simplified Han", 185614, m["Hani"][3], ranges = m["Hani"].ranges, characters = m["Hani"].characters, spaces = m["Hani"].spaces, parent = "Hani", } m["Hant"] = { "Traditional Han", 178528, m["Hani"][3], ranges = m["Hani"].ranges, characters = m["Hani"].characters, spaces = m["Hani"].spaces, parent = "Hani", } m["Hano"] = process_ranges{ "Hanunoo", 1584045, "abugida", aliases = {"Hanunó'o", "Hanuno'o"}, ranges = { 0x1720, 0x1736, }, } m["Hatr"] = process_ranges{ "Hatran", 20813038, "abjad", ranges = { 0x108E0, 0x108F2, 0x108F4, 0x108F5, 0x108FB, 0x108FF, }, direction = "rtl", } m["Hebr"] = process_ranges{ "Hebrew", 33513, "abjad", -- more precisely, impure abjad ranges = { 0x0591, 0x05C7, 0x05D0, 0x05EA, 0x05EF, 0x05F4, 0x2135, 0x2138, 0xFB1D, 0xFB36, 0xFB38, 0xFB3C, 0xFB3E, 0xFB3E, 0xFB40, 0xFB41, 0xFB43, 0xFB44, 0xFB46, 0xFB4F, }, direction = "rtl", display_text = "Hebr-common", sort_key = "Hebr-common", strip_diacritics = "Hebr-common", } m["Hira"] = process_ranges{ "Hiragana", 48332, "syllabary", ranges = { 0x3001, 0x3003, 0x3008, 0x3011, 0x3013, 0x301F, 0x3030, 0x3035, 0x3037, 0x3037, 0x303C, 0x303D, 0x3041, 0x3096, 0x3099, 0x30A0, 0x30FB, 0x30FC, 0xFE45, 0xFE46, 0xFF61, 0xFF65, 0xFF70, 0xFF70, 0xFF9E, 0xFF9F, 0x1B001, 0x1B11F, 0x1B132, 0x1B132, 0x1B150, 0x1B152, 0x1F200, 0x1F200, }, varieties = {"Hentaigana"}, spaces = false, } m["Hluw"] = process_ranges{ "Anatolian hieroglyphic", 521323, "logography, syllabary", ranges = { 0x14400, 0x14646, }, wikipedia_article = "Anatolian hieroglyphs", } m["Hmng"] = process_ranges{ "Pahawh Hmong", 365954, "semisyllabary", aliases = {"Hmong"}, ranges = { 0x16B00, 0x16B45, 0x16B50, 0x16B59, 0x16B5B, 0x16B61, 0x16B63, 0x16B77, 0x16B7D, 0x16B8F, }, } m["Hmnp"] = process_ranges{ "Nyiakeng Puachue Hmong", 33712499, "alphabet", ranges = { 0x1E100, 0x1E12C, 0x1E130, 0x1E13D, 0x1E140, 0x1E149, 0x1E14E, 0x1E14F, }, } m["Hung"] = process_ranges{ "Old Hungarian", 446224, "alphabet", aliases = {"Hungarian runic"}, ranges = { 0x10C80, 0x10CB2, 0x10CC0, 0x10CF2, 0x10CFA, 0x10CFF, }, capitalized = true, direction = "rtl", } m["Ibrnn"] = { "Northeastern Iberian", 1113155, "semisyllabary", ietf_subtag = "Zzzz", -- Not in Unicode } m["Ibrns"] = { "Southeastern Iberian", 2305351, "semisyllabary", ietf_subtag = "Zzzz", -- Not in Unicode } m["Image"] = { -- To be used to avoid any formatting or link processing "Image-rendered", 478798, -- This should not have any characters listed ietf_subtag = "Zyyy", translit = false, character_category = false, -- none } m["Inds"] = { "Indus", 601388, aliases = {"Harappan", "Indus Valley"}, } m["Ipach"] = { "International Phonetic Alphabet", 21204, aliases = {"IPA"}, ietf_subtag = "Latn", } m["Ital"] = process_ranges{ "Old Italic", 4891256, "alphabet", ranges = { 0x10300, 0x10323, 0x1032D, 0x1032F, }, translit = "Ital-translit", } m["Java"] = process_ranges{ "Javanese", 879704, "abugida", ranges = { 0xA980, 0xA9CD, 0xA9CF, 0xA9D9, 0xA9DE, 0xA9DF, }, } m["Jurc"] = { "Jurchen", 912240, "logography", spaces = false, } m["Kali"] = process_ranges{ "Kayah Li", 4919239, "abugida", ranges = { 0xA900, 0xA92F, }, } m["Kana"] = process_ranges{ "Katakana", 82946, "syllabary", ranges = { 0x3001, 0x3003, 0x3008, 0x3011, 0x3013, 0x301F, 0x3030, 0x3035, 0x3037, 0x3037, 0x303C, 0x303D, 0x3099, 0x309C, 0x30A0, 0x30FF, 0x31F0, 0x31FF, 0x32D0, 0x32FE, 0x3300, 0x3357, 0xFE45, 0xFE46, 0xFF61, 0xFF9F, 0x1AFF0, 0x1AFF3, 0x1AFF5, 0x1AFFB, 0x1AFFD, 0x1AFFE, 0x1B000, 0x1B000, 0x1B120, 0x1B122, 0x1B155, 0x1B155, 0x1B164, 0x1B167, }, spaces = false, } m["Kawi"] = process_ranges{ "Kawi", 975802, "abugida", ranges = { 0x11F00, 0x11F10, 0x11F12, 0x11F3A, 0x11F3E, 0x11F5A, }, } m["Khar"] = process_ranges{ "Kharoshthi", 1161266, "abugida", ranges = { 0x10A00, 0x10A03, 0x10A05, 0x10A06, 0x10A0C, 0x10A13, 0x10A15, 0x10A17, 0x10A19, 0x10A35, 0x10A38, 0x10A3A, 0x10A3F, 0x10A48, 0x10A50, 0x10A58, }, direction = "rtl", } m["Khmr"] = process_ranges{ "Khmer", 1054190, "abugida", ranges = { 0x1780, 0x17DD, 0x17E0, 0x17E9, 0x17F0, 0x17F9, 0x19E0, 0x19FF, }, spaces = false, normalizationFixes = handle_normalization_fixes{ from = {"ឣ", "ឤ"}, to = {"អ", "អា"} }, } m["Khoj"] = process_ranges{ "Khojki", 1740656, "abugida", ranges = { 0x0AE6, 0x0AEF, 0xA830, 0xA839, 0x11200, 0x11211, 0x11213, 0x11241, }, normalizationFixes = handle_normalization_fixes{ from = {"𑈀𑈬𑈱", "𑈀𑈬", "𑈀𑈱", "𑈀𑈳", "𑈁𑈱", "𑈆𑈬", "𑈬𑈰", "𑈬𑈱", "𑉀𑈮"}, to = {"𑈇", "𑈁", "𑈅", "𑈇", "𑈇", "𑈃", "𑈲", "𑈳", "𑈂"} }, } m["Khomt"] = { "Khom Thai", 13023788, "abugida", -- Not in Unicode } m["Kitl"] = { "Khitan large", 6401797, "logography", spaces = false, } m["Kits"] = process_ranges{ "Khitan small", 6401800, "logography, syllabary", ranges = { 0x16FE4, 0x16FE4, 0x18B00, 0x18CD5, 0x18CFF, 0x18CFF, }, spaces = false, } m["Knda"] = process_ranges{ "Kannada", 839666, "abugida", ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0C80, 0x0C8C, 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3, 0x0CB5, 0x0CB9, 0x0CBC, 0x0CC4, 0x0CC6, 0x0CC8, 0x0CCA, 0x0CCD, 0x0CD5, 0x0CD6, 0x0CDD, 0x0CDE, 0x0CE0, 0x0CE3, 0x0CE6, 0x0CEF, 0x0CF1, 0x0CF3, 0x1CD0, 0x1CD0, 0x1CD2, 0x1CD3, 0x1CDA, 0x1CDA, 0x1CF2, 0x1CF2, 0x1CF4, 0x1CF4, 0xA830, 0xA835, }, normalizationFixes = handle_normalization_fixes{ from = {"ಉಾ", "ಋಾ", "ಒೌ"}, to = {"ಊ", "ೠ", "ಔ"} }, translit = "kn-translit", } m["Kpel"] = { "Kpelle", 1586299, "syllabary", -- Not in Unicode } m["Krai"] = process_ranges{ "Kirat Rai", 123173834, "abugida", aliases = {"Rai", "Khambu Rai", "Rai Barṇamālā", "Kirat Khambu Rai"}, ranges = { 0x16D40, 0x16D79, }, } m["Kthi"] = process_ranges{ "Kaithi", 1253814, "abugida", ranges = { 0x0966, 0x096F, 0xA830, 0xA839, 0x11080, 0x110C2, 0x110CD, 0x110CD, }, } m["Kulit"] = { "Kulitan", 6443044, "abugida", -- Not in Unicode } m["Lana"] = process_ranges{ "Tai Tham", 1314503, "abugida", aliases = {"Tham", "Tua Mueang", "Lanna"}, ranges = { 0x1A20, 0x1A5E, 0x1A60, 0x1A7C, 0x1A7F, 0x1A89, 0x1A90, 0x1A99, 0x1AA0, 0x1AAD, }, spaces = false, } m["Laoo"] = process_ranges{ "Lao", 1815229, "abugida", ranges = { 0x0E81, 0x0E82, 0x0E84, 0x0E84, 0x0E86, 0x0E8A, 0x0E8C, 0x0EA3, 0x0EA5, 0x0EA5, 0x0EA7, 0x0EBD, 0x0EC0, 0x0EC4, 0x0EC6, 0x0EC6, 0x0EC8, 0x0ECE, 0x0ED0, 0x0ED9, 0x0EDC, 0x0EDF, }, spaces = false, } m["Latn"] = process_ranges{ "Latin", 8229, "alphabet", aliases = {"Roman"}, ranges = { 0x0041, 0x005A, 0x0061, 0x007A, 0x00AA, 0x00AA, 0x00BA, 0x00BA, 0x00C0, 0x00D6, 0x00D8, 0x00F6, 0x00F8, 0x02B8, 0x02C0, 0x02C1, 0x02E0, 0x02E4, 0x0363, 0x036F, 0x0485, 0x0486, 0x0951, 0x0952, 0x10FB, 0x10FB, 0x1D00, 0x1D25, 0x1D2C, 0x1D5C, 0x1D62, 0x1D65, 0x1D6B, 0x1D77, 0x1D79, 0x1DBE, 0x1DF8, 0x1DF8, 0x1E00, 0x1EFF, 0x202F, 0x202F, 0x2071, 0x2071, 0x207F, 0x207F, 0x2090, 0x209C, 0x20F0, 0x20F0, 0x2100, 0x2125, 0x2128, 0x2128, 0x212A, 0x2134, 0x2139, 0x213B, 0x2141, 0x214E, 0x2160, 0x2188, 0x2C60, 0x2C7F, 0xA700, 0xA707, 0xA722, 0xA787, 0xA78B, 0xA7CD, 0xA7D0, 0xA7D1, 0xA7D3, 0xA7D3, 0xA7D5, 0xA7DC, 0xA7F2, 0xA7FF, 0xA92E, 0xA92E, 0xAB30, 0xAB5A, 0xAB5C, 0xAB64, 0xAB66, 0xAB69, 0xFB00, 0xFB06, 0xFF21, 0xFF3A, 0xFF41, 0xFF5A, 0x10780, 0x10785, 0x10787, 0x107B0, 0x107B2, 0x107BA, 0x1DF00, 0x1DF1E, 0x1DF25, 0x1DF2A, }, varieties = {"Rumi", "Romaji", "Rōmaji", "Romaja"}, capitalized = true, translit = false, } m["Latf"] = { "Fraktur", 148443, m["Latn"][3], ranges = m["Latn"].ranges, characters = m["Latn"].characters, other_names = {"Blackletter"}, -- Blackletter is actually the parent "script" capitalized = m["Latn"].capitalized, translit = m["Latn"].translit, parent = "Latn", } m["Latg"] = { "Gaelic", 1432616, m["Latn"][3], ranges = m["Latn"].ranges, characters = m["Latn"].characters, other_names = {"Irish"}, capitalized = m["Latn"].capitalized, translit = m["Latn"].translit, parent = "Latn", } m["pjt-Latn"] = { "Latin", nil, m["Latn"][3], ranges = m["Latn"].ranges, characters = m["Latn"].characters, capitalized = m["Latn"].capitalized, translit = m["Latn"].translit, parent = "Latn", } m["Leke"] = { "Leke", 19572613, "abugida", -- Not in Unicode } m["Lepc"] = process_ranges{ "Lepcha", 1481626, "abugida", aliases = {"Róng"}, ranges = { 0x1C00, 0x1C37, 0x1C3B, 0x1C49, 0x1C4D, 0x1C4F, }, } m["Limb"] = process_ranges{ "Limbu", 933796, "abugida", ranges = { 0x0965, 0x0965, 0x1900, 0x191E, 0x1920, 0x192B, 0x1930, 0x193B, 0x1940, 0x1940, 0x1944, 0x194F, }, } m["Lina"] = process_ranges{ "Linear A", 30972, ranges = { 0x10107, 0x10133, 0x10600, 0x10736, 0x10740, 0x10755, 0x10760, 0x10767, }, } m["Linb"] = process_ranges{ "Linear B", 190102, ranges = { 0x10000, 0x1000B, 0x1000D, 0x10026, 0x10028, 0x1003A, 0x1003C, 0x1003D, 0x1003F, 0x1004D, 0x10050, 0x1005D, 0x10080, 0x100FA, 0x10100, 0x10102, 0x10107, 0x10133, 0x10137, 0x1013F, }, } m["Lisu"] = process_ranges{ "Fraser", 1194621, "alphabet", aliases = {"Old Lisu", "Lisu"}, ranges = { 0x300A, 0x300B, 0xA4D0, 0xA4FF, 0x11FB0, 0x11FB0, }, normalizationFixes = handle_normalization_fixes{ from = {"['’]", "[.ꓸ][.ꓸ]", "[.ꓸ][,ꓹ]"}, to = {"ʼ", "ꓺ", "ꓻ"} }, translit = "Lisu-translit", sort_key = { from = {"𑾰"}, to = {"ꓬ" .. p[1]} }, } m["Loma"] = { "Loma", 13023816, "syllabary", -- Not in Unicode } m["Lyci"] = process_ranges{ "Lycian", 913587, "alphabet", ranges = { 0x10280, 0x1029C, }, } m["Lydi"] = process_ranges{ "Lydian", 4261300, "alphabet", ranges = { 0x10920, 0x10939, 0x1093F, 0x1093F, }, direction = "rtl", } m["Mahj"] = process_ranges{ "Mahajani", 6732850, "abugida", ranges = { 0x0964, 0x096F, 0xA830, 0xA839, 0x11150, 0x11176, }, } m["Maka"] = process_ranges{ "Makasar", 72947229, "abugida", aliases = {"Old Makasar"}, ranges = { 0x11EE0, 0x11EF8, }, } m["Mand"] = process_ranges{ "Mandaic", 1812130, aliases = {"Mandaean"}, ranges = { 0x0640, 0x0640, 0x0840, 0x085B, 0x085E, 0x085E, }, direction = "rtl", } m["Mani"] = process_ranges{ "Manichaean", 3544702, "abjad", ranges = { 0x0640, 0x0640, 0x10AC0, 0x10AE6, 0x10AEB, 0x10AF6, }, direction = "rtl", translit = "Mani-translit", } m["Marc"] = process_ranges{ "Marchen", 72403709, "abugida", ranges = { 0x11C70, 0x11C8F, 0x11C92, 0x11CA7, 0x11CA9, 0x11CB6, }, } m["Maya"] = process_ranges{ "Maya", 211248, aliases = {"Maya hieroglyphic", "Mayan", "Mayan hieroglyphic"}, ranges = { 0x1D2E0, 0x1D2F3, }, } m["Medf"] = process_ranges{ "Medefaidrin", 1519764, aliases = {"Oberi Okaime", "Oberi Ɔkaimɛ"}, ranges = { 0x16E40, 0x16E9A, }, capitalized = true, } m["Mend"] = process_ranges{ "Mende", 951069, aliases = {"Mende Kikakui"}, ranges = { 0x1E800, 0x1E8C4, 0x1E8C7, 0x1E8D6, }, direction = "rtl", } m["Merc"] = process_ranges{ "Meroitic cursive", 73028124, "abugida", ranges = { 0x109A0, 0x109B7, 0x109BC, 0x109CF, 0x109D2, 0x109FF, }, direction = "rtl", } m["Mero"] = process_ranges{ "Meroitic hieroglyphic", 73028623, "abugida", ranges = { 0x10980, 0x1099F, }, direction = "rtl", wikipedia_article = "Meroitic hieroglyphs", } m["Mlym"] = process_ranges{ "Malayalam", 1164129, "abugida", ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0D00, 0x0D0C, 0x0D0E, 0x0D10, 0x0D12, 0x0D44, 0x0D46, 0x0D48, 0x0D4A, 0x0D4F, 0x0D54, 0x0D63, 0x0D66, 0x0D7F, 0x1CDA, 0x1CDA, 0x1CF2, 0x1CF2, 0xA830, 0xA832, }, normalizationFixes = handle_normalization_fixes{ from = {"ഇൗ", "ഉൗ", "എെ", "ഒാ", "ഒൗ", "ക്‍", "ണ്‍", "ന്‍റ", "ന്‍", "മ്‍", "യ്‍", "ര്‍", "ല്‍", "ള്‍", "ഴ്‍", "െെ", "ൻ്റ"}, to = {"ഈ", "ഊ", "ഐ", "ഓ", "ഔ", "ൿ", "ൺ", "ൻറ", "ൻ", "ൔ", "ൕ", "ർ", "ൽ", "ൾ", "ൖ", "ൈ", "ന്റ"} }, translit = "ml-translit", } m["Modi"] = process_ranges{ "Modi", 1703713, "abugida", ranges = { 0xA830, 0xA839, 0x11600, 0x11644, 0x11650, 0x11659, }, normalizationFixes = handle_normalization_fixes{ from = {"𑘀𑘹", "𑘀𑘺", "𑘁𑘹", "𑘁𑘺"}, to = {"𑘊", "𑘋", "𑘌", "𑘍"} }, } do local Mong_displaytext = { from = {"([ᠨ-ᡂᡸ])ᠶ([ᠨ-ᡂᡸ])", "([ᠠ-ᡂᡸ])ᠸ([^᠋ᠠ-ᠧ])", "([ᠠ-ᡂᡸ])ᠸ$"}, to = {"%1ᠢ%2", "%1ᠧ%2", "%1ᠧ"} } m["Mong"] = process_ranges{ "Mongolian", 1055705, "alphabet", aliases = {"Mongol bichig", "Hudum Mongol bichig"}, ranges = { 0x1800, 0x1805, 0x180A, 0x1819, 0x1820, 0x1842, 0x1878, 0x1878, 0x1880, 0x1897, 0x18A6, 0x18A6, 0x18A9, 0x18A9, 0x200C, 0x200D, 0x202F, 0x202F, 0x3001, 0x3002, 0x3008, 0x300B, 0x11660, 0x11668, }, direction = "vertical-ltr", display_text = Mong_displaytext, strip_diacritics = Mong_displaytext, translit = "Mong-translit", } m["mnc-Mong"] = process_ranges{ "Manchu", 122888, m["Mong"][3], ranges = { 0x1801, 0x1801, 0x1804, 0x1804, 0x1808, 0x180F, 0x1820, 0x1820, 0x1823, 0x1823, 0x1828, 0x182A, 0x182E, 0x1830, 0x1834, 0x1838, 0x183A, 0x183A, 0x185D, 0x185D, 0x185F, 0x1861, 0x1864, 0x1869, 0x186C, 0x1871, 0x1873, 0x1877, 0x1880, 0x1888, 0x188F, 0x188F, 0x189A, 0x18A5, 0x18A8, 0x18A8, 0x18AA, 0x18AA, 0x200C, 0x200D, 0x202F, 0x202F, }, direction = "vertical-ltr", parent = "Mong", translit = "mnc-translit", } m["sjo-Mong"] = process_ranges{ "Xibe", 113624153, m["Mong"][3], aliases = {"Sibe"}, ranges = { 0x1804, 0x1804, 0x1807, 0x1807, 0x180A, 0x180F, 0x1820, 0x1820, 0x1823, 0x1823, 0x1828, 0x1828, 0x182A, 0x182A, 0x182E, 0x1830, 0x1834, 0x1838, 0x183A, 0x183A, 0x185D, 0x1872, 0x200C, 0x200D, 0x202F, 0x202F, }, direction = "vertical-ltr", parent = "mnc-Mong", } m["xwo-Mong"] = process_ranges{ "Clear Script", 529085, m["Mong"][3], aliases = {"Todo", "Todo bichig"}, ranges = { 0x1800, 0x1801, 0x1804, 0x1806, 0x180A, 0x1820, 0x1828, 0x1828, 0x182F, 0x1831, 0x1834, 0x1834, 0x1837, 0x1838, 0x183A, 0x183B, 0x1840, 0x1840, 0x1843, 0x185C, 0x1880, 0x1887, 0x1889, 0x188F, 0x1894, 0x1894, 0x1896, 0x1899, 0x18A7, 0x18A7, 0x200C, 0x200D, 0x202F, 0x202F, 0x11669, 0x1166C, }, direction = "vertical-ltr", parent = "Mong", translit = "xwo-translit", } end m["Moon"] = { "Moon", 918391, "alphabet", aliases = {"Moon System of Embossed Reading", "Moon type", "Moon writing", "Moon alphabet", "Moon code"}, -- Not in Unicode } m["Morse"] = { "Morse code", 79897, ietf_subtag = "Zsym", } m["Mroo"] = process_ranges{ "Mru", 75919253, aliases = {"Mro", "Mrung"}, ranges = { 0x16A40, 0x16A5E, 0x16A60, 0x16A69, 0x16A6E, 0x16A6F, }, } m["Mtei"] = process_ranges{ "Meitei Mayek", 2981413, "abugida", aliases = {"Meetei Mayek", "Manipuri"}, ranges = { 0xAAE0, 0xAAF6, 0xABC0, 0xABED, 0xABF0, 0xABF9, }, } m["Mult"] = process_ranges{ "Multani", 17047906, "abugida", ranges = { 0x0A66, 0x0A6F, 0x11280, 0x11286, 0x11288, 0x11288, 0x1128A, 0x1128D, 0x1128F, 0x1129D, 0x1129F, 0x112A9, }, } m["Music"] = process_ranges{ "musical notation", 233861, "pictography", ranges = { 0x2669, 0x266F, 0x1D100, 0x1D126, 0x1D129, 0x1D1EA, }, ietf_subtag = "Zsym", translit = false, } m["Mymr"] = process_ranges{ "Burmese", 43887939, "abugida", aliases = {"Myanmar"}, ranges = { 0x1000, 0x109F, 0xA92E, 0xA92E, 0xA9E0, 0xA9FE, 0xAA60, 0xAA7F, 0x116D0, 0x116E3, }, spaces = false, } m["Nagm"] = process_ranges{ "Mundari Bani", 106917274, "alphabet", aliases = {"Nag Mundari"}, ranges = { 0x1E4D0, 0x1E4F9, }, } m["Nand"] = process_ranges{ "Nandinagari", 6963324, "abugida", ranges = { 0x0964, 0x0965, 0x0CE6, 0x0CEF, 0x1CE9, 0x1CE9, 0x1CF2, 0x1CF2, 0x1CFA, 0x1CFA, 0xA830, 0xA835, 0x119A0, 0x119A7, 0x119AA, 0x119D7, 0x119DA, 0x119E4, }, } m["Narb"] = process_ranges{ "Ancient North Arabian", 1472213, "abjad", aliases = {"Old North Arabian"}, ranges = { 0x10A80, 0x10A9F, }, direction = "rtl", translit = "Narb-translit", } m["Nbat"] = process_ranges{ "Nabataean", 855624, "abjad", aliases = {"Nabatean"}, ranges = { 0x10880, 0x1089E, 0x108A7, 0x108AF, }, direction = "rtl", } m["Newa"] = process_ranges{ "Newa", 7237292, "abugida", aliases = {"Newar", "Newari", "Prachalit Nepal"}, ranges = { 0x11400, 0x1145B, 0x1145D, 0x11461, }, } m["Nkdb"] = { "Dongba", 1190953, "pictography", aliases = {"Naxi Dongba", "Nakhi Dongba", "Tomba", "Tompa", "Mo-so"}, spaces = false, -- Not in Unicode } m["Nkgb"] = { "Geba", 731189, "syllabary", aliases = {"Nakhi Geba", "Naxi Geba"}, spaces = false, -- Not in Unicode } m["Nkoo"] = process_ranges{ "N'Ko", 1062587, "alphabet", ranges = { 0x060C, 0x060C, 0x061B, 0x061B, 0x061F, 0x061F, 0x07C0, 0x07FA, 0x07FD, 0x07FF, 0xFD3E, 0xFD3F, }, direction = "rtl", } m["None"] = { "unspecified", nil, -- This should not have any characters listed ietf_subtag = "Zyyy", translit = false, character_category = false, -- none } m["Nshu"] = process_ranges{ "Nüshu", 56436, "syllabary", aliases = {"Nushu"}, ranges = { 0x16FE1, 0x16FE1, 0x1B170, 0x1B2FB, }, spaces = false, } m["Ogam"] = process_ranges{ "Ogham", 184661, ranges = { 0x1680, 0x169C, }, } m["Olck"] = process_ranges{ "Ol Chiki", 201688, aliases = {"Ol Chemetʼ", "Ol", "Santali"}, ranges = { 0x1C50, 0x1C7F, }, } m["Onao"] = process_ranges{ "Ol Onal", 108607084, "alphabet", ranges = { 0x0964, 0x0965, 0x1E5D0, 0x1E5FA, 0x1E5FF, 0x1E5FF, }, } m["Orkh"] = process_ranges{ "Old Turkic", 5058305, aliases = {"Orkhon runic"}, ranges = { 0x10C00, 0x10C48, }, direction = "rtl", translit = "Orkh-translit", } m["Orya"] = process_ranges{ "Odia", 1760127, "abugida", aliases = {"Oriya"}, ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0B01, 0x0B03, 0x0B05, 0x0B0C, 0x0B0F, 0x0B10, 0x0B13, 0x0B28, 0x0B2A, 0x0B30, 0x0B32, 0x0B33, 0x0B35, 0x0B39, 0x0B3C, 0x0B44, 0x0B47, 0x0B48, 0x0B4B, 0x0B4D, 0x0B55, 0x0B57, 0x0B5C, 0x0B5D, 0x0B5F, 0x0B63, 0x0B66, 0x0B77, 0x1CDA, 0x1CDA, 0x1CF2, 0x1CF2, }, normalizationFixes = handle_normalization_fixes{ from = {"ଅା", "ଏୗ", "ଓୗ"}, to = {"ଆ", "ଐ", "ଔ"} }, } m["Osge"] = process_ranges{ "Osage", 7105529, ranges = { 0x104B0, 0x104D3, 0x104D8, 0x104FB, }, capitalized = true, translit = "Osge-translit", } m["Osma"] = process_ranges{ "Osmanya", 1377866, ranges = { 0x10480, 0x1049D, 0x104A0, 0x104A9, }, } m["Ougr"] = process_ranges{ "Old Uyghur", 1998938, "abjad, alphabet", ranges = { 0x0640, 0x0640, 0x10AF2, 0x10AF2, 0x10F70, 0x10F89, }, -- This should ideally be "vertical-ltr", but getting the CSS right is tricky because it's right-to-left horizontally, but left-to-right vertically. Currently, displaying it vertically causes it to display bottom-to-top. direction = "rtl", } m["Palm"] = process_ranges{ "Palmyrene", 17538100, ranges = { 0x10860, 0x1087F, }, direction = "rtl", } m["Pauc"] = process_ranges{ "Pau Cin Hau", 25339852, ranges = { 0x11AC0, 0x11AF8, }, } m["Pcun"] = { "Proto-Cuneiform", 1650699, "pictography", -- Not in Unicode } m["Pelm"] = { "Proto-Elamite", 56305763, "pictography", -- Not in Unicode } m["Perm"] = process_ranges{ "Old Permic", 147899, ranges = { 0x0483, 0x0483, 0x10350, 0x1037A, }, } m["Phag"] = process_ranges{ "Phags-pa", 822836, "abugida", ranges = { 0x1802, 0x1803, 0x1805, 0x1805, 0x200C, 0x200D, 0x202F, 0x202F, 0x3002, 0x3002, 0xA840, 0xA877, }, direction = "vertical-ltr", } m["Phli"] = process_ranges{ "Inscriptional Pahlavi", 24089793, "abjad", ranges = { 0x10B60, 0x10B72, 0x10B78, 0x10B7F, }, direction = "rtl", } m["Phlp"] = process_ranges{ "Psalter Pahlavi", 7253954, "abjad", ranges = { 0x0640, 0x0640, 0x10B80, 0x10B91, 0x10B99, 0x10B9C, 0x10BA9, 0x10BAF, }, direction = "rtl", } m["Phlv"] = { "Book Pahlavi", 72403118, "abjad", direction = "rtl", wikipedia_article = "Pahlavi scripts#Book Pahlavi", -- Not in Unicode } m["Phnx"] = process_ranges{ "Phoenician", 26752, "abjad", ranges = { 0x10900, 0x1091B, 0x1091F, 0x1091F, }, direction = "rtl", translit = "Phnx-translit", } m["Plrd"] = process_ranges{ "Pollard", 601734, "abugida", aliases = {"Miao"}, ranges = { 0x16F00, 0x16F4A, 0x16F4F, 0x16F87, 0x16F8F, 0x16F9F, }, } m["Prti"] = process_ranges{ "Inscriptional Parthian", 13023804, ranges = { 0x10B40, 0x10B55, 0x10B58, 0x10B5F, }, direction = "rtl", } m["Psin"] = { "Proto-Sinaitic", 1065250, "abjad", direction = "rtl", -- Not in Unicode } m["Ranj"] = { "Ranjana", 2385276, "abugida", -- Not in Unicode } m["Rjng"] = process_ranges{ "Rejang", 2007960, "abugida", ranges = { 0xA930, 0xA953, 0xA95F, 0xA95F, }, } m["Rohg"] = process_ranges{ "Hanifi Rohingya", 21028705, "alphabet", ranges = { 0x060C, 0x060C, 0x061B, 0x061B, 0x061F, 0x061F, 0x0640, 0x0640, 0x06D4, 0x06D4, 0x10D00, 0x10D27, 0x10D30, 0x10D39, }, direction = "rtl", } m["Roro"] = { "Rongorongo", 209764, -- Not in Unicode } m["Rumin"] = process_ranges{ "Rumi numerals", nil, ranges = { 0x10E60, 0x10E7E, }, ietf_subtag = "Arab", } m["Runr"] = process_ranges{ "Runic", 82996, "alphabet", ranges = { 0x16A0, 0x16EA, 0x16EE, 0x16F8, }, } do local Samr_stripdiacritics = { remove_diacritics = c.CGJ .. u(0x0816) .. "-" .. u(0x082D), } m["Samr"] = process_ranges{ "Samaritan", 1550930, "abjad", ranges = { 0x0800, 0x082D, 0x0830, 0x083E, }, direction = "rtl", strip_diacritics = Samr_stripdiacritics, sort_key = Samr_stripdiacritics, } end m["Sarb"] = process_ranges{ "Ancient South Arabian", 446074, "abjad", aliases = {"Old South Arabian"}, ranges = { 0x10A60, 0x10A7F, }, direction = "rtl", translit = "Sarb-translit", } m["Saur"] = process_ranges{ "Saurashtra", 3535165, "abugida", ranges = { 0xA880, 0xA8C5, 0xA8CE, 0xA8D9, }, } m["Semap"] = { "flag semaphore", 250796, "pictography", ietf_subtag = "Zsym", } m["Sgnw"] = process_ranges{ "SignWriting", 1497335, "pictography", aliases = {"Sutton SignWriting"}, ranges = { 0x1D800, 0x1DA8B, 0x1DA9B, 0x1DA9F, 0x1DAA1, 0x1DAAF, }, translit = false, } m["Shaw"] = process_ranges{ "Shavian", 1970098, aliases = {"Shaw"}, ranges = { 0x10450, 0x1047F, }, } m["Shrd"] = process_ranges{ "Sharada", 2047117, "abugida", ranges = { 0x0951, 0x0951, 0x1CD7, 0x1CD7, 0x1CD9, 0x1CD9, 0x1CDC, 0x1CDD, 0x1CE0, 0x1CE0, 0xA830, 0xA835, 0xA838, 0xA838, 0x11180, 0x111DF, }, translit = "Shrd-translit", } m["Shui"] = { "Sui", 752854, "logography", spaces = false, -- Not in Unicode } m["Sidd"] = process_ranges{ "Siddham", 250379, "abugida", ranges = { 0x11580, 0x115B5, 0x115B8, 0x115DD, }, translit = "Sidd-translit", } m["Sidt"] = { "Sidetic", 36659, "alphabet", direction = "rtl", -- Not in Unicode } m["Sind"] = process_ranges{ "Khudabadi", 6402810, "abugida", aliases = {"Khudawadi"}, ranges = { 0x0964, 0x0965, 0xA830, 0xA839, 0x112B0, 0x112EA, 0x112F0, 0x112F9, }, normalizationFixes = handle_normalization_fixes{ from = {"𑊰𑋠", "𑊰𑋥", "𑊰𑋦", "𑊰𑋧", "𑊰𑋨"}, to = {"𑊱", "𑊶", "𑊷", "𑊸", "𑊹"} }, } m["Sinh"] = process_ranges{ "Sinhalese", 1574992, "abugida", aliases = {"Sinhala"}, ranges = { 0x0964, 0x0965, 0x0D81, 0x0D83, 0x0D85, 0x0D96, 0x0D9A, 0x0DB1, 0x0DB3, 0x0DBB, 0x0DBD, 0x0DBD, 0x0DC0, 0x0DC6, 0x0DCA, 0x0DCA, 0x0DCF, 0x0DD4, 0x0DD6, 0x0DD6, 0x0DD8, 0x0DDF, 0x0DE6, 0x0DEF, 0x0DF2, 0x0DF4, 0x1CF2, 0x1CF2, 0x111E1, 0x111F4, }, normalizationFixes = handle_normalization_fixes{ from = {"අා", "අැ", "අෑ", "උෟ", "ඍෘ", "ඏෟ", "එ්", "එෙ", "ඔෟ", "ෘෘ"}, to = {"ආ", "ඇ", "ඈ", "ඌ", "ඎ", "ඐ", "ඒ", "ඓ", "ඖ", "ෲ"} }, } m["Sogd"] = process_ranges{ "Sogdian", 578359, "abjad", ranges = { 0x0640, 0x0640, 0x10F30, 0x10F59, }, direction = "rtl", } m["Sogo"] = process_ranges{ "Old Sogdian", 72403254, "abjad", ranges = { 0x10F00, 0x10F27, }, direction = "rtl", } m["Sora"] = process_ranges{ "Sorang Sompeng", 7563292, aliases = {"Sora Sompeng"}, ranges = { 0x110D0, 0x110E8, 0x110F0, 0x110F9, }, } m["Soyo"] = process_ranges{ "Soyombo", 8009382, "abugida", ranges = { 0x11A50, 0x11AA2, }, } m["Sund"] = process_ranges{ "Sundanese", 51589, "abugida", ranges = { 0x1B80, 0x1BBF, 0x1CC0, 0x1CC7, }, } m["Sunu"] = process_ranges{ "Sunuwar", 109984965, "alphabet", ranges = { 0x11BC0, 0x11BE1, 0x11BF0, 0x11BF9, }, } m["Sylo"] = process_ranges{ "Sylheti Nagri", 144128, "abugida", aliases = {"Sylheti Nāgarī", "Syloti Nagri"}, ranges = { 0x0964, 0x0965, 0x09E6, 0x09EF, 0xA800, 0xA82C, }, } m["Syrc"] = process_ranges{ "Syriac", 26567, "abjad", -- more precisely, impure abjad ranges = { 0x060C, 0x060C, 0x061B, 0x061C, 0x061F, 0x061F, 0x0640, 0x0640, 0x064B, 0x0655, 0x0670, 0x0670, 0x0700, 0x070D, 0x070F, 0x074A, 0x074D, 0x074F, 0x0860, 0x086A, 0x1DF8, 0x1DF8, 0x1DFA, 0x1DFA, }, direction = "rtl", } -- Syre, Syrj, Syrn are apparently subsumed into Syrc; discuss if this causes issues m["Tagb"] = process_ranges{ "Tagbanwa", 977444, "abugida", ranges = { 0x1735, 0x1736, 0x1760, 0x176C, 0x176E, 0x1770, 0x1772, 0x1773, }, } m["Takr"] = process_ranges{ "Takri", 759202, "abugida", ranges = { 0x0964, 0x0965, 0xA830, 0xA839, 0x11680, 0x116B9, 0x116C0, 0x116C9, }, normalizationFixes = handle_normalization_fixes{ from = {"𑚀𑚭", "𑚀𑚴", "𑚀𑚵", "𑚆𑚲"}, to = {"𑚁", "𑚈", "𑚉", "𑚇"} }, } m["Tale"] = process_ranges{ "Tai Nüa", 2566326, "abugida", aliases = {"Tai Nuea", "New Tai Nüa", "New Tai Nuea", "Dehong Dai", "Tai Dehong", "Tai Le"}, ranges = { 0x1040, 0x1049, 0x1950, 0x196D, 0x1970, 0x1974, }, spaces = false, } m["Talu"] = process_ranges{ "New Tai Lue", 3498863, "abugida", ranges = { 0x1980, 0x19AB, 0x19B0, 0x19C9, 0x19D0, 0x19DA, 0x19DE, 0x19DF, }, spaces = false, } m["Taml"] = process_ranges{ "Tamil", 26803, "abugida", ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0B82, 0x0B83, 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, 0x0B92, 0x0B95, 0x0B99, 0x0B9A, 0x0B9C, 0x0B9C, 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA, 0x0BAE, 0x0BB9, 0x0BBE, 0x0BC2, 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCD, 0x0BD0, 0x0BD0, 0x0BD7, 0x0BD7, 0x0BE6, 0x0BFA, 0x1CDA, 0x1CDA, 0xA8F3, 0xA8F3, 0x11301, 0x11301, 0x11303, 0x11303, 0x1133B, 0x1133C, 0x11FC0, 0x11FF1, 0x11FFF, 0x11FFF, }, normalizationFixes = handle_normalization_fixes{ from = {"அூ", "ஸ்ரீ"}, to = {"ஆ", "ஶ்ரீ"} }, } m["Tang"] = process_ranges{ "Tangut", 1373610, "logography, syllabary", ranges = { 0x31EF, 0x31EF, 0x16FE0, 0x16FE0, 0x17000, 0x187F7, 0x18800, 0x18AFF, 0x18D00, 0x18D08, }, spaces = false, translit = "txg-translit", } m["Tavt"] = process_ranges{ "Tai Viet", 11818517, "abugida", ranges = { 0xAA80, 0xAAC2, 0xAADB, 0xAADF, }, spaces = false, } m["Tayo"] = process_ranges{ "Lai Tay", 16306701, "abugida", aliases = {"Tai Yo"}, direction = "vertical-rtl", ranges = { 0x1E6C0, 0x1E6DE, 0x1E6E0, 0x1E6F5, 0x1E6FE, 0x1E6FF, }, spaces = false, } m["Telu"] = process_ranges{ "Telugu", 570450, "abugida", ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x0C00, 0x0C0C, 0x0C0E, 0x0C10, 0x0C12, 0x0C28, 0x0C2A, 0x0C39, 0x0C3C, 0x0C44, 0x0C46, 0x0C48, 0x0C4A, 0x0C4D, 0x0C55, 0x0C56, 0x0C58, 0x0C5A, 0x0C5D, 0x0C5D, 0x0C60, 0x0C63, 0x0C66, 0x0C6F, 0x0C77, 0x0C7F, 0x1CDA, 0x1CDA, 0x1CF2, 0x1CF2, }, normalizationFixes = handle_normalization_fixes{ from = {"ఒౌ", "ఒౕ", "ిౕ", "ెౕ", "ొౕ"}, to = {"ఔ", "ఓ", "ీ", "ే", "ో"} }, } m["Teng"] = { "Tengwar", 473725, } m["Tfng"] = process_ranges{ "Tifinagh", 208503, "abjad, alphabet", ranges = { 0x2D30, 0x2D67, 0x2D6F, 0x2D70, 0x2D7F, 0x2D7F, }, other_names = {"Libyco-Berber", "Berber"}, -- per Wikipedia, Libyco-Berber is the parent } m["Tglg"] = process_ranges{ "Baybayin", 812124, "abugida", aliases = {"Tagalog"}, varieties = {"Badlit", "Basahan", "Kur-itan"}, ranges = { 0x1700, 0x1715, 0x171F, 0x171F, 0x1735, 0x1736, }, } m["Thaa"] = process_ranges{ "Thaana", 877906, "abugida", ranges = { 0x060C, 0x060C, 0x061B, 0x061C, 0x061F, 0x061F, 0x0660, 0x0669, 0x0780, 0x07B1, 0xFDF2, 0xFDF2, 0xFDFD, 0xFDFD, }, direction = "rtl", } m["Thai"] = process_ranges{ "Thai", 236376, "abugida", ranges = { 0x0E01, 0x0E3A, 0x0E40, 0x0E5B, }, spaces = false, } do local Tibt_displaytext = { from = {"ༀ", "༌", "།།", "༚༚", "༚༝", "༝༚", "༝༝", "ཷ", "ཹ", "ེེ", "ོོ"}, to = {"ཨོཾ", "་", "༎", "༛", "༟", "࿎", "༞", "ྲཱྀ", "ླཱྀ", "ཻ", "ཽ"} } m["Tibt"] = process_ranges{ "Tibetan", 46861, "abugida", ranges = { 0x0F00, 0x0F47, 0x0F49, 0x0F6C, 0x0F71, 0x0F97, 0x0F99, 0x0FBC, 0x0FBE, 0x0FCC, 0x0FCE, 0x0FD4, 0x0FD9, 0x0FDA, 0x3008, 0x300B, }, normalizationFixes = handle_normalization_fixes{ combiningClasses = {["༹"] = 1}, from = {"ཷ", "ཹ"}, to = {"ྲཱྀ", "ླཱྀ"} }, display_text = Tibt_displaytext, strip_diacritics = Tibt_displaytext, sort_key = "Tibt-sortkey", translit = "Tibt-translit", } m["sit-tam-Tibt"] = { "Tamyig", 109875213, m["Tibt"][3], -- There is no inheritance of properties currently implemented for scripts. Per [[User:Theknightwho]], this -- is because it's tricky to do since there are several types of child scripts: those that are mere display -- variants (like fa-Arab), which should be eliminated in favor of CSS language selectors to -- handle the font differences; those that are genuinely different scripts that happen to share the same -- Unicode codepoints but have mostly different properties (e.g. Manchu vs. Mongolian); and those that are -- somewhere in between (like Tamyig vs. Tibetan). As a result, we currently have to manually specify -- which properties we want inherited as follows. ranges = m["Tibt"].ranges, characters = m["Tibt"].characters, parent = "Tibt", normalizationFixes = m["Tibt"].normalizationFixes, display_text = m["Tibt"].display_text, strip_diacritics = m["Tibt"].strip_diacritics, sort_key = m["Tibt"].sort_key, translit = m["Tibt"].translit, } end m["Tirh"] = process_ranges{ "Tirhuta", 1765752, "abugida", ranges = { 0x0951, 0x0952, 0x0964, 0x0965, 0x1CF2, 0x1CF2, 0xA830, 0xA839, 0x11480, 0x114C7, 0x114D0, 0x114D9, }, normalizationFixes = handle_normalization_fixes{ from = {"𑒁𑒰", "𑒋𑒺", "𑒍𑒺", "𑒪𑒵", "𑒪𑒶"}, to = {"𑒂", "𑒌", "𑒎", "𑒉", "𑒊"} }, } m["Tnsa"] = process_ranges{ "Tangsa", 105576311, "alphabet", ranges = { 0x16A70, 0x16ABE, 0x16AC0, 0x16AC9, }, } m["Todr"] = process_ranges{ "Todhri", 10274731, "alphabet", direction = "rtl", ranges = { 0x105C0, 0x105F3, }, } m["Tols"] = { "Tolong Siki", 4459822, "alphabet", -- Not in Unicode } m["Toto"] = process_ranges{ "Toto", 104837516, "abugida", ranges = { 0x1E290, 0x1E2AE, }, } m["Tutg"] = process_ranges{ "Tigalari", 2604990, "abugida", aliases = {"Tulu"}, ranges = { 0x1CF2, 0x1CF2, 0x1CF4, 0x1CF4, 0xA8F1, 0xA8F1, 0x11380, 0x11389, 0x1138B, 0x1138B, 0x1138E, 0x1138E, 0x11390, 0x113B5, 0x113B7, 0x113C0, 0x113C2, 0x113C2, 0x113C5, 0x113C5, 0x113C7, 0x113CA, 0x113CC, 0x113D5, 0x113D7, 0x113D8, 0x113E1, 0x113E2, }, } m["Ugar"] = process_ranges{ "Ugaritic", 332652, "abjad", ranges = { 0x10380, 0x1039D, 0x1039F, 0x1039F, }, } m["Vaii"] = process_ranges{ "Vai", 523078, "syllabary", ranges = { 0xA500, 0xA62B, }, } m["Visp"] = { "Visible Speech", 1303365, "alphabet", -- Not in Unicode } m["Vith"] = process_ranges{ "Vithkuqi", 3301993, "alphabet", ranges = { 0x10570, 0x1057A, 0x1057C, 0x1058A, 0x1058C, 0x10592, 0x10594, 0x10595, 0x10597, 0x105A1, 0x105A3, 0x105B1, 0x105B3, 0x105B9, 0x105BB, 0x105BC, }, capitalized = true, } m["Wara"] = process_ranges{ "Varang Kshiti", 79199, aliases = {"Warang Citi"}, ranges = { 0x118A0, 0x118F2, 0x118FF, 0x118FF, }, capitalized = true, } m["Wcho"] = process_ranges{ "Wancho", 33713728, "alphabet", ranges = { 0x1E2C0, 0x1E2F9, 0x1E2FF, 0x1E2FF, }, } m["Wole"] = { "Woleai", 6643710, "syllabary", -- Not in Unicode } m["Xpeo"] = process_ranges{ "Old Persian", 1471822, ranges = { 0x103A0, 0x103C3, 0x103C8, 0x103D5, }, } m["Xsux"] = process_ranges{ "Cuneiform", 401, aliases = {"Sumero-Akkadian Cuneiform"}, ranges = { 0x12000, 0x12399, 0x12400, 0x1246E, 0x12470, 0x12474, 0x12480, 0x12543, }, } m["Yezi"] = process_ranges{ "Yezidi", 13175481, "alphabet", ranges = { 0x060C, 0x060C, 0x061B, 0x061B, 0x061F, 0x061F, 0x0660, 0x0669, 0x10E80, 0x10EA9, 0x10EAB, 0x10EAD, 0x10EB0, 0x10EB1, }, direction = "rtl", } m["Yiii"] = process_ranges{ "Yi", 1197646, "syllabary", ranges = { 0x3001, 0x3002, 0x3008, 0x3011, 0x3014, 0x301B, 0x30FB, 0x30FB, 0xA000, 0xA48C, 0xA490, 0xA4C6, 0xFF61, 0xFF65, }, } m["Zanb"] = process_ranges{ "Zanabazar Square", 50809208, "abugida", ranges = { 0x11A00, 0x11A47, }, } m["Zmth"] = process_ranges{ "mathematical notation", 1140046, ranges = { 0x00AC, 0x00AC, 0x00B1, 0x00B1, 0x00D7, 0x00D7, 0x00F7, 0x00F7, 0x03D0, 0x03D2, 0x03D5, 0x03D5, 0x03F0, 0x03F1, 0x03F4, 0x03F6, 0x0606, 0x0608, 0x2016, 0x2016, 0x2032, 0x2034, 0x2040, 0x2040, 0x2044, 0x2044, 0x2052, 0x2052, 0x205F, 0x205F, 0x2061, 0x2064, 0x207A, 0x207E, 0x208A, 0x208E, 0x20D0, 0x20DC, 0x20E1, 0x20E1, 0x20E5, 0x20E6, 0x20EB, 0x20EF, 0x2102, 0x2102, 0x2107, 0x2107, 0x210A, 0x2113, 0x2115, 0x2115, 0x2118, 0x211D, 0x2124, 0x2124, 0x2128, 0x2129, 0x212C, 0x212D, 0x212F, 0x2131, 0x2133, 0x2138, 0x213C, 0x2149, 0x214B, 0x214B, 0x2190, 0x21A7, 0x21A9, 0x21AE, 0x21B0, 0x21B1, 0x21B6, 0x21B7, 0x21BC, 0x21DB, 0x21DD, 0x21DD, 0x21E4, 0x21E5, 0x21F4, 0x22FF, 0x2308, 0x230B, 0x2320, 0x2321, 0x237C, 0x237C, 0x239B, 0x23B5, 0x23B7, 0x23B7, 0x23D0, 0x23D0, 0x23DC, 0x23E2, 0x25A0, 0x25A1, 0x25AE, 0x25B7, 0x25BC, 0x25C1, 0x25C6, 0x25C7, 0x25CA, 0x25CB, 0x25CF, 0x25D3, 0x25E2, 0x25E2, 0x25E4, 0x25E4, 0x25E7, 0x25EC, 0x25F8, 0x25FF, 0x2605, 0x2606, 0x2640, 0x2640, 0x2642, 0x2642, 0x2660, 0x2663, 0x266D, 0x266F, 0x27C0, 0x27FF, 0x2900, 0x2AFF, 0x2B30, 0x2B44, 0x2B47, 0x2B4C, 0xFB29, 0xFB29, 0xFE61, 0xFE66, 0xFE68, 0xFE68, 0xFF0B, 0xFF0B, 0xFF1C, 0xFF1E, 0xFF3C, 0xFF3C, 0xFF3E, 0xFF3E, 0xFF5C, 0xFF5C, 0xFF5E, 0xFF5E, 0xFFE2, 0xFFE2, 0xFFE9, 0xFFEC, 0x1D400, 0x1D454, 0x1D456, 0x1D49C, 0x1D49E, 0x1D49F, 0x1D4A2, 0x1D4A2, 0x1D4A5, 0x1D4A6, 0x1D4A9, 0x1D4AC, 0x1D4AE, 0x1D4B9, 0x1D4BB, 0x1D4BB, 0x1D4BD, 0x1D4C3, 0x1D4C5, 0x1D505, 0x1D507, 0x1D50A, 0x1D50D, 0x1D514, 0x1D516, 0x1D51C, 0x1D51E, 0x1D539, 0x1D53B, 0x1D53E, 0x1D540, 0x1D544, 0x1D546, 0x1D546, 0x1D54A, 0x1D550, 0x1D552, 0x1D6A5, 0x1D6A8, 0x1D7CB, 0x1D7CE, 0x1D7FF, 0x1EE00, 0x1EE03, 0x1EE05, 0x1EE1F, 0x1EE21, 0x1EE22, 0x1EE24, 0x1EE24, 0x1EE27, 0x1EE27, 0x1EE29, 0x1EE32, 0x1EE34, 0x1EE37, 0x1EE39, 0x1EE39, 0x1EE3B, 0x1EE3B, 0x1EE42, 0x1EE42, 0x1EE47, 0x1EE47, 0x1EE49, 0x1EE49, 0x1EE4B, 0x1EE4B, 0x1EE4D, 0x1EE4F, 0x1EE51, 0x1EE52, 0x1EE54, 0x1EE54, 0x1EE57, 0x1EE57, 0x1EE59, 0x1EE59, 0x1EE5B, 0x1EE5B, 0x1EE5D, 0x1EE5D, 0x1EE5F, 0x1EE5F, 0x1EE61, 0x1EE62, 0x1EE64, 0x1EE64, 0x1EE67, 0x1EE6A, 0x1EE6C, 0x1EE72, 0x1EE74, 0x1EE77, 0x1EE79, 0x1EE7C, 0x1EE7E, 0x1EE7E, 0x1EE80, 0x1EE89, 0x1EE8B, 0x1EE9B, 0x1EEA1, 0x1EEA3, 0x1EEA5, 0x1EEA9, 0x1EEAB, 0x1EEBB, 0x1EEF0, 0x1EEF1, }, translit = false, } m["Zname"] = process_ranges{ "Znamenny musical notation", 965834, "pictography", ranges = { 0x1CF00, 0x1CF2D, 0x1CF30, 0x1CF46, 0x1CF50, 0x1CFC3, }, ietf_subtag = "Zsym", translit = false, } m["Zsym"] = process_ranges{ "symbolic", 80071, "pictography", ranges = { 0x20DD, 0x20E0, 0x20E2, 0x20E4, 0x20E7, 0x20EA, 0x20F0, 0x20F0, 0x2100, 0x2101, 0x2103, 0x2106, 0x2108, 0x2109, 0x2114, 0x2114, 0x2116, 0x2117, 0x211E, 0x2123, 0x2125, 0x2127, 0x212A, 0x212B, 0x212E, 0x212E, 0x2132, 0x2132, 0x2139, 0x213B, 0x214A, 0x214A, 0x214C, 0x214F, 0x21A8, 0x21A8, 0x21AF, 0x21AF, 0x21B2, 0x21B5, 0x21B8, 0x21BB, 0x21DC, 0x21DC, 0x21DE, 0x21E3, 0x21E6, 0x21F3, 0x2300, 0x2307, 0x230C, 0x231F, 0x2322, 0x237B, 0x237D, 0x239A, 0x23B6, 0x23B6, 0x23B8, 0x23CF, 0x23D1, 0x23DB, 0x23E3, 0x23FF, 0x2500, 0x259F, 0x25A2, 0x25AD, 0x25B8, 0x25BB, 0x25C2, 0x25C5, 0x25C8, 0x25C9, 0x25CC, 0x25CE, 0x25D4, 0x25E1, 0x25E3, 0x25E3, 0x25E5, 0x25E6, 0x25ED, 0x25F7, 0x2600, 0x2604, 0x2607, 0x263F, 0x2641, 0x2641, 0x2643, 0x265F, 0x2664, 0x266C, 0x2670, 0x27BF, 0x2B00, 0x2B2F, 0x2B45, 0x2B46, 0x2B4D, 0x2B73, 0x2B76, 0x2B95, 0x2B97, 0x2BFF, 0x4DC0, 0x4DFF, 0x1F000, 0x1F02B, 0x1F030, 0x1F093, 0x1F0A0, 0x1F0AE, 0x1F0B1, 0x1F0BF, 0x1F0C1, 0x1F0CF, 0x1F0D1, 0x1F0F5, 0x1F300, 0x1F6D7, 0x1F6DC, 0x1F6EC, 0x1F6F0, 0x1F6FC, 0x1F700, 0x1F776, 0x1F77B, 0x1F7D9, 0x1F7E0, 0x1F7EB, 0x1F7F0, 0x1F7F0, 0x1F800, 0x1F80B, 0x1F810, 0x1F847, 0x1F850, 0x1F859, 0x1F860, 0x1F887, 0x1F890, 0x1F8AD, 0x1F8B0, 0x1F8B1, 0x1F900, 0x1FA53, 0x1FA60, 0x1FA6D, 0x1FA70, 0x1FA7C, 0x1FA80, 0x1FA88, 0x1FA90, 0x1FABD, 0x1FABF, 0x1FAC5, 0x1FACE, 0x1FADB, 0x1FAE0, 0x1FAE8, 0x1FAF0, 0x1FAF8, 0x1FB00, 0x1FB92, 0x1FB94, 0x1FBCA, 0x1FBF0, 0x1FBF9, }, translit = false, character_category = false, -- none } m["Zxxx"] = { "unwritten", 104839715, -- This should not have any characters listed translit = false, character_category = false, -- none } m["Zyyy"] = { "undetermined", 104839687, -- This should not have any characters listed, probably translit = false, character_category = false, -- none } m["Zzzz"] = { "uncoded", 104839675, -- This should not have any characters listed translit = false, character_category = false, -- none } -- These should be defined after the scripts they are composed of. m["Hrkt"] = process_ranges{ "Kana", 187659, "syllabary", aliases = {"Japanese syllabaries"}, ranges = union( m["Hira"].ranges, m["Kana"].ranges ), spaces = false, } m["Jpan"] = process_ranges{ "Japanese", 190502, "logography, syllabary", ranges = union( m["Hrkt"].ranges, m["Hani"].ranges, m["Latn"].ranges ), spaces = false, sort_by_scraping = true, } m["Kore"] = process_ranges{ "Korean", 711797, "logography, syllabary", ranges = union( m["Hang"].ranges, m["Hani"].ranges, m["Latn"].ranges ), -- `漢字(한자)`→`漢字` -- `가-나-다`→`가나다`, `가--나--다`→`가-나-다` -- `온돌(溫突/溫堗)`→`온돌` ([[ondol]]) strip_diacritics = { remove_diacritics = u(0x302E) .. u(0x302F), from = {"([" .. m["Hani"].characters .. "])%(.-%)", "^%-", "%-$", "%-(%-?)", "\1", "%([" .. m["Hani"].characters .. "/]+%)"}, to = {"%1", "\1", "\1", "%1", "-"} } } return require("Module:languages").finalizeData(m, "script") kvyy35f6s5h4xpezxctp3uvd3pdnrtg मॉड्यूल:families 828 302161 488021 487831 2026-09-04T09:33:25Z SM7 6218 step back 488021 Scribunto text/plain local export = {} local families_by_name_module = "Module:families/canonical names" local families_data_module = "Module:families/data" local json_module = "Module:JSON" local language_like_module = "Module:language-like" local languages_module = "Module:languages" local load_module = "Module:load" local table_module = "Module:table" local get_by_code -- Defined below. local gmatch = string.gmatch local insert = table.insert local ipairs = ipairs local make_object -- Defined below. local pairs = pairs local require = require local setmetatable = setmetatable local type = type --[==[ Loaders for functions in other modules, which overwrite themselves with the target function when called. This ensures modules are only loaded when needed, retains the speed/convenience of locally-declared pre-loaded functions, and has no overhead after the first call, since the target functions are called directly in any subsequent calls.]==] local function category_name_has_suffix(...) category_name_has_suffix = require(language_like_module).categoryNameHasSuffix return category_name_has_suffix(...) end local function category_name_to_code(...) category_name_to_code = require(language_like_module).categoryNameToCode return category_name_to_code(...) end local function deep_copy(...) deep_copy = require(table_module).deepCopy return deep_copy(...) end local function get_lang(...) get_lang = require(languages_module).getByCode return get_lang(...) end local function keys_to_list(...) keys_to_list = require(table_module).keysToList return keys_to_list(...) end local function load_data(...) load_data = require(load_module).load_data return load_data(...) end local function make_lang_object(...) make_lang_object = require(languages_module).makeObject return make_lang_object(...) end local function to_json(...) to_json = require(json_module).toJSON return to_json(...) end --[==[ Loaders for objects, which load data (or some other object) into some variable, which can then be accessed as "foo or get_foo()", where the function get_foo sets the object to "foo" and then returns it. This ensures they are only loaded when needed, and avoids the need to check for the existence of the object each time, since once "foo" has been set, "get_foo" will not be called again.]==] local families_by_name local function get_families_by_name() families_by_name, get_families_by_name = load_data(families_by_name_module), nil return families_by_name end local families_data local function get_families_data() families_data, get_families_data = load_data(families_data_module), nil return families_data end local families_suffixes local function get_families_suffixes() families_suffixes, get_families_suffixes = { "languages", "lects" }, nil return families_suffixes end local Family = {} Family.__index = Family --[==[ Return the family code of the family, e.g. {"ine"} for the Indo-European languages. ]==] function Family:getCode() return self._code end --[==[ Return the canonical name of the family. This is the name used to represent that language family on Wiktionary, and is guaranteed to be unique to that family alone. Example: {"Indo-European"} for the Indo-European languages. ]==] function Family:getCanonicalName() local name = self._name if name == nil then name = self._data[1] self._name = name end return name end --[==[ Return the display form of the family. For families, this is usually the same as the value returned by {getCategoryName("nocap")}, i.e. it reads <code>"<var>name</var> languages"</code> (e.g. {"Indo-Iranian languages"}). For full and etymology-only languages, this is the same as the canonical name, and for scripts, it reads <code>"<var>name</var> script"</code> (e.g. {"Arabic script"}). The displayed text used in {makeCategoryLink()} is always the same as the display form. ]==] function Family:getDisplayForm() local name = self._data[1] if category_name_has_suffix(name, families_suffixes or get_families_suffixes()) then name = name .. " languages" end return name end function Family:getAliases() Family.getAliases = require(language_like_module).getAliases return self:getAliases() end function Family:getVarieties(flatten) Family.getVarieties = require(language_like_module).getVarieties return self:getVarieties(flatten) end function Family:getOtherNames() Family.getOtherNames = require(language_like_module).getOtherNames return self:getOtherNames() end function Family:getAllNames() Family.getAllNames = require(language_like_module).getAllNames return self:getAllNames() end --[==[Returns a table of types as a lookup table (with the types as keys). The possible types are * {family}: This object is a family. * {full}: This object is a "full" family. This includes all families but a couple of etymology-only families for Old and Middle Iranian languages. * {etymology-only}: This object is an etymology-only family, similar to etymology-only languages. There are currently only two such families, for Old Iranian languages and Middle Iranian languages (which do not represent proper clades and have no proto-languages, hence cannot be full families). ]==] function Family:getTypes() local types = self._types if types == nil then types = {family = true} if self:getFullCode() == self:getCode() then types.full = true else types["etymology-only"] = true end local rawtypes = self._data.type if rawtypes then for t in gmatch(rawtypes, "[^,]+") do types[t] = true end end self._types = types end return types end --[==[Given a list of types as strings, returns true if the family has all of them.]==] function Family:hasType(...) Family.hasType = require(language_like_module).hasType return self:hasType(...) end --[==[Returns a {Family} object for the superfamily that the family belongs to.]==] function Family:getFamily() if self._familyObject == nil then local familyCode = self:getFamilyCode() if familyCode then self._familyObject = get_by_code(familyCode) else self._familyObject = false end end return self._familyObject or nil end --[==[Returns the code of the family's superfamily.]==] function Family:getFamilyCode() if not self._familyCode then self._familyCode = self._data[3] end return self._familyCode end --[==[Returns the canonical name of the family's superfamily.]==] function Family:getFamilyName() if self._familyName == nil then local family = self:getFamily() if family then self._familyName = family:getCanonicalName() else self._familyName = false end end return self._familyName or nil end --[==[Check whether the family belongs to {superfamily} (which can be a family code or object), and returns a boolean. If more than one is given, returns {true} if the family belongs to any of them. A family is '''not''' considered to belong to itself.]==] function Family:inFamily(...) for _, superfamily in ipairs{...} do if type(superfamily) == "table" then superfamily = superfamily:getCode() end local family, code = self:getFamily() while family do code = family:getCode() if code == superfamily then return true end family = family:getFamily() -- If family is parent to itself, return false. if family and family:getCode() == code then return false end end return false end end function Family:getParent() if self._parentObject == nil then local parentCode = self:getParentCode() if parentCode then self._parentObject = get_lang(parentCode, nil, true, true) else self._parentObject = false end end return self._parentObject or nil end function Family:getParentCode() if not self._parentCode then self._parentCode = self._data.parent end return self._parentCode end function Family:getParentName() if self._parentName == nil then local parent = self:getParent() if parent then self._parentName = parent:getCanonicalName() else self._parentName = false end end return self._parentName or nil end function Family:getParentChain() if not self._parentChain then self._parentChain = {} local parent = self:getParent() while parent do insert(self._parentChain, parent) parent = parent:getParent() end end return self._parentChain end function Family:hasParent(...) --checkObject("family", nil, ...) for _, other_family in ipairs{...} do for _, parent in ipairs(self:getParentChain()) do if type(other_family) == "string" then if other_family == parent:getCode() then return true end else if other_family:getCode() == parent:getCode() then return true end end end end return false end --[==[ If the family is etymology-only, this iterates through its parents until a full family is found, and the corresponding object is returned. If the family is a full family, then it simply returns itself. ]==] function Family:getFull() if not self._fullObject then local fullCode = self:getFullCode() if fullCode ~= self:getCode() then self._fullObject = get_lang(fullCode, nil, nil, true) else self._fullObject = self end end return self._fullObject end --[==[ If the family is etymology-only, this iterates through its parents until a full family is found, and the corresponding code is returned. If the family is a full family, then it simply returns the family code. ]==] function Family:getFullCode() return self._fullCode or self:getCode() end --[==[ If the family is etymology-only, this iterates through its parents until a full family is found, and the corresponding canonical name is returned. If the family is a full family, then it simply returns the canonical name of the family. ]==] function Family:getFullName() if self._fullName == nil then local full = self:getFull() if full then self._fullName = full:getCanonicalName() else self._fullName = false end end return self._fullName or nil end --[==[ Return a {Language} object (see [[Module:languages]]) for the proto-language of this family, if one exists. Otherwise, return {nil}. ]==] function Family:getProtoLanguage() if self._protoLanguageObject == nil then self._protoLanguageObject = get_lang(self._data.protoLanguage or self:getCode() .. "-pro", nil, true) or false end return self._protoLanguageObject or nil end function Family:getProtoLanguageCode() if self._protoLanguageCode == nil then local protoLanguage = self:getProtoLanguage() self._protoLanguageCode = protoLanguage and protoLanguage:getCode() or false end return self._protoLanguageCode or nil end function Family:getProtoLanguageName() if not self._protoLanguageName then self._protoLanguageName = self:getProtoLanguage():getCanonicalName() end return self._protoLanguageName end function Family:hasAncestor(...) -- Go up the family tree until a protolanguage is found. local family = self local protolang = family:getProtoLanguage() while not protolang do family = family:getFamily() protolang = family:getProtoLanguage() -- Return false if the family is its own family, to avoid an infinite loop. if family:getFamilyCode() == family:getCode() then return false end end -- If the protolanguage is not in the family, it must therefore be ancestral to it. Check if it is a match. for _, otherlang in ipairs{...} do if ( type(otherlang) == "string" and protolang:getCode() == otherlang or type(otherlang) == "table" and protolang:getCode() == otherlang:getCode() ) and not protolang:inFamily(self) then return true end end -- If not, check the protolanguage's ancestry. return protolang:hasAncestor(...) end local function fetch_descendants(self, format) local languages = require("Module:languages/code to canonical name") local etymology_languages = require("Module:etymology languages/code to canonical name") local families = require("Module:families/code to canonical name") local descendants = {} -- Iterate over all three datasets. for _, data in ipairs{languages, etymology_languages, families} do for code in pairs(data) do local lang = get_lang(code, nil, true, true) if lang:inFamily(self) then if format == "object" then insert(descendants, lang) elseif format == "code" then insert(descendants, code) elseif format == "name" then insert(descendants, lang:getCanonicalName()) end end end end return descendants end function Family:getDescendants() if not self._descendantObjects then self._descendantObjects = fetch_descendants(self, "object") end return self._descendantObjects end function Family:getDescendantCodes() if not self._descendantCodes then self._descendantCodes = fetch_descendants(self, "code") end return self._descendantCodes end function Family:getDescendantNames() if not self._descendantNames then self._descendantNames = fetch_descendants(self, "name") end return self._descendantNames end function Family:hasDescendant(...) for _, lang in ipairs{...} do if type(lang) == "string" then lang = get_lang(lang, nil, true) end if lang:inFamily(self) then return true end end return false end --[==[ Return the name of the main category of that family. Example: {"Germanic languages"} for the Germanic languages, whose category is at [[:Category:Germanic languages]]. Unless optional argument `nocap` is given, the family name at the beginning of the returned value will be capitalized. This capitalization is correct for category names, but not if the family name is lowercase and the returned value of this function is used in the middle of a sentence. (For example, the pseudo-family with the code {qfa-mix} has the name {"mixed"}, which should remain lowercase when used as part of the category name [[:Category:Terms derived from mixed languages]] but should be capitalized in [[:Category:Mixed languages]].) If you are considering using {getCategoryName("nocap")}, use {getDisplayForm()} instead. ]==] function Family:getCategoryName(nocap) local name = self._data.categoryName or self:getDisplayForm() if not nocap then name = mw.getContentLanguage():ucfirst(name) end return name end function Family:makeCategoryLink() return "[[:Category:" .. self:getCategoryName() .. "|" .. self:getDisplayForm() .. "]]" end --[==[Returns the Wikidata item id for the family or <code>nil</code>. This corresponds to the the second field in the data modules.]==] function Family:getWikidataItem() Family.getWikidataItem = require(language_like_module).getWikidataItem return self:getWikidataItem() end --[==[ Returns the name of the Wikipedia article for the family. `project` specifies the language and project to retrieve the article from, defaulting to {"enwiki"} for the English Wikipedia. Normally if specified it should be the project code for a specific-language Wikipedia e.g. "zhwiki" for the Chinese Wikipedia, but it can be any project, including non-Wikipedia ones. If the project is the English Wikipedia and the property {wikipedia_article} is present in the data module it will be used first. In all other cases, a sitelink will be generated from {:getWikidataItem} (if set). The resulting value (or lack of value) is cached so that subsequent calls are fast. If no value could be determined, and `noCategoryFallback` is {false}, {:getCategoryName} is used as fallback; otherwise, {nil} is returned. Note that if `noCategoryFallback` is {nil} or omitted, it defaults to {false} if the project is the English Wikipedia, otherwise to {true}. In other words, under normal circumstances, if the English Wikipedia article couldn't be retrieved, the return value will fall back to a link to the family's category, but this won't normally happen for any other project. ]==] function Family:getWikipediaArticle(noCategoryFallback, project) Family.getWikipediaArticle = require(language_like_module).getWikipediaArticle return self:getWikipediaArticle(noCategoryFallback, project) end function Family:makeWikipediaLink() return "[[w:" .. self:getWikipediaArticle() .. "|" .. self:getCanonicalName() .. "]]" end --[==[Returns the name of the Wikimedia Commons category page for the family.]==] function Family:getCommonsCategory() Family.getCommonsCategory = require(language_like_module).getCommonsCategory return self:getCommonsCategory() end function Family:toJSON(opts) local ret = { canonicalName = self:getCanonicalName(), categoryName = self:getCategoryName("nocap"), code = self:getCode(), parent = self:getParentCode(), full = self:getFullCode(), family = self:getFamilyCode(), protoLanguage = self:getProtoLanguageCode(), aliases = self:getAliases(), varieties = self:getVarieties(), otherNames = self:getOtherNames(), type = keys_to_list(self:getTypes()), wikidataItem = self:getWikidataItem(), wikipediaArticle = self:getWikipediaArticle(true), } -- Use `deep_copy` when returning a table, so that there are no editing restrictions imposed by `mw.loadData`. return opts and opts.lua_table and deep_copy(ret) or to_json(ret, opts) end function Family:getData() return self._data end function export.makeObject(code, data) local data_type = type(data) if data_type ~= "table" then error(("bad argument #2 to 'makeObject' (table expected, got %s)"):format(data_type)) end return setmetatable({_data = data, _code = code, _fullCode = code}, Family) end make_object = export.makeObject --[==[ Finds the family whose code matches the one provided. If it exists, it returns a {Family} object representing the family. Otherwise, it returns {nil}.]==] function export.getByCode(code) local data = (families_data or get_families_data())[code] if data == nil then return nil elseif data.parent == nil then return make_object(code, data) end return make_lang_object(code, data) end get_by_code = export.getByCode --[==[ Look for the family whose canonical name (the name used to represent that family on Wiktionary) matches the one provided. If it exists, it returns a {Family} object representing the family. Otherwise, it returns {nil}. The canonical name of families should always be unique (it is an error for two families on Wiktionary to share the same canonical name), so this is guaranteed to give at most one result.]==] function export.getByCanonicalName(name) if name == nil then return nil end local code = (families_by_name or get_families_by_name())[name] if code == nil then return nil end return get_by_code(code) end --[==[ Look for the family whose category name (the name used in categories for that family) matches the one provided. If it exists, it returns a {Family} object representing the family. Otherwise, it returns {nil}. In almost all cases, the category name for a family is its canonical name plus the word "languages", e.g. "Indo-European" has the category name "Indo-European languages". Where a canonical name ends with "languages" or "lects", the category name is identical to the canonical name.]==] function export.getByCategoryName(name) if name == nil then return nil end local code = category_name_to_code( name, " भाषाएँ", families_by_name or get_families_by_name(), families_suffixes or get_families_suffixes() ) if code == nil then return nil end return get_by_code(code) end return export scggsisht5xvplij81zw36y1e5y5von मॉड्यूल:families/data 828 302162 488020 477758 2026-09-04T09:29:44Z SM7 6218 updating... 488020 Scribunto text/plain --[=[ This module contains definitions for all language family codes on Wiktionary. ]=]-- local m = {} m["aav"] = { "Austroasiatic", 33199, aliases = {"Austro-Asiatic"}, } m["aav-khs"] = { "Khasian", 3073734, "aav", aliases = {"Khasic"}, } m["aav-nic"] = { "Nicobarese", 217380, "aav", } m["aav-pkl"] = { "Pnar-Khasi-Lyngngam", nil, "aav-khs", } m["afa"] = { "Afroasiatic", 25268, aliases = {"Afro-Asiatic"}, } m["alg"] = { "Algonquian", 33392, "aql", } m["alg-abp"] = { "Abenaki-Penobscot", 197936, "alg-eas", } m["alg-ara"] = { "Arapahoan", 2153686, "alg", } m["alg-eas"] = { "Eastern Algonquian", 2257525, "alg", } m["alg-sfk"] = { "Sac-Fox-Kickapoo", 1440172, "alg", } m["alv"] = { "Atlantic-Congo", 771124, "nic", } m["alv-aah"] = { "Ayere-Ahan", 750953, "alv-von", } m["alv-ada"] = { "Adamawa", 32906, "alv-sav", } m["alv-bag"] = { "Baga", 2746083, "alv-mel", } m["alv-bak"] = { "Bak", 1708174, "alv-sng", } m["alv-bam"] = { "Bambukic", 4853456, "alv-ada", aliases = {"Yungur-Jen"}, } m["alv-bny"] = { "Banyum", 2892477, "alv-nyn", } m["alv-bua"] = { "Bua", 4982094, "alv-mbd", } m["alv-bwj"] = { "Bikwin-Jen", 84542501, "alv-bam", } m["alv-cng"] = { "Cangin", 1033184, "alv-fwo", } m["alv-ctn"] = { "Central Tano", 1658486, "alv-ptn", aliases = {"Akan"}, } m["alv-dlt"] = { "Delta Edoid", nil, "alv-edo", } m["alv-dur"] = { "Duru", 5316788, "alv-lni", } m["alv-ede"] = { "Ede", 35368, "alv-yor", } m["alv-edk"] = { "Edekiri", 5336735, "alv-yrd", } m["alv-edo"] = { "Edoid", 1287469, "alv-von", } m["alv-eeo"] = { "Edo-Esan-Ora", 12630439, "alv-nce", } m["alv-fli"] = { "Fali", 3450166, "alv", } m["alv-fwo"] = { "Fula-Wolof", 12631267, "alv-sng", } m["alv-gbe"] = { "Gbe", 668284, "alv-von", } m["alv-gda"] = { "Ga-Dangme", 3443338, "alv-kwa", } m["alv-gng"] = { "Guang", 684009, "alv-ptn", } m["alv-gtm"] = { "Ghana-Togo Mountain", 493020, "alv-kwa", aliases = {"Togo Remnant", "Central Togo"}, } m["alv-hei"] = { "Heiban", 108752116, "alv-the", } m["alv-ido"] = { "Idomoid", 974196, "alv-von", } m["alv-igb"] = { "Igboid", 1429100, "alv-von", } m["alv-jfe"] = { "Jola-Felupe", 1708174, "alv-jol", aliases = {"Ejamat"}, } m["alv-jol"] = { "Jola", 35176, "alv-bak", aliases = {"Diola"}, } m["alv-kim"] = { "Kim", 6409701, "alv-mbd", } m["alv-kis"] = { "Kissi", 35696, "alv-mel", } m["alv-krb"] = { "Karaboro", 4213541, "alv-snf", } m["alv-ktg"] = { "Ka-Togo", 5972796, "alv-gtm", } m["alv-kul"] = { "Kulango", 16977424, "alv-sav", aliases = {"Kulango-Lorhon", "Kulango-Lorom"}, } m["alv-kwa"] = { "Kwa", 33430, "nic-vco", } m["alv-lag"] = { "Lagoon", 111210042, "alv-kwa", } m["alv-lek"] = { "Leko", 6520642, other_names = {"Sambaic"}, -- appears to be an alias in Glottolog "alv-lni", } m["alv-lim"] = { "Limba", 35825, "alv", } m["alv-lni"] = { "Leko-Nimbari", 1708170, "alv-ada", other_names = {"Central Adamawa"}, aliases = {"Chamba-Mumuye"}, } m["alv-mbd"] = { "Mbum-Day", 6799816, "alv-ada", } m["alv-mbm"] = { "Mbum", 6799814, "alv-mbd", } m["alv-mel"] = { "Mel", 12122355, "alv", } m["alv-mum"] = { "Mumuye", 84607009, "alv-mye", } m["alv-mye"] = { "Mumuye-Yendang", 6935539, "alv-lni", } m["alv-nal"] = { "Nalu", nil, "alv-sng", } m["alv-nce"] = { "North-Central Edoid", 16110869, "alv-edo", } m["alv-ngb"] = { "Nupe-Gbagyi", 12638649, "alv-nup", aliases = {"Nupe-Gbari"}, } m["alv-ntg"] = { "Na-Togo", nil, "alv-gtm", } m["alv-nup"] = { "Nupoid", 1429143, "alv-von", } m["alv-nwd"] = { "Northwestern Edoid", 16111012, "alv-edo", } m["alv-nyn"] = { "Nyun", nil, "alv-fwo", } m["alv-pap"] = { "Papel", 7132562, "alv-bak", } m["alv-pph"] = { "Phla-Pherá", 3849625, "alv-gbe", } m["alv-ptn"] = { "Potou-Tano", 1475003, "alv-kwa", } m["alv-sav"] = { "Savanna", 4403672, "nic-vco", aliases = {"Savannas"}, } m["alv-sma"] = { "Supyire-Mamara", 4446348, "alv-snf", aliases = {"Suppire-Mamara"}, } m["alv-snf"] = { "Senufo", 33795, "alv", aliases = {"Senufic", "Senoufo", "Sénoufo"}, } m["alv-sng"] = { "Senegambian", 1708753, "alv", } m["alv-snr"] = { "Senari", 4416084, "alv-snf", } m["alv-swd"] = { "Southwestern Edoid", 12633903, "alv-edo", } m["alv-tal"] = { "Talodi", 12643302, "alv-the", } m["alv-tdj"] = { "Tagwana-Djimini", 7675362, "alv-snf", } m["alv-ten"] = { "Tenda", 3217535, "alv-fwo", } m["alv-the"] = { "Talodi-Heiban", 1521145, "alv", } m["alv-von"] = { "Volta-Niger", 34177, "nic-vco", } m["alv-wan"] = { "Wara-Natyoro", 7968830, "alv-sav", } m["alv-wjk"] = { "Waja-Kam", nil, "alv-ada", } m["alv-yek"] = { "Yekhee", nil, "alv-nce", } m["alv-yor"] = { "Yoruba", nil, "alv-edk", } m["alv-yrd"] = { "Yoruboid", 1789745, "alv-von", } m["alv-yun"] = { "Yungur", 84601642, "alv-bam", aliases = {"Bena-Mboi"}, } m["apa"] = { "Apachean", 27758, "ath", aliases = {"Southern Athabaskan"}, } m["aqa"] = { "Alacalufan", 1288430, } m["aql"] = { "Algic", 721612, aliases = {"Algonquian-Ritwan", "Algonquian-Wiyot-Yurok"}, } m["art"] = { "constructed", 33215, "qfa-not", aliases = {"artificial", "planned"}, } m["ath"] = { "Athabaskan", 27475, "xnd", } m["ath-nor"] = { "North Athabaskan", 20738, "ath", aliases = {"Northern Athabaskan"}, } m["ath-pco"] = { "Pacific Coast Athabaskan", 20654, "ath", } m["auf"] = { "Arauan", 626772, aliases = {"Arahuan", "Arauán", "Arawa", "Arawan", "Arawán"}, } --[=[ Exceptional language and family codes for Australian Aboriginal languages can use the prefix "aus-", though "aus" is no longer itself a family code. ]=]-- m["aus-arn"] = { "Arnhem", 2581700, aliases = {"Gunwinyguan", "Macro-Gunwinyguan"}, } m["aus-bub"] = { "Bunuban", 2495148, aliases = {"Bunaban"}, } m["aus-cww"] = { "Central New South Wales", 5061507, "aus-pam", } m["aus-dal"] = { "Daly", 2478079, } m["aus-dyb"] = { "Dyirbalic", 1850666, "aus-pam", } m["aus-gar"] = { "Garawan", 5521951, } m["aus-gun"] = { "Gunwinyguan", 2581700, "aus-arn", aliases = {"Gunwingguan"}, } m["aus-jar"] = { "Jarrakan", 2039423, } m["aus-kar"] = { "Karnic", 4215578, "aus-pam", } m["aus-mir"] = { "Mirndi", 4294095, } m["aus-nga"] = { "Ngayarda", 16153490, "aus-psw", } m["aus-nyu"] = { "Nyulnyulan", 2039408, } m["aus-pam"] = { "Pama-Nyungan", 33942, } m["aus-pmn"] = { "Paman", 2640654, "aus-pam", } m["aus-psw"] = { "Southwest Pama-Nyungan", 2258160, "aus-pam", } m["aus-rnd"] = { "Arandic", 4784071, "aus-pam", } m["aus-tnk"] = { "Tangkic", 1823065, } m["aus-wdj"] = { "Iwaidjan", 4196968, aliases = {"Yiwaidjan"}, } m["aus-wor"] = { "Worrorran", 2038619, } m["aus-yid"] = { "Yidinyic", 4205849, "aus-pam", } m["aus-yng"] = { "Yangmanic", 42727644, } m["aus-yol"] = { "Yolngu", 2511254, "aus-pam", aliases = {"Yolŋu", "Yolngu Matha"}, } m["aus-yuk"] = { "Yuin-Kuric", 3833021, "aus-pam", } m["awd"] = { "Arawak", 626753, aliases = {"Arawakan", "Maipurean", "Maipuran"}, } m["awd-nwk"] = { "Nawiki", nil, "awd", aliases = {"Newiki"}, } m["awd-taa"] = { "Ta-Arawak", 7672731, "awd", aliases = {"Ta-Arawakan", "Ta-Maipurean"}, } m["azc"] = { "Uto-Aztecan", 34073, aliases = {"Uto-Aztekan"}, } m["azc-cup"] = { "Cupan", 19866871, "azc-tak", } m["azc-dur"] = { "Durango Nahuatl", 2386361, "azc-nah", aliases = {"Mexicanero"} } m["azc-hua"] = { "Huasteca Nahuatl", 3832950, "azc-nah", } m["azc-nah"] = { "Nahuan", 11965602, "azc", aliases = {"Aztecan"}, } m["azc-num"] = { "Numic", 2657541, "azc", } m["azc-pim"] = { "Piman", 7194600, "azc", aliases = {"Tepiman"}, } m["azc-tak"] = { "Takic", 1280305, "azc", } m["azc-trc"] = { "Taracahitic", 4245032, "azc", aliases = {"Taracahitan"}, } m["bad"] = { "Banda", 806234, "nic-ubg", } m["bad-cnt"] = { "Central Banda", 3438391, "bad", } m["bai"] = { "Bamileke", 806005, "nic-gre", } m["bat"] = { "Baltic", 33136, "ine-bsl", } m["bat-eas"] = { "East Baltic", 149944, "bat", } m["bat-wes"] = { "West Baltic", 149946, "bat", } m["ber"] = { "Berber", 25448, "afa", aliases = {"Tamazight"}, } m["bnt"] = { "Bantu", 33146, "nic-bds", } m["bnt-baf"] = { "Bafia", 799784, "bnt", } m["bnt-bbo"] = { "Bafo-Bonkeng", nil, "bnt-saw", } m["bnt-bdz"] = { "Boma-Dzing", 1729203, "bnt", } m["bnt-bek"] = { "Bekwilic", nil, "bnt-ndb", } m["bnt-bki"] = { "Bena-Kinga", 16113307, "bnt-bne", } m["bnt-bmo"] = { "Bangi-Moi", nil, "bnt-bnm", } m["bnt-bne"] = { "Northeast Bantu", 7057832, "bnt", } m["bnt-bnm"] = { "Bangi-Ntomba", 806477, "bnt-bte", } m["bnt-boa"] = { "Boan", 4931250, "bnt", aliases = {"Buan", "Ababuan"}, } m["bnt-bot"] = { "Botatwe", 4948532, "bnt", } m["bnt-bsa"] = { "Basaa", 809739, "bnt", } m["bnt-bsh"] = { "Bushoong", 5001551, "bnt-bte", } m["bnt-bso"] = { "Southern Bantu", 980498, "bnt", } m["bnt-bta"] = { "Bati-Angba", 4869303, "bnt-boa", other_names = {"Late Bomokandian"}, aliases = {"Bwa"}, } m["bnt-btb"] = { "Beti", 35118, "bnt", } m["bnt-bte"] = { "Bangi-Tetela", 4855181, "bnt", } m["bnt-bun"] = { "Buja-Ngombe", 4986733, "bnt-mbb", } m["bnt-chg"] = { "Chaga", 33016, "bnt-cht", } m["bnt-cht"] = { "Chaga-Taita", nil, "bnt-bne", } m["bnt-clu"] = { "Chokwe-Luchazi", 3339273, "bnt", } m["bnt-com"] = { "Comorian", 33077, "bnt-sab", } m["bnt-glb"] = { "Great Lakes Bantu", 5599420, "bnt-bne", } m["bnt-haj"] = { "Haya-Jita", 25502360, "bnt-glb", } m["bnt-kak"] = { "Kako", nil, "bnt-pob", } m["bnt-kav"] = { "Kavango", 116544179, "bnt-ksb", } m["bnt-kbi"] = { "Komo-Bira", 6428591, "bnt-boa", } m["bnt-kel"] = { "Kele", 1738162, "bnt-kts", aliases = {"Sheke"}, } m["bnt-kil"] = { "Kilombero", 6408121, "bnt", } m["bnt-kka"] = { "Kikuyu-Kamba", 16114410, "bnt-bne", aliases = {"Thagiicu"}, } m["bnt-kmb"] = { "Kimbundu", 16947687, "bnt", } m["bnt-kng"] = { "Kongo", 6429214, "bnt", } m["bnt-kpw"] = { "Kpwe", 36428, "bnt-saw", } m["bnt-ksb"] = { "Kavango-Southwest Bantu", 6379098, "bnt", } m["bnt-kts"] = { "Kele-Tsogo", 6385577, "bnt", } m["bnt-lbn"] = { "Luban", 4536504, "bnt", } m["bnt-leb"] = { "Lebonya", 6511395, "bnt", } m["bnt-lgb"] = { "Lega-Binja", 6517694, "bnt", } m["bnt-lok"] = { "Logooli-Kuria", nil, "bnt-glb", } m["bnt-lub"] = { "Luba", nil, "bnt-lbn", } m["bnt-lun"] = { "Lunda", 6704091, "bnt", } m["bnt-mak"] = { "Makua", 6740431, "bnt-bso", aliases = {"Makhuwa"}, } m["bnt-mbb"] = { "Mboshi-Buja", 6799764, "bnt", } m["bnt-mbe"] = { "Mbole-Enya", 6799728, "bnt", } m["bnt-mbi"] = { "Mbinga", nil, "bnt-rur", } m["bnt-mbo"] = { "Mboshi", 6799763, "bnt-mbb", } m["bnt-mbt"] = { "Mbete", 1346910, "bnt-tmb", aliases = {"Mbere"}, } m["bnt-mby"] = { "Mbeya", nil, "bnt-ruk", } m["bnt-mij"] = { "Mijikenda", 6845474, "bnt-sab", } m["bnt-mka"] = { "Makaa", nil, "bnt-ndb", } m["bnt-mne"] = { "Manenguba", 31147471, "bnt", aliases = {"Mbo", "Ngoe"}, } m["bnt-mnj"] = { "Makaa-Njem", 1603899, "bnt-pob", } m["bnt-mon"] = { "Mongo", nil, "bnt-bnm", } m["bnt-mra"] = { "Mbugwe-Rangi", 6799795, "bnt", } m["bnt-msl"] = { "Masaba-Luhya", 12636428, "bnt-glb", } m["bnt-mwi"] = { "Mwika", nil, "bnt-ruk", } m["bnt-ncb"] = { "Northeast Coast Bantu", 7057848, "bnt-bne", } m["bnt-ndb"] = { "Ndzem-Bomwali", nil, "bnt-mnj", } m["bnt-ngn"] = { "Ngondi-Ngiri", 7022532, "bnt-mbb", } m["bnt-ngu"] = { "Nguni", 961559, "bnt-bso", aliases = {"Ngoni"}, } m["bnt-nya"] = { "Nyali", 7070832, "bnt-leb", } m["bnt-nyb"] = { "Nyanga-Buyi", 7070882, "bnt", } m["bnt-nyg"] = { "Nyoro-Ganda", 12638666, "bnt-glb", } m["bnt-nys"] = { "Nyasa", 7070921, "bnt", } m["bnt-nze"] = { "Nzebi", 1755498, "bnt-tmb", aliases = {"Njebi"}, } m["bnt-ova"] = { "Ovambo", 36489, "bnt-swb", aliases = {"Oshivambo", "Oshiwambo", "Owambo"}, } m["bnt-par"] = { "Pare", nil, "bnt-ncb", } m["bnt-pen"] = { "Pende", 7162373, "bnt", } m["bnt-pob"] = { "Pomo-Bomwali", nil, "bnt", } m["bnt-ruk"] = { "Rukwa", 7378902, "bnt", } m["bnt-run"] = { "Rungwe", nil, "bnt-ruk", } m["bnt-rur"] = { "Rufiji-Ruvuma", 7377947, "bnt", } m["bnt-ruv"] = { "Ruvu", nil, "bnt-ncb", } m["bnt-rvm"] = { "Ruvuma", nil, "bnt-rur", } m["bnt-sab"] = { "Sabaki", 2209395, "bnt-ncb", } m["bnt-saw"] = { "Sawabantu", 532003, "bnt", } m["bnt-sbi"] = { "Sabi", 7396071, "bnt", } m["bnt-seu"] = { "Seuta", nil, "bnt-ncb", } m["bnt-shh"] = { "Shi-Havu", nil, "bnt-glb", } m["bnt-sho"] = { "Shona", 2904660, "bnt", } m["bnt-sir"] = { "Sira", 1436372, "bnt", aliases = {"Shira-Punu"}, } m["bnt-ske"] = { "Soko-Kele", nil, "bnt-bte", } m["bnt-sna"] = { "Sena", nil, "bnt-nys", } m["bnt-sts"] = { "Sotho-Tswana", 2038386, "bnt-bso", } m["bnt-swb"] = { "Southwest Bantu", 116543539, "bnt-ksb", } m["bnt-swh"] = { "Swahili", nil, "bnt-sab", } m["bnt-tek"] = { "Teke", 36528, "bnt-tmb", } m["bnt-tet"] = { "Tetela", 7706059, "bnt-bte", } m["bnt-tkc"] = { "Central Teke", 36473, "bnt-tek", } m["bnt-tkm"] = { "Takama", nil, "bnt-bne", } m["bnt-tmb"] = { "Teke-Mbede", 7695332, "bnt", aliases = {"Teke-Mbere"}, } m["bnt-tso"] = { "Tsogo", 2458420, other_names = {"Okani"}, --appears to be an alias in Glottolog "bnt-kts", } m["bnt-tsr"] = { "Tswa-Ronga", 12643962, "bnt-bso", } m["bnt-yak"] = { "Yaka", 8047027, "bnt", } m["bnt-yko"] = { "Yasa-Kombe", nil, "bnt-saw", } m["bnt-zbi"] = { "Zamba-Binza", nil, "bnt-bnm", } m["btk"] = { "Batak", 1998595, "poz-nws", } --[=[ Exceptional language and family codes for Central American Indian languages may use the prefix "cai-", though "cai" is no longer itself a family code. ]=]-- --[=[ Exceptional language and family codes for Caucasian languages can use the prefix "cau-", though "cau" is no longer itself a family code. ]=]-- m["cau-abz"] = { "Abkhaz-Abaza", 4663617, "cau-nwc", other_names = {"Abkhaz-Tapanta"}, aliases = {"Abazgi"}, } m["cau-and"] = { "Andian", 492152, "cau-ava", aliases = {"Andic"}, } m["cau-ava"] = { "Avaro-Andian", 4055404, "cau-nec", aliases = {"Avar-Andian", "Avar-Andi", "Avar-Andic"}, } m["cau-cir"] = { "Circassian", 858543, "cau-nwc", aliases = {"Cherkess"}, } m["cau-drg"] = { "Dargwa", 5222637, "cau-nec", other_names = {"Dargin"}, } m["cau-esm"] = { "Eastern Samur", nil, "cau-sam", } m["cau-ets"] = { "East Tsezian", 121437666, "cau-tsz", aliases = {"East Tsezic", "East Didoic"}, } m["cau-lzg"] = { "Lezghian", 2144370, "cau-nec", aliases = {"Lezgi", "Lezgian", "Lezgic"}, } m["cau-nkh"] = { "Nakh", 24441, "cau-nec", aliases = {"North-Central Caucasian"}, } m["cau-nec"] = { "Northeast Caucasian", 27387, aliases = {"Dagestanian", "Nakho-Dagestanian", "Caspian"}, } m["cau-nwc"] = { "Northwest Caucasian", 33852, aliases = {"Abkhazo-Adyghean", "Abkhaz-Adyghe", "Pontic"}, } m["cau-sam"] = { "Samur", 15229151, "cau-lzg", } m["cau-ssm"] = { "Southern Samur", nil, "cau-sam", } m["cau-tsz"] = { "Tsezian", 1651530, "cau-nec", aliases = {"Tsezic", "Didoic"}, } m["cau-vay"] = { "Vainakh", 4102486, "cau-nkh", aliases = {"Veinakh", "Vaynakh"}, } m["cau-wsm"] = { "Western Samur", nil, "cau-sam", } m["cau-wts"] = { "West Tsezian", 121437697, "cau-tsz", aliases = {"West Tsezic", "West Didoic"}, } m["cba"] = { "Chibchan", 520478, "qfa-mch", -- or none if Macro-Chibchan is considered undemonstrated } m["ccs"] = { "Kartvelian", 34030, aliases = {"South Caucasian"}, } m["ccs-gzn"] = { "Georgian-Zan", 34030, "ccs", aliases = {"Karto-Zan"}, } m["ccs-zan"] = { "Zan", 2606912, "ccs-gzn", aliases = {"Zanuri", "Colchian"}, } m["cdc"] = { "Chadic", 33184, "afa", } m["cdc-cbm"] = { "Central Chadic", 2251547, "cdc", aliases = {"Biu-Mandara"}, } m["cdc-est"] = { "East Chadic", 2276221, "cdc", } m["cdc-mas"] = { "Masa", 2136092, "cdc", } m["cdc-wst"] = { "West Chadic", 2447774, "cdc", } m["cdd"] = { "Caddoan", 1025090, } m["cel"] = { "Celtic", 25293, "ine", } m["cel-bry"] = { "Brythonic", 156877, "cel-ins", aliases = {"Brittonic"}, } m["cel-brs"] = { "Southwestern Brythonic", 2612853, "cel-bry", aliases = {"Southwestern Brittonic"}, } m["cel-brw"] = { "Western Brythonic", 593069, "cel-bry", aliases = {"Western Brittonic"}, } m["cel-gae"] = { "Goidelic", 56433, "cel-ins", aliases = {"Gaelic"}, protoLanguage = "pgl", } m["cel-his"] = { "Hispano-Celtic", 4204136, "cel", } m["cel-ins"] = { "Insular Celtic", 214506, "cel", } m["chi"] = { "Chimakuan", 1073088, } m["chm"] = { "Mari", 973685, "urj", } m["cmc"] = { "Chamic", 2997506, "poz-mcm", } m["crp"] = { "creole or pidgin", 19682167, "qfa-cnt", } m["csu"] = { "Central Sudanic", 190822, "ssa", } m["csu-bba"] = { "Bongo-Bagirmi", 3505042, "csu", } m["csu-bbk"] = { "Bongo-Baka", 4941917, "csu-bba", } m["csu-bgr"] = { "Bagirmi", 4841948, "csu-bba", aliases = {"Bagirmic"}, } m["csu-bkr"] = { "Birri-Kresh", nil, "csu", } m["csu-ecs"] = { "Eastern Central Sudanic", 16911698, "csu", aliases = {"East Central Sudanic", "Central Sudanic East", "Lendu-Mangbetu"}, } m["csu-kab"] = { "Kaba", 6343715, "csu-bba", } m["csu-lnd"] = { "Lendu", 6522357, "csu-ecs", aliases = {"Lenduic"}, } m["csu-maa"] = { "Mangbetu", 6748874, "csu-ecs", aliases = {"Mangbetu-Asoa", "Mangbetu-Asua"}, } m["csu-mle"] = { "Mangbutu-Lese", 17009406, "csu-ecs", aliases = {"Mangbutu-Efe", "Mangbutu", "Membi-Mangbutu-Efe"}, } m["csu-mma"] = { "Moru-Madi", 6915156, "csu-ecs", } m["csu-sar"] = { "Sara", 2036691, "csu-bba", } m["csu-val"] = { "Vale", 7909520, "csu-bba", } m["cus"] = { "Cushitic", 33248, "afa", } m["cus-cen"] = { "Central Cushitic", 56569, "cus", } m["cus-eas"] = { "East Cushitic", 56568, "cus", } m["cus-hec"] = { "Highland East Cushitic", 56524, "cus-eas", } m["cus-som"] = { "Somaloid", 56774, "cus-eas", aliases = {"Sam", "Macro-Somali"}, } m["cus-sou"] = { "South Cushitic", 56525, "cus", } m["day"] = { "Land Dayak", 2760613, "poz", } m["del"] = { "Lenape", 2665761, "alg-eas", aliases = {"Delaware"}, } m["den"] = { "Slavey", 13272, "ath-nor", aliases = {"Slave", "Slavé"}, } m["dmn"] = { "Mande", 33681, "nic", } m["dmn-bbu"] = { "Bisa-Busa", 12627956, "dmn-mde", } m["dmn-emn"] = { "East Manding", nil, "dmn-man", } m["dmn-jje"] = { "Jogo-Jeri", nil, "dmn-mjo", } m["dmn-man"] = { "Manding", 35772, "dmn-mmo", } m["dmn-mda"] = { "Mano-Dan", nil, "dmn-mse", } m["dmn-mdc"] = { "Central Mande", 5972907, "dmn-mdw", } m["dmn-mde"] = { "Eastern Mande", 12633080, "dmn", } m["dmn-mdw"] = { "Western Mande", 16113831, "dmn", } m["dmn-mjo"] = { "Manding-Jogo", 12636153, "dmn-mdc", } m["dmn-mmo"] = { "Manding-Mokole", nil, "dmn-mva", } m["dmn-mnk"] = { "Maninka", 36186, "dmn-emn", } m["dmn-mnw"] = { "Northwestern Mande", 5972910, "dmn-mdw", } m["dmn-mok"] = { "Mokole", 16935447, "dmn-mmo", } m["dmn-mse"] = { "Southeastern Mande", 5972912, "dmn-mde", } m["dmn-msw"] = { "Southwestern Mande", 12633904, "dmn-mdw", } m["dmn-mva"] = { "Manding-Vai", nil, "dmn-mjo", } m["dmn-nbe"] = { "Nwa-Beng", nil, "dmn-mse", } m["dmn-sam"] = { "Samo", 36327, "dmn-bbu", aliases = {"Samuic"}, } m["dmn-smg"] = { "Samogo", 7410000, "dmn-mnw", aliases = {"Duun-Seenku"}, } m["dmn-snb"] = { "Soninke-Bobo", 16111680, "dmn-mnw", } m["dmn-sya"] = { "Susu-Yalunka", nil, "dmn-mdc", } m["dmn-vak"] = { "Vai-Kono", nil, "dmn-mva", } m["dmn-wmn"] = { "West Manding", nil, "dmn-man", } m["dra"] = { "Dravidian", 33311, } m["dra-cen"] = { "Central Dravidian", 12628823, "dra", } m["dra-gki"] = { "Gondi-Kui", 12631610, "dra-sdt", } m["dra-gon"] = { "Gondi", 55639812, "dra-gki", } m["dra-imd"] = { "Irula-Muduga", nil, "dra-tkn", } m["dra-kan"] = { "Kannadoid", 6363888, "dra-tkn", protoLanguage = "dra-okn", } m["dra-kki"] = { "Konda-Kui", nil, "dra-gki", } m["dra-kml"] = { "Kurux-Malto", 68002822, "dra-nor", } m["dra-knk"] = { "Kolami-Naiki", 10547037, "dra-cen", } m["dra-kod"] = { "Kodagu", 67983106, "dra-tkd", } m["dra-kor"] = { "Koraga", 33394, "dra-tlk", } m["dra-mal"] = { "Malayalamoid", 6741581, "dra-tml", } m["dra-mdy"] = { "Madiya", 27602, "dra-gon", } m["dra-mlo"] = { "Malto", nil, "dra-kml", } m["dra-mur"] = { "Muria", 6938499, "dra-gon", } m["dra-nor"] = { "North Dravidian", 16110967, "dra", } m["dra-pgd"] = { "Parji-Gadaba", 10620428, "dra-cen", } m["dra-sdo"] = { "South Dravidian I", 16112843, -- Wikipedia's "South Dravidian" is South Dravidian I in this scheme. "dra-sou", aliases = {"South Dravidian"}, -- This is why I and II are used. } m["dra-sdt"] = { "South Dravidian II", 12633975, "dra-sou", aliases = {"South-Central Dravidian"}, } m["dra-sou"] = { "South Dravidian", 128886618, "dra", aliases = {"Southern Dravidian"}, } m["dra-tam"] = { "Tamiloid", 7681417, "dra-tml", protoLanguage = "oty", } m["dra-tel"] = { "Teluguic", nil, "dra-sdt", protoLanguage = "dra-ote", } m["dra-tkd"] = { "Tamil-Kodagu", 25494510, "dra-tkn", } m["dra-tkn"] = { "Tamil-Kannada", 6478506, "dra-sdo", } m["dra-tkt"] = { "Toda-Kota", 67983857, "dra-tkd", } m["dra-tlk"] = { "Tulu-Koraga", nil, "dra-sdo", } m["dra-tml"] = { "Tamil-Malayalam", 10690507, "dra-tkd", } m["egx"] = { "Egyptian", 50868, "afa", protoLanguage = "egy", } m["ero"] = { "Horpa", 56854, "sit-wgy", } m["esx"] = { "Eskimo-Aleut", 25946, } m["esx-esk"] = { "Eskimo", 25946, "esx", } m["esx-inu"] = { "Inuit", 27796, "esx-esk", } m["euq"] = { "Vasconic", 4669240, } m["gba"] = { "Gbaya", 3099986, "alv-sav", } m["gba-eas"] = { "Eastern Gbaya", nil, "gba", } m["gba-sou"] = { "Southern Gbaya", nil, "gba", } m["gba-wes"] = { "Western Gbaya", nil, "gba", } m["gem"] = { "Germanic", 21200, "ine", } m["gio"] = { "Gelao", 56401, "qfa-kra", } m["gme"] = { "East Germanic", 108662, "gem", } m["gmq"] = { "North Germanic", 106085, "gem", } m["gmq-eas"] = { "East Scandinavian", 3090263, "gmq", protoLanguage = "non-oen", } m["gmq-ins"] = { "Insular Scandinavian", nil, "gmq-wes", } m["gmq-wes"] = { "West Scandinavian", 1792570, "gmq", protoLanguage = "non-own", } m["gmw"] = { "West Germanic", 26721, "gem", } m["gmw-afr"] = { "Anglo-Frisian", 5329170, "gmw-nsg", } m["gmw-ang"] = { "Anglic", 1346342, "gmw-afr", protoLanguage = "ang", } m["gmw-fri"] = { "Frisian", 25325, "gmw-afr", protoLanguage = "ofs", } m["gmw-frk"] = { "Low Franconian", 153050, "gmw", protoLanguage = "frk", } m["gmw-hgm"] = { "High German", 52040, "gmw", protoLanguage = "goh", } m["gmw-ian"] = { "Irish Anglo-Norman", 120719384, "gmw-ang", protoLanguage = "enm", } m["gmw-lgm"] = { "Low German", 25433, "gmw-nsg", protoLanguage = "osx", } m["gmw-nsg"] = { "North Sea Germanic", 30134, "gmw", aliases = {"Ingvaeonic"}, } m["gn"] = { "Guarani", 35876, "tup-gua", aliases = {"Guaraní"}, } m["grb"] = { "Grebo proper", 35257, "kro-grb", } m["grk"] = { "Hellenic", 2042538, "ine", aliases = {"Greek"}, } m["him"] = { "Western Pahari", 10939493, "inc-pah", aliases = {"Himachali"}, } m["hmn"] = { "Hmongic", 3307894, "hmx", } m["hmx"] = { "Hmong-Mien", 33322, aliases = {"Miao-Yao"}, } m["hmx-mie"] = { "Mienic", 7992695, "hmx", } m["hok"] = { "Hokan", 33406, } m["hyx"] = { "Armenian", 8785, "ine", } m["iir"] = { "Indo-Iranian", 33514, "ine", } m["iir-nur"] = { "Nuristani", 161804, "iir", } m["nur-nor"] = { "Northern Nuristani", nil, "iir-nur", } m["nur-sou"] = { "Southern Nuristani", nil, "iir-nur", } m["ijo"] = { "Ijoid", 1325759, "nic", other_names = {"Ijaw"}, -- Ijaw may be a subfamily } m["inc"] = { "Indo-Aryan", 33577, "iir", aliases = {"Indic"}, } m["inc-bas"] = { "Bengali-Assamese", 4179137, "inc-eas", aliases = {"Assamese-Bengali", "Gauda-Kamarupa"}, } m["inc-bhi"] = { "Bhil", 4901727, "inc-cen", } m["inc-bih"] = { "Bihari", 135305, "inc-eas", } m["inc-cen"] = { "Central Indo-Aryan", 10979187, "inc", protoLanguage = "inc-asa", } m["inc-chi"] = { "Chitrali", 11732797, "inc-dar", } m["inc-dar"] = { "Dardic", 161101, "inc", protoLanguage = "inc-ash", } m["inc-dre"] = { "Eastern Dardic", nil, "inc-dar", } m["inc-dng"] = { "Dangari", nil, "inc-shn", } m["inc-eas"] = { "Eastern Indo-Aryan", 12593391, "inc", protoLanguage = "inc-aav", } m["inc-hal"] = { "Halbic", 16910593, "inc-eas", aliases = {"Halbi"}, } m["inc-hie"] = { "Eastern Hindi", 4126648, "inc-cen", aliases = {"Purabiyā"}, protoLanguage = "inc-oaw", } m["inc-hiw"] = { "Western Hindi", 12600937, "inc-cen", protoLanguage = "inc-ohi", } m["inc-hnd"] = { "Hindustani", 11051, "inc-hiw", aliases = {"Hindi-Urdu"}, protoLanguage = "hi-mid", } m["inc-ins"] = { "Insular Indo-Aryan", 12179302, "inc", protoLanguage = "inc-apa", } m["inc-kas"] = { "Kashmiric", nil, "inc-dre", aliases = {"Kashmiri"}, } m["inc-koh"] = { "Kohistani", 13018610, "inc-dre", } m["inc-krd"] = { "KRDS languages", 6356154, "inc-eas", aliases = {"Kamta, Rajbanshi, Deshi and Surjapuri", "KRNB languages", "Kamta, Rajbanshi and Northern Deshi Bangla"}, } m["inc-kun"] = { "Kunar", nil, "inc-dar", } m["inc-mid"] = { "Middle Indo-Aryan", 3236316, "inc", aliases = {"Middle Indic"}, } m["inc-nwe"] = { "Northwestern Indo-Aryan", 16111018, "inc", protoLanguage = "inc-apa", } m["inc-nor"] = { "Northern Indo-Aryan", 946077, "inc", protoLanguage = "inc-aka", } m["inc-old"] = { "Old Indo-Aryan", 118976896, "inc", aliases = {"Old Indic"}, } m["inc-pac"] = { "Central Pahari", nil, "inc-pah", } m["inc-pae"] = { "Eastern Pahari", nil, "inc-pah", } m["inc-pah"] = { "Pahari", 946077, "inc-nor", aliases = {"Pahadi"}, protoLanguage = "inc-aka", } m["inc-pan"] = { "Punjabic", 2656685, "inc-nwe", aliases = {"Greater Punjabic"}, protoLanguage = "inc-opa", } m["inc-pas"] = { "Pashayi", 36670, "inc-dar", aliases = {"Pashai"}, } m["inc-rom"] = { "Romani", 13201, "inc-wes", aliases = {"Romany", "Gypsy", "Gipsy"}, } m["inc-sad"] = { "Sadanic", 109546827, "inc-bih", aliases = {"Sadani"}, } m["inc-shn"] = { "Shinaic", 12646125, "inc-dre", } m["inc-snd"] = { "Sindhic", 7522212, "inc-nwe", protoLanguage = "inc-avr", } m["inc-sou"] = { "Southern Indo-Aryan", 10856062, "inc", protoLanguage = "inc-ama", } m["inc-tha"] = { "Tharu", 34035, "inc-eas", } m["inc-wes"] = { "Western Indo-Aryan", nil, "inc", protoLanguage = "inc-agu", } m["ine"] = { "Indo-European", 19860, aliases = {"Indo-Germanic"}, } m["ine-ana"] = { "Anatolian", 147085, "ine", } m["ine-bsl"] = { "Balto-Slavic", 147356, "ine", } m["ine-luw"] = { "Luwic", 115748615, "ine-ana", aliases = {"Luvic"}, } m["ine-toc"] = { "Tocharian", 37029, "ine", aliases = {"Tokharian"}, } m["ira"] = { "Iranian", 33527, "iir", } m["ira-csp"] = { "Caspian", 5049123, "ira-mpr", } m["ira-cen"] = { "Central Iranian", nil, "ira", } m["ira-kms"] = { "Komisenian", nil, "ira-mpr", aliases = {"Semnani"}, } m["ira-lur"] = { "Luric", nil, -- ? "ira-swi", } m["ira-mid"] = { "Middle Iranian", 6841465, "ira", } m["ira-mny"] = { "Munji-Yidgha", nil, "ira-sym", aliases = {"Yidgha-Munji"}, } m["ira-msh"] = { "Mazanderani-Shahmirzadi", nil, "ira-csp", } m["ira-nei"] = { "Northeastern Iranian", 10775567, "ira", } m["ira-nwi"] = { "Northwestern Iranian", 390576, "ira-wes", } m["ira-old"] = { "Old Iranian", 23301845, "ira", } m["ira-orp"] = { "Ormuri-Parachi", nil, "ira-sei", } m["ira-pat"] = { "Pathan", nil, "ira-sei", } m["ira-sbc"] = { "Sogdo-Bactrian", nil, "ira-nei", } m["ira-mpr"] = { "Medo-Parthian", nil, "ira-nwi", aliases = {"Partho-Median"}, } m["ira-sgi"] = { "Sanglechi-Ishkashimi", 18711232, "ira-sei", } m["ira-shr"] = { "Shughni-Roshani", 11732824, "ira-shy", } m["ira-shy"] = { "Shughni-Yazghulami", nil, "ira-sym", } m["ira-sgc"] = { "Sogdic", nil, "ira-sbc", aliases = {"Sogdian"}, } m["ira-sei"] = { "Southeastern Iranian", 3833002, "ira", } m["ira-swi"] = { "Southwestern Iranian", 390424, "ira-wes", } m["ira-sym"] = { "Shughni-Yazghulami-Munji", nil, "ira-sei", } m["ira-wes"] = { "Western Iranian", 129850, "ira", } m["ira-zgr"] = { "Zaza-Gorani", 167854, "ira-mpr", aliases = {"Zaza-Gurani", "Gorani-Zaza"}, } m["iro"] = { "Iroquoian", 33623, } m["iro-nor"] = { "North Iroquoian", nil, "iro", } m["itc"] = { "Italic", 131848, "ine", } m["itc-laf"] = { "Latino-Faliscan", 33478, "itc", aliases = {"Latinian"}, } m["itc-sbl"] = { "Osco-Umbrian", 515194, "itc", aliases = {"Sabellic", "Sabellian"}, } m["jpx"] = { "Japonic", 33612, aliases = {"Japanese", "Japanese-Ryukyuan"}, } m["jpx-nry"] = { "Northern Ryukyuan", 20862796, "jpx-ryu", } m["jpx-ryu"] = { "Ryukyuan", 56393, "jpx", } m["jpx-sry"] = { "Southern Ryukyuan", 18392243, "jpx-ryu", } m["kar"] = { "Karen", 1364815, "sit", } m["kca"] = { "Khanty", 33563, "urj-ugr", aliases = {"Khantyic", "Khantic"}, } --[=[ Exceptional language and family codes for Khoisan and Kordofanian languages can use the prefix "khi-" and "kdo-" respectively, though they are no longer family codes themselves. ]=]-- m["khi-kal"] = { "Kalahari Khoe", nil, "khi-kho", } m["khi-khk"] = { "Khoekhoe", nil, "khi-kho", } m["khi-kkw"] = { "Khoe-Kwadi", 60785084, aliases = {"Kwadi-Khoe"}, } m["khi-kho"] = { "Khoe", 2736449, "khi-kkw", aliases = {"Central Khoisan"}, } m["khi-kxa"] = { "Kx'a", 6450587, aliases = {"Kxa", "Ju-ǂHoan"}, } m["khi-tuu"] = { "Tuu", 631046, aliases = {"Kwi", "Taa-Kwi", "Southern Khoisan", "Taa-ǃKwi", "Taa-ǃUi", "ǃUi-Taa"}, } m["kro"] = { "Kru", 33535, "nic-vco", } m["kro-aiz"] = { "Aizi", 4699431, "kro", } m["kro-bet"] = { "Bété", 32956, "kro-ekr", } m["kro-did"] = { "Dida", 32685, "kro-ekr", } m["kro-ekr"] = { "Eastern Kru", 5972899, "kro", } m["kro-grb"] = { "Grebo", 5601537, "kro-wkr", } m["kro-wee"] = { "Wee", nil, "kro-wkr", } m["kro-wkr"] = { "Western Kru", 5972897, "kro", } m["ku"] = { "Kurdish", 36368, "ira-nwi", } m["kv"] = { "Komi", 36126, -- "Komi language" in Wikipedia but refers specifically to Komi-Zyrian; no Wikidata item for Komi family "urj-prm", } m["map"] = { "Austronesian", 49228, } m["map-ata"] = { "Atayalic", 716610, "map", } m["mjg"] = { "Monguor", 34214, "xgn-shr", } m["mkh"] = { "Mon-Khmer", 33199, "aav", } m["mkh-asl"] = { "Aslian", 3111082, "mkh", } m["mkh-ban"] = { "Bahnaric", 56309, "mkh", } m["mkh-kat"] = { "Katuic", 56697, "mkh", } m["mkh-khm"] = { "Khmuic", 1323245, "mkh", } m["mkh-kmr"] = { "Khmeric", nil, "mkh", } m["mkh-mnc"] = { "Monic", 3217497, "mkh", } m["mkh-mng"] = { "Mangic", 3509556, "mkh", } m["mkh-nbn"] = { "North Bahnaric", 56309, "mkh-ban", } m["mkh-pal"] = { "Palaungic", 2391173, "mkh", } m["mkh-pea"] = { "Pearic", 3073022, "mkh", } m["mkh-pkn"] = { "Pakanic", nil, "mkh-mng", } m["mkh-vie"] = { "Vietic", 2355546, "mkh", } m["mno"] = { "Manobo", 3217483, "phi", } m["mns"] = { "Mansi", 33759, "urj-ugr", aliases = {"Mansic"}, } m["mun"] = { "Munda", 33892, "aav", } m["myn"] = { "Mayan", 33738, } --[=[ Exceptional language and family codes for North American Indian languages can use the prefix "nai-", though "nai" is no longer itself a family code. ]=]-- m["nai-cat"] = { "Catawban", 3446638, "nai-sca", } m["nai-chu"] = { "Chumashan", 1288420, } m["nai-ckn"] = { "Chinookan", 610586, } m["nai-coo"] = { "Coosan", 940278, } m["nai-jcq"] = { "Jicaquean", 12179308, "hok" } m["nai-ker"] = { "Keresan", 35878, } m["nai-klp"] = { "Kalapuyan", 1569040, } m["nai-kta"] = { "Kiowa-Tanoan", 386288, } m["nai-len"] = { "Lencan", 36189, aliases = {"Lenca"}, } m["nai-mdu"] = { "Maiduan", 33502, } m["nai-miz"] = { "Mixe-Zoquean", 954016, aliases = {"Mixe-Zoque"}, } m["nai-min"] = { "Misumalpan", 281693, "qfa-mch", aliases = {"Misuluan", "Misumalpa"}, } m["nai-mus"] = { "Muskogean", 902978, aliases = {"Muskhogean"}, } m["nai-pak"] = { "Pakawan", 65085487, "hok", } m["nai-pal"] = { "Palaihnihan", 1288332, } m["nai-plp"] = { "Plateau Penutian", 2307476, } m["nai-pom"] = { "Pomoan", 2618420, "hok", aliases = {"Pomo", "Kulanapan"}, } m["nai-sca"] = { "Siouan-Catawban", 34181, } m["nai-shp"] = { "Sahaptian", 114782, "nai-plp", } m["nai-shs"] = { "Shastan", 2991735, "hok", } m["nai-tot"] = { "Totozoquean", 7828419, } m["nai-ttn"] = { "Totonacan", 34039, aliases = {"Totonac-Tepehua", "Totonacan-Tepehuan"}, varieties = {"Totonac"}, } m["nai-tqn"] = { "Tequistlatecan", 1568317, "hok", aliases = {"Tequistlatec", "Chontal", "Chontalan", "Oaxacan Chontal", "Chontal of Oaxaca"}, } m["nai-tsi"] = { "Tsimshianic", 34134, } m["nai-utn"] = { "Utian", 13371763, "nai-you", aliases = {"Miwok-Costanoan", "Mutsun"}, } m["nai-wtq"] = { "Wintuan", 1294259, aliases = {"Wintun"}, } m["nai-xin"] = { "Xincan", 1546494, aliases = {"Xinca"}, } m["nai-ykn"] = { "Yukian", 2406722, aliases = {"Yuki-Wappo"}, } m["nai-you"] = { "Yok-Utian", 2886186, } m["nai-yuc"] = { "Yuman-Cochimí", 579137, } m["ngf"] = { "Trans-New Guinea", 34018, } m["ngf-ais"] = { "Aisian", nil, "ngf-eso", } m["ngf-ang"] = { "Angan", 3217366, "ngf", aliases = {"Kratke Range"}, -- Usher } m["ngf-ank"] = { "Angal-Kewa", 12626916, -- exist in dewiki and hrwiki "ngf-sak", } m["ngf-ask"] = { "Asmat-Kamoro", 3031400, "ngf", -- Wikipedia uses Asmat-Kamoro to refer to a narrower group excluding the Sabakor languages (Buruwai and Kamberau, -- which Glottolog splits into North Kamrau and South Kamrau [sic]), and uses Asmat-Kamrau to refer to what we and -- Glottolog call Asmat-Kamoro. Glottolog does not recognize the narrower grouping. aliases = {"Asmat-Kamrau", -- Wikipedia "Asmat-Kamrau Bay", -- Usher }, } m["ngf-asm"] = { "Asmat", 4807421, "ngf-ask", } m["ngf-ata"] = { "Ankave-Tainae-Akoye", nil, "ngf-ang", aliases = {"Southwest Kratke Range"}, -- Usher } m["ngf-awd"] = { "Awyu-Dumut", -- [[w:Awyu-Dumut languages]] redirects to [[w:Greater Awyu languages]] 4830163, -- exist in eswiki, hrwiki and ruwiki "ngf-gaw", aliases = {"Central Digul River"}, -- Usher } m["ngf-awy"] = { "Awyu", 96372866, "ngf-awd", } m["ngf-bda"] = { "Becking-Dawi", nil, -- Q55993716 ([[Category:Becking–Dawi languages]]) exists in enwiki "ngf-gaw", aliases = {"Becking and Dawi Rivers"}, -- Usher } m["ngf-bin"] = { "Binanderean", 3217374, -- Wikidata doesn't distinguish Binanderean from Greater Binanderean "ngf-gbi", aliases = {"Oro"}, -- Usher (2020) } m["ngf-boa"] = { "Boane", nil, "ngf-era", aliases = {"Boana", -- Glottolog's name "Wain"}, -- not in Usher; "Wain" often excludes Mungkip, perhaps because it's poorly documented } m["ngf-bos"] = { "Bosavi", 4947122, "ngf", aliases = {"Papuan Plateau"}, -- alternative name given by Wikipedia } m["ngf-bsi"] = { "Baruya-Simbari", nil, "ngf-ang", aliases = {"Northwest Kratke Range"}, -- Usher } m["ngf-cda"] = { "Central Dani", nil, "ngf-dan", aliases = {"Dani"}, -- Usher } m["ngf-chw"] = { "Chimbu-Wahgi", 3217383, "ngf", aliases = {"Simbu-Western Highlands"}, -- alternative name given by Wikipedia } m["ngf-dag"] = { "Dagan", 5208454, "ngf", -- not accepted as TNG by Glottolog but accepted by all others aliases = {"Meneao Range"}, } m["ngf-dal"] = { "Dallman", nil, "ngf-huo", aliases = {"Kinalakna-Kumukio", -- Pawley-Hammarström, who exclude Nomu, but they only had a numeral list of that language to work from "Northeast Huon", -- Usher }, } m["ngf-dan"] = { "Dani", 3217389, "ngf", -- Wikipedia renames the Dani languages to the Baliem Valley languages and sometimes (but not consistently) -- reserves the name Dani (or "Dani proper") for a narrower group excluding Wano and the poorly attested Ngalik -- languages (Nduga, Silimo, and the Yali dialect cluster, which we, following Ethnologue and Glottolog, split into -- Anggurk Yali, Ninia Yali and Pass Valley Yali). Glottolog does not recognize the narrower grouping. aliases = {"Baliem Valley", -- Wikipedia "Balim Valley", -- Usher }, } m["ngf-dum"] = { "Dumut", -- [[w:Dumut languages]] redirects to [[w:Greater Awyu languages]] nil, "ngf-awd", aliases = {"Wambon"}, -- Usher } m["ngf-ehu"] = { "Eastern Huon", -- Glottolog adds Ono and Sialum, Pawley-Hammarström adds Dedua 10567087, "ngf-huo", aliases = {"East Huon"}, -- Usher } m["ngf-eku"] = { "East Kutubuan", 5328752, "ngf", -- Not in TNG per Glottolog but accepted by all others. Sometimes grouped with Fasu to form a Kutubuan family. aliases = {"East Kutubu"}, -- Glottolog's name } m["ngf-enc"] = { "Engic", nil, "ngf-eng", aliases = {"Engan", -- Glottolog "Engan proper", -- Wikipedia "North Engan", -- alternative name given by Wikipedia "Trans-Enga", -- Usher }, } m["ngf-eng"] = { "Engan", 3217449, "ngf", aliases = {"Enga-Kewa-Huli", -- Glottolog, Pawley-Hammarström "Enga-Southern Highlands", -- Usher }, } m["ngf-era"] = { "Erap", nil, "ngf-fin", aliases = {"Erap River"}, -- Usher? } m["ngf-eso"] = { "East Sogeram", nil, "ngf-sog", } m["ngf-est"] = { "East Strickland", 5329440, "ngf", aliases = {"Strickland River"}, -- alternative name given by Wikipedia } m["ngf-eva"] = { "Evapia", nil, "ngf-rai", aliases = {"Evapia River"}, -- Usher } m["ngf-fgi"] = { "Fore-Gimi", nil, "ngf-gor", aliases = {"South Goroka"}, -- Usher } m["ngf-fhu"] = { "Finisterre-Huon", 3217453, "ngf", aliases = {"Finisterre Range-Huon Peninsula"}, -- per Usher } m["ngf-fin"] = { "Finisterre", 5450373, "ngf-fhu", aliases = {"Finisterre-Saruwaged", -- Glottolog's name "Finisterre Range"}, -- per Usher } m["ngf-gah"] = { "Gahuku", nil, "ngf-gor", aliases = {"Alekano-Asaro River"}, -- Usher } m["ngf-gau"] = { "Gauwa", nil, "ngf-kai", aliases = {"West Kainantu"}, -- Usher } m["ngf-gaw"] = { "Greater Awyu", 12627424, "ngf", aliases = {"Digul River"}, -- used by Usher (2020) } m["ngf-gbi"] = { "Greater Binanderean", 3217374, -- Wikidata doesn't distinguish Binanderean from Greater Binanderean "ngf", -- not placed in Trans-New Guinea in Usher (2020) aliases = {"Guhu-Oro"}, -- Guhu-Oro is used in Usher (2020) } m["ngf-gko"] = { "Gaena-Korafe", 11732347, -- considered a single Korafe language by Wikipedia "ngf-bin", aliases = {"Gaina-Korafe"}, -- Usher } m["ngf-gmo"] = { "Gusap-Mot", 16110857, "ngf-fin", aliases = {"Mot River"}, -- Usher? } m["ngf-gor"] = { "Goroka", 15478597, "ngf-kgo", } m["ngf-gsu"] = { "Gogodala-Suki", 5577428, "ngf", -- Possibly in the proposed Papuan Gulf family. Not in TNG per Glottolog but accepted by all others. aliases = {"Suki-Gogodala", -- Glottolog's name "Suki-Aramia River", -- Used in Usher (2020) }, } m["ngf-gum"] = { "Gum", 5618008, "ngf-mab", } m["ngf-gvd"] = { "Grand Valley Dani", -- considered a single language by Wikipedia 5595219, "ngf-cda", } m["ngf-hag"] = { "Hagen", -- [[w:Hagen languages]] redirects to [[w:Chimbu–Wahgi languages]] nil, "ngf-chw", aliases = {"Melpa-Kaugel River"}, -- Usher } m["ngf-han"] = { "Hanseman", 5651020, "ngf-mab", aliases = {"Hansemann Range"}, -- Usher } m["ngf-huo"] = { "Huon", 5946109, "ngf-fhu", aliases = {"Huon Peninsula"}, -- per Usher } m["ngf-jim"] = { "Jimi", -- [[w:Jimi languages]] and [[w:Jimi River languages]] redirect to [[w:Chimbu–Wahgi languages]] nil, "ngf-chw", aliases = {"Jimi River"}, -- Usher } m["ngf-kab"] = { "Kabwum", nil, "ngf-huo", aliases = {"Timbe-Selepet-Komba", -- Pawley-Hammarström, "Northwest Huon", -- Usher }, } m["ngf-kai"] = { "Kainantu", -- Kambaira: under "unclassified Kainantu" (Glottolog), Tairora (Pawley-Hammarström), Gauwa (Usher) 15478590, "ngf-kgo", aliases = {"Gadsup-Auyana-Awa-Tairora"}, -- Wurm, } m["ngf-kak"] = { "Kalam-Kobon", 6350303, "ngf-ksa", aliases = {"Kalam", "Kaironk River"}, -- Usher (2020) } m["ngf-kau"] = { "Kaukombar", nil, "ngf-nad", aliases = {"Kaukombaran", -- Glottolog following Z'graggen (1975) "Kaukombar River"}, -- Usher's term } m["ngf-kbm"] = { "Kosorong-Burum-Mindik", nil, "ngf-huo", aliases = {"Bulum River"}, -- Usher } m["ngf-kgo"] = { "Kainantu-Goroka", 3217463, "ngf", aliases = {"Eastern Highlands"}, -- per Usher (2020) } m["ngf-khu"] = { "Kewa-Huli", nil, "ngf-eng", aliases = {"Huli-Southern Highlands"}, -- Usher } m["ngf-kma"] = { "Kâte-Mape", nil, "ngf-ehu", aliases = {"Kate-Mape-Sene", -- Pawley-Hammarström (with Sene), "Southeast Huon", -- Usher }, } m["ngf-kme"] = { "Kapau-Menya", nil, "ngf-ang", aliases = {"Southeast Kratke Range"}, -- Usher } m["ngf-koi"] = { "Koiarian", 11154240, "ngf", -- not accepted as TNG by Glottolog but accepted by all others aliases = {"Koiari-Managalas Plateau"}, } m["ngf-kok"] = { "Kokon", -- Usher calls it South Mabuso but includes Gum in it nil, "ngf-mab", } m["ngf-kow"] = { "Kowan", 6435004, "ngf-mad", aliases = {"Isumrud Strait"}, -- per Usher (2020) } m["ngf-ksa"] = { "Kalam-Southern Adelbert", nil, "ngf-mad", aliases = {"Kalamic-South Adelbert", -- Glottolog "West Madang"}, -- Usher (2020) } m["ngf-kto"] = { "Kube-Tobo", -- per Glottolog, one language "Kulungtfu-Yuanggeng-Tobo" 1173235, -- code for Tobo-Kube language "ngf-huo", aliases = {"Tobo-Kube"}, } m["ngf-kts"] = { "Komyandaret-Tsaukambo", nil, "ngf-bda", aliases = {"Becking River"}, -- Usher } m["ngf-kum"] = { "Kumil", nil, "ngf-nad", aliases = {"Kumilan", -- Pawley-Hammarström following Z'graggen (1975) "Kumil River"}, -- Usher's term } m["ngf-kya"] = { "Kamano-Yagaria", nil, "ngf-gor", aliases = {"Henganofi", -- Usher "Kamano-Yagaria-Keigana", }, } m["ngf-lok"] = { "Lowland Ok", nil, "ngf-okk", } m["ngf-mab"] = { "Mabuso", 6721668, "ngf-mad", } m["ngf-mad"] = { "Madang", 11217556, "ngf", aliases = {"Madang-Adelbert Range"}, -- Z'graggen (1975), corresponding to today's Madang except in lacking Kalam and Gants } m["ngf-mek"] = { "Mek", 6810515, "ngf", aliases = {"Goliath"}, -- outdated alternative name given by Wikipedia } m["ngf-min"] = { "Mindjim", 86749913, "ngf-mad", aliases = {"Lower Minjim", -- Glottolog, placed in Rai Coast by Glottolog and Pawley-Hammarström; Glottolog's -- Mindjim has 6 languages, including "Upper Minjim" (Rerau and Sgi Bara) "Mindjim River", -- Usher "Minjim", "Minjim River", }, } -- Add if Molet is separated from Asaro'o -- m["ngf-moa"] = { -- "Molet-Asaro'o", -- nil, -- "ngf-war", -- } m["ngf-mok"] = { "Mountain Ok", -- [[w:Mountain Ok languages]] redirects to [[w:Ok languages]] nil, "ngf-okk", } m["ngf-mom"] = { "Mombum", 6897077, "ngf", -- not accepted as TNG by Glottolog but accepted by all others aliases = {"Mombum-Koneraw", "Komolom", "Muli Strait"}, -- Pawley-Hammarström uses Komolom, Usher uses Muli Strait } m["ngf-msu"] = { "Mian-Suganga", -- considred a single Mian language by Wikipedia 12952846, "ngf-mok", aliases = {"Mianic"}, -- Glottolog } m["ngf-nad"] = { "Northern Adelbert", -- not accepted by Pawley-Hammarström 16952821, -- code for Croisilles linkage "ngf-mad", aliases = {"Adelbert Range-Isumrud Strait", -- Usher (2020) "North Adelbert", "Pihom-Isumrud"}, -- Ross? } m["ngf-nbi"] = { "North Binanderean", nil, "ngf-bin", aliases = {"Suena-Zia"}, -- Usher } m["ngf-nde"] = { "Ndeiram", -- [[w:Ndeiram River languages]] redirects to [[w:Greater Awyu languages]] nil, "ngf-awd", aliases = {"Ndeiram River"}, -- Usher? } m["ngf-ngn"] = { "Ngalik-Nduga", -- [[w:Ngalik languages]] redirects to [[w:Baliem Valley languages]] = Dani languages nil, "ngf-dan", aliases = {"Ngalik"}, -- Usher } m["ngf-nso"] = { "North Sogeram", nil, "ngf-sog", aliases = {"Mum-Sirva", -- Usher "North Central Sogeram", -- used by those who accept Central Sogeram (= North Sogeram + Apali and Manat) "North-Central Sogeram", -- rarer than without the dash "Sikan"}, -- Z’graggen (1975?) } m["ngf-num"] = { "Numugen", nil, "ngf-nad", aliases = {"Numugenan", -- Glottolog following Z'graggen 1975 "Numugen River"}, -- Usher's term } m["ngf-nur"] = { "Nuru", -- Usher excludes Yangulam, Pawley-Hammarström include Jilim and Rerau nil, "ngf-rai", aliases = {"Nuru River"}, -- Usher? } m["ngf-nwh"] = { "Northwest Hanseman", -- Usher nil, "ngf-han", aliases = {"Wamas-Samosa-Murupi-Mosimo"}, -- Glottolog, Greenhill, and Pawley-Hammarström following Z'graggen; the most common name, but very unwieldy } m["ngf-oen"] = { "Outer Engan", -- considered a single Nete language by Wikipedia 6998869, "ngf-enc", aliases = {"Nete-Bisorio"}, -- Usher } m["ngf-okk"] = { "Ok", 7081687, "ngf", } m["ngf-omo"] = { "Omosan", -- not included in (Greater) Northern Adelbert by Glottolog, but a sister nil, "ngf-nad", } m["ngf-oro"] = { "Orokaivic", 7103752, -- considered a single Orokaiva language by Wikipedia "ngf-bin", aliases = {"Central Oro"}, -- Usher } m["ngf-pan"] = { "Paniai Lakes", 6035631, "ngf", aliases = {"Wissel Lakes", "Wissel Lakes-Kemandoga River"}, -- alternative names given by Wikipedia } m["ngf-pek"] = { "Peka", nil, "ngf-rai", aliases = {"Peka River"}, -- Usher? } m["ngf-pom"] = { "Pomoikan", nil, "ngf-sad", } m["ngf-rai"] = { "Rai Coast", 7283663, "ngf-mad", aliases = {"South Madang"}, -- Usher } m["ngf-sab"] = { "Sabakor", -- [[w:Sabakor languages]] redirects to [[w:Asmat–Kamrau languages]] nil, -- 55994614 is for [[Category:Kamrau Bay languages]], which exists on enwiki "ngf-ask", aliases = {"Kamrau Bay"}, -- Usher } m["ngf-sad"] = { "Southern Adelbert", 12633980, "ngf-ksa", aliases = {"South Adelbert", -- Glottolog "Southern Adelbert Range", -- Z'graggen (1980) "Sogeram and Tomul Rivers"}, -- Usher (2020)? } m["ngf-sak"] = { "Sau-Angal-Kewa", nil, "ngf-khu", aliases = {"Southern Highlands"}, -- Usher } m["ngf-san"] = { "Sankwep", nil, "ngf-huo", aliases = {"Nabak-Momolili", -- Pawley-Hammarström, "Southwest Huon", -- Usher }, } m["ngf-sbh"] = { "South Bird's Head", 7566330, "ngf", } m["ngf-sim"] = { "Simbu", nil, "ngf-chw", } m["ngf-sog"] = { "Sogeram", 86750419, "ngf-sad", aliases = {"Sogeram River", -- Usher "Wanang"}, } m["ngf-sop"] = { "Sopac", nil, "ngf-ehu", aliases = {"Momare-Migabac", -- Pawley-Hammarström, "Masaweng River", -- Usher }, } m["ngf-taa"] = { "Tainae-Akoye", nil, "ngf-ata", aliases = {"Akoye-Tainae"}, -- Usher } m["ngf-tai"] = { "Tairora", nil, "ngf-kai", aliases = {"Tairoric", -- Glottolog, "East Kainantu", -- Usher }, } m["ngf-tib"] = { "Tiboran", nil, "ngf-nad", aliases = {"Nuclear Tibor", -- Glottolog, excluding Wanambre/Mokati "Tiboran River", -- Usher (2020) "Tibor", -- Pick (2020) and Glottolog including Wanambre/Mokati } } m["ngf-tna"] = { "Tangko-Nakai", nil, "ngf-okk", aliases = {"Central Ok"}, -- Usher } m["ngf-uru"] = { "Uruwa", nil, "ngf-fin", aliases = {"Uruwa River"}, -- Usher? } m["ngf-usi"] = { "Utu-Silopi", nil, "ngf-han", aliases = {"Silopi-Utu"}, -- Usher } m["ngf-waa"] = { "Wantoat-Awara", -- not in Usher but Wantoat and Awara form a dialect chain nil, "ngf-wan", aliases = {"Awara-Wantoat"}, -- per Wikipedia } m["ngf-wah"] = { "Wahgi", -- [[w:Wahgi languages]] redirects to [[w:Chimbu–Wahgi languages]] nil, "ngf-chw", aliases = {"Wahgi Valley"}, -- Usher } m["ngf-wan"] = { "Wantoatic", nil, "ngf-fin", aliases = {"Wantoat", "Wantoat River", -- Usher? }, } m["ngf-war"] = { "Warup", 12645082, "ngf-fin", aliases = {"Warup River"}, -- Usher? } m["ngf-woj"] = { "Wojokesic", nil, "ngf-ang", aliases = {"Northeast Kratke Range"}, -- Usher } m["ngf-wok"] = { "West Ok", nil, "ngf-okk", aliases = {"Kwer-Kopkaka-Burumakok"}, -- Glottolog, Pawley-Hammarström } m["ngf-wso"] = { "West Sogeram", nil, "ngf-sog", aliases = {"Mand-Nend", -- Usher "Atan", -- Wurm following Z'graggen }, } m["ngf-yag"] = { "Yaganon", -- placed in Rai Coast by Glottolog and Pawley-Hammarström 35323986, "ngf-mad", aliases = {"Yaganon River"}, -- Usher } m["ngf-yal"] = { "Yali", -- considered a single language by Wikipedia 8047468, "ngf-ngn", aliases = {"Ngalik"}, -- Glottolog, Pawley-Hammarström } m["ngf-yar"] = { "Yareban", 16977672, "ngf", -- not accepted as TNG by Glottolog but accepted by all others aliases = {"Musa River"}, } m["ngf-ynu"] = { "Yau-Nungon", 12953319, -- for the single Yau language in Wikipedia ([[w:Yau language (Trans–New Guinea)]]) "ngf-uru", } m["ngf-yup"] = { "Yupna", nil, "ngf-fin", aliases = {"Yupna River"}, -- Usher? } m["nic"] = { "Niger-Congo", 33838, aliases = {"Niger-Kordofanian"}, } m["nic-alu"] = { "Alumic", 4737355, "nic-plt", } m["nic-bas"] = { "Basa", 4866154, "nic-knj", } m["nic-bbe"] = { "Eastern Beboid", nil, "nic-beb", } m["nic-bco"] = { "Benue-Congo", 33253, "nic-vco", } m["nic-bcr"] = { "Bantoid-Cross", 806983, "nic-bco", } m["nic-bdn"] = { "Northern Bantoid", nil, "nic-bod", aliases = {"North Bantoid"}, } m["nic-bds"] = { "Southern Bantoid", 3183152, "nic-bod", aliases = {"Wide Bantu", "Bin"}, } m["nic-beb"] = { "Beboid", 813549, "nic-bds", } m["nic-ben"] = { "Bendi", 4887065, "nic-bcr", } m["nic-beo"] = { "Beromic", 4894642, "nic-plt", } m["nic-bod"] = { "Bantoid", 806992, "nic-bcr", } m["nic-buk"] = { "Buli-Koma", nil, "nic-ovo", } m["nic-bwa"] = { "Bwa", 12628562, "nic-gur", other_names = {"Bwamu", "Bomu"}, } m["nic-cde"] = { "Central Delta", 3813191, "nic-cri", } m["nic-cri"] = { "Cross River", 1141096, "nic-bcr", } m["nic-dag"] = { "Dagbani", nil, "nic-wov", } m["nic-dak"] = { "Dakoid", 1157745, "nic-bdn", } m["nic-dge"] = { "Escarpment Dogon", 5397128, "qfa-dgn", } m["nic-dgw"] = { "West Dogon", nil, "qfa-dgn", } m["nic-eko"] = { "Ekoid", 1323395, "nic-bds", } m["nic-eov"] = { "Eastern Oti-Volta", nil, "nic-ovo", aliases = {"Samba"}, } m["nic-fru"] = { "Furu", 5509783, "nic-bds", } m["nic-gne"] = { "Eastern Gurunsi", 12633072, "nic-gns", aliases = {"Eastern Grũsi"}, } m["nic-gnn"] = { "Northern Gurunsi", nil, "nic-gns", aliases = {"Northern Grũsi"}, } m["nic-gnw"] = { "Western Gurunsi", nil, "nic-gns", aliases = {"Western Grũsi"}, } m["nic-gns"] = { "Gurunsi", 721007, "nic-gur", aliases = {"Grũsi"}, } m["nic-gre"] = { "Eastern Grassfields", 5330160, "nic-grf", } m["nic-grf"] = { "Grassfields", 750932, "nic-bds", aliases = {"Grassfields Bantu", "Wide Grassfields"}, } m["nic-grm"] = { "Gurma", 30587833, "nic-ovo", } m["nic-grs"] = { "Southwest Grassfields", 7571285, "nic-grf", } m["nic-gur"] = { "Gur", 33536, "alv-sav", aliases = {"Voltaic"}, } m["nic-ief"] = { "Ibibio-Efik", 2743643, "nic-lcr", } m["nic-jer"] = { "Jera", nil, "nic-kne", } m["nic-jkn"] = { "Jukunoid", 1711622, "nic-pla", } m["nic-jrn"] = { "Jarawan", 1683430, "nic-mba", } m["nic-jrw"] = { "Jarawa", 35423, "nic-jrn", } m["nic-kam"] = { "Kambari", 6356294, "nic-knj", } m["nic-ktl"] = { "Katloid", nil, "nic", } m["nic-kau"] = { "Kauru", nil, "nic-kne", } m["nic-kmk"] = { "Kamuku", 6359821, "nic-knj", } m["nic-kne"] = { "East Kainji", 5328687, "nic-knj", } m["nic-knj"] = { "Kainji", 681495, "nic-pla", } m["nic-knn"] = { "Northwest Kainji", 7060098, "nic-knj", } m["nic-ktl"] = { "Katloid", 6377681, "nic", aliases = {"Katla", "Katla-Tima"}, } m["nic-lcr"] = { "Lower Cross River", 3813193, "nic-cri", } m["nic-mam"] = { "Mamfe", 2005898, "nic-bds", aliases = {"Nyang"}, } m["nic-mba"] = { "Mbam", 687826, "nic-bds", } m["nic-mbc"] = { "Mba", 6799561, "nic-ubg", } m["nic-mbw"] = { "West Mbam", nil, "nic-mba", } m["nic-mmb"] = { "Mambiloid", 1888151, other_names = {"North Bantoid"}, -- per Wikipedia, North Bantoid is the parent family "nic-bdn", } m["nic-mom"] = { "Momo", 6897393, "nic-grf", } m["nic-mre"] = { "Moré", nil, "nic-wov", } m["nic-ngd"] = { "Ngbandi", 36439, "nic-ubg", } m["nic-nge"] = { "Ngemba", 7022271, "nic-gre", } m["nic-ngk"] = { "Ngbaka", 3217499, "nic-ubg", } m["nic-nin"] = { "Ninzic", 7039282, "nic-plt", } m["nic-nka"] = { "Nkambe", 7042520, "nic-gre", } m["nic-nkb"] = { "Baka", nil, "nic-nkw", } m["nic-nke"] = { "Eastern Ngbaka", nil, "nic-ngk", } m["nic-nkg"] = { "Gbanziri", nil, "nic-nkw", } m["nic-nkk"] = { "Kpala", nil, "nic-nkw", } m["nic-nkm"] = { "Mbaka", nil, "nic-nkw", } m["nic-nkw"] = { "Western Ngbaka", nil, "nic-ngk", } m["nic-npd"] = { "North Plateau Dogon", nil, "qfa-dgn", } m["nic-nun"] = { "Nun", 13654297, "nic-gre", } m["nic-nwa"] = { "Nanga-Walo", nil, "qfa-dgn", } m["nic-ogo"] = { "Ogoni", 2350726, "nic-cri", aliases = {"Ogonoid"}, } m["nic-ovo"] = { "Oti-Volta", 1157178, "nic-gur", } m["nic-pla"] = { "Platoid", 453244, "nic-bco", aliases = {"Central Nigerian"}, } m["nic-plc"] = { "Central Plateau", 5061668, "nic-plt", } m["nic-pld"] = { "Plains Dogon", nil, "qfa-dgn", } m["nic-ple"] = { "East Plateau", 5329154, "nic-plt", } m["nic-pls"] = { "South Plateau", 7568236, "nic-plt", aliases = {"Jilic-Eggonic"}, } m["nic-plt"] = { "Plateau", 1267471, "nic-pla", } m["nic-ras"] = { "Rashad", 3401986, "nic", } m["nic-rnc"] = { "Central Ring", nil, "nic-rng", } m["nic-rng"] = { "Ring", 2269051, "nic-grf", aliases = {"Ring Road"}, } m["nic-rnn"] = { "Northern Ring", nil, "nic-rng", } m["nic-rnw"] = { "Western Ring", nil, "nic-rng", } m["nic-ser"] = { "Sere", 7453058, "nic-ubg", } m["nic-shi"] = { "Shiroro", 7498953, "nic-knj", aliases = {"Pongu"}, } m["nic-sis"] = { "Sisaala", 36532, "nic-gnw", } m["nic-tar"] = { "Tarokoid", 2394472, "nic-plt", } m["nic-tiv"] = { "Tivoid", 752377, "nic-bds", } m["nic-tvc"] = { "Central Tivoid", nil, "nic-tiv", } m["nic-tvn"] = { "Northern Tivoid", nil, "nic-tiv", } m["nic-ubg"] = { "Ubangian", 33932, "nic-vco", -- or none } m["nic-uce"] = { "East-West Upper Cross River", nil, "nic-ucr", } m["nic-ucn"] = { "North-South Upper Cross River", nil, "nic-ucr", } m["nic-ucr"] = { "Upper Cross River", 4108624, "nic-cri", aliases = {"Upper Cross"}, } m["nic-vco"] = { "Volta-Congo", 37228, "alv", } m["nic-wov"] = { "Western Oti-Volta", nil, "nic-ovo", aliases = {"Moré-Dagbani"} } m["nic-ykb"] = { "Yukubenic", 16909196, "nic-plt", aliases = {"Oohum"}, } m["nic-ymb"] = { "Yambasa", nil, "nic-mba", } m["nic-yon"] = { "Yom-Nawdm", nil, "nic-ovo", aliases = {"Moré-Dagbani"} } m["njo"] = { "Ao", 28433, "sit-aao", aliases = {"Ao Naga"}, } m["nub"] = { "Nubian", 1517194, "sdv-nes", } m["nub-hil"] = { "Hill Nubian", 5762211, "nub", aliases = {"Kordofan Nubian"}, } m["omq"] = { "Oto-Manguean", 33669, } m["omq-cha"] = { "Chatino", 35111, "omq-zap", } m["omq-chi"] = { "Chinantecan", 35828, "omq", } m["omq-cui"] = { "Cuicatec", 616024, "omq-mix", } m["omq-maz"] = { "Mazatecan", 36230, "omq", aliases = {"Mazatec"}, } m["omq-mix"] = { "Mixtecan", 21083066, "omq", } m["omq-mxt"] = { "Mixtec", 36363, "omq-mix", } m["omq-otp"] = { "Oto-Pamean", 1270220, "omq", } m["omq-pop"] = { "Popolocan", 5132273, "omq", } m["omq-tri"] = { "Triqui", 780200, "omq-mix", aliases = {"Trique"}, } m["omq-zap"] = { "Zapotecan", 8066463, "omq", } m["omq-zpc"] = { "Zapotec", 13214, "omq-zap", } m["omv"] = { "Omotic", 33860, "afa", } m["omv-aro"] = { "Aroid", 3699526, "omv", aliases = {"Ari-Banna", "South Omotic", "Somotic"}, } m["omv-diz"] = { "Dizoid", 430251, "omv", aliases = {"Maji", "Majoid"}, } m["omv-eom"] = { "East Ometo", 20527288, "omv-ome", } m["omv-gon"] = { "Gonga", 4143043, "omv", aliases = {"Kefoid"}, } m["omv-mao"] = { "Mao", 1351495, "omv", } m["omv-nom"] = { "North Ometo", nil, "omv-ome", } m["omv-ome"] = { "Ometo", 36310, "omv", } m["oto"] = { "Otomian", 130372545, "omq-otp", } m["oto-otm"] = { "Otomi", 36355, "oto", } m["paa"] = { "Papuan", 236425, "qfa-not", } m["paa-aia"] = { "Aian", 4767739, -- Annaberg languages "paa-ram", aliases = {"Middle Ramu", -- Foley (with Rao), "Annaberg", -- with Rao "Aram-Aren", -- Usher }, } m["paa-alp"] = { "Alor-Pantar", 3502429, "paa-tap", } m["paa-amu"] = { "Amto-Musan", 480281, aliases = {"Samaia River"}, } m["paa-ani"] = { "Anim", 55603991, aliases = {"Fly River"}, } m["paa-ara"] = { "Arapesh", 4784223, "paa-koa", aliases = {"Arapeshan"}, -- Foley } m["paa-arf"] = { "Arafundi", 4783702, } m["paa-ata"] = { "Ataitan", 4812652, "paa-ram", aliases = {"Tangu", -- Foley "Tanggu", -- alternative name given by Wikipedia "Moam River", -- Usher }, } m["paa-baa"] = { "Bayono-Awbono", 2424781, } m["paa-bai"] = { "Baining", 748487, aliases = {"East New Britain"}, } m["paa-baw"] = { "Bosngun-Awar", nil, "paa-ott", aliases = {"East Ramu Coast", -- Usher "Bosman-Awar", -- Wikipedia }, } m["paa-bew"] = { "Bewani", -- [[w:Bewani languages]] redirects to [[w:Border languages (New Guinea)]]; but Croatian Wikipedia has an entry 16113460, "paa-bor", aliases = {"Poal River"}, -- Usher } m["paa-boa"] = { "Boazi", 48803717, "paa-mby", aliases = {"Lake Murray"}, -- Usher } m["paa-bor"] = { "Border", 1752158, aliases = {"Upper Tami", "Tami River-Bewani Range", -- Usher }, } m["paa-bul"] = { "Bulaka River", 4987195, aliases = {"Yelmek-Maklew", "Jabga"}, -- Yelmek-Maklew in Evans (2018) and Gregor (2021) } m["paa-bvi"] = { "Betaf-Vitou", -- Glottolog nil, "paa-tor", aliases = {"Vitou-Betaf", -- Wikipedia "Fitou-Tena", -- Usher "Manirem", }, } m["paa-clp"] = { "Central Lakes Plain", -- [[w:Central Lakes Plain languages]] redirects to [[w:Lakes Plain languages]] nil, -- Q86780132 is for the corresponding category, which exists in enwiki "paa-lpl", aliases = {"East Tariku", -- Glottolog "Central Lakes Plains", -- Usher }, } m["paa-dtu"] = { "Doso-Turumsa", 16917784, -- possibly related to East Strickland languages aliases = {"Soari River"}, -- Usher's name } m["paa-ebh"] = { "East Bird's Head", 338064, aliases = {"Mantion-Meax", "Mantion-Meyah", -- Mantion-Meax is Wikipedia's term "Southeast Bird's Head", -- Usher (2020) }, } m["paa-eel"] = { "Eastern Eleman", nil, "paa-ele", aliases = {"East Eleman"}, } m["paa-egb"] = { "East Geelvink Bay", 1497678, aliases = {"Geelvink Bay", "East Cenderawasih"}, -- Geelvink Bay per Glottolog } m["paa-eke"] = { "East Keram", nil, "paa-ker", } m["paa-ele"] = { "Eleman", 3034298, aliases = {"Kerema Bay"}, } m["paa-elp"] = { "East Lakes Plain", -- [[w:East Lakes Plain languages]] redirects to [[w:Lakes Plain languages]]; but Croatian Wikipedia has an entry 12633078, "paa-lpl", aliases = {"East Lakes Plains"}, -- Usher } m["paa-epw"] = { "Eastern Pauwasi", 16115496, aliases = {"East Pauwasi"}, } m["paa-etf"] = { "Eastern Trans-Fly", 5330530, aliases = {"Oriomo"}, -- in increasing recent use, probably originating in Evans (2018) } m["paa-eti"] = { "East Timor", 15496066, "paa-tap", aliases = {"Oirata-Makasae", -- Wikipedia's name "Eastern Timor", -- alternative name given by Wikipedia "Fataluku-Makasai", "Oirata-Makasai", -- alternative names given by Wikidata }, } m["paa-fas"] = { "Fas", 3502658, aliases = {"Baibai-Fas"}, -- Glottolog's name } m["paa-flp"] = { "Far West Lakes Plain", -- [[w:Wapoga River languages]] redirects to [[w:Lakes Plain languages]] nil, -- Q86808337 is for the corresponding Wapoga languages category, which exists in enwiki "paa-lpl", aliases = {"Rasawa", -- Clouse (1997) "Wapoga River", -- Usher, including Kehu/Keuw (unclassified by others) }, } m["paa-gkw"] = { "Greater Kwerba", 12635134, aliases = {"West Foja Range", -- Usher "Kwerbic", -- Wikipedia "Kwerba", -- Foley (2018) }, } m["paa-gto"] = { "Galela-Tobelo", nil, "paa-nnh", aliases = {"Mainland North Halmaheran", -- Glottolog "Mainland North Halmahera", "Northeast Halmahera", -- alternative names "Northeast Halmaheran", -- Wikipedia, from Verhoeve 1988 }, } m["paa-hya"] = { "Heyo-Yahang", nil, "paa-mam", aliases = {"Yahang-Heyo"}, -- Wikipedia's name } m["paa-ing"] = { "Inland Gulf", 6034783, "paa-ani", aliases = {"Inland Gulf of Papua"}, -- Glottolog } m["paa-isk"] = { "Inner Sko", 65043889, "paa-sko", aliases = {"Skouic", -- Glottolog "West Vanimo Coast", -- Usher "Western Skou", -- Wikipedia "Inner Skou", "Nuclear Skou", -- alternative names given by Wikipedia }, } m["paa-iwa"] = { "Iwam", 15147853, "paa-sep", } m["paa-kae"] = { "Kamula-Elevala", 130390498, -- often placed in TNG aliases = {"Kamula-Elevala River"}, } m["paa-kan"] = { "Kanum", -- removed from Tonda by Glottolog nil, "paa-ton", } m["paa-kay"] = { "Kayagaric", 7566330, aliases = {"Kayagar", -- formerly common "Cook River"}, -- per Usher (2020) } m["paa-ker"] = { "Keram", 48768173, -- often grouped within or coordinate with the Ramu languages aliases = {"Keram River"}, } m["paa-kiw"] = { "Kiwaian", 338449, aliases = {"Kiwai"}, -- formerly common, still sees some use } m["paa-kko"] = { "Kaure-Kosare", -- rejected by Pawley-Hammarström but accepted by Glottolog, Foley (2018) and Usher (2020) 48767891, aliases = {"Nawa River"}, -- Usher's term } m["paa-koa"] = { "Kombio-Arapesh", 16115049, "paa-trr", aliases = {"Kombio-Arapeshan", -- Laycock, who includes Wom "Kombio-Arapesh-Urat", -- Glottolog, including Urat }, } m["paa-kol"] = { "Kolopom", 6427807, } m["paa-kom"] = { "Kombio", 65044238, "paa-koa", aliases = {"Kombian", -- Laycock "Kombio-Yambes", -- Glottolog }, } m["paa-kun"] = { "Kunimaipan", 134973258, aliases = {"Northwest Wharton Range"}, -- per Usher (2020) -- often considered a subfamily of Goilalan } m["paa-kwa"] = { "Kwalean", 6450053, aliases = {"Humene-Uare"}, } m["paa-kwe"] = { "Kwerba proper", 12635134, "paa-gkw", aliases = {"Kwerba", -- Usher "Kwerbaic", -- Glottolog }, } m["paa-kwo"] = { "Kwomtari", 2075415, aliases = {"Kwomtari-Nai"}, -- Senu River is a larger unproven proposal } m["paa-lla"] = { "Loloda-Laba", -- a single language in Glottolog (Loloda-Laba) and Wikipedia (Loloda) 11732388, -- for the Loloda language "paa-gto", aliases = {"Loloda"}, -- Wikipedia's name } m["paa-lma"] = { "Left May", 614468, aliases = {"Arai River"}, -- per Usher (2020) -- Sometimes in a putative Arai-Samaia family along with Amto-Musan and the Pyu language } m["paa-lmu"] = { "Lepki-Murkim", -- Kembra accepted by Glottolog and Usher; not by Foley (2020) but does not exclude the possibility -- of a relationship 85776285, -- independent family per Glottolog, part of South Pauwasi River family (under Pauwasi) per Usher (2020) aliases = {"Lepki-Murkim-Kembra"}, -- Glottolog } m["paa-lpl"] = { "Lakes Plain", 6478969, aliases = {"Lakes Plains"}, } m["paa-lra"] = { "Lower Ramu", 65089469, "paa-ram", aliases = {"Ottilien-Misegian"}, -- alternative name given by Wikipedia } m["paa-lse"] = { "Lower Sepik", 7061700, aliases = {"Nor-Pondo"}, } m["paa-mai"] = { "Mairasi", 6736896, aliases = {"Mairasic"}, -- per Glottolog } m["paa-mal"] = { "Mailuan", 6735839, aliases = {"Cloudy Bay"}, } m["paa-mam"] = { "Maimai", -- Foley's Maimai is expanded 53679325, -- this is the code for the expanded Maimai with 6 languages, as opposed to the 3 in "Nuclear Maimai" "paa-trr", aliases = {"Nuclear Maimai", -- Glottolog's name "Maimai proper", -- Wikipedia's name }, } m["paa-man"] = { "Manubaran", 6752335, aliases = {"Mount Brown"}, } m["paa-mar"] = { "Marienberg", 1570589, "paa-trr", aliases = {"Marienberg Hills"}, -- Usher } m["paa-may"] = { "Maybratic", 4830892, -- the code for the Maybrat language in Wikipedia, which subsumes the two languages of this family -- putatively included in West Papuan but generally considered an isolated family aliases = {"Maybrat-Karon"}, } m["paa-mbi"] = { "Mbaham-Iha", 85784512, "qfa-dis", -- Papuan languages; Glottolog groups Karas (Kalamang) with Mbaham-Iha into a (mainland) West Bomberai -- family and stops there; Wikipedia, following Usher and Schapper (2022), groups Karas, Mbaham-Iha -- and the large Timor-Alor-Pantar family into a (Greater) West Bomberai family, saying that Karas is no -- closer to Mbaham-Iha than to Timor-Alor-Pantar. aliases = {"Mbahaam-Iha", -- used by Wikidata "Nuclear West Bomberai", -- Glottolog's name }, } m["paa-mby"] = { "Marind-Boazi-Yaqay", 3217484, "paa-ani", aliases = {"Marind-Boazi-Yaqai", -- Glottolog "Marind-Yakhai", -- Usher, without Boazi "Marind-Yaqai", -- Wikidata "Marind", -- alternative name given by Wikipedia "Marind-Arandai", -- alternative name given by Spanish Wikipedia }, } m["paa-mmu"] = { "Mandi-Muniwara", nil, "paa-mar", aliases = {"West Marienberg Hills"}, -- Usher } m["paa-mon"] = { "Monumbo", -- per Glottolog: "No evidence for the Bogia (Monumbo) languages being related to other Torricelli languages was ever presented" 16928417, aliases = {"Bogia", -- Glottolog "Bogia Bay", -- Usher (2020) }, } m["paa-mri"] = { "Marindic", -- [[w:Marindic languages]] redirects to [[w:Marind–Yaqai languages]] nil, "paa-mby", aliases = {"Marind"}, -- Usher; a single language } m["paa-nam"] = { "Nambu", 6961418, "paa-yam", aliases = {"East Morehead River"}, -- Usher } m["paa-nbo"] = { "North Bougainville", 749496, } m["paa-ndu"] = { "Ndu", 3217498, "paa-sep", -- Not accepted by Glottolog aliases = {"Ndu-Nggala"}, -- Usher } m["paa-ngk"] = { "Ngkolmpu", -- considered a single language by Wikipedia 5908646, "paa-kan", aliases = {"Ngkantr", -- Glottolog "Ngkolmpu Kanum", -- Wikipedia "Ngkontar", -- alternative name given by Wikipedia "Kanum", -- used by Wikidata }, } m["paa-nha"] = { "North Halmahera", 3217358, -- possibly in a proposed West Papuan family or an independent family } m["paa-nim"] = { "Nimboran", 12638426, aliases = {"Nimboranic", -- per Glottolog "Grime River", -- per Usher (2020) } } m["paa-nnd"] = { "Nuclear Ndu", nil, "paa-ndu", aliases = {"Ndu", -- Usher, with Boiken/Boikin "Ndu proper", -- Wikipedia }, } m["paa-nnh"] = { "Northern North Halmahera", nil, "paa-nha", aliases = {"Northern North Halmaheran", -- Glottolog "Halmahera", -- Usher "Core Halmaheran", -- Wikipedia }, } m["paa-nto"] = { "Namla-Tofanma", 16918187, -- independent family per Glottolog and Foley (2018), part of West Pauwasi family (under Pauwasi) per Usher (2020) } m["paa-ott"] = { "Ottilien", 7109477, "paa-lra", aliases = {"Ramu Coast", -- Usher "Watam-Awar-Gamay", -- alternative name given by Wikipedia }, } m["paa-pah"] = { "Pahoturi River", 17049141, aliases = {"Pahoturi"}, -- per Glottolog } m["paa-pal"] = { "Palei", -- Laycock adds Agi and Nabi/Nambi(-Metan) 65089113, "paa-wpa", aliases = {"Nuclear Palai"}, } m["paa-pia"] = { "Piawi", -- per Wikipedia, grouped with Arafundi languages to form Upper Yuat, which is a sister to Madang 7190400, aliases = {"Schraeder Range", -- Usher? "Waibuk"}, } m["paa-pio"] = { "Piore River", 65043152, "paa-sko", aliases = {"Barupu Lagoon", -- Glottolog "Lagoon", -- alternative name given by Wikipedia }, } m["paa-por"] = { "Porapora", -- Foley includes Ambakich (which we, Glottolog, and Usher treat as Keram) 65044258, "paa-ram", aliases = {"Agoan", -- Glottolog "Porapora River", -- Usher "core Grass", -- alternative name given by Wikipedia }, } m["paa-ram"] = { "Ramu", 3442808, aliases = {"Ramu River"}, -- per Usher (2020) } m["paa-rsa"] = { "Rasawa-Saponi", -- [[w:Rasawa-Saponi languages]] redirects to [[w:Lakes Plain languages]] nil, -- Q9859418 is for the coresponding category, which exists in the Piedmontese Wikipedia (?!) "paa-flp", aliases = {"Rombak River"}, -- Usher } m["paa-rub"] = { "Ruboni", 6875319, "paa-lra", aliases = {"Misegian", -- Wikipedia's name "Mikarew", -- alternative name given by Wikipedia "Ruboni Range"}, -- Usher } m["paa-saa"] = { "Samarokena-Airoran", 96417699, "paa-gkw", aliases = {"Apauwar Coast"}, -- Usher } m["paa-sah"] = { "Sahu", nil, "paa-nnh", } m["paa-sbo"] = { "South Bougainville", 3217380, } m["paa-sen"] = { "Sentani", 17044584, -- no consensus on higher affiliations, if any aliases = {"Sentanic", "Demta-Sentani", "Demta-Lake Sentani"}, -- Sentanic per Glottolog, Demta-Sentani per Wikipedia } m["paa-sep"] = { "Sepik", 3508772, } m["paa-shi"] = { "Serra Hills", 65043154, "paa-sko", } m["paa-sko"] = { "Sko", 953509, aliases = {"Skou"}, } m["paa-sng"] = { "Senagi", 2066550, } m["paa-taa"] = { "Taikat-Awyi", -- [[w:Taikat languages]] redirects to [[w:Border languages (New Guinea)]]; but Croatian Wikipedia has an entry 12643265, "paa-bor", aliases = {"Taikat", -- Foley "Upper Tami River", -- Usher }, } m["paa-tam"] = { "Tamolan", 7681634, "paa-ram", aliases = {"Guam River"}, -- Usher } m["paa-tap"] = { "Timor-Alor-Pantar", 16590002, } m["paa-teb"] = { "Teberan", 7692052, -- Often grouped with Trans-New Guinea, but per Pawley-Hammarström (2018), it has "weaker or disputed claims to membership in TNG". aliases = {"Dadibi-Folopa"}, } m["paa-tir"] = { "Tirio", 7809225, "paa-ani", aliases = {"Nuclear Lower Fly", -- Pawley-Hammarström ("Lower Fly" includes Abom) "Nuclear Tirio", -- Glottolog ("Tirio" includes Abom) "Lower Fly River", -- Usher (without Abom) }, } m["paa-tki"] = { "Turama-Kikori", 7853680, aliases = {"Turama-Kikorian", "Rumu-Omati River"}, } m["paa-ton"] = { "Tonda", 8581005, "paa-yam", aliases = {"West Morehead River"}, -- Usher } m["paa-too"] = { "Tor-Orya", 16590099, aliases = {"Orya-Tor"}, } m["paa-tor"] = { "Tor", -- [[w:Tor languages]] redirects to [[w:Orya–Tor languages]] nil, "paa-too", } m["paa-trr"] = { "Torricelli", 1333831, } m["paa-tti"] = { "Ternate-Tidore", nil, "paa-nnh", } m["paa-wal"] = { "Walio", 16919872, -- Often placed in Sepik (e.g. by Laycock and Z'graggen (1975)), but not by Foley (2018), and not accepted by Glottolog. aliases = {"Walioic", -- Glottolog "Central Leonhard Schultze River", }, } m["paa-wap"] = { "Wapei", -- Glottolog includes Nabi/Nambi(-Metan) in Wapeic 65089115, "paa-wpa", aliases = {"Wapeic"}, -- Glottolog } m["paa-war"] = { "Waris", -- [[w:Waris languages]] redirects to [[w:Border languages (New Guinea)]]; but Croatian Wikipedia has an entry 12645076, "paa-bor", aliases = {"Warisic", -- Glottolog "Bapi River", -- Usher (without Manem or Senggi) }, } m["paa-wbh"] = { "West Bird's Head", 5330530, -- Kuwani is sometimes included; probably related to North Halmahera languages. } m["paa-wel"] = { "Western Eleman", nil, "paa-ele", aliases = {"West Eleman"}, } m["paa-wig"] = { "West Inland Gulf", nil, "paa-ing", aliases = {"West Inland Gulf of Papua"}, -- Glottolog } m["paa-wke"] = { "West Keram", nil, "paa-ker", aliases = {"Koam", "Mongol-Langam", "Ulmapo"}, -- Koam used by Foley, Ulmapo used by Glottolog } m["paa-wko"] = { "Wára-Kómnzo", -- since we split out Kómnzo as a separate language 11732474, -- for the Wara language "paa-ton", aliases = {"Anta-Komnzo-Wára-Wérè-Kémä", -- Glottolog's name "Wára", "Wara", -- Wikipedia }, } m["paa-wlp"] = { "West Lakes Plain", -- [[w:Tariku languages]] redirects to [[w:Lakes Plain languages]] 47007503, -- actually for "Tariku languages", which per Wikipedia covers Fayu, Kirikiri, Iau and Tause "paa-lpl", aliases = {"West Tariku", -- Glottolog "West Lakes Plains"}, -- Usher, with Edopi/Iau } m["paa-wpa"] = { "Wapei-Palei", 65043156, "paa-trr", } m["paa-wpw"] = { -- paa-wpa already used by Wapei-Palei "Western Pauwasi", -- 2 langs per Glottolog and Pawley-Hammarström; Usher also includes Namla-Tofanma and Usku 85815062, aliases = {"West Pauwasi", -- Wikipedia, Usher "Tebi-Towe", "Dubu-Towei"}, } m["paa-yam"] = { "Yam", 15062272, aliases = {"Morehead and Upper Maro River", "Morehead River", -- Usher }, } m["paa-yaq"] = { "Yaqayic", -- [[w:Yaqai languages]] redirects to [[w:Marind–Yaqai languages]] nil, "paa-mby", aliases = {"Yakhai-Warkay"}, -- Usher } m["paa-ysa"] = { "Yawa-Saweru", 3217545, aliases = {"Yawa", "Yawan", "Yapen"}, } m["paa-yua"] = { "Yuat", 8060096, } m["phi"] = { "Philippine", 947858, "poz", } m["phi-kal"] = { "Kalamian", 3217466, "phi", aliases = {"Calamian"}, } m["poz"] = { "Malayo-Polynesian", 143158, "map", } m["poz-aay"] = { "Admiralty Islands", 2701306, "poz-oce", } m["poz-bnn"] = { "North Bornean", 1427907, "poz", } m["poz-bre"] = { "East Barito", 2701314, "poz", } m["poz-brw"] = { "West Barito", 2761679, "poz", } m["poz-bss"] = { "Bali-Sasak-Sumbawa", 3396043, "poz-msa", } m["poz-btk"] = { "Bungku-Tolaki", 3217381, "poz-clb", } m["poz-cet"] = { "Central-Eastern Malayo-Polynesian", 2269883, "poz", } m["poz-clb"] = { "Celebic", 1078041, "poz", } m["poz-cln"] = { "New Caledonian", 3091221, "poz-ocs", } m["poz-cma"] = { "Central Maluku", 3217479, "poz-cet", } m["poz-hce"] = { "Halmahera-Cenderawasih", 2526616, "pqe", } m["poz-kal"] = { "Kaili-Pamona", 3217465, "poz-clb", } m["poz-lgx"] = { "Lampungic", 49215, "poz", } m["poz-mcm"] = { "Malayo-Chamic", nil, "poz-msa", } m["poz-mic"] = { "Micronesian", 420591, "poz-occ", } m["poz-mly"] = { "Malayic", 662628, "poz-mcm", } m["poz-msa"] = { "Malayo-Sumbawan", 1363818, "poz", } m["poz-mun"] = { "Muna-Buton", 3037924, "poz-clb", } m["poz-nws"] = { "Northwest Sumatran", 2071308, "poz", } m["poz-occ"] = { "Central-Eastern Oceanic", 2068435, "poz-oce", } m["poz-oce"] = { "Oceanic", 324457, "pqe", } m["poz-ocs"] = { "Southern Oceanic", 3039118, "poz-occ", } m["poz-ocw"] = { "Western Oceanic", 2701282, "poz-oce", } m["poz-pcc"] = { "Central Pacific", 3130237, "poz-occ", } m["poz-pep"] = { "Eastern Polynesian", 390979, "poz-pnp", } m["poz-pnp"] = { "Nuclear Polynesian", 743851, "poz-pol", } m["poz-pol"] = { "Polynesian", 390979, "poz-pcc", } m["poz-san"] = { "Sabahan", 3217517, "poz-bnn", } m["poz-sbj"] = { "Sama-Bajaw", 2160409, "poz", } m["poz-slb"] = { "Saluan-Banggai", 3217519, "poz-clb", } m["poz-sls"] = { "Southeast Solomonic", 3119671, "poz-occ", } m["poz-ssw"] = { "South Sulawesi", 2778190, "poz", } m["poz-stm"] = { "St. Matthias", 6484143, "poz-oce", aliases = {"St Matthias"}, } m["poz-swa"] = { "North Sarawakan", 538569, "poz-bnn", } m["poz-tem"] = { "Temotu", 3075769, "poz-oce", } m["poz-tim"] = { "Timoric", 7806987, "poz-cet", } m["poz-ton"] = { "Tongic", 3397263, "poz-pol", } m["poz-tot"] = { "Tomini-Tolitoli", 3217541, "poz-clb", } m["poz-vnc"] = { "Central Vanuatu", 5061988, "poz-ocs", } m["poz-vnn"] = { "North Vanuatu", 85789650, "poz-ocs", } m["poz-vns"] = { "South Vanuatu", 3070173, "poz-ocs", } m["poz-wot"] = { "Wotu-Wolio", 1041317, "poz-clb", aliases = {"Island Kaili-Wolio"}, -- Glottolog } m["pqe"] = { "Eastern Malayo-Polynesian", 2269883, "poz-cet", } m["qfa-adc"] = { "Central Great Andamanese", nil, "qfa-adm", } m["qfa-adm"] = { "Great Andamanese", 3515103, } m["qfa-adn"] = { "Northern Great Andamanese", nil, "qfa-adm", } m["qfa-ads"] = { "Southern Great Andamanese", nil, "qfa-adm", } m["qfa-ain"] = { "Ainuic", 50111972, aliases = {"Ainu"}, } m["qfa-bej"] = { "Be-Jizhao", nil, "qfa-bet", } m["qfa-bet"] = { "Be-Tai", 12627719, "qfa-tak", aliases = {"Tai-Be", "Daic-Beic", "Beic-Daic"}, } m["qfa-buy"] = { "Buyang", 1109927, "qfa-kra", } m["qfa-cka"] = { "Chukotko-Kamchatkan", 33255, } m["qfa-cre"] = { "creole", 33289, "crp", } m["qfa-ckn"] = { "Chukotkan", 2606732, "qfa-cka", } m["qfa-cnt"] = { "contact", 133253514, "qfa-not", } m["qfa-dis"] = { -- Languages that are not unclassifiable (qfa-unc) but where there is no consensus on classification. Usually -- this is because the languages are divergent and it's disputed whether they are isolates or distantly related -- to other languages. "disputed affiliation", nil, "qfa-not", categoryName = "Languages of disputed affiliation", } m["qfa-dgn"] = { "Dogon", 1234776, "nic", } m["qfa-dny"] = { "Dene-Yeniseian", 21103, aliases = {"Dené-Yeniseian"}, } m["qfa-hur"] = { "Hurro-Urartian", 1144159, } m["qfa-iso"] = { "isolate", 33648, "qfa-not", categoryName = "Language isolates", } m["qfa-kad"] = { "Kadu", -- considered either Nilo-Saharan or independent/none 1720989, } m["qfa-kms"] = { "Kam-Sui", 1023641, "qfa-tak", } m["qfa-kor"] = { "Koreanic", 11263525, } m["qfa-kra"] = { "Kra", 1022087, "qfa-tak", } m["qfa-lic"] = { "Hlai", 1023648, "qfa-tak", aliases = {"Hlaic"}, } m["qfa-mch"] = { -- used in both N and S America "Macro-Chibchan", 3438062, } m["qfa-mix"] = { "mixed", 33694, "qfa-cnt", } m["qfa-not"] = { "not a family", nil, "qfa-not", } m["qfa-onb"] = { "Be", nil, "qfa-bej", aliases = {"Ong-Be", "Beic"}, } m["qfa-ong"] = { "Ongan", 2090575, aliases = {"Angan", "South Andamanese", "Jarawa-Onge"}, } m["qfa-pid"] = { "pidgin", 33831, "crp", } m["qfa-sub"] = { "substrate", 20730913, "qfa-not", } m["qfa-tak"] = { "Kra-Dai", 34171, aliases = {"Tai-Kadai", "Kadai"}, } m["qfa-tyn"] = { "Tyrsenian", 1344038, } m["qfa-unc"] = { -- This corresponds to languages normally called "unclassified", i.e. there is insufficient data or research to -- classify them, whereas our [[:Category:Unclassified languages]] is just languages that no Wiktionary editor -- has classified yet (the family code in the language data is missing). "unclassifiable", 33956, "qfa-not", } m["qfa-xgs"] = { "Serbi-Mongolic", 108887939, } m["qfa-xgx"] = { "Para-Mongolic", 107619002, "qfa-xgs", } m["qfa-yen"] = { "Yeniseian", 27639, "qfa-dny", aliases = {"Yeniseic", "Yenisei-Ostyak"}, } m["qfa-yke"] = { "Ketic", nil, "qfa-yen", } m["qfa-yko"] = { "Kottic", nil, "qfa-yen", } m["qfa-yrn"] = { "Arinic", nil, "qfa-yen", } m["qfa-ypm"] = { "Pumpokolic", nil, "qfa-yen", } m["qfa-yuk"] = { "Yukaghir", 34164, aliases = {"Yukagir", "Jukagir"}, } m["qwe"] = { "Quechuan", 5218, } m["raj"] = { "Rajasthani", 13196, "inc-wes", protoLanguage = "inc-ogu", } m["roa"] = { "Romance", 19814, "itc", aliases = {"Romanic", "Latin", "Neolatin", "Neo-Latin"}, protoLanguage = "la", } m["roa-asl"] = { "Asturleonese", 35390, "roa-ibe", protoLanguage = "roa-ole", } m["roa-cas"] = { "Castilian", 71924, "roa-ibe", aliases = {"Castillian", "Castilic", "Castillic"}, protoLanguage = "osp", } m["roa-dal"] = { "Dalmatian Romance", 97646077, "roa-itd", } m["roa-eas"] = { "Eastern Romance", 147576, "roa", } m["roa-emr"] = { "Emilian-Romagnol", 242648, "roa-git", } m["roa-gap"] = { "Galician-Portuguese", 9080204, "roa-ibe", aliases = {"Galician Romance", "Galaic-Portuguese"}, protoLanguage = "roa-opt", } m["roa-gar"] = { "Gallo-Romance", 500394, "roa-wes", } m["roa-itd"] = { "Italo-Dalmatian", 3313381, "roa-iwr", aliases = {"Central Romance"} } m["roa-itr"] = { "Italo-Romance", 3356483, "roa-itd", } m["roa-iwr"] = { "Italo-Western Romance", 112608, "roa", aliases = {"Italo-Western"}, } m["roa-git"] = { "Gallo-Italic", 516074, "roa-gar", aliases = {"Gallo-Italian", "Gallo-Cisalpine", "Cisalpine"}, } m["roa-grh"] = { "Gallo-Rhaetian", 97646466, "roa-gar", } m["roa-ibe"] = { "Ibero-Romance", 749533, "roa-wes", aliases = {"Iberian Romance", "West Ibero-Romance", "Western Ibero-Romance", "West Iberian Romance", "Western Iberian Romance"} } m["roa-nar"] = { "Navarro-Aragonese", 133252927, "roa-ibe", protoLanguage = "roa-ona", } m["roa-oil"] = { "Oïl", 37351, "roa-grh", aliases = {"langues d'oïl", "langue d'oïl", "Cisalpine"}, protoLanguage = "fro", } m["roa-ocr"] = { "Occitano-Romance", 599958, "roa-gar", aliases = {"Gallo-Narbonnese", "East Iberian", "Eastern Iberian"}, } m["roa-rhe"] = { "Rhaeto-Romance", 515593, "roa-grh", aliases = {"langues d'oïl", "langue d'oïl", "Cisalpine"}, } m["roa-sou"] = { "Southern Romance", 145345, "roa", } m["roa-wes"] = { "Western Romance", 2714388, "roa-iwr", } --[=[ Exceptional language and family codes for South American Indian languages can use the prefix "sai-", though "sai" is no longer itself a family code. ]=]-- m["sai-ara"] = { "Araucanian", 626630, } m["sai-aym"] = { "Aymaran", 33010, } m["sai-bar"] = { "Barbacoan", 807304, aliases = {"Barbakoan"}, } m["sai-bor"] = { "Boran", 5371776, } m["sai-cah"] = { "Cahuapanan", 1025793, } m["sai-car"] = { "Cariban", 33090, aliases = {"Carib"}, } m["sai-cer"] = { "Cerrado", 98078151, "sai-jee", aliases = {"Amazonian Jê"}, } m["sai-chc"] = { "Chocoan", 1075616, aliases = {"Choco", "Chocó"}, } m["sai-cho"] = { "Chonan", 33019, aliases = {"Chon"}, } m["sai-cje"] = { "Central Jê", 18010843, "sai-cer", aliases = {"Akuwẽ"}, } m["sai-cpc"] = { "Chapacuran", 1062626, } m["sai-crn"] = { "Charruan", 3112423, aliases = {"Charrúan"}, } m["sai-ctc"] = { "Catacaoan", 5051139, } m["sai-guc"] = { "Guaicuruan", 1974973, "sai-mgc", aliases = {"Guaicurú", "Guaycuruana", "Guaikurú", "Guaycuruano", "Guaykuruan", "Waikurúan"}, } m["sai-guh"] = { "Guahiban", 944056, aliases = {"Guahiboan", "Guajiboan", "Wahivoan"}, } m["sai-gui"] = { "Guianan", nil, "sai-car", aliases = {"Guianan Carib", "Guiana Carib"}, } m["sai-har"] = { "Harákmbut", 1584402, "sai-hkt", aliases = {"Harákmbet"}, } m["sai-hkt"] = { "Harákmbut-Katukinan", 17107635, } m["sai-hrp"] = { "Huarpean", 1578336, aliases = {"Warpean", "Huarpe", "Warpe"}, } m["sai-jee"] = { "Jê", 1483594, "sai-mje", aliases = {"Gê", "Jean", "Gean", "Jê-Kaingang", "Ye"}, } m["sai-jir"] = { "Jirajaran", 3028651, aliases = {"Hiraháran"}, } m["sai-jiv"] = { "Jivaroan", 1393074, aliases = {"Hívaro", "Jibaro", "Jibaroan", "Jibaroana", "Jívaro"}, } m["sai-ktk"] = { "Katukinan", 2636000, "sai-hkt", aliases = {"Catuquinan"}, } m["sai-kui"] = { "Kuikuroan", nil, "sai-car", aliases = {"Kuikuro", "Nahukwa"}, } m["sai-map"] = { "Mapoyan", 61096301, "sai-ven", aliases = {"Mapoyo", "Mapoyo-Yabarana", "Mapoyo-Yavarana", "Mapoyo-Yawarana"}, } m["sai-mas"] = { "Mascoian", 1906952, aliases = {"Mascoyan", "Maskoian", "Enlhet-Enenlhet"}, } m["sai-mgc"] = { "Mataco-Guaicuru", 255512, } m["sai-mje"] = { "Macro-Jê", 887133, aliases = {"Macro-Gê"}, } m["sai-mtc"] = { "Matacoan", 2447424, "sai-mgc", } m["sai-mur"] = { "Muran", 33826, aliases = {"Mura"}, } m["sai-nad"] = { "Nadahup", 1856439, aliases = {"Makú", "Macú", "Vaupés-Japurá"}, } m["sai-nje"] = { "Northern Jê", 98078225, "sai-cer", aliases = {"Core Jê"}, } m["sai-nmk"] = { "Nambikwaran", 15548027, aliases = {"Nambicuaran", "Nambiquaran", "Nambikuaran"}, } m["sai-otm"] = { "Otomacoan", 3217503, aliases = {"Otomákoan", "Otomakoan"}, } m["sai-pan"] = { "Panoan", 1544537, "sai-pat", aliases = {"Pano"}, } m["sai-pat"] = { "Pano-Tacanan", 2475746, aliases = {"Pano-Tacana", "Pano-Takana", "Páno-Takána", "Pano-Takánan"}, } m["sai-pek"] = { "Pekodian", 107451736, "sai-car", aliases = {"South Amazonian Carib", "Southern Cariban", "Pekodi"}, } m["sai-pem"] = { "Pemongan", nil, "sai-ven", aliases = {"Pemong", "Pemóng", "Purukoto"}, } m["sai-pey"] = { "Peba-Yaguan", 174015, aliases = {"Peba-Yagua", "Yaguan", "Peban", "Yáwan"}, } m["sai-prk"] = { "Parukotoan", 107451482, "sai-car", aliases = {"Parukoto"}, } m["sai-sje"] = { "Southern Jê", 98078245, "sai-jee", } m["sai-tac"] = { "Tacanan", 3113762, "sai-pat", } m["sai-tar"] = { "Taranoan", 105097814, "sai-gui", aliases = {"Trio", "Tarano"}, } m["sai-tin"] = { "Tiniguan", 2892258, aliases = {"Tinigua"}, } m["sai-tuc"] = { "Tucanoan", 788144, } m["sai-tyu"] = { "Ticuna-Yuri", 4467010, } m["sai-ucp"] = { "Uru-Chipaya", 2475488, aliases = {"Uru-Chipayan"}, } m["sai-ven"] = { "Venezuelan Cariban", nil, "sai-car", aliases = {"Venezuelan Carib", "Venezuelan", "Venezuelano"}, } m["sai-wic"] = { "Wichí", 3027047, } m["sai-wit"] = { "Witotoan", 43079317, aliases = {"Huitotoan", "Uitotoan"}, } m["sai-ynm"] = { "Yanomami", nil, aliases = {"Yanomam", "Shamatari", "Yamomami", "Yanomaman"}, } m["sai-yuk"] = { "Yukpan", nil, "sai-car", aliases = {"Yukpa", "Yukpano", "Yukpa-Japreria"}, } m["sai-zam"] = { "Zamucoan", 3048461, aliases = {"Samúkoan"}, } m["sai-zap"] = { "Zaparoan", 33911, aliases = {"Záparoan", "Saparoan", "Sáparoan", "Záparo", "Zaparoano", "Zaparoana"}, } m["sal"] = { "Salish", 33985, } m["sdv"] = { "Eastern Sudanic", 2036148, "ssa", } m["sdv-bri"] = { "Bari", nil, "sdv-nie", } m["sdv-daj"] = { "Daju", 956724, "sdv", } m["sdv-dnu"] = { "Dinka-Nuer", nil, "sdv-niw", } m["sdv-eje"] = { "Eastern Jebel", 3408878, "sdv", } m["sdv-kln"] = { "Kalenjin", 637228, "sdv-nis", } m["sdv-lma"] = { "Lotuko-Maa", nil, "sdv-nie", } m["sdv-lon"] = { "Northern Luo", nil, "sdv-luo", } m["sdv-los"] = { "Southern Luo", 7570103, "sdv-luo", } m["sdv-luo"] = { "Luo", nil, "sdv-niw", } m["sdv-nes"] = { "Northern Eastern Sudanic", 4810496, "sdv", aliases = {"Astaboran", "Ek Sudanic"}, } m["sdv-nie"] = { "Eastern Nilotic", 153795, "sdv-nil", } m["sdv-nil"] = { "Nilotic", 513408, "sdv", } m["sdv-nis"] = { "Southern Nilotic", 1552410, "sdv-nil", } m["sdv-niw"] = { "Western Nilotic", 3114989, "sdv-nil", } m["sdv-nma"] = { "Nandi-Markweta", nil, "sdv-kln", } m["sdv-nyi"] = { "Nyima", 11688746, "sdv-nes", aliases = {"Nyimang"}, } m["sdv-tmn"] = { "Taman", 3408873, "sdv-nes", aliases = {"Tamaic"}, } m["sdv-ttu"] = { "Teso-Turkana", 7705551, "sdv-nie", aliases = {"Ateker"}, } m["sel"] = { "Selkup", 34008, "syd", } m["sem"] = { "Semitic", 34049, "afa", } m["sem-ara"] = { "Aramaic", 28602, "sem-nwe", protoLanguage = "arc", } m["sem-arb"] = { "Arabic", 164667, "sem-cen", protoLanguage = "ar", } m["sem-are"] = { "Eastern Aramaic", 3410322, "sem-ara", } m["sem-arw"] = { "Western Aramaic", 3394214, "sem-ara", } m["sem-ase"] = { "Southeastern Aramaic", 3410322, "sem-are", } m["sem-can"] = { "Canaanite", 747547, "sem-nwe", } m["sem-cen"] = { "Central Semitic", 3433228, "sem-wes", } m["sem-cna"] = { "Central Neo-Aramaic", 3410322, "sem-are", } m["sem-eas"] = { "East Semitic", 164273, "sem", } m["sem-eth"] = { "Ethiopian Semitic", 163629, "sem-wes", aliases = {"Afro-Semitic", "Ethiopian", "Ethiopic", "Ethiosemitic"}, } m["sem-nna"] = { "Northeastern Neo-Aramaic", 2560578, "sem-are", } m["sem-nwe"] = { "Northwest Semitic", 162996, "sem-cen", } m["sem-osa"] = { "Old South Arabian", 35025, "sem-cen", aliases = {"Epigraphic South Arabian", "Sayhadic"}, } m["sem-sar"] = { "Modern South Arabian", 1981908, "sem-wes", } m["sem-wes"] = { "West Semitic", 124901, "sem", } m["sgn"] = { "sign", 34228, "qfa-not", } m["sgn-asl"] = { "American Sign Languages", nil, "sgn-fsl", } m["sgn-fsl"] = { "French Sign Languages", 5501921, "sgn", } m["sgn-gsl"] = { "German Sign Languages", 5551235, "sgn", } m["sgn-jsl"] = { "Japanese Sign Languages", 11722508, "sgn", } m["sio"] = { "Siouan", 34181, "nai-sca", } m["sio-dhe"] = { "Dhegihan", 3217420, "sio-msv", } m["sio-dkt"] = { "Dakotan", 4154122, "sio-msv", } m["sio-mor"] = { "Missouri River Siouan", 26807266, "sio", } m["sio-msv"] = { "Mississippi Valley Siouan", 12637104, "sio", } m["sio-ohv"] = { "Ohio Valley Siouan", 21070931, "sio", } m["sit"] = { "Sino-Tibetan", 45961, aliases = {"Trans-Himalayan"}, } m["sit-aao"] = { "Central Naga", 615474, "sit", } m["sit-alm"] = { "Almora", nil, "sit-whm", } m["sit-bai"] = { "Bai", 35103, "sit-mba", } m["sit-bdi"] = { "Bodish", 1814078, "sit", } m["sit-cln"] = { "Cai-Long", 107182612, "sit-mba", aliases = {"Ta-Li"}, } m["sit-dhi"] = { "Dhimalish", 1207648, "sit", } m["sit-ebo"] = { "East Bodish", 56402, "sit-bdi", } m["sit-egy"] = { "East rGyalrongic", 832026, "sit-rgy", } m["sit-ers"] = { "Ersuic", 56335, "sit", } m["sit-gma"] = { "Greater Magaric", 55612963, "sit", } m["sit-gsi"] = { "Greater Siangic", 52698851, "sit", } m["sit-hrs"] = { "Hrusish", 1632501, "sit", aliases = {"Southeast Kamengic"}, } m["sit-jnp"] = { "Jingphoic", nil, "sit-jpl", aliases = {"Jingpho"}, } m["sit-jpl"] = { "Kachin-Luic", 1515454, "tbq-bkj", aliases = {"Jingpho-Luish", "Jingpho-Asakian", "Kachinic"}, } m["sit-kch"] = { "Konyak-Chang", nil, "sit-kon", } m["sit-kha"] = { "Kham", 33305, "sit-gma", } m["sit-khb"] = { "Kho-Bwa", 6401917, "sit", aliases = {"Bugunish", "Kamengic"}, } m["sit-khw"] = { "Western Kho-Bwa", nil, "sit-khb", } m["sit-khc"] = { "Chug-Lish", nil, "sit-khw", aliases = {"Duhumbi-Khispi"}, } m["sit-khm"] = { "Mey-Sartang", nil, "sit-khw", aliases = {"Sartang-Sherdukpen"}, } m["sit-kic"] = { "Central Kiranti", nil, "sit-kir", } m["sit-kie"] = { "Eastern Kiranti", nil, "sit-kir", } m["sit-kin"] = { "Kinnauric", nil, "sit-whm", aliases = {"Kinnauri"}, } m["sit-kir"] = { "Kiranti", 922148, "sit", } m["sit-kiw"] = { "Western Kiranti", 922148, "sit-kir", } m["sit-kon"] = { "Northern Naga", 774590, "tbq-bkj", aliases = {"Konyakian", "Konyak"}, } m["sit-kyk"] = { "Kyirong-Kagate", 6450957, "sit-tib", } m["sit-lab"] = { "Ladakhi-Balti", 6450957, "sit-tib", } m["sit-las"] = { "Lahuli-Spiti", 6473510, "sit-tib", } m["sit-luu"] = { "Luish", 55621439, "sit-jpl", aliases = {"Asakian", "Sak"}, } m["sit-mar"] = { "Maringic", nil, "sit-tma", } m["sit-mba"] = { "Macro-Bai", 16963847, "sit-sba", aliases = {"Greater Bai"}, } m["sit-mdz"] = { "Midzu", 6843504, "sit", aliases = {"Geman", "Midzuish", "Miju-Meyor", "Southern Mishmi"}, } m["sit-mnz"] = { "Mondzish", 6898839, "tbq-lob", aliases = {"Mangish"}, } m["sit-mru"] = { "Mruic", 16908870, "sit", aliases = {"Mru-Hkongso"}, } m["sit-nas"] = { "Naish", 25047956, "sit-nax", } m["sit-nax"] = { "Naic", 6982999, "tbq-buq", aliases = {"Naxish"}, } m["sit-nba"] = { "Northern Bai", 122463830, "sit-bai", } m["sit-new"] = { "Newaric", 55625069, "sit", } m["sit-nng"] = { "Nungish", 1515482, "sit", aliases = {"Nung"}, } m["sit-qia"] = { "Qiangic", 1636765, "tbq-buq", } m["sit-rgy"] = { "Rgyalrongic", 56936, "sit-qia", aliases = {"Jiarongic"}, } m["sit-sba"] = { "Sino-Bai", nil, "sit", aliases = {"Greater Bai"}, } m["sit-tam"] = { "Tamangic", 3309439, "sit", aliases = {"West Bodish"}, } m["sit-tan"] = { "Tani", 3217538, "sit", } m["sit-tib"] = { "Tibetic", 1641150, "sit-bdi", protoLanguage = "otb", } m["sit-tja"] = { "Tujia", nil, "sit", } m["sit-tma"] = { "Tangkhul-Maring", nil, "sit", } m["sit-tng"] = { "Tangkhulic", 1516657, "sit-tma", aliases = {"Tangkhul"}, } m["sit-tno"] = { "Tangsa-Nocte", nil, "sit-kon", } m["sit-tsk"] = { "Tshangla", nil, "sit", } m["sit-wgy"] = { "West rGyalrongic", nil, "sit-rgy" } m["sit-whm"] = { "West Himalayish", 2301695, "sit", } m["sit-zem"] = { "Zeme", 189291, "sit", aliases = {"Zeliangrong", "Zemeic"}, } m["sla"] = { "Slavic", 23526, "ine-bsl", aliases = {"Slavonic"}, } m["smi"] = { "Sami", 56463, "urj", aliases = {"Saami", "Samic", "Saamic"}, } m["son"] = { "Songhay", 505198, "ssa", aliases = {"Songhai"}, } m["sqj"] = { "Albanian", 8748, "ine", } m["ssa"] = { "Nilo-Saharan", -- possibly not a genetic grouping 33705, } m["ssa-fur"] = { "Fur", 2989512, "ssa", } m["ssa-klk"] = { "Kuliak", 1791476, "ssa", aliases = {"Rub"}, } m["ssa-kom"] = { "Koman", 1781084, "ssa", } m["ssa-sah"] = { "Saharan", 1757661, "ssa", } m["syd"] = { "Samoyedic", 34005, "urj", aliases = {"Samoyed", "Samodeic"}, } m["syd-ene"] = { "Enets", 29942, "syd", } m["tai"] = { "Tai", 749720, "qfa-bet", aliases = {"Daic"}, } m["tai-wen"] = { "Wenma-Southwestern Tai", nil, "tai", } m["tai-tay"] = { "Tày", nil, "tai-wen", } m["tai-sap"] = { "Sapa-Southwestern Tai", nil, "tai-wen", aliases = {"Sapa-Thai"}, } m["tai-swe"] = { "Southwestern Tai", 10889250, "tai-sap", } m["tai-cho"] = { "Chongzuo Tai", 13216, "tai", } m["tai-cen"] = { "Central Tai", 5061891, "tai", } m["tai-nor"] = { "Northern Tai", 7059014, "tai", } m["tbq"] = { "Tibeto-Burman", 34064, "sit", } m["tbq-anp"] = { "Angami-Pochuri", 530460, "sit", } m["tbq-axi"] = { "Axioid", nil, "tbq-sel", } m["tbq-bdg"] = { "Bodo-Garo", 4090000, "tbq-bkj", } m["tbq-bis"] = { "Bisoid", 48844742, "tbq-slo", } m["tbq-bka"] = { "Bi-Ka", 12627890, "tbq-slo", } m["tbq-bkj"] = { "Sal", 889900, "sit", -- Brahmaputran appears to be Glottolog's term aliases = {"Bodo-Konyak-Jinghpaw", "Brahmaputran", "Jingpho-Konyak-Bodo"}, } m["tbq-brm"] = { "Burmish", 865713, "tbq-lob", } m["tbq-buq"] = { "Burmo-Qiangic", 16056278, "sit", aliases = {"Eastern Tibeto-Burman"}, } m["tbq-drp"] = { "Downriver Phula", 7188378, "tbq-rph", } m["tbq-han"] = { "Hanoid", 17004185, "tbq-slo", } m["tbq-hph"] = { "Highland Phula", nil, "tbq-sel", } m["tbq-jin"] = { "Jino", 6202716, "tbq-slo", } m["tbq-kzh"] = { "Kazhuoish", 48834669, "tbq-lol", } m["tbq-kuk"] = { "Kuki-Chin", 832413, "sit", aliases = {"Kukish", "South-Central Tibeto-Burman"}, } m["tbq-lal"] = { "Lalo", 56548, "tbq-lso", } m["tbq-lho"] = { "Lahoish", nil, "tbq-lol", } m["tbq-llo"] = { "Lipo-Lolopo", nil, "tbq-lso", } m["tbq-lob"] = { "Lolo-Burmese", 1635712, "tbq-buq", } m["tbq-lol"] = { "Loloish", 37035, "tbq-lob", aliases = {"Yi", "Ngwi", "Nisoic"}, } m["tbq-lso"] = { "Lisoish", 6559055, "tbq-lol", } m["tbq-lwo"] = { "Lawoish", 48847673, "tbq-lol", } m["tbq-muj"] = { "Muji", 11221327, "tbq-hph", } m["tbq-nas"] = { "Nasoid", nil, "tbq-nlo", } m["tbq-nis"] = { "Nisu", 56404, "tbq-nlo", } m["tbq-nlo"] = { "Northern Loloish", 7058676, "tbq-nso", } m["tbq-nso"] = { "Nisoish", 56990, "tbq-lol", } m["tbq-nus"] = { "Nusoish", 114245231, "tbq-lol", } m["tbq-phw"] = { "Phowa", 7187959, "tbq-hph", } m["tbq-rph"] = { "Riverine Phula", nil, "tbq-sel", } m["tbq-sel"] = { "Southeastern Loloish", 16111894, "tbq-nso", } m["tbq-sil"] = { "Siloid", 60787071, "tbq-slo", } m["tbq-slo"] = { "Southern Loloish", 5649340, "tbq-lol", } m["tbq-tal"] = { "Taloid", 48804018, "tbq-lso", } m["tbq-urp"] = { "Upriver Phula", 7187058, "tbq-rph", } m["trk"] = { "Turkic", 34090, } m["trk-cmn"] = { "Common Turkic", 1126028, "trk", aliases = {"Shaz Turkic", "Shaz-Turkic"}, } m["trk-kar"] = { "Karluk", 703173, "trk-cmn", aliases = {"Qarluq", "Uyghur-Uzbek", "Southeastern Turkic"}, } m["trk-kbu"] = { "Kipchak-Bulgar", 3512539, "trk-kip", aliases = {"Uralian", "Uralo-Caspian"}, } m["trk-kcu"] = { "Kipchak-Cuman", 4370412, "trk-kip", aliases = {"Ponto-Caspian"}, } m["trk-kip"] = { "Kipchak", 1339898, "trk-cmn", -- Russian Wikipedia article [[w:ru:Западнотюркские_языки]] says "Western Turkic" is used by N.A. Baskakov and includes Oghuz, Kipchak and Karluk. -- Azerbaijani Wikipedia article [[w:az:Qərbi_türk_dilləri]] clarifies that "Western Turkic" is not a clade. other_names = {"Western Turkic"}, aliases = {"Kypchak", "Qypchaq", "Northwestern Turkic"}, protoLanguage = "qwm", } m["trk-kkp"] = { "Kyrgyz-Kipchak", 4221189, "trk-kip", } m["trk-kno"] = { "Kipchak-Nogai", 4326954, "trk-kip", aliases = {"Aralo-Caspian"}, } m["trk-nsb"] = { "North Siberian Turkic", 4537269, "trk-sib", aliases = {"Northern Siberian Turkic"}, } m["trk-ogr"] = { "Oghur", 1422731, "trk", aliases = {"Lir-Turkic", "r-Turkic"}, } m["trk-ogz"] = { "Oghuz", 494600, "trk-cmn", aliases = {"Southwestern Turkic"}, } m["trk-sib"] = { "Siberian Turkic", 354353, "trk-cmn", other_names = {"Northern Turkic"}, -- per [[w:ru:Восточнотюркские_языки]], "Eastern Turkic" is an alias for Siberian Turkic in the work of O.A. Mudrak, -- but has a different non-clade meaning in the older work of N.A. Baskakov. aliases = {"Eastern Turkic", "Northeastern Turkic"}, } m["trk-ssb"] = { "South Siberian Turkic", nil, "trk-sib", aliases = {"Southern Siberian Turkic"}, } m["tup"] = { "Tupian", 34070, aliases = {"Tupi"}, } m["tup-gua"] = { "Tupi-Guarani", 148610, "tup", aliases = {"Tupí-Guaraní"}, } m["tuw"] = { "Tungusic", 34230, aliases = {"Manchu-Tungus", "Tungus"}, } m["tuw-ewe"] = { "Ewenic", 105889448, "tuw", aliases = {"Northern Tungusic"}, } m["tuw-jrc"] = { "Jurchenic", 105889432, "tuw", aliases = {"Manchuric"}, } m["tuw-nan"] = { "Nanaic", 105889264, "tuw", } m["tuw-udg"] = { "Udegheic", 105889266, "tuw", } m["urj"] = { "Uralic", 34113, varieties = {"Finno-Ugric"}, } m["urj-fin"] = { "Finnic", 33328, "urj", aliases = {"Baltic-Finnic", "Balto-Finnic", "Fennic"}, } m["urj-mdv"] = { "Mordvinic", 627313, "urj", } m["urj-prm"] = { "Permic", 161493, "urj", } m["urj-ugr"] = { "Ugric", 156631, "urj", } m["wak"] = { "Wakashan", 60069, } m["wen"] = { "Sorbian", 25442, "zlw", aliases = {"Lusatian", "Wendish"}, } m["xgn"] = { "Mongolic", 33750, "qfa-xgs", aliases = {"Mongolian"}, } m["xgn-cen"] = { "Central Mongolic", 28719447, "xgn", protoLanguage = "xng-lat", } m["xgn-sou"] = { "Southern Mongolic", nil, "xgn", protoLanguage = "xng-ear", } m["xgn-shr"] = { "Shirongolic", 107539435, "xgn-sou", } m["xme"] = { "Median", nil, "ira-mpr", protoLanguage = "xme-old", } m["xme-ttc"] = { "Tatic", nil, "xme", } m["xnd"] = { "Na-Dene", 26986, "qfa-dny", aliases = {"Na-Dené"}, } m["xsc"] = { "Scythian", nil, "ira-nei", } m["xsc-sak"] = { "Saka", nil, "xsc-skw", aliases = {"Sakan"}, } m["xsc-sar"] = { "Sarmatian", nil, "xsc", } m["xsc-skw"] = { "Saka-Wakhi", nil, "xsc", } m["yok"] = { "Yokuts", 34249, "nai-you", aliases = {"Yokutsan", "Mariposan", "Mariposa"}, } m["ypk"] = { "Yupik", 27970, "esx-esk", aliases = {"Yup'ik", "Yuit"}, } m["yrk"] = { "Nenets", 36452, "syd", } m["zhx"] = { "Sinitic", 33857, "sit-sba", aliases = {"Chinese"}, protoLanguage = "och", } m["zhx-com"] = { "Coastal Min", 20667215, "zhx-min", } m["zhx-inm"] = { "Inland Min", 20667237, "zhx-min", } m["zhx-man"] = { "Mandarinic", nil, "zhx", protoLanguage = "cmn-ear", } m["zhx-min"] = { "Min", 56504, "zhx", } m["zhx-nan"] = { "Southern Min", 36495, "zhx-com", } m["zhx-pin"] = { "Pinghua", 2735715, "zhx", protoLanguage = "ltc", } m["zhx-yue"] = { "Yue", 7033959, "zhx", protoLanguage = "ltc", } m["zle"] = { "East Slavic", 144713, "sla", } m["zls"] = { "South Slavic", 146665, "sla", } m["zlw"] = { "West Slavic", 145852, "sla", } m["zlw-lch"] = { "Lechitic", 742782, "zlw", aliases = {"Lekhitic"}, } m["zlw-pom"] = { "Pomeranian", nil, "zlw-lch", } m["znd"] = { "Zande", 8066072, "nic-ubg", } return require("Module:languages").finalizeData(m, "family") 2fsyry7cuxqqni3huwa84iaxx0xdof6 मॉड्यूल:translations 828 302210 487909 487371 2026-09-03T15:30:57Z SM7 6218 updating... 487909 Scribunto text/plain local export = {} local anchors_module = "Module:anchors" local debug_track_module = "Module:debug/track" local languages_module = "Module:languages" local links_module = "Module:links" local pages_module = "Module:pages" local parameters_module = "Module:parameters" local string_utilities_module = "Module:string utilities" local templatestyles_module = "Module:TemplateStyles" local utilities_module = "Module:utilities" local wikimedia_languages_module = "Module:wikimedia languages" local concat = table.concat local html_create = mw.html.create local insert = table.insert local load_data = mw.loadData local new_title = mw.title.new local require = require --[==[ Loaders for functions in other modules, which overwrite themselves with the target function when called. This ensures modules are only loaded when needed, retains the speed/convenience of locally-declared pre-loaded functions, and has no overhead after the first call, since the target functions are called directly in any subsequent calls.]==] local function decode_uri(...) decode_uri = require(string_utilities_module).decode_uri return decode_uri(...) end local function format_categories(...) format_categories = require(utilities_module).format_categories return format_categories(...) end local function full_link(...) full_link = require(links_module).full_link return full_link(...) end local function get_link_page(...) get_link_page = require(links_module).get_link_page return get_link_page(...) end local function get_wikimedia_lang(...) get_wikimedia_lang = require(wikimedia_languages_module).getByCode return get_wikimedia_lang(...) end local function language_link(...) language_link = require(links_module).language_link return language_link(...) end local function normalize_anchor(...) normalize_anchor = require(anchors_module).normalize_anchor return normalize_anchor(...) end local function plain_link(...) plain_link = require(links_module).plain_link return plain_link(...) end local function process_params(...) process_params = require(parameters_module).process return process_params(...) end local function remove_links(...) remove_links = require(links_module).remove_links return remove_links(...) end local function split_on_slashes(...) split_on_slashes = require(links_module).split_on_slashes return split_on_slashes(...) end local function templatestyles(...) templatestyles = require(templatestyles_module) return templatestyles(...) end local function track(...) track = require(debug_track_module) return track(...) end --[==[ Loaders for objects, which load data (or some other object) into some variable, which can then be accessed as "foo or get_foo()", where the function get_foo sets the object to "foo" and then returns it. This ensures they are only loaded when needed, and avoids the need to check for the existence of the object each time, since once "foo" has been set, "get_foo" will not be called again.]==] local en local function get_en() en, get_en = require(languages_module).getByCode("en"), nil return en end local headword_data local function get_headword_data() headword_data, get_headword_data = load_data("Module:headword/data"), nil return headword_data end local parameters_data local function get_parameters_data() parameters_data, get_parameters_data = load_data("Module:parameters/data"), nil return parameters_data end local translations_data local function get_translations_data() translations_data, get_translations_data = load_data("Module:translations/data"), nil return translations_data end local function is_translation_subpage(pagename) if (headword_data or get_headword_data()).page.namespace ~= "" then return false elseif not pagename then pagename = (headword_data or get_headword_data()).encoded_pagename end return pagename:match("./translations$") and true or false end local function canonical_pagename() local pagename = (headword_data or get_headword_data()).encoded_pagename return is_translation_subpage(pagename) and pagename:sub(1, -14) or pagename end local function interwiki(terminfo, term, lang, langcode) -- No interwiki link if term is empty/missing if not term or #term < 1 then terminfo.interwiki = false return end -- Percent-decode the term. term = decode_uri(terminfo.term, "PATH") -- Don't show an interwiki link if it's an invalid title. if not new_title(term) then terminfo.interwiki = false return end local interwiki_langcode = (translations_data or get_translations_data()).interwiki_langs[langcode] local wmlangs = interwiki_langcode and {get_wikimedia_lang(interwiki_langcode)} or lang:getWikimediaLanguages() -- Don't show the interwiki link if the language is not recognised by Wikimedia. if #wmlangs == 0 then terminfo.interwiki = false return end local sc = terminfo.sc local target_page = get_link_page(term, lang, sc) local split = split_on_slashes(target_page) if not split[1] then terminfo.interwiki = false return end target_page = split[1] local wmlangcode = wmlangs[1]:getCode() local interwiki_link = language_link{ lang = lang, sc = sc, term = wmlangcode .. ":" .. target_page, alt = "(" .. wmlangcode .. ")", tr = "-" } terminfo.interwiki = tostring(html_create("span") :addClass("tpos") :wikitext("&nbsp;" .. interwiki_link) ) end function export.show_terminfo(terminfo, check) local lang = terminfo.lang local langcode, langname = lang:getCode(), lang:getCanonicalName() -- Translations must be for mainspace languages. if not lang:hasType("regular") then error("Translations must be for attested and approved main-namespace languages.") else local disallowed = (translations_data or get_translations_data()).disallowed local err_msg = disallowed[langcode] if err_msg then error("Translations not allowed in " .. langname .. " (" .. langcode .. "). " .. langname .. " translations should " .. err_msg) end local fullcode = lang:getFullCode() if fullcode ~= langcode then err_msg = disallowed[fullcode] if err_msg then langname = lang:getFullName() error("Translations not allowed in " .. langname .. " (" .. fullcode .. "). " .. langname .. " translations should " .. err_msg) end end end if langcode == "en" then if terminfo.interwiki then error("Interwiki translations not allowed for English; they should always link to a different Wiktionary") end local current_L2 = require(pages_module).get_current_L2() if current_L2 ~= "Translingual" and mw.title.getCurrentTitle().nsText ~= "Wiktionary" then if current_L2 then error("English translations only allowed in Translingual section, not in " .. current_L2) else error("English translations only allowed in Translingual section, not outside of any L2") end end end local term = terminfo.term -- Check if there is a term. Don't show the interwiki link if there is nothing to link to. if not term then -- Track entries that don't provide a term. -- FIXME: This should be a category. track("translations/no term") track("translations/no term/" .. langcode) end if terminfo.interwiki then interwiki(terminfo, term, lang, langcode) end langcode = lang:getFullCode() if (translations_data or get_translations_data()).need_super[langcode] then local tr = terminfo.tr if tr ~= nil then terminfo.tr = tr:gsub("%d[%d%*%-]*%f[^%d%*]", "<sup>%0</sup>") end end terminfo.show_qualifiers = true local link = full_link(terminfo, "translation") local canonical_name = lang:getCanonicalName() local full_name = lang:getFullName() local categories = {"Terms with " .. canonical_name .. " translations"} if canonical_name ~= full_name then insert(categories, "Terms with " .. full_name .. " translations") end if check then link = tostring(html_create("span") :addClass("ttbc") :tag("sup") :addClass("ttbc") :wikitext("(please [[WT:Translations#Translations to be checked|verify]])") :done() :wikitext(" " .. link) ) insert(categories, "Requests for review of " .. langname .. " translations") end return link .. format_categories(categories, en or get_en(), nil, canonical_pagename()) end -- Implements {{t}}, {{t+}}, {{t-check}} and {{t+check}}. function export.show(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["translation"]) local check = frame.args.check return export.show_terminfo({ lang = args[1], sc = args.sc, track_sc = true, term = args[2], alt = args.alt, id = args.id, genders = args[3], tr = args.tr, ts = args.ts, lit = args.lit, q = args.q, qq = args.qq, l = args.l, ll = args.ll, refs = args.ref, interwiki = frame.args.interwiki, }, check and check ~= "") end local function add_id(div, id) return id and div:attr("id", normalize_anchor("Translations-" .. id)) or div end -- Implements {{trans-top}} and part of {{trans-top-also}}. local function top(args, title, id, navhead) local column_width = (args["column-width"] == "wide" or args["column-width"] == "narrow") and "-" .. args["column-width"] or "" local div = html_create("div") :addClass("NavFrame") :node(navhead) :tag("div") :addClass("NavContent") :tag("table") :addClass("translations") :attr("role", "presentation") :attr("data-gloss", title or "") :tag("tr") :tag("td") :addClass("translations-cell") :addClass("multicolumn-list" .. column_width) :attr("colspan", "3") :allDone() div = add_id(div, id) local categories = {} if not title then insert(categories, "Translation table header lacks gloss") end local pagename = canonical_pagename() if is_translation_subpage() then insert(categories, "Translation subpages") end return (tostring(div):gsub("</td></tr></table></div></div>$", "")) .. (#categories > 0 and format_categories(categories, en or get_en(), nil, pagename) or "") .. -- Category to trigger [[MediaWiki:Gadget-TranslationAdder.js]]; we want this even on -- user pages and such. format_categories("Entries with translation boxes", nil, nil, nil, true) .. templatestyles("Module:translations/styles.css") end -- Entry point for {{trans-top}}. function export.top(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["trans-top"]) local title = args[1] local id = args.id or title title = title and remove_links(title) return top(args, title, id, html_create("div") :addClass("NavHead") :css("text-align", "left") :wikitext(title or "Translations") ) end -- Entry point for {{checktrans-top}}. function export.check_top(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["checktrans-top"]) local text = "\n:''The translations below need to be checked and inserted above into the appropriate translation tables. See instructions at " .. frame:expandTemplate{ title = "section link", args = {"Wiktionary:Entry layout#Translations"} } .. ".''\n" local header = html_create("div") :addClass("checktrans") :wikitext(text) local subtitle = args[1] local title = "Translations to be checked" if subtitle then title = title .. "&zwnj;: \"" .. subtitle .. "\"" end -- No ID, since these should always accompany proper translation tables, and can't be trusted anyway (i.e. there's no use-case for links). return tostring(header) .. "\n" .. top(args, title, nil, html_create("div") :addClass("NavHead") :css("text-align", "left") :wikitext(title or "Translations") ) end -- Implements {{trans-bottom}}. function export.bottom(frame) -- Check nothing is being passed as a parameter. process_params(frame:getParent().args, (parameters_data or get_parameters_data())["trans-bottom"]) return "</table></div></div>" end -- Implements {{trans-see}} and part of {{trans-top-also}}. local function see(args, see_text) local navhead = html_create("div") :addClass("NavHead") :css("text-align", "left") :wikitext(args[1] .. " ") :tag("span") :css("font-weight", "normal") :wikitext("— ") :tag("i") :wikitext(see_text) :allDone() local terms, id = args[2], args.id if #terms == 0 then terms[1] = args[1] end for i = 1, #terms do local term_id = id[i] or id.default local data = { term = terms[i], id = term_id and "Translations-" .. term_id or "Translations", } terms[i] = plain_link(data) end return navhead:wikitext(concat(terms, ",&lrm; ")) end -- Entry point for {{trans-see}}. function export.see(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["trans-see"]) local div = html_create("div") :addClass("pseudo") :addClass("NavFrame") :node(see(args, "see ")) return tostring(add_id(div, args.id.default or args[1])) end -- Entry point for {{trans-top-also}}. function export.top_also(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["trans-top-also"]) local navhead = see(args, "see also ") local title = args[1] local id = args.id.default or title title = remove_links(title) return top(args, title, id, navhead) end -- Implements {{translation subpage}}. function export.subpage(frame) process_params(frame:getParent().args, (parameters_data or get_parameters_data())["translation subpage"]) if not is_translation_subpage() then error("This template should only be used on translation subpages, which have titles that end with '/translations'.") end -- "Translation subpages" category is handled by {{trans-top}}. return ("''This page contains translations for ''%s''. See the main entry for more information.''"):format(full_link{ lang = en or get_en(), term = canonical_pagename(), }) end -- Implements {{t-needed}}. function export.needed(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["t-needed"]) local lang, category = args[1], "" local span = html_create("span") :addClass("trreq") :attr("data-lang", lang:getCode()) :tag("i") :wikitext("please add this translation if you can") :done() if not args.nocat then local type, sort = args[2], args.sort if type == "quote" then category = "Requests for translations of " .. lang:getCanonicalName() .. " quotations" elseif type == "usex" then category = "Requests for translations of " .. lang:getCanonicalName() .. " usage examples" else category = "Requests for translations into " .. lang:getCanonicalName() lang = en or get_en() end category = format_categories(category, lang, sort, not sort and canonical_pagename() or nil) end return tostring(span) .. category end -- Implements {{no equivalent translation}}. function export.no_equivalent(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["no equivalent translation"]) local text = "no equivalent term in " .. args[1]:getCanonicalName() if not args.noend then text = text .. ", but see" end return tostring(html_create("i"):wikitext(text)) end -- Implements {{no attested translation}}. function export.no_attested(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["no attested translation"]) local langname = args[1]:getCanonicalName() local text = "no [[WT:ATTEST|attested]] term in " .. langname local category = "" if not args.noend then text = text .. ", but see" local sort = args.sort category = format_categories(langname .. " unattested translations", en or get_en(), sort, not sort and canonical_pagename() or nil) end return tostring(html_create("i"):wikitext(text)) .. category end -- Implements {{not used}}. function export.not_used(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["not used"]) return tostring(html_create("i"):wikitext((args[2] or "not used") .. " in " .. args[1]:getCanonicalName())) end return export ddmeh30lm5qa67dbgom8ml4egmhwtjn 487913 487909 2026-09-03T15:54:43Z SM7 6218 localization... 487913 Scribunto text/plain local export = {} local anchors_module = "Module:anchors" local debug_track_module = "Module:debug/track" local languages_module = "Module:languages" local links_module = "Module:links" local pages_module = "Module:pages" local parameters_module = "Module:parameters" local string_utilities_module = "Module:string utilities" local templatestyles_module = "Module:TemplateStyles" local utilities_module = "Module:utilities" local wikimedia_languages_module = "Module:wikimedia languages" local concat = table.concat local html_create = mw.html.create local insert = table.insert local load_data = mw.loadData local new_title = mw.title.new local require = require --[==[ Loaders for functions in other modules, which overwrite themselves with the target function when called. This ensures modules are only loaded when needed, retains the speed/convenience of locally-declared pre-loaded functions, and has no overhead after the first call, since the target functions are called directly in any subsequent calls.]==] local function decode_uri(...) decode_uri = require(string_utilities_module).decode_uri return decode_uri(...) end local function format_categories(...) format_categories = require(utilities_module).format_categories return format_categories(...) end local function full_link(...) full_link = require(links_module).full_link return full_link(...) end local function get_link_page(...) get_link_page = require(links_module).get_link_page return get_link_page(...) end local function get_wikimedia_lang(...) get_wikimedia_lang = require(wikimedia_languages_module).getByCode return get_wikimedia_lang(...) end local function language_link(...) language_link = require(links_module).language_link return language_link(...) end local function normalize_anchor(...) normalize_anchor = require(anchors_module).normalize_anchor return normalize_anchor(...) end local function plain_link(...) plain_link = require(links_module).plain_link return plain_link(...) end local function process_params(...) process_params = require(parameters_module).process return process_params(...) end local function remove_links(...) remove_links = require(links_module).remove_links return remove_links(...) end local function split_on_slashes(...) split_on_slashes = require(links_module).split_on_slashes return split_on_slashes(...) end local function templatestyles(...) templatestyles = require(templatestyles_module) return templatestyles(...) end local function track(...) track = require(debug_track_module) return track(...) end --[==[ Loaders for objects, which load data (or some other object) into some variable, which can then be accessed as "foo or get_foo()", where the function get_foo sets the object to "foo" and then returns it. This ensures they are only loaded when needed, and avoids the need to check for the existence of the object each time, since once "foo" has been set, "get_foo" will not be called again.]==] local en local function get_en() en, get_en = require(languages_module).getByCode("hi"), nil return en end local headword_data local function get_headword_data() headword_data, get_headword_data = load_data("Module:headword/data"), nil return headword_data end local parameters_data local function get_parameters_data() parameters_data, get_parameters_data = load_data("Module:parameters/data"), nil return parameters_data end local translations_data local function get_translations_data() translations_data, get_translations_data = load_data("Module:translations/data"), nil return translations_data end local function is_translation_subpage(pagename) if (headword_data or get_headword_data()).page.namespace ~= "" then return false elseif not pagename then pagename = (headword_data or get_headword_data()).encoded_pagename end return pagename:match("./translations$") and true or false end local function canonical_pagename() local pagename = (headword_data or get_headword_data()).encoded_pagename return is_translation_subpage(pagename) and pagename:sub(1, -14) or pagename end local function interwiki(terminfo, term, lang, langcode) -- No interwiki link if term is empty/missing if not term or #term < 1 then terminfo.interwiki = false return end -- Percent-decode the term. term = decode_uri(terminfo.term, "PATH") -- Don't show an interwiki link if it's an invalid title. if not new_title(term) then terminfo.interwiki = false return end local interwiki_langcode = (translations_data or get_translations_data()).interwiki_langs[langcode] local wmlangs = interwiki_langcode and {get_wikimedia_lang(interwiki_langcode)} or lang:getWikimediaLanguages() -- Don't show the interwiki link if the language is not recognised by Wikimedia. if #wmlangs == 0 then terminfo.interwiki = false return end local sc = terminfo.sc local target_page = get_link_page(term, lang, sc) local split = split_on_slashes(target_page) if not split[1] then terminfo.interwiki = false return end target_page = split[1] local wmlangcode = wmlangs[1]:getCode() local interwiki_link = language_link{ lang = lang, sc = sc, term = wmlangcode .. ":" .. target_page, alt = "(" .. wmlangcode .. ")", tr = "-" } terminfo.interwiki = tostring(html_create("span") :addClass("tpos") :wikitext("&nbsp;" .. interwiki_link) ) end function export.show_terminfo(terminfo, check) local lang = terminfo.lang local langcode, langname = lang:getCode(), lang:getCanonicalName() -- Translations must be for mainspace languages. if not lang:hasType("regular") then error("अनुवाद को (attested) एवं अनुमत (approved) मुख्य-नामस्थान की भाषाओं में ही होने चाहिए।") else local disallowed = (translations_data or get_translations_data()).disallowed local err_msg = disallowed[langcode] if err_msg then error("हिंदी विक्षनरी पर " .. langname .. " (" .. langcode .. ") में अनुवाद की इजाजत नहीं है। " .. langname .. " अनुवाद को " .. err_msg) end local fullcode = lang:getFullCode() if fullcode ~= langcode then err_msg = disallowed[fullcode] if err_msg then langname = lang:getFullName() error("हिंदी विक्षनरी पर " .. langname .. " (" .. fullcode .. ") में अनुवाद की इजाजत नहीं है। " .. langname .. " अनुवाद को " .. err_msg) end end end if langcode == "hi" then if terminfo.interwiki then error("हिंदी में इंटरविकि अनुवाद की इजाजत नहीं है; इन्हें हमेशा किसी दूसरे भाषा की विक्षनरी से लिंक किया जाना चाहिए।") end local current_L2 = require(pages_module).get_current_L2() if current_L2 ~= "ट्रांसलिंगुअल" and mw.title.getCurrentTitle().nsText ~= "विक्षनरी" then if current_L2 then error("हिंदी अनुवाद की इजाजत केवल ट्रांसलिंगुअल अनुभाग में है, वर्तमान " .. current_L2 .. " में नहीं।") else error("हिंदी अनुवाद की इजाजत केवल ट्रांसलिंगुअल अनुभाग में है, किसी L2 के बाहर नहीं।") end end end local term = terminfo.term -- Check if there is a term. Don't show the interwiki link if there is nothing to link to. if not term then -- Track entries that don't provide a term. -- FIXME: This should be a category. track("translations/no term") track("translations/no term/" .. langcode) end if terminfo.interwiki then interwiki(terminfo, term, lang, langcode) end langcode = lang:getFullCode() if (translations_data or get_translations_data()).need_super[langcode] then local tr = terminfo.tr if tr ~= nil then terminfo.tr = tr:gsub("%d[%d%*%-]*%f[^%d%*]", "<sup>%0</sup>") end end terminfo.show_qualifiers = true local link = full_link(terminfo, "translation") local canonical_name = lang:getCanonicalName() local full_name = lang:getFullName() local categories = {"टर्म " .. canonical_name .. " अनुवाद के साथ"} if canonical_name ~= full_name then insert(categories, "टर्म " .. full_name .. " अनुवाद के साथ") end if check then link = tostring(html_create("span") :addClass("ttbc") :tag("sup") :addClass("ttbc") :wikitext("(कृपया [[विक्षनरी:अनुवाद#जाँच की आवश्यता वाले अनुवाद|जाँचें]])") :done() :wikitext(" " .. link) ) insert(categories, "अनुवाद जाँच अनुरोध " .. langname .. " के अनुवादों हेतु") end return link .. format_categories(categories, en or get_en(), nil, canonical_pagename()) end -- Implements {{t}}, {{t+}}, {{t-check}} and {{t+check}}. function export.show(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["translation"]) local check = frame.args.check return export.show_terminfo({ lang = args[1], sc = args.sc, track_sc = true, term = args[2], alt = args.alt, id = args.id, genders = args[3], tr = args.tr, ts = args.ts, lit = args.lit, q = args.q, qq = args.qq, l = args.l, ll = args.ll, refs = args.ref, interwiki = frame.args.interwiki, }, check and check ~= "") end local function add_id(div, id) return id and div:attr("id", normalize_anchor("Translations-" .. id)) or div end -- Implements {{trans-top}} and part of {{trans-top-also}}. local function top(args, title, id, navhead) local column_width = (args["column-width"] == "wide" or args["column-width"] == "narrow") and "-" .. args["column-width"] or "" local div = html_create("div") :addClass("NavFrame") :node(navhead) :tag("div") :addClass("NavContent") :tag("table") :addClass("translations") :attr("role", "presentation") :attr("data-gloss", title or "") :tag("tr") :tag("td") :addClass("translations-cell") :addClass("multicolumn-list" .. column_width) :attr("colspan", "3") :allDone() div = add_id(div, id) local categories = {} if not title then insert(categories, "अनुवाद हेडर में ग्लॉस ग़ायब है") end local pagename = canonical_pagename() if is_translation_subpage() then insert(categories, "अनुवाद उपपृष्ठ") end return (tostring(div):gsub("</td></tr></table></div></div>$", "")) .. (#categories > 0 and format_categories(categories, en or get_en(), nil, pagename) or "") .. -- Category to trigger [[MediaWiki:Gadget-TranslationAdder.js]]; we want this even on -- user pages and such. format_categories("अनुवाद बक्सों के साथ प्रविष्टियाँ", nil, nil, nil, true) .. templatestyles("Module:translations/styles.css") end -- Entry point for {{trans-top}}. function export.top(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["trans-top"]) local title = args[1] local id = args.id or title title = title and remove_links(title) return top(args, title, id, html_create("div") :addClass("NavHead") :css("text-align", "left") :wikitext(title or "अनुवाद") ) end -- Entry point for {{checktrans-top}}. function export.check_top(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["checktrans-top"]) local text = "\n:''The translations below need to be checked and inserted above into the appropriate translation tables. See instructions at " .. frame:expandTemplate{ title = "section link", args = {"विक्षनरी:प्रविष्टि शैली मार्गदर्शन#अनुवाद"} } .. ".''\n" local header = html_create("div") :addClass("checktrans") :wikitext(text) local subtitle = args[1] local title = "जाँच की आवश्यकता वाले अनुवाद" if subtitle then title = title .. "&zwnj;: \"" .. subtitle .. "\"" end -- No ID, since these should always accompany proper translation tables, and can't be trusted anyway (i.e. there's no use-case for links). return tostring(header) .. "\n" .. top(args, title, nil, html_create("div") :addClass("NavHead") :css("text-align", "left") :wikitext(title or "अनुवाद") ) end -- Implements {{trans-bottom}}. function export.bottom(frame) -- Check nothing is being passed as a parameter. process_params(frame:getParent().args, (parameters_data or get_parameters_data())["trans-bottom"]) return "</table></div></div>" end -- Implements {{trans-see}} and part of {{trans-top-also}}. local function see(args, see_text) local navhead = html_create("div") :addClass("NavHead") :css("text-align", "left") :wikitext(args[1] .. " ") :tag("span") :css("font-weight", "normal") :wikitext("— ") :tag("i") :wikitext(see_text) :allDone() local terms, id = args[2], args.id if #terms == 0 then terms[1] = args[1] end for i = 1, #terms do local term_id = id[i] or id.default local data = { term = terms[i], id = term_id and "अनुवाद-" .. term_id or "अनुवाद", } terms[i] = plain_link(data) end return navhead:wikitext(concat(terms, ",&lrm; ")) end -- Entry point for {{trans-see}}. function export.see(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["trans-see"]) local div = html_create("div") :addClass("pseudo") :addClass("NavFrame") :node(see(args, "देखें ")) return tostring(add_id(div, args.id.default or args[1])) end -- Entry point for {{trans-top-also}}. function export.top_also(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["trans-top-also"]) local navhead = see(args, "इन्हें भी देखें ") local title = args[1] local id = args.id.default or title title = remove_links(title) return top(args, title, id, navhead) end -- Implements {{translation subpage}}. function export.subpage(frame) process_params(frame:getParent().args, (parameters_data or get_parameters_data())["translation subpage"]) if not is_translation_subpage() then error("This template should only be used on translation subpages, which have titles that end with '/translations'.") end -- "Translation subpages" category is handled by {{trans-top}}. return ("''This page contains translations for ''%s''. See the main entry for more information.''"):format(full_link{ lang = en or get_en(), term = canonical_pagename(), }) end -- Implements {{t-needed}}. function export.needed(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["t-needed"]) local lang, category = args[1], "" local span = html_create("span") :addClass("trreq") :attr("data-lang", lang:getCode()) :tag("i") :wikitext("कृपया यह अनुवाद जोड़ें यदि आप जोड़ सकते हों") :done() if not args.nocat then local type, sort = args[2], args.sort if type == "quote" then category = "Requests for translations of " .. lang:getCanonicalName() .. " quotations" elseif type == "usex" then category = "Requests for translations of " .. lang:getCanonicalName() .. " usage examples" else category = "Requests for translations into " .. lang:getCanonicalName() lang = en or get_en() end category = format_categories(category, lang, sort, not sort and canonical_pagename() or nil) end return tostring(span) .. category end -- Implements {{no equivalent translation}}. function export.no_equivalent(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["no equivalent translation"]) local text = "इसका " .. args[1]:getCanonicalName() .. " में कोई सटीक संगत (equivalent) टर्म नहीं है" if not args.noend then text = text .. ", लेकिन देखें" end return tostring(html_create("i"):wikitext(text)) end -- Implements {{no attested translation}}. function export.no_attested(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["no attested translation"]) local langname = args[1]:getCanonicalName() local text = "no [[WT:ATTEST|attested]] term in " .. langname local category = "" if not args.noend then text = text .. ", लेकिन देखें" local sort = args.sort category = format_categories(langname .. " unattested translations", en or get_en(), sort, not sort and canonical_pagename() or nil) end return tostring(html_create("i"):wikitext(text)) .. category end -- Implements {{not used}}. function export.not_used(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["not used"]) return tostring(html_create("i"):wikitext((args[2] or "not used") .. " in " .. args[1]:getCanonicalName())) end return export kvd108dlvm8aqy9bvhz6m7n8r6lw7wg 487914 487913 2026-09-03T15:55:01Z SM7 6218 "[[मॉड्यूल:translations]]" सुरक्षित किया ([सम्पादन=केवल प्रबंधक अनुमत] (हमेशा) [स्थानांतरण=केवल प्रबंधक अनुमत] (हमेशा)) 487913 Scribunto text/plain local export = {} local anchors_module = "Module:anchors" local debug_track_module = "Module:debug/track" local languages_module = "Module:languages" local links_module = "Module:links" local pages_module = "Module:pages" local parameters_module = "Module:parameters" local string_utilities_module = "Module:string utilities" local templatestyles_module = "Module:TemplateStyles" local utilities_module = "Module:utilities" local wikimedia_languages_module = "Module:wikimedia languages" local concat = table.concat local html_create = mw.html.create local insert = table.insert local load_data = mw.loadData local new_title = mw.title.new local require = require --[==[ Loaders for functions in other modules, which overwrite themselves with the target function when called. This ensures modules are only loaded when needed, retains the speed/convenience of locally-declared pre-loaded functions, and has no overhead after the first call, since the target functions are called directly in any subsequent calls.]==] local function decode_uri(...) decode_uri = require(string_utilities_module).decode_uri return decode_uri(...) end local function format_categories(...) format_categories = require(utilities_module).format_categories return format_categories(...) end local function full_link(...) full_link = require(links_module).full_link return full_link(...) end local function get_link_page(...) get_link_page = require(links_module).get_link_page return get_link_page(...) end local function get_wikimedia_lang(...) get_wikimedia_lang = require(wikimedia_languages_module).getByCode return get_wikimedia_lang(...) end local function language_link(...) language_link = require(links_module).language_link return language_link(...) end local function normalize_anchor(...) normalize_anchor = require(anchors_module).normalize_anchor return normalize_anchor(...) end local function plain_link(...) plain_link = require(links_module).plain_link return plain_link(...) end local function process_params(...) process_params = require(parameters_module).process return process_params(...) end local function remove_links(...) remove_links = require(links_module).remove_links return remove_links(...) end local function split_on_slashes(...) split_on_slashes = require(links_module).split_on_slashes return split_on_slashes(...) end local function templatestyles(...) templatestyles = require(templatestyles_module) return templatestyles(...) end local function track(...) track = require(debug_track_module) return track(...) end --[==[ Loaders for objects, which load data (or some other object) into some variable, which can then be accessed as "foo or get_foo()", where the function get_foo sets the object to "foo" and then returns it. This ensures they are only loaded when needed, and avoids the need to check for the existence of the object each time, since once "foo" has been set, "get_foo" will not be called again.]==] local en local function get_en() en, get_en = require(languages_module).getByCode("hi"), nil return en end local headword_data local function get_headword_data() headword_data, get_headword_data = load_data("Module:headword/data"), nil return headword_data end local parameters_data local function get_parameters_data() parameters_data, get_parameters_data = load_data("Module:parameters/data"), nil return parameters_data end local translations_data local function get_translations_data() translations_data, get_translations_data = load_data("Module:translations/data"), nil return translations_data end local function is_translation_subpage(pagename) if (headword_data or get_headword_data()).page.namespace ~= "" then return false elseif not pagename then pagename = (headword_data or get_headword_data()).encoded_pagename end return pagename:match("./translations$") and true or false end local function canonical_pagename() local pagename = (headword_data or get_headword_data()).encoded_pagename return is_translation_subpage(pagename) and pagename:sub(1, -14) or pagename end local function interwiki(terminfo, term, lang, langcode) -- No interwiki link if term is empty/missing if not term or #term < 1 then terminfo.interwiki = false return end -- Percent-decode the term. term = decode_uri(terminfo.term, "PATH") -- Don't show an interwiki link if it's an invalid title. if not new_title(term) then terminfo.interwiki = false return end local interwiki_langcode = (translations_data or get_translations_data()).interwiki_langs[langcode] local wmlangs = interwiki_langcode and {get_wikimedia_lang(interwiki_langcode)} or lang:getWikimediaLanguages() -- Don't show the interwiki link if the language is not recognised by Wikimedia. if #wmlangs == 0 then terminfo.interwiki = false return end local sc = terminfo.sc local target_page = get_link_page(term, lang, sc) local split = split_on_slashes(target_page) if not split[1] then terminfo.interwiki = false return end target_page = split[1] local wmlangcode = wmlangs[1]:getCode() local interwiki_link = language_link{ lang = lang, sc = sc, term = wmlangcode .. ":" .. target_page, alt = "(" .. wmlangcode .. ")", tr = "-" } terminfo.interwiki = tostring(html_create("span") :addClass("tpos") :wikitext("&nbsp;" .. interwiki_link) ) end function export.show_terminfo(terminfo, check) local lang = terminfo.lang local langcode, langname = lang:getCode(), lang:getCanonicalName() -- Translations must be for mainspace languages. if not lang:hasType("regular") then error("अनुवाद को (attested) एवं अनुमत (approved) मुख्य-नामस्थान की भाषाओं में ही होने चाहिए।") else local disallowed = (translations_data or get_translations_data()).disallowed local err_msg = disallowed[langcode] if err_msg then error("हिंदी विक्षनरी पर " .. langname .. " (" .. langcode .. ") में अनुवाद की इजाजत नहीं है। " .. langname .. " अनुवाद को " .. err_msg) end local fullcode = lang:getFullCode() if fullcode ~= langcode then err_msg = disallowed[fullcode] if err_msg then langname = lang:getFullName() error("हिंदी विक्षनरी पर " .. langname .. " (" .. fullcode .. ") में अनुवाद की इजाजत नहीं है। " .. langname .. " अनुवाद को " .. err_msg) end end end if langcode == "hi" then if terminfo.interwiki then error("हिंदी में इंटरविकि अनुवाद की इजाजत नहीं है; इन्हें हमेशा किसी दूसरे भाषा की विक्षनरी से लिंक किया जाना चाहिए।") end local current_L2 = require(pages_module).get_current_L2() if current_L2 ~= "ट्रांसलिंगुअल" and mw.title.getCurrentTitle().nsText ~= "विक्षनरी" then if current_L2 then error("हिंदी अनुवाद की इजाजत केवल ट्रांसलिंगुअल अनुभाग में है, वर्तमान " .. current_L2 .. " में नहीं।") else error("हिंदी अनुवाद की इजाजत केवल ट्रांसलिंगुअल अनुभाग में है, किसी L2 के बाहर नहीं।") end end end local term = terminfo.term -- Check if there is a term. Don't show the interwiki link if there is nothing to link to. if not term then -- Track entries that don't provide a term. -- FIXME: This should be a category. track("translations/no term") track("translations/no term/" .. langcode) end if terminfo.interwiki then interwiki(terminfo, term, lang, langcode) end langcode = lang:getFullCode() if (translations_data or get_translations_data()).need_super[langcode] then local tr = terminfo.tr if tr ~= nil then terminfo.tr = tr:gsub("%d[%d%*%-]*%f[^%d%*]", "<sup>%0</sup>") end end terminfo.show_qualifiers = true local link = full_link(terminfo, "translation") local canonical_name = lang:getCanonicalName() local full_name = lang:getFullName() local categories = {"टर्म " .. canonical_name .. " अनुवाद के साथ"} if canonical_name ~= full_name then insert(categories, "टर्म " .. full_name .. " अनुवाद के साथ") end if check then link = tostring(html_create("span") :addClass("ttbc") :tag("sup") :addClass("ttbc") :wikitext("(कृपया [[विक्षनरी:अनुवाद#जाँच की आवश्यता वाले अनुवाद|जाँचें]])") :done() :wikitext(" " .. link) ) insert(categories, "अनुवाद जाँच अनुरोध " .. langname .. " के अनुवादों हेतु") end return link .. format_categories(categories, en or get_en(), nil, canonical_pagename()) end -- Implements {{t}}, {{t+}}, {{t-check}} and {{t+check}}. function export.show(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["translation"]) local check = frame.args.check return export.show_terminfo({ lang = args[1], sc = args.sc, track_sc = true, term = args[2], alt = args.alt, id = args.id, genders = args[3], tr = args.tr, ts = args.ts, lit = args.lit, q = args.q, qq = args.qq, l = args.l, ll = args.ll, refs = args.ref, interwiki = frame.args.interwiki, }, check and check ~= "") end local function add_id(div, id) return id and div:attr("id", normalize_anchor("Translations-" .. id)) or div end -- Implements {{trans-top}} and part of {{trans-top-also}}. local function top(args, title, id, navhead) local column_width = (args["column-width"] == "wide" or args["column-width"] == "narrow") and "-" .. args["column-width"] or "" local div = html_create("div") :addClass("NavFrame") :node(navhead) :tag("div") :addClass("NavContent") :tag("table") :addClass("translations") :attr("role", "presentation") :attr("data-gloss", title or "") :tag("tr") :tag("td") :addClass("translations-cell") :addClass("multicolumn-list" .. column_width) :attr("colspan", "3") :allDone() div = add_id(div, id) local categories = {} if not title then insert(categories, "अनुवाद हेडर में ग्लॉस ग़ायब है") end local pagename = canonical_pagename() if is_translation_subpage() then insert(categories, "अनुवाद उपपृष्ठ") end return (tostring(div):gsub("</td></tr></table></div></div>$", "")) .. (#categories > 0 and format_categories(categories, en or get_en(), nil, pagename) or "") .. -- Category to trigger [[MediaWiki:Gadget-TranslationAdder.js]]; we want this even on -- user pages and such. format_categories("अनुवाद बक्सों के साथ प्रविष्टियाँ", nil, nil, nil, true) .. templatestyles("Module:translations/styles.css") end -- Entry point for {{trans-top}}. function export.top(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["trans-top"]) local title = args[1] local id = args.id or title title = title and remove_links(title) return top(args, title, id, html_create("div") :addClass("NavHead") :css("text-align", "left") :wikitext(title or "अनुवाद") ) end -- Entry point for {{checktrans-top}}. function export.check_top(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["checktrans-top"]) local text = "\n:''The translations below need to be checked and inserted above into the appropriate translation tables. See instructions at " .. frame:expandTemplate{ title = "section link", args = {"विक्षनरी:प्रविष्टि शैली मार्गदर्शन#अनुवाद"} } .. ".''\n" local header = html_create("div") :addClass("checktrans") :wikitext(text) local subtitle = args[1] local title = "जाँच की आवश्यकता वाले अनुवाद" if subtitle then title = title .. "&zwnj;: \"" .. subtitle .. "\"" end -- No ID, since these should always accompany proper translation tables, and can't be trusted anyway (i.e. there's no use-case for links). return tostring(header) .. "\n" .. top(args, title, nil, html_create("div") :addClass("NavHead") :css("text-align", "left") :wikitext(title or "अनुवाद") ) end -- Implements {{trans-bottom}}. function export.bottom(frame) -- Check nothing is being passed as a parameter. process_params(frame:getParent().args, (parameters_data or get_parameters_data())["trans-bottom"]) return "</table></div></div>" end -- Implements {{trans-see}} and part of {{trans-top-also}}. local function see(args, see_text) local navhead = html_create("div") :addClass("NavHead") :css("text-align", "left") :wikitext(args[1] .. " ") :tag("span") :css("font-weight", "normal") :wikitext("— ") :tag("i") :wikitext(see_text) :allDone() local terms, id = args[2], args.id if #terms == 0 then terms[1] = args[1] end for i = 1, #terms do local term_id = id[i] or id.default local data = { term = terms[i], id = term_id and "अनुवाद-" .. term_id or "अनुवाद", } terms[i] = plain_link(data) end return navhead:wikitext(concat(terms, ",&lrm; ")) end -- Entry point for {{trans-see}}. function export.see(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["trans-see"]) local div = html_create("div") :addClass("pseudo") :addClass("NavFrame") :node(see(args, "देखें ")) return tostring(add_id(div, args.id.default or args[1])) end -- Entry point for {{trans-top-also}}. function export.top_also(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["trans-top-also"]) local navhead = see(args, "इन्हें भी देखें ") local title = args[1] local id = args.id.default or title title = remove_links(title) return top(args, title, id, navhead) end -- Implements {{translation subpage}}. function export.subpage(frame) process_params(frame:getParent().args, (parameters_data or get_parameters_data())["translation subpage"]) if not is_translation_subpage() then error("This template should only be used on translation subpages, which have titles that end with '/translations'.") end -- "Translation subpages" category is handled by {{trans-top}}. return ("''This page contains translations for ''%s''. See the main entry for more information.''"):format(full_link{ lang = en or get_en(), term = canonical_pagename(), }) end -- Implements {{t-needed}}. function export.needed(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["t-needed"]) local lang, category = args[1], "" local span = html_create("span") :addClass("trreq") :attr("data-lang", lang:getCode()) :tag("i") :wikitext("कृपया यह अनुवाद जोड़ें यदि आप जोड़ सकते हों") :done() if not args.nocat then local type, sort = args[2], args.sort if type == "quote" then category = "Requests for translations of " .. lang:getCanonicalName() .. " quotations" elseif type == "usex" then category = "Requests for translations of " .. lang:getCanonicalName() .. " usage examples" else category = "Requests for translations into " .. lang:getCanonicalName() lang = en or get_en() end category = format_categories(category, lang, sort, not sort and canonical_pagename() or nil) end return tostring(span) .. category end -- Implements {{no equivalent translation}}. function export.no_equivalent(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["no equivalent translation"]) local text = "इसका " .. args[1]:getCanonicalName() .. " में कोई सटीक संगत (equivalent) टर्म नहीं है" if not args.noend then text = text .. ", लेकिन देखें" end return tostring(html_create("i"):wikitext(text)) end -- Implements {{no attested translation}}. function export.no_attested(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["no attested translation"]) local langname = args[1]:getCanonicalName() local text = "no [[WT:ATTEST|attested]] term in " .. langname local category = "" if not args.noend then text = text .. ", लेकिन देखें" local sort = args.sort category = format_categories(langname .. " unattested translations", en or get_en(), sort, not sort and canonical_pagename() or nil) end return tostring(html_create("i"):wikitext(text)) .. category end -- Implements {{not used}}. function export.not_used(frame) local args = process_params(frame:getParent().args, (parameters_data or get_parameters_data())["not used"]) return tostring(html_create("i"):wikitext((args[2] or "not used") .. " in " .. args[1]:getCanonicalName())) end return export kvd108dlvm8aqy9bvhz6m7n8r6lw7wg मॉड्यूल:translations/data 828 302211 487908 479445 2026-09-03T15:29:48Z SM7 6218 updating... 487908 Scribunto text/plain local needs_translit = { ["alr"] = true, ["ab"] = true, ["abq"] = true, ["ady"] = true, ["agh"] = true, ["akv"] = true, ["am"] = true, ["ani"] = true, ["aqc"] = true, ["ar"] = true, ["as"] = true, ["av"] = true, ["ba"] = true, ["bbl"] = true, ["bdk"] = true, ["be"] = true, ["bg"] = true, ["bn"] = true, ["bo"] = true, ["bph"] = true, ["bxr"] = true, ["ce"] = true, ["cji"] = true, ["ckt"] = true, ["cv"] = true, ["dar"] = true, ["dlg"] = true, ["dng"] = true, ["dv"] = true, ["el"] = true, ["enf"] = true, ["ess"] = true, ["eve"] = true, ["evn"] = true, ["fa"] = true, ["gdo"] = true, ["got"] = true, ["gu"] = true, ["he"] = true, ["hi"] = true, ["hy"] = true, ["inh"] = true, ["itl"] = true, ["ja"] = true, ["ka"] = true, ["kap"] = true, ["kbd"] = true, ["kca"] = true, ["kjh"] = true, ["kk"] = true, ["km"] = true, ["kn"] = true, ["ko"] = true, ["krc"] = true, ["kv"] = true, ["kva"] = true, ["ky"] = true, ["lez"] = true, ["lo"] = true, ["mdf"] = true, ["mk"] = true, ["ml"] = true, ["mn"] = true, ["mr"] = true, ["my"] = true, ["myv"] = true, ["ne"] = true, ["or"] = true, ["os"] = true, ["ps"] = true, ["ru"] = true, ["rue"] = true, ["sah"] = true, ["sa"] = true, ["si"] = true, ["ta"] = true, ["te"] = true, ["tg"] = true, ["th"] = true, ["ti"] = true, ["tt"] = true, ["tyv"] = true, ["udm"] = true, ["ug"] = true, ["uk"] = true, ["ur"] = true, ["xal"] = true, ["yi"] = true, ["yrk-tun"] = true, } return { needs_translit } hify3vkrfmmepxnpibhlkfsp7sq7v9t 487916 487908 2026-09-03T16:03:28Z SM7 6218 corrected 487916 Scribunto text/plain local export = {} local function lang_info(code) return require("Module:languages").getByCode(code):getCanonicalName() .. " (" .. code .. ")" end -- Mainspace languages not allowed in translation sections. -- The value is the part of the error message given after "Translations not allowed in LANG. LANG translations should ...". local disallowed = {} disallowed["ltc"] = "be given as " .. lang_info("lzh") .. "." disallowed["och"] = disallowed["ltc"] -- disallowed["zh"] = "be given as a specific lect. For Modern Standard Chinese, use " .. lang_info("cmn") .. "." -- To be enabled once all current instances have been converted. export.disallowed = disallowed -- This maps from Wiktionary languages to Wikimedia languages for the purpose of {{t+}}. Unfortunately it duplicates data -- in several other places, which must also be updated; see [[Module:wikimedia languages/data]] for more information. export.interwiki_langs = { ["fa-cls"] = "fa", ["fa-ira"] = "fa", ["gug"] = "gn", ["kmr"] = "ku", ["lki"] = "ku", ["nds-de"] = "nds", ["nds-nl"] = "nds", ["pdt"] = "nds", ["prs"] = "fa", ["sdh"] = "ku", } -- languages needing superscripts in tr export.need_super = { ["cjy"] = true, ["cpx"] = true, ["gan"] = true, ["hak"] = true, ["hnm"] = true, ["hsn"] = true, ["luh"] = true, ["nan-tws"] = true, ["wuu"] = true, ["yue"] = true, ["zhx-sic"] = true, ["zhx-tai"] = true, } return export au2r6ei8b9uywc4gv3svrezzkgi3d07 विक्षनरी:भाषाएँ 4 302304 488017 486728 2026-09-04T08:11:46Z SM7 6218 [[Special:Contributions/~2025-26954-96|~2025-26954-96]] ([[User talk:~2025-26954-96|वार्ता]]) का सम्पादन [[User:SM7|SM7]] के अंतिम अवतरण पर पूर्ववत किया 478551 wikitext text/x-wiki {{policy-TT}} {{हिंदीनहीं}} :''विक्षनरी पर सभी भाषाओं एवं उनके कोड के लिए, देखें '''[[विक्षनरी:भाषाओं की सूची]]'''.'' :''For information on how to add or remove a language from Wiktionary, see '''[[विक्षनरी:Guide to adding and removing languages]]'''.'' Wiktionary includes many words in many languages. This page details the conventions and practices relating to the variety of languages on Wiktionary. ==समावेशन मापदंड== {{main|विक्षनरी:समावेशन मापदंड#समावेशन हेतु भाषाएँ}} ==भाषा जानकारी== To distinguish languages, Wiktionary gives each a unique name and a unique code, which identify it. Other information is also collected. ===भाषा नाम=== Wiktionary calls each language it includes by a distinct name. This name is used in headers, translation tables, categories, appendices, and some other places. Most languages only have one name, but some may be known by multiple names. In this case, one of the language's names is chosen for use in Wiktionary. This name is referred to as the ''canonical name'' of the language. Canonical language names are chosen by consensus. Whenever possible, common English names of languages are used, and diacritics are avoided. Attested names (names which meet [[WT:CFI]]) are strongly preferred. Canonical names must be unique, meaning that a name must refer to at most one language. When two or more languages are commonly known by the same name, Wiktionary distinguishes them by choosing different canonical names for each one, using a variety of means: * In many cases, the languages are also known by other names. One of those other names is then chosen so that it is unique. For example, the language of the [[w:Pyu city-states|Pyu city-states]], though called "Pyu" by some scholars, is called "Tircul" (code: <code>pyx</code>) on Wiktionary, to distinguish it from the language of Papua New Guinea which is called "Pyu" (code: <code>pby</code>). * Alternative spellings of the same name can also be used to distinguish languages with otherwise identical names. For example, the Riang language of India and Bangladesh (code: <code>ria</code>) goes by the name "Reang" on Wiktionary, to distinguish it from the "Riang" of Burma/Myanmar (code: <code>ril</code>). * If languages cannot be distinguished by alternative names, the place where each language is spoken is appended in parentheses after its name, as in the case of "Buli (Ghana)" (code: <code>bwu</code>) and "Buli (Indonesia)" (code: <code>bzq</code>). * If languages go by the same name ''and'' are spoken in the same place, they can be disambiguated by their linguistic families. For example, "Mor (Austronesian)" (code: <code>mhz</code>) and "Mor (Papuan)" (code: <code>moq</code>), both of which are spoken in Indonesia. ===भाषा कोड=== Each language on Wiktionary also has a unique code assigned to it, usually consisting of two or three letters. This code is used to identify languages when including templates in entries. Language names are not used in this case because they are longer and less precise, as the above section illustrates. [[:Category:All topics|Topical categories]] also use the language code as part of their names. The list of standard language codes can be found at [[विक्षनरी:भाषाओं की सूची]] and the list of special language codes, including etymology-only languages, can be found at the subpage [[विक्षनरी:भाषाओं की सूची/विशेष]]. Wiktionary chooses codes for languages as follows, in order of priority: # If the language has a two-letter code in the [[:en:w:ISO 639-1|ISO 639-1]] standard, then that code is used. Wikipedia has [[w:List of ISO 639-1 codes|a list of ISO 639-1 codes]]. ## A few languages are represented on Wiktionary by [[:en:w:ISO 639-1|639-1]] codes the [[:en:w:International Organization for Standardization|ISO]] has [[deprecate]]d. This is generally the case when the ISO has come to consider a lect to be a group of languages, but Wiktionary still considers it a single language. '''Serbo-Croatian''', for example, is represented by <code>sh</code>. # If the language has a three-letter code in the [[:en:w:ISO 639-3|ISO 639-3]] standard, then that code is used. Wikipedia has [[:en:w:List of ISO 639-3 codes|a list of ISO 639-3 codes]]. For translingual terms the code <code>mul</code> is used. # If the language has a three-letter code in the [[:en:w:ISO 639-2|ISO 639-2]] standard, then that code is used. This is quite rare. An example is '''Nahuatl''', which is represented by the ISO 639-2 code <code>nah</code>. # Any language which does not have an ISO code, but which is to be included in Wiktionary, has a new Wiktionary-specific "exceptional" code devised for it. This code consists of two parts. The first part is the nearest three-letter (ISO) family code from [[:en:w:ISO 639-5|ISO 639-5]]; it is followed by a hyphen. The second part is a series of three lowercase letters which approximate the language name. (No digits, upper case letters, etc are used: IANA tags allow these, case independent, but Mediawiki software is more restrictive.) For example, '''Gallo''' is <code>roa-gal</code>: "<code>roa</code>" is the ISO 639-5 code for Romance languages, "<code>gal</code>" abbreviates "'''Gal'''lo". ## In a very few cases, the Wikimedia Foundation Language Committee has already devised a code of this form to represent the language, using it in the subdomain part of the URL of the language's wiki projects; in that case, we use the Wikimedia code. For example, the WMF uses <code>map-bms</code> for '''Banyumasan''' (the Banyumasan Wikipedia is [//map-bms.wikipedia.org map-bms.wikipedia.org]), so Wiktionary also represents Banyumasan using this code. If the Wikimedia code is of a different form, it is not used by Wiktionary; for example, Tarantino has the Wikimedia code <code>roa-tara</code>, but the Wiktionary code <code>roa-tar</code>. ## If no family to which the language belongs has an ISO code, or it is not known which family the language belonged to, the prefix <code>und</code> is used: for example, Kassite is represented by the code <code>und-kas</code>. ## Ancestor or "proto-" languages (which are generally reconstructed, though some are directly attested, like [[:श्रेणी:Proto-Norse language|Proto-Norse]]) are assigned exceptional codes consisting of the language family's code with "<code>-pro</code>" added to the end: '''Proto-Germanic''', for example, is represented by the code <code>gem-pro</code>. Because the entire family code is used as the first part of the code, the code may be longer than seven characters: for example, '''Proto-Mixe-Zoque''' is <code>nai-miz-pro</code>. Not all lects which have been assigned codes by the [[:en:w:International Organization for Standardization|ISO]] are assigned codes or included by Wiktionary. This is the case for some constructed languages, for example. There are also many lects which the ISO has assigned codes which are not treated as distinct languages on Wiktionary. For example, the ISO assigned '''Moldovan'''/'''Moldavian''' the 639-1 code <code>mo</code>, but Wiktionary regards it as a form of Romanian and represents it and Romanian by the same code <code>ro</code>. See [[विक्षनरी:Language treatment]] for more information. ====विकिमीडिया कोड के साथ बेमेल==== In a small number of cases, there is a mismatch between the (typically ISO-derived) code used by Wiktionary to represent a language and the code used by the Wikimedia Foundation. For example, Aromanian is represented on Wiktionary and in ISO 639-3 by the code <code>rup</code>, but the WMF uses the code <code>roa-rup</code> and locates the Aromanian Wikipedia at [//roa-rup.wikipedia.org roa-rup.wikipedia.org]. The templates such as [[Template:wikipedia]] which Wiktionary uses to link to its sister projects accept only Wiktionary codes. To enable linking to projects (such as the Aromanian Wikipedia) for which the WMF uses special codes, [[Module:wikimedia languages]] maps Wiktionary codes to Wikimedia codes, and [[Module:languages]] performs the reverse mapping. ===भाषा परिवार=== {{main|विक्षनरी:भाषा परिवार}} Wiktionary sorts languages into families. Most families are related through descent from a common ancestor, but a few are merely categories, such as "creoles and pidgins". Wiktionary records which family a language belongs to in the data modules of [[Module:languages]]. Like languages, families are represented by unique codes and have unique canonical names. * '''English''' belongs to the '''West Germanic''' languages (code: <code>gmw</code>). * '''Serbo-Croatian''' belongs to '''South Slavic''' languages (code:<code>zls</code>). * '''Abenaki''' belongs to the '''Algonquian''' languages (code: <code>alg</code>). * '''Nahuatl''' belongs to the '''Nahuan''' languages (code: <code>azc-nah</code>). Some languages are not naturally descended from other languages, but show other origins. These use special types of families: * The widely-used constructed language '''Esperanto''' is an '''artificial''' language (code: <code>art</code>). * '''Chavacano''', a creole language, is grouped under the '''creole or pidgin''' languages (code: <code>crp</code>). ===किसी भाषा द्वारा प्रयुक्त लिपि=== {{main|विक्षनरी:लिपियाँ}} Wiktionary records which script(s) (writing systems) a language is written in as well. This information is primarily used by modules to be able to automatically detect and format non-Latin-alphabet text appropriately. Scripts, too, have unique codes and canonical names. * '''English''' is written in the '''Latin''' script (code: <code>Latn</code>). * '''Serbo-Croatian''' is written in both the '''Latin''' and the '''Cyrillic''' scripts (codes: <code>Latn</code> and <code>Cyrl</code>). ==किसी भाषा की शब्दावलियाँ खोजना और प्रबंधन== {{main|:श्रेणी:सभी भाषाएँ}} Every language has a main category which contains all terms that the English Wiktionary has for that language. This category is named using the canonical name of the language, followed by the word "language". For example, the main category for English is [[:श्रेणी:English language]]. If the canonical name of the language already ends in the word "language", nothing is added (hence [[:श्रेणी:American Sign Language]]). The main category for a language will have a variety of subcategories, which organise terms in various ways. The most important is the "lemma" category tree, which organises all lemmas in a language by their part of speech. As Wiktionary is always being expanded and improved upon, not all languages have their own categories yet, and certain subcategories may still be empty or missing. Categories are created as needed, when new entries are added to them. When content is added in a language lacking a category, it can simply be created using the {{temp|auto cat}} template, as long as the name follows the standard format used by other languages. Languages generally also have a page which contains information that is useful to users who want to create or edit entries in that language. This page is named "विक्षनरी:About (canonical name of language)", for example [[विक्षनरी:English entry guidelines]] or [[विक्षनरी:About Spanish]]. These pages contain a wide variety of information, depending on what other editors have found useful to note. They may explain which templates to use, specific conventions regarding spelling, pronunciation or transliteration, and more. By convention, a shortcut redirect is created to these pages for easy access, named '''WT:A(language code)'''. For example, [[WT:AEN]] redirects to [[विक्षनरी:About English]] (for which the code is <code>en</code>). ==भाषा जानकारी का भंडारण एवं पुनःप्राप्तीकरण== {{main|विक्षनरी:भाषाओं की सूची}} Templates and modules use a system for storing and retrieving the various pieces of information that may be associated with a language. The module [[Module:languages]] is used to retrieve all language-related information from other modules. This module cannot be used directly in a template, so instead there is another module named [[Module:languages/templates]], which allows templates to access the information. An overview of all basic information about a language, such as its canonical name, alternative names, code, family or scripts, can be looked up at [[विक्षनरी:भाषाओं की सूची]]. This is useful if you need to look up the code for a particular language, or need to know what the canonical name of a language is. The data itself is not stored in [[Module:languages]], but instead is contained in a number of data modules (see [[:श्रेणी:Language data modules]]). For instructions on how to edit this information, see the documentation of any of the data modules. ==भाषा-विविधताएँ जो केवल व्युत्पत्ति अनुभागों में दिखती हैं== Some lects (dialects, [[chronolect]]s and [[topolect]]s) are referred to in etymology sections without having entries. These languages are given certain exceptional codes which generally do not fit the pattern described above. These languages and their codes are stored in '''[[Module:etymology languages/data]]''' and described in '''[[विक्षनरी:Dialects]]'''. == इन्हें भी देखें == * [[विक्षनरी:भाषा परिवार]] * [[विक्षनरी:लिपियाँ]] * [[Module:data consistency check]], which checks for non-unique canonical names and other problems * [[विक्षनरी:Wikimedia language codes]] for the relationship between WMF project URLs and the language codes [[श्रेणी:सभी भाषाएँ| भाषाएँ]] f2gofm80iiq8xqxelv5c5f9bru5fakg मॉड्यूल:category tree 828 302327 487963 487856 2026-09-03T20:35:44Z SM7 6218 local < 487963 Scribunto text/plain -- Prevent substitution. if mw.isSubsting() then return require("Module:unsubst") end local export = {} local category_tree_submodule_prefix = "Module:category tree/" local category_tree_styles_css = "Module:category tree/styles.css" local m_str_utils = require("Module:string utilities") local m_template_parser = require("Module:template parser") local m_utilities = require("Module:utilities") local ceil = math.ceil local class_else_type = m_template_parser.class_else_type local concat = table.concat local deep_copy = require("Module:table").deepCopy local full_url = mw.uri.fullUrl local insert = table.insert local is_callable = require("Module:fun").is_callable local log10 = math.log10 or require("Module:math").log10 local new_title = mw.title.new local pages_in_category = mw.site.stats.pagesInCategory local parse = m_template_parser.parse local remove_comments = require("Module:string/removeComments") local sort = table.sort local split = m_str_utils.split local string_compare = require("Module:string/compare") local trim = m_str_utils.trim local uupper = m_str_utils.upper local yesno = require("Module:yesno") local current_frame = mw.getCurrentFrame() local current_title = mw.title.getCurrentTitle() local namespace = current_title.namespace local poscatboiler_subsystem = "poscatboiler" local extra_args_error = "Extra arguments to {{((}}auto cat{{))}} are not allowed for this category." -- Generates a sortkey for a numeral `n`, adding leading zeroes to avoid the "1, 10, 2, 3" sorting problem. `max_n` is the greatest expected value of `n`, and is used to determine how many leading zeroes are needed. If not supplied, it defaults to the number of languages. function export.numeral_sortkey(n, max_n) max_n = max_n or require("Module:list of languages").count() return ("#%%0%dd"):format(ceil(log10(max_n + 1))):format(n) end function export.split_lang_label(title_text) local getByCanonicalName = require("Module:languages").getByCanonicalName -- Progressively remove a word from the potential canonical name until it -- matches an actual canonical name. local words = split(title_text, " ", true) for i = #words - 1, 1, -1 do local lang = getByCanonicalName(concat(words, " ", 1, i)) if lang then return lang, concat(words, " ", i + 1) end end return nil, title_text end local function show_error(text, title) return require("Module:message box").maintenance( "red", "[[File:Codex icon Alert red.svg|40px|alt=alert]]", title or "This category is not defined in Wiktionary's category tree.", text ) end local function error_not_in_category_tree() error( "This category is not defined in Wiktionary's category tree. " .. "Double-check the category name for typos. " .. "Search existing categories or request definition at [[Wiktionary:Category and label treatment requests|WT:CLTR]]. " .. "Affected category: " .. current_title.fullText, 2 ) end -- Show the text that goes at the very top right of the page. local function show_topright(current) return current.getTopright and current:getTopright() or nil end local function link_box(content) return ("<div class=\"noprint plainlinks\" style=\"float: right; clear: both; margin: 0 0 .5em 1em; background: var(--wikt-palette-paleblue, #f9f9f9); border: 1px var(--border-color-base, #aaaaaa) solid; margin-top: -1px; padding: 5px; font-weight: bold;\">%s</div>"):format(content) end local function show_editlink(current) return link_box(("[%s Edit category data]"):format(tostring(full_url(current:getDataModule(), "action=edit")))) end local function show_related_changes() local title = current_title.fullText return link_box(("[%s <span title=\"Recent edits and other changes to pages in %s\">Recent changes</span>]"):format( tostring(full_url("Special:RecentChangesLinked", { target = title, showlinkedto = 0, })), title )) end local function show_pagelist(current) local namespace = "namespace=" local info = current:getInfo() local lang_code = info.code if info.label == "citations" or info.label == "citations of undefined terms" then namespace = namespace .. "Citations" elseif lang_code then local lang = require("Module:languages").getByCode(lang_code, true, true) if lang then -- Proto-Norse (gmq-pro) is probably the only language with a code ending in -pro -- that's intended to have mostly non-reconstructed entries. if (lang_code:find("%-pro$") and lang_code ~= "gmq-pro") or lang:hasType("reconstructed") then namespace = namespace .. "विक्षनरी" elseif lang:hasType("appendix-constructed") then namespace = namespace .. "विक्षनरी" end end elseif info.label:match("templates") then namespace = namespace .. "साँचा" elseif info.label:match("modules") then namespace = namespace .. "Module" elseif info.label:match("^विक्षनरी") or info.label:match("^Pages") then namespace = "" end return ([=[ {| id="newest-and-oldest-pages" class="wikitable mw-collapsible" style="float: right; clear: both; margin: 0 0 .5em 1em;" ! Newest and oldest pages&nbsp; |- | id="recent-additions" style="font-size:0.9em;" | '''Newest pages ordered by last [[mw:Manual:Categorylinks table#cl_timestamp|category link update]]:''' %s |- | id="oldest-pages" style="font-size:0.9em;" | '''Oldest pages ordered by last edit:''' %s |}]=]):format( current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=categoryadd order=descending]=] ):format(current_title.text, namespace) ), current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=lastedit order=ascending]=] ):format(current_title.text, namespace) ) ) end -- Show navigational "breadcrumbs" at the top of the page. local function show_breadcrumbs(current) local steps = {} -- Start at the current label and move our way up the "chain" from child to parent, until we can't go further. while current do local category, display_name, nocap if type(current) == "string" then category = current display_name = current:gsub("^श्रेणी:", "") else if not current.getCategoryName then error("Internal error: Bad format in breadcrumb chain structure, probably a misformatted value for `parents`: " .. mw.dumpObject(current)) end category = "श्रेणी:" .. current:getCategoryName() display_name, nocap = current:getBreadcrumbName() end if not nocap then display_name = mw.getContentLanguage():ucfirst(display_name) end insert(steps, 1, ("[[:%s|%s]]"):format(category, display_name)) -- Move up the "chain" by one level. if type(current) == "string" then current = nil else current = current:getParents() end if current then current = current[1].name end end local templateStyles = require("Module:TemplateStyles")(category_tree_styles_css) local ol = mw.html.create("ol") for i, step in ipairs(steps) do local li = mw.html.create("li") if i ~= 1 then local span = mw.html.create("span") :attr("aria-hidden", "true") :addClass("ts-categoryBreadcrumbs-separator") :wikitext(" » ") li:node(span) end li:wikitext(step) ol:node(li) end return templateStyles .. tostring(mw.html.create("div") :attr("role", "navigation") :attr("aria-label", "Breadcrumb") :addClass("ts-categoryBreadcrumbs") :node(ol)) end local function show_also(current) local also = current._info.also if also and #also > 0 then return ('<div style="margin-top:-1em;margin-bottom:1.5em">%s</div>'):format(require("Module:also").main(also)) end return nil end -- Show a short description text for the category. local function show_description(current) return current.getDescription and current:getDescription() or nil end local function show_appendix(current) local appendix = current.getAppendix and current:getAppendix() return appendix and ("For more information, see [[%s]]."):format(appendix) or nil end local function sort_children(child1, child2) return string_compare(uupper(child1.sort), uupper(child2.sort)) end -- Show a list of child categories. local function show_children(current) local children = current.getChildren and current:getChildren() or nil if not children then return nil end sort(children, sort_children) local children_list = {} for _, child in ipairs(children) do local child_name, child_pagetitle = child.name if type(child_name) == "string" then child_pagetitle = child_name else child_pagetitle = "श्रेणी:" .. child_name:getCategoryName() end if new_title(child_pagetitle).exists then insert(children_list, ("* [[:%s]]: %s"):format( child_pagetitle, child.description or type(child_name) == "string" and child_name:gsub("^श्रेणी:", "") .. "." or child_name:getDescription("child") )) end end return concat(children_list, "\n") end -- Show a table of contents with links to each letter in the language's script. local function show_TOC(current) local titleText = current_title.text local inCategoryPages = pages_in_category(titleText, "pages") local inCategorySubcats = pages_in_category(titleText, "subcats") local TOC_type -- Compute type of table of contents required. if inCategoryPages > 2500 or inCategorySubcats > 2500 then TOC_type = "full" elseif inCategoryPages > 200 or inCategorySubcats > 200 then TOC_type = "normal" else -- No (usual) need for a TOC if all pages or subcategories can fit on one page; -- but allow this to be overridden by a custom TOC handler. TOC_type = "none" end if current.getTOC then local TOC_text = current:getTOC(TOC_type) if TOC_text ~= true then return TOC_text or nil end end if TOC_type ~= "none" then local templatename = current:getTOCTemplateName() local TOC_template if TOC_type == "full" then -- This category is very large, see if there is a "full" version of the TOC. local TOC_template_full = new_title(templatename .. "/full") if TOC_template_full.exists then TOC_template = TOC_template_full end end if not TOC_template then local TOC_template_normal = new_title(templatename) if TOC_template_normal.exists then TOC_template = TOC_template_normal end end if TOC_template then return current_frame:expandTemplate{title = TOC_template.text, args = {}} end end return nil end -- Show the "catfix" that adds language attributes and script classes to the page. local function show_catfix(current) local lang, sc = current:getCatfixInfo() return lang and m_utilities.catfix(lang, sc) or nil end -- Show the parent categories that the current category should be placed in. local function show_categories(current, categories) local parents = current.getParents and current:getParents() or nil if not parents then return nil end for _, parent in ipairs(parents) do local parent_name = parent.name local sortkey = type(parent.sort) == "table" and parent.sort:makeSortKey() or parent.sort if type(parent_name) == "string" then insert(categories, ("[[%s|%s]]"):format(parent_name, sortkey)) else insert(categories, ("[[श्रेणी:%s|%s]]"):format(parent_name:getCategoryName(), sortkey)) end end -- Also put the category in its corresponding "umbrella" or "by language" category. local umbrella = current:getUmbrella() if umbrella then -- FIXME: use a language-neutral sorting function like the Unicode Collation Algorithm. local sortkey = current._lang and current._lang:getCanonicalName() or current:getCategoryName() sortkey = require("Module:languages").getByCode("en", true):makeSortKey(sortkey) if type(umbrella) == "string" then insert(categories, ("[[%s|%s]]"):format(umbrella, sortkey)) else insert(categories, ("[[श्रेणी:%s|%s]]"):format(umbrella:getCategoryName(), sortkey)) end end -- Check for various unwanted parser functions, which should be integrated into the category tree data instead. -- Note: HTML comments shouldn't be removed from `content` until after this step, as they can affect the result. local content = current_title:getContent() if not content then -- This happens when using [[Special:ExpandTemplates]] to call {{auto cat}} on a nonexistent category page, -- which is needed by Benwing's create_wanted_categories.py script. return end local defaultsort, displaytitle, page_has_param for node in parse(content):iterate_nodes() do local node_class = class_else_type(node) if node_class == "template" then local name = node:get_name() if name == "DEFAULTSORT:" and not defaultsort then insert(categories, "[[Category:Pages with DEFAULTSORT conflicts]]") defaultsort = true elseif name == "DISPLAYTITLE:" and not displaytitle then insert(categories,"[[Category:Pages with DISPLAYTITLE conflicts]]") displaytitle = true end elseif node_class == "parameter" and not page_has_param then insert(categories,"[[Category:Pages with raw triple-brace template parameters]]") page_has_param = true end end -- Check for raw category markup, which should also be integrated into the category tree data. content = remove_comments(content, "BOTH") local head = content:find("[[", 1, true) while head do local close = content:find("]]", head + 2, true) if not close then break end -- Make sure there are no intervening "[[" between head and close. local open = content:find("[[", head + 2, true) while open and open < close do head = open open = content:find("[[", head + 2, true) end local cat = content:sub(head + 2, close - 1) local colon = cat:match("^[ _\128-\244]*[Cc][Aa][Tt][EeGgOoRrYy _\128-\244]*():") if colon then local pipe = cat:find("|", colon + 1, true) if pipe ~= #cat then local title = new_title(pipe and cat:sub(1, pipe - 1) or cat) if title and title.namespace == 14 then insert(categories,"[[Category:Categories with categories using raw markup]]") break end end end head = open end end local function generate_output(current) if current then for _, functionName in pairs{ "getBreadcrumbName", "getDataModule", "canBeEmpty", "getDescription", "getParents", "getChildren", "getUmbrella", "getAppendix", "getTOCTemplateName", } do if not is_callable(current[functionName]) then require("Module:debug").track{"category tree/missing function", "category tree/missing function/" .. functionName} end end end local boxes, display, categories = {}, {}, {} -- Categories should never show files as a gallery. insert(categories, "__NOGALLERY__") if current_frame:getParent():getTitle() == "साँचा:auto cat" then insert(categories, "[[Category:Categories calling Template:auto cat]]") end -- Check if the category is empty local totalPages = pages_in_category(current_title.text, "all") local hugeCategory = totalPages > 1000000 -- 1 million -- Categorize huge categories, as they cause DynamicPageList to time out and make the category inaccessible. if hugeCategory then insert(categories, "[[Category:Huge categories]]") end -- Are the parameters valid? if not current then -- Signal failure so export.show can try the next handler. return nil, true end -- Does the category have the correct name? local currentName = current:getCategoryName() local correctName = current_title.text == currentName if not correctName then insert(categories, "[[श्रेणी:Categories with incorrect names]]") insert(display, show_error( ("Based on the data in the category tree, this category should be called '''[[:श्रेणी:%s]]'''."):format(currentName), "इस श्रेणी में कोई ग़लत नाम है।" )) end -- Add cleanup category for empty categories. local canBeEmpty = current:canBeEmpty() if canBeEmpty and correctName then insert(categories, " __EXPECTUNUSEDCATEGORY__") elseif totalPages == 0 then insert(categories, "[[Category:Empty categories]]") end if current:isHidden() then insert(categories, " __HIDDENCAT__") end -- Put all the float-right stuff into a <div> that does not clear, so that float-left stuff like the breadcrumbs and -- description can go opposite the float-right stuff without vertical space. insert(boxes, "<div style=\"float: right;\">") insert(boxes, show_topright(current)) insert(boxes, show_editlink(current)) insert(boxes, show_related_changes()) -- Show pagelist, unless it's a huge category (since they can't use DynamicPageList - see above). if not hugeCategory then insert(boxes, show_pagelist(current)) end insert(boxes, "</div>") -- Generate the displayed information insert(display, show_breadcrumbs(current)) insert(display, show_also(current)) insert(display, show_description(current)) insert(display, show_appendix(current)) insert(display, show_children(current)) insert(display, show_TOC(current)) insert(display, show_catfix(current)) insert(display, '<br class="clear-both-in-vector-2022-only">') show_categories(current, categories) return concat(boxes, "\n") .. "\n" .. concat(display, "\n\n") .. concat(categories, "") end --[==[ List of handler functions that try to match the page name. A handler should return the name of a submodule to [[Module:category tree]] and an info table which is passed as an argument to the submodule. If a handler does not recognize the page name, it should return nil. Note that the order of handlers matters! ]==] local handlers = {} -- Thesaurus per-language category insert(handlers, function(title) local code, label = title:match("^विक्षनरी:(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Topic per-language category insert(handlers, function(title) local code, label = title:match("^(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Lect category e.g. for [[:Category:New Zealand English]] or [[:Category:Issime Walser]] insert(handlers, function(title, args) local lect = args.lect or args.dialect if lect ~= "" and yesno(lect, true) then -- Same as boolean in [[Module:parameters]]. return poscatboiler_subsystem, {label = title, args = args, raw = true} end end) -- poscatboiler per-language label, e.g. [[Category:English non-lemma forms]] insert(handlers, function(title, args) local lang, label = export.split_lang_label(title) if not lang then return end local baseLabel, script = label:match("(.+) in (.-)$") if script and baseLabel ~= "टर्म" then local scriptObj = require("Module:scripts").getByCategoryName(script) if scriptObj then return poscatboiler_subsystem, {label = baseLabel, code = lang:getCode(), sc = scriptObj:getCode(), args = args} end end return poscatboiler_subsystem, {label = label, code = lang:getCode(), args = args} end) -- poscatboiler label umbrella category insert(handlers, function(title, args) local label = title:match("(.+) भाषा अनुसार$") if label then -- The poscatboiler code will appropriately lowercase if needed. return poscatboiler_subsystem, {label = label, args = args} end end) -- poscatboiler raw handlers insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args, raw = true} end) -- poscatboiler umbrella handlers without 'by language' insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args} end) function export.show(frame) local args, other_args = require("Module:parameters").process(frame:getParent().args, { ["also"] = {type = "title", sublist = "comma without whitespace", namespace = 14} }, true) if args.also then for k, arg in next, args.also do args.also[k] = arg.prefixedText end end for k, arg in next, other_args do other_args[k] = trim(arg) end if namespace == 10 then -- Template return "(यह साँचा [[Help:Namespaces#Category|श्रेणी:]] नामस्थान में स्थित पृष्ठ पर प्रयोग किया जाना चाहिये।)" elseif namespace ~= 14 then -- Category error("यह साँचा/मॉड्यूल केवल [[mw:Help:Namespaces#Category|श्रेणी:]] नामस्थान में प्रयोग में लाया जा सकता है।") end local saw_tree_lookup_failure = false local failure_consumed_args = false -- Go through each handler in turn. If a handler doesn't recognize the format of the category, it will return nil, -- and we will consider the next handler. Otherwise, it returns a template name and arguments to call it with, but -- even then, that template might return an error, and we need to consider the next handler. This happens, for -- example, with the category "CAT:Mato Grosso, Brazil", where "Mato" is the name of a language, so the poscatboiler -- per-language label handler fires and tries to find a label "Grosso, Brazil". This throws an error, and -- previously, this blocked further handler consideration, but now we check for the error and continue checking -- handlers; eventually, the topic umbrella handler will fire and correctly handle the category. for _, handler in ipairs(handlers) do -- Use a new title object and args table for each handler, to keep them isolated. local submodule, info = handler(current_title.text, deep_copy(other_args)) if submodule then info.also = deep_copy(args.also) require("Module:debug").track("auto cat/" .. submodule) -- `failed` is true if no match was found in the category tree. submodule = require(category_tree_submodule_prefix .. submodule) local cattext, failed = generate_output(submodule.main(info)) if failed then saw_tree_lookup_failure = true failure_consumed_args = failure_consumed_args or not not info.args elseif not info.args and next(other_args) then error(extra_args_error) else return cattext end end end -- No handler produced a valid category-tree match. -- Preserve previous behavior: if no failing handler consumed args, surface extra-arg errors first. if saw_tree_lookup_failure and not failure_consumed_args and next(other_args) then error(extra_args_error) end error_not_in_category_tree() end -- TODO: new test entrypoint. return export fenzpw5i6qt8tp85o5nw0nq4dlaeff3 487994 487963 2026-09-04T06:46:09Z SM7 6218 चूँकि यहाँ DynamicPageList इंस्टाल नहीं है, पेज लिस्ट दिखाना बंद किया गया 487994 Scribunto text/plain -- Prevent substitution. if mw.isSubsting() then return require("Module:unsubst") end local export = {} local category_tree_submodule_prefix = "Module:category tree/" local category_tree_styles_css = "Module:category tree/styles.css" local m_str_utils = require("Module:string utilities") local m_template_parser = require("Module:template parser") local m_utilities = require("Module:utilities") local ceil = math.ceil local class_else_type = m_template_parser.class_else_type local concat = table.concat local deep_copy = require("Module:table").deepCopy local full_url = mw.uri.fullUrl local insert = table.insert local is_callable = require("Module:fun").is_callable local log10 = math.log10 or require("Module:math").log10 local new_title = mw.title.new local pages_in_category = mw.site.stats.pagesInCategory local parse = m_template_parser.parse local remove_comments = require("Module:string/removeComments") local sort = table.sort local split = m_str_utils.split local string_compare = require("Module:string/compare") local trim = m_str_utils.trim local uupper = m_str_utils.upper local yesno = require("Module:yesno") local current_frame = mw.getCurrentFrame() local current_title = mw.title.getCurrentTitle() local namespace = current_title.namespace local poscatboiler_subsystem = "poscatboiler" local extra_args_error = "Extra arguments to {{((}}auto cat{{))}} are not allowed for this category." -- Generates a sortkey for a numeral `n`, adding leading zeroes to avoid the "1, 10, 2, 3" sorting problem. `max_n` is the greatest expected value of `n`, and is used to determine how many leading zeroes are needed. If not supplied, it defaults to the number of languages. function export.numeral_sortkey(n, max_n) max_n = max_n or require("Module:list of languages").count() return ("#%%0%dd"):format(ceil(log10(max_n + 1))):format(n) end function export.split_lang_label(title_text) local getByCanonicalName = require("Module:languages").getByCanonicalName -- Progressively remove a word from the potential canonical name until it -- matches an actual canonical name. local words = split(title_text, " ", true) for i = #words - 1, 1, -1 do local lang = getByCanonicalName(concat(words, " ", 1, i)) if lang then return lang, concat(words, " ", i + 1) end end return nil, title_text end local function show_error(text, title) return require("Module:message box").maintenance( "red", "[[File:Codex icon Alert red.svg|40px|alt=alert]]", title or "This category is not defined in Wiktionary's category tree.", text ) end local function error_not_in_category_tree() error( "This category is not defined in Wiktionary's category tree. " .. "Double-check the category name for typos. " .. "Search existing categories or request definition at [[Wiktionary:Category and label treatment requests|WT:CLTR]]. " .. "Affected category: " .. current_title.fullText, 2 ) end -- Show the text that goes at the very top right of the page. local function show_topright(current) return current.getTopright and current:getTopright() or nil end local function link_box(content) return ("<div class=\"noprint plainlinks\" style=\"float: right; clear: both; margin: 0 0 .5em 1em; background: var(--wikt-palette-paleblue, #f9f9f9); border: 1px var(--border-color-base, #aaaaaa) solid; margin-top: -1px; padding: 5px; font-weight: bold;\">%s</div>"):format(content) end local function show_editlink(current) return link_box(("[%s श्रेणी आँकड़े संपादित करें]"):format(tostring(full_url(current:getDataModule(), "action=edit")))) end local function show_related_changes() local title = current_title.fullText return link_box(("[%s <span title=\"Recent edits and other changes to pages in %s\">हाल में हुए पारिवर्तन देखें</span>]"):format( tostring(full_url("Special:RecentChangesLinked", { target = title, showlinkedto = 0, })), title )) end --[==[ ******* चूँकि यहाँ DynamicPageList इंस्टाल नहीं है, पेज लिस्ट दिखाना बंद किया गया ********** ******* अगर भविष्य में यह सुविधा इंस्टाल होती है, इसे वापस सक्रिय कर लिया जायेगा ********** local function show_pagelist(current) local namespace = "namespace=" local info = current:getInfo() local lang_code = info.code if info.label == "citations" or info.label == "citations of undefined terms" then namespace = namespace .. "Citations" elseif lang_code then local lang = require("Module:languages").getByCode(lang_code, true, true) if lang then -- Proto-Norse (gmq-pro) is probably the only language with a code ending in -pro -- that's intended to have mostly non-reconstructed entries. if (lang_code:find("%-pro$") and lang_code ~= "gmq-pro") or lang:hasType("reconstructed") then namespace = namespace .. "विक्षनरी" elseif lang:hasType("appendix-constructed") then namespace = namespace .. "विक्षनरी" end end elseif info.label:match("templates") then namespace = namespace .. "साँचा" elseif info.label:match("modules") then namespace = namespace .. "Module" elseif info.label:match("^विक्षनरी") or info.label:match("^Pages") then namespace = "" end return ([=[ {| id="newest-and-oldest-pages" class="wikitable mw-collapsible" style="float: right; clear: both; margin: 0 0 .5em 1em;" ! Newest and oldest pages&nbsp; |- | id="recent-additions" style="font-size:0.9em;" | '''Newest pages ordered by last [[mw:Manual:Categorylinks table#cl_timestamp|category link update]]:''' %s |- | id="oldest-pages" style="font-size:0.9em;" | '''Oldest pages ordered by last edit:''' %s |}]=]):format( current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=categoryadd order=descending]=] ):format(current_title.text, namespace) ), current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=lastedit order=ascending]=] ):format(current_title.text, namespace) ) ) end ]==] -- Show navigational "breadcrumbs" at the top of the page. local function show_breadcrumbs(current) local steps = {} -- Start at the current label and move our way up the "chain" from child to parent, until we can't go further. while current do local category, display_name, nocap if type(current) == "string" then category = current display_name = current:gsub("^श्रेणी:", "") else if not current.getCategoryName then error("Internal error: Bad format in breadcrumb chain structure, probably a misformatted value for `parents`: " .. mw.dumpObject(current)) end category = "श्रेणी:" .. current:getCategoryName() display_name, nocap = current:getBreadcrumbName() end if not nocap then display_name = mw.getContentLanguage():ucfirst(display_name) end insert(steps, 1, ("[[:%s|%s]]"):format(category, display_name)) -- Move up the "chain" by one level. if type(current) == "string" then current = nil else current = current:getParents() end if current then current = current[1].name end end local templateStyles = require("Module:TemplateStyles")(category_tree_styles_css) local ol = mw.html.create("ol") for i, step in ipairs(steps) do local li = mw.html.create("li") if i ~= 1 then local span = mw.html.create("span") :attr("aria-hidden", "true") :addClass("ts-categoryBreadcrumbs-separator") :wikitext(" » ") li:node(span) end li:wikitext(step) ol:node(li) end return templateStyles .. tostring(mw.html.create("div") :attr("role", "navigation") :attr("aria-label", "Breadcrumb") :addClass("ts-categoryBreadcrumbs") :node(ol)) end local function show_also(current) local also = current._info.also if also and #also > 0 then return ('<div style="margin-top:-1em;margin-bottom:1.5em">%s</div>'):format(require("Module:also").main(also)) end return nil end -- Show a short description text for the category. local function show_description(current) return current.getDescription and current:getDescription() or nil end local function show_appendix(current) local appendix = current.getAppendix and current:getAppendix() return appendix and ("For more information, see [[%s]]."):format(appendix) or nil end local function sort_children(child1, child2) return string_compare(uupper(child1.sort), uupper(child2.sort)) end -- Show a list of child categories. local function show_children(current) local children = current.getChildren and current:getChildren() or nil if not children then return nil end sort(children, sort_children) local children_list = {} for _, child in ipairs(children) do local child_name, child_pagetitle = child.name if type(child_name) == "string" then child_pagetitle = child_name else child_pagetitle = "श्रेणी:" .. child_name:getCategoryName() end if new_title(child_pagetitle).exists then insert(children_list, ("* [[:%s]]: %s"):format( child_pagetitle, child.description or type(child_name) == "string" and child_name:gsub("^श्रेणी:", "") .. "." or child_name:getDescription("child") )) end end return concat(children_list, "\n") end -- Show a table of contents with links to each letter in the language's script. local function show_TOC(current) local titleText = current_title.text local inCategoryPages = pages_in_category(titleText, "pages") local inCategorySubcats = pages_in_category(titleText, "subcats") local TOC_type -- Compute type of table of contents required. if inCategoryPages > 2500 or inCategorySubcats > 2500 then TOC_type = "full" elseif inCategoryPages > 200 or inCategorySubcats > 200 then TOC_type = "normal" else -- No (usual) need for a TOC if all pages or subcategories can fit on one page; -- but allow this to be overridden by a custom TOC handler. TOC_type = "none" end if current.getTOC then local TOC_text = current:getTOC(TOC_type) if TOC_text ~= true then return TOC_text or nil end end if TOC_type ~= "none" then local templatename = current:getTOCTemplateName() local TOC_template if TOC_type == "full" then -- This category is very large, see if there is a "full" version of the TOC. local TOC_template_full = new_title(templatename .. "/full") if TOC_template_full.exists then TOC_template = TOC_template_full end end if not TOC_template then local TOC_template_normal = new_title(templatename) if TOC_template_normal.exists then TOC_template = TOC_template_normal end end if TOC_template then return current_frame:expandTemplate{title = TOC_template.text, args = {}} end end return nil end -- Show the "catfix" that adds language attributes and script classes to the page. local function show_catfix(current) local lang, sc = current:getCatfixInfo() return lang and m_utilities.catfix(lang, sc) or nil end -- Show the parent categories that the current category should be placed in. local function show_categories(current, categories) local parents = current.getParents and current:getParents() or nil if not parents then return nil end for _, parent in ipairs(parents) do local parent_name = parent.name local sortkey = type(parent.sort) == "table" and parent.sort:makeSortKey() or parent.sort if type(parent_name) == "string" then insert(categories, ("[[%s|%s]]"):format(parent_name, sortkey)) else insert(categories, ("[[श्रेणी:%s|%s]]"):format(parent_name:getCategoryName(), sortkey)) end end -- Also put the category in its corresponding "umbrella" or "by language" category. local umbrella = current:getUmbrella() if umbrella then -- FIXME: use a language-neutral sorting function like the Unicode Collation Algorithm. local sortkey = current._lang and current._lang:getCanonicalName() or current:getCategoryName() sortkey = require("Module:languages").getByCode("en", true):makeSortKey(sortkey) if type(umbrella) == "string" then insert(categories, ("[[%s|%s]]"):format(umbrella, sortkey)) else insert(categories, ("[[श्रेणी:%s|%s]]"):format(umbrella:getCategoryName(), sortkey)) end end -- Check for various unwanted parser functions, which should be integrated into the category tree data instead. -- Note: HTML comments shouldn't be removed from `content` until after this step, as they can affect the result. local content = current_title:getContent() if not content then -- This happens when using [[Special:ExpandTemplates]] to call {{auto cat}} on a nonexistent category page, -- which is needed by Benwing's create_wanted_categories.py script. return end local defaultsort, displaytitle, page_has_param for node in parse(content):iterate_nodes() do local node_class = class_else_type(node) if node_class == "template" then local name = node:get_name() if name == "DEFAULTSORT:" and not defaultsort then insert(categories, "[[Category:Pages with DEFAULTSORT conflicts]]") defaultsort = true elseif name == "DISPLAYTITLE:" and not displaytitle then insert(categories,"[[Category:Pages with DISPLAYTITLE conflicts]]") displaytitle = true end elseif node_class == "parameter" and not page_has_param then insert(categories,"[[Category:Pages with raw triple-brace template parameters]]") page_has_param = true end end -- Check for raw category markup, which should also be integrated into the category tree data. content = remove_comments(content, "BOTH") local head = content:find("[[", 1, true) while head do local close = content:find("]]", head + 2, true) if not close then break end -- Make sure there are no intervening "[[" between head and close. local open = content:find("[[", head + 2, true) while open and open < close do head = open open = content:find("[[", head + 2, true) end local cat = content:sub(head + 2, close - 1) local colon = cat:match("^[ _\128-\244]*[Cc][Aa][Tt][EeGgOoRrYy _\128-\244]*():") if colon then local pipe = cat:find("|", colon + 1, true) if pipe ~= #cat then local title = new_title(pipe and cat:sub(1, pipe - 1) or cat) if title and title.namespace == 14 then insert(categories,"[[Category:Categories with categories using raw markup]]") break end end end head = open end end local function generate_output(current) if current then for _, functionName in pairs{ "getBreadcrumbName", "getDataModule", "canBeEmpty", "getDescription", "getParents", "getChildren", "getUmbrella", "getAppendix", "getTOCTemplateName", } do if not is_callable(current[functionName]) then require("Module:debug").track{"category tree/missing function", "category tree/missing function/" .. functionName} end end end local boxes, display, categories = {}, {}, {} -- Categories should never show files as a gallery. insert(categories, "__NOGALLERY__") if current_frame:getParent():getTitle() == "साँचा:auto cat" then insert(categories, "[[Category:Categories calling Template:auto cat]]") end -- Check if the category is empty local totalPages = pages_in_category(current_title.text, "all") local hugeCategory = totalPages > 1000000 -- 1 million -- Categorize huge categories, as they cause DynamicPageList to time out and make the category inaccessible. if hugeCategory then insert(categories, "[[Category:Huge categories]]") end -- Are the parameters valid? if not current then -- Signal failure so export.show can try the next handler. return nil, true end -- Does the category have the correct name? local currentName = current:getCategoryName() local correctName = current_title.text == currentName if not correctName then insert(categories, "[[श्रेणी:Categories with incorrect names]]") insert(display, show_error( ("Based on the data in the category tree, this category should be called '''[[:श्रेणी:%s]]'''."):format(currentName), "इस श्रेणी में कोई ग़लत नाम है।" )) end -- Add cleanup category for empty categories. local canBeEmpty = current:canBeEmpty() if canBeEmpty and correctName then insert(categories, " __EXPECTUNUSEDCATEGORY__") elseif totalPages == 0 then insert(categories, "[[Category:Empty categories]]") end if current:isHidden() then insert(categories, " __HIDDENCAT__") end -- Put all the float-right stuff into a <div> that does not clear, so that float-left stuff like the breadcrumbs and -- description can go opposite the float-right stuff without vertical space. insert(boxes, "<div style=\"float: right;\">") insert(boxes, show_topright(current)) insert(boxes, show_editlink(current)) insert(boxes, show_related_changes()) -- Show pagelist, unless it's a huge category (since they can't use DynamicPageList - see above). if not hugeCategory then insert(boxes, show_pagelist(current)) end insert(boxes, "</div>") -- Generate the displayed information insert(display, show_breadcrumbs(current)) insert(display, show_also(current)) insert(display, show_description(current)) insert(display, show_appendix(current)) insert(display, show_children(current)) insert(display, show_TOC(current)) insert(display, show_catfix(current)) insert(display, '<br class="clear-both-in-vector-2022-only">') show_categories(current, categories) return concat(boxes, "\n") .. "\n" .. concat(display, "\n\n") .. concat(categories, "") end --[==[ List of handler functions that try to match the page name. A handler should return the name of a submodule to [[Module:category tree]] and an info table which is passed as an argument to the submodule. If a handler does not recognize the page name, it should return nil. Note that the order of handlers matters! ]==] local handlers = {} -- Thesaurus per-language category insert(handlers, function(title) local code, label = title:match("^विक्षनरी:(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Topic per-language category insert(handlers, function(title) local code, label = title:match("^(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Lect category e.g. for [[:Category:New Zealand English]] or [[:Category:Issime Walser]] insert(handlers, function(title, args) local lect = args.lect or args.dialect if lect ~= "" and yesno(lect, true) then -- Same as boolean in [[Module:parameters]]. return poscatboiler_subsystem, {label = title, args = args, raw = true} end end) -- poscatboiler per-language label, e.g. [[Category:English non-lemma forms]] insert(handlers, function(title, args) local lang, label = export.split_lang_label(title) if not lang then return end local baseLabel, script = label:match("(.+) in (.-)$") if script and baseLabel ~= "टर्म" then local scriptObj = require("Module:scripts").getByCategoryName(script) if scriptObj then return poscatboiler_subsystem, {label = baseLabel, code = lang:getCode(), sc = scriptObj:getCode(), args = args} end end return poscatboiler_subsystem, {label = label, code = lang:getCode(), args = args} end) -- poscatboiler label umbrella category insert(handlers, function(title, args) local label = title:match("(.+) भाषा अनुसार$") if label then -- The poscatboiler code will appropriately lowercase if needed. return poscatboiler_subsystem, {label = label, args = args} end end) -- poscatboiler raw handlers insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args, raw = true} end) -- poscatboiler umbrella handlers without 'by language' insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args} end) function export.show(frame) local args, other_args = require("Module:parameters").process(frame:getParent().args, { ["also"] = {type = "title", sublist = "comma without whitespace", namespace = 14} }, true) if args.also then for k, arg in next, args.also do args.also[k] = arg.prefixedText end end for k, arg in next, other_args do other_args[k] = trim(arg) end if namespace == 10 then -- Template return "(यह साँचा [[Help:Namespaces#Category|श्रेणी:]] नामस्थान में स्थित पृष्ठ पर प्रयोग किया जाना चाहिये।)" elseif namespace ~= 14 then -- Category error("यह साँचा/मॉड्यूल केवल [[mw:Help:Namespaces#Category|श्रेणी:]] नामस्थान में प्रयोग में लाया जा सकता है।") end local saw_tree_lookup_failure = false local failure_consumed_args = false -- Go through each handler in turn. If a handler doesn't recognize the format of the category, it will return nil, -- and we will consider the next handler. Otherwise, it returns a template name and arguments to call it with, but -- even then, that template might return an error, and we need to consider the next handler. This happens, for -- example, with the category "CAT:Mato Grosso, Brazil", where "Mato" is the name of a language, so the poscatboiler -- per-language label handler fires and tries to find a label "Grosso, Brazil". This throws an error, and -- previously, this blocked further handler consideration, but now we check for the error and continue checking -- handlers; eventually, the topic umbrella handler will fire and correctly handle the category. for _, handler in ipairs(handlers) do -- Use a new title object and args table for each handler, to keep them isolated. local submodule, info = handler(current_title.text, deep_copy(other_args)) if submodule then info.also = deep_copy(args.also) require("Module:debug").track("auto cat/" .. submodule) -- `failed` is true if no match was found in the category tree. submodule = require(category_tree_submodule_prefix .. submodule) local cattext, failed = generate_output(submodule.main(info)) if failed then saw_tree_lookup_failure = true failure_consumed_args = failure_consumed_args or not not info.args elseif not info.args and next(other_args) then error(extra_args_error) else return cattext end end end -- No handler produced a valid category-tree match. -- Preserve previous behavior: if no failing handler consumed args, surface extra-arg errors first. if saw_tree_lookup_failure and not failure_consumed_args and next(other_args) then error(extra_args_error) end error_not_in_category_tree() end -- TODO: new test entrypoint. return export 5zuh9xp0hz5jik78uy7aohv6p3mg36b 487995 487994 2026-09-04T06:49:18Z SM7 6218 चूँकि यहाँ DynamicPageList इंस्टाल नहीं है, पेज लिस्ट दिखाना बंद किया गया... पूरा किया 487995 Scribunto text/plain -- Prevent substitution. if mw.isSubsting() then return require("Module:unsubst") end local export = {} local category_tree_submodule_prefix = "Module:category tree/" local category_tree_styles_css = "Module:category tree/styles.css" local m_str_utils = require("Module:string utilities") local m_template_parser = require("Module:template parser") local m_utilities = require("Module:utilities") local ceil = math.ceil local class_else_type = m_template_parser.class_else_type local concat = table.concat local deep_copy = require("Module:table").deepCopy local full_url = mw.uri.fullUrl local insert = table.insert local is_callable = require("Module:fun").is_callable local log10 = math.log10 or require("Module:math").log10 local new_title = mw.title.new local pages_in_category = mw.site.stats.pagesInCategory local parse = m_template_parser.parse local remove_comments = require("Module:string/removeComments") local sort = table.sort local split = m_str_utils.split local string_compare = require("Module:string/compare") local trim = m_str_utils.trim local uupper = m_str_utils.upper local yesno = require("Module:yesno") local current_frame = mw.getCurrentFrame() local current_title = mw.title.getCurrentTitle() local namespace = current_title.namespace local poscatboiler_subsystem = "poscatboiler" local extra_args_error = "Extra arguments to {{((}}auto cat{{))}} are not allowed for this category." -- Generates a sortkey for a numeral `n`, adding leading zeroes to avoid the "1, 10, 2, 3" sorting problem. `max_n` is the greatest expected value of `n`, and is used to determine how many leading zeroes are needed. If not supplied, it defaults to the number of languages. function export.numeral_sortkey(n, max_n) max_n = max_n or require("Module:list of languages").count() return ("#%%0%dd"):format(ceil(log10(max_n + 1))):format(n) end function export.split_lang_label(title_text) local getByCanonicalName = require("Module:languages").getByCanonicalName -- Progressively remove a word from the potential canonical name until it -- matches an actual canonical name. local words = split(title_text, " ", true) for i = #words - 1, 1, -1 do local lang = getByCanonicalName(concat(words, " ", 1, i)) if lang then return lang, concat(words, " ", i + 1) end end return nil, title_text end local function show_error(text, title) return require("Module:message box").maintenance( "red", "[[File:Codex icon Alert red.svg|40px|alt=alert]]", title or "This category is not defined in Wiktionary's category tree.", text ) end local function error_not_in_category_tree() error( "This category is not defined in Wiktionary's category tree. " .. "Double-check the category name for typos. " .. "Search existing categories or request definition at [[Wiktionary:Category and label treatment requests|WT:CLTR]]. " .. "Affected category: " .. current_title.fullText, 2 ) end -- Show the text that goes at the very top right of the page. local function show_topright(current) return current.getTopright and current:getTopright() or nil end local function link_box(content) return ("<div class=\"noprint plainlinks\" style=\"float: right; clear: both; margin: 0 0 .5em 1em; background: var(--wikt-palette-paleblue, #f9f9f9); border: 1px var(--border-color-base, #aaaaaa) solid; margin-top: -1px; padding: 5px; font-weight: bold;\">%s</div>"):format(content) end local function show_editlink(current) return link_box(("[%s श्रेणी आँकड़े संपादित करें]"):format(tostring(full_url(current:getDataModule(), "action=edit")))) end local function show_related_changes() local title = current_title.fullText return link_box(("[%s <span title=\"Recent edits and other changes to pages in %s\">हाल में हुए पारिवर्तन देखें</span>]"):format( tostring(full_url("Special:RecentChangesLinked", { target = title, showlinkedto = 0, })), title )) end --[==[ ******* चूँकि यहाँ DynamicPageList इंस्टाल नहीं है, पेज लिस्ट दिखाना बंद किया गया ********** ******* अगर भविष्य में यह सुविधा इंस्टाल होती है, इसे वापस सक्रिय कर लिया जायेगा ********** local function show_pagelist(current) local namespace = "namespace=" local info = current:getInfo() local lang_code = info.code if info.label == "citations" or info.label == "citations of undefined terms" then namespace = namespace .. "Citations" elseif lang_code then local lang = require("Module:languages").getByCode(lang_code, true, true) if lang then -- Proto-Norse (gmq-pro) is probably the only language with a code ending in -pro -- that's intended to have mostly non-reconstructed entries. if (lang_code:find("%-pro$") and lang_code ~= "gmq-pro") or lang:hasType("reconstructed") then namespace = namespace .. "विक्षनरी" elseif lang:hasType("appendix-constructed") then namespace = namespace .. "विक्षनरी" end end elseif info.label:match("templates") then namespace = namespace .. "साँचा" elseif info.label:match("modules") then namespace = namespace .. "Module" elseif info.label:match("^विक्षनरी") or info.label:match("^Pages") then namespace = "" end return ([=[ {| id="newest-and-oldest-pages" class="wikitable mw-collapsible" style="float: right; clear: both; margin: 0 0 .5em 1em;" ! Newest and oldest pages&nbsp; |- | id="recent-additions" style="font-size:0.9em;" | '''Newest pages ordered by last [[mw:Manual:Categorylinks table#cl_timestamp|category link update]]:''' %s |- | id="oldest-pages" style="font-size:0.9em;" | '''Oldest pages ordered by last edit:''' %s |}]=]):format( current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=categoryadd order=descending]=] ):format(current_title.text, namespace) ), current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=lastedit order=ascending]=] ):format(current_title.text, namespace) ) ) end ]==] -- Show navigational "breadcrumbs" at the top of the page. local function show_breadcrumbs(current) local steps = {} -- Start at the current label and move our way up the "chain" from child to parent, until we can't go further. while current do local category, display_name, nocap if type(current) == "string" then category = current display_name = current:gsub("^श्रेणी:", "") else if not current.getCategoryName then error("Internal error: Bad format in breadcrumb chain structure, probably a misformatted value for `parents`: " .. mw.dumpObject(current)) end category = "श्रेणी:" .. current:getCategoryName() display_name, nocap = current:getBreadcrumbName() end if not nocap then display_name = mw.getContentLanguage():ucfirst(display_name) end insert(steps, 1, ("[[:%s|%s]]"):format(category, display_name)) -- Move up the "chain" by one level. if type(current) == "string" then current = nil else current = current:getParents() end if current then current = current[1].name end end local templateStyles = require("Module:TemplateStyles")(category_tree_styles_css) local ol = mw.html.create("ol") for i, step in ipairs(steps) do local li = mw.html.create("li") if i ~= 1 then local span = mw.html.create("span") :attr("aria-hidden", "true") :addClass("ts-categoryBreadcrumbs-separator") :wikitext(" » ") li:node(span) end li:wikitext(step) ol:node(li) end return templateStyles .. tostring(mw.html.create("div") :attr("role", "navigation") :attr("aria-label", "Breadcrumb") :addClass("ts-categoryBreadcrumbs") :node(ol)) end local function show_also(current) local also = current._info.also if also and #also > 0 then return ('<div style="margin-top:-1em;margin-bottom:1.5em">%s</div>'):format(require("Module:also").main(also)) end return nil end -- Show a short description text for the category. local function show_description(current) return current.getDescription and current:getDescription() or nil end local function show_appendix(current) local appendix = current.getAppendix and current:getAppendix() return appendix and ("For more information, see [[%s]]."):format(appendix) or nil end local function sort_children(child1, child2) return string_compare(uupper(child1.sort), uupper(child2.sort)) end -- Show a list of child categories. local function show_children(current) local children = current.getChildren and current:getChildren() or nil if not children then return nil end sort(children, sort_children) local children_list = {} for _, child in ipairs(children) do local child_name, child_pagetitle = child.name if type(child_name) == "string" then child_pagetitle = child_name else child_pagetitle = "श्रेणी:" .. child_name:getCategoryName() end if new_title(child_pagetitle).exists then insert(children_list, ("* [[:%s]]: %s"):format( child_pagetitle, child.description or type(child_name) == "string" and child_name:gsub("^श्रेणी:", "") .. "." or child_name:getDescription("child") )) end end return concat(children_list, "\n") end -- Show a table of contents with links to each letter in the language's script. local function show_TOC(current) local titleText = current_title.text local inCategoryPages = pages_in_category(titleText, "pages") local inCategorySubcats = pages_in_category(titleText, "subcats") local TOC_type -- Compute type of table of contents required. if inCategoryPages > 2500 or inCategorySubcats > 2500 then TOC_type = "full" elseif inCategoryPages > 200 or inCategorySubcats > 200 then TOC_type = "normal" else -- No (usual) need for a TOC if all pages or subcategories can fit on one page; -- but allow this to be overridden by a custom TOC handler. TOC_type = "none" end if current.getTOC then local TOC_text = current:getTOC(TOC_type) if TOC_text ~= true then return TOC_text or nil end end if TOC_type ~= "none" then local templatename = current:getTOCTemplateName() local TOC_template if TOC_type == "full" then -- This category is very large, see if there is a "full" version of the TOC. local TOC_template_full = new_title(templatename .. "/full") if TOC_template_full.exists then TOC_template = TOC_template_full end end if not TOC_template then local TOC_template_normal = new_title(templatename) if TOC_template_normal.exists then TOC_template = TOC_template_normal end end if TOC_template then return current_frame:expandTemplate{title = TOC_template.text, args = {}} end end return nil end -- Show the "catfix" that adds language attributes and script classes to the page. local function show_catfix(current) local lang, sc = current:getCatfixInfo() return lang and m_utilities.catfix(lang, sc) or nil end -- Show the parent categories that the current category should be placed in. local function show_categories(current, categories) local parents = current.getParents and current:getParents() or nil if not parents then return nil end for _, parent in ipairs(parents) do local parent_name = parent.name local sortkey = type(parent.sort) == "table" and parent.sort:makeSortKey() or parent.sort if type(parent_name) == "string" then insert(categories, ("[[%s|%s]]"):format(parent_name, sortkey)) else insert(categories, ("[[श्रेणी:%s|%s]]"):format(parent_name:getCategoryName(), sortkey)) end end -- Also put the category in its corresponding "umbrella" or "by language" category. local umbrella = current:getUmbrella() if umbrella then -- FIXME: use a language-neutral sorting function like the Unicode Collation Algorithm. local sortkey = current._lang and current._lang:getCanonicalName() or current:getCategoryName() sortkey = require("Module:languages").getByCode("en", true):makeSortKey(sortkey) if type(umbrella) == "string" then insert(categories, ("[[%s|%s]]"):format(umbrella, sortkey)) else insert(categories, ("[[श्रेणी:%s|%s]]"):format(umbrella:getCategoryName(), sortkey)) end end -- Check for various unwanted parser functions, which should be integrated into the category tree data instead. -- Note: HTML comments shouldn't be removed from `content` until after this step, as they can affect the result. local content = current_title:getContent() if not content then -- This happens when using [[Special:ExpandTemplates]] to call {{auto cat}} on a nonexistent category page, -- which is needed by Benwing's create_wanted_categories.py script. return end local defaultsort, displaytitle, page_has_param for node in parse(content):iterate_nodes() do local node_class = class_else_type(node) if node_class == "template" then local name = node:get_name() if name == "DEFAULTSORT:" and not defaultsort then insert(categories, "[[Category:Pages with DEFAULTSORT conflicts]]") defaultsort = true elseif name == "DISPLAYTITLE:" and not displaytitle then insert(categories,"[[Category:Pages with DISPLAYTITLE conflicts]]") displaytitle = true end elseif node_class == "parameter" and not page_has_param then insert(categories,"[[Category:Pages with raw triple-brace template parameters]]") page_has_param = true end end -- Check for raw category markup, which should also be integrated into the category tree data. content = remove_comments(content, "BOTH") local head = content:find("[[", 1, true) while head do local close = content:find("]]", head + 2, true) if not close then break end -- Make sure there are no intervening "[[" between head and close. local open = content:find("[[", head + 2, true) while open and open < close do head = open open = content:find("[[", head + 2, true) end local cat = content:sub(head + 2, close - 1) local colon = cat:match("^[ _\128-\244]*[Cc][Aa][Tt][EeGgOoRrYy _\128-\244]*():") if colon then local pipe = cat:find("|", colon + 1, true) if pipe ~= #cat then local title = new_title(pipe and cat:sub(1, pipe - 1) or cat) if title and title.namespace == 14 then insert(categories,"[[Category:Categories with categories using raw markup]]") break end end end head = open end end local function generate_output(current) if current then for _, functionName in pairs{ "getBreadcrumbName", "getDataModule", "canBeEmpty", "getDescription", "getParents", "getChildren", "getUmbrella", "getAppendix", "getTOCTemplateName", } do if not is_callable(current[functionName]) then require("Module:debug").track{"category tree/missing function", "category tree/missing function/" .. functionName} end end end local boxes, display, categories = {}, {}, {} -- Categories should never show files as a gallery. insert(categories, "__NOGALLERY__") if current_frame:getParent():getTitle() == "साँचा:auto cat" then insert(categories, "[[Category:Categories calling Template:auto cat]]") end -- Check if the category is empty local totalPages = pages_in_category(current_title.text, "all") local hugeCategory = totalPages > 1000000 -- 1 million -- Categorize huge categories, as they cause DynamicPageList to time out and make the category inaccessible. if hugeCategory then insert(categories, "[[Category:Huge categories]]") end -- Are the parameters valid? if not current then -- Signal failure so export.show can try the next handler. return nil, true end -- Does the category have the correct name? local currentName = current:getCategoryName() local correctName = current_title.text == currentName if not correctName then insert(categories, "[[श्रेणी:Categories with incorrect names]]") insert(display, show_error( ("Based on the data in the category tree, this category should be called '''[[:श्रेणी:%s]]'''."):format(currentName), "इस श्रेणी में कोई ग़लत नाम है।" )) end -- Add cleanup category for empty categories. local canBeEmpty = current:canBeEmpty() if canBeEmpty and correctName then insert(categories, " __EXPECTUNUSEDCATEGORY__") elseif totalPages == 0 then insert(categories, "[[Category:Empty categories]]") end if current:isHidden() then insert(categories, " __HIDDENCAT__") end -- Put all the float-right stuff into a <div> that does not clear, so that float-left stuff like the breadcrumbs and -- description can go opposite the float-right stuff without vertical space. insert(boxes, "<div style=\"float: right;\">") insert(boxes, show_topright(current)) insert(boxes, show_editlink(current)) insert(boxes, show_related_changes()) -- Show pagelist, unless it's a huge category (since they can't use DynamicPageList - see above). --[[ if not hugeCategory then insert(boxes, show_pagelist(current)) end ]] insert(boxes, "</div>") -- Generate the displayed information insert(display, show_breadcrumbs(current)) insert(display, show_also(current)) insert(display, show_description(current)) insert(display, show_appendix(current)) insert(display, show_children(current)) insert(display, show_TOC(current)) insert(display, show_catfix(current)) insert(display, '<br class="clear-both-in-vector-2022-only">') show_categories(current, categories) return concat(boxes, "\n") .. "\n" .. concat(display, "\n\n") .. concat(categories, "") end --[==[ List of handler functions that try to match the page name. A handler should return the name of a submodule to [[Module:category tree]] and an info table which is passed as an argument to the submodule. If a handler does not recognize the page name, it should return nil. Note that the order of handlers matters! ]==] local handlers = {} -- Thesaurus per-language category insert(handlers, function(title) local code, label = title:match("^विक्षनरी:(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Topic per-language category insert(handlers, function(title) local code, label = title:match("^(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Lect category e.g. for [[:Category:New Zealand English]] or [[:Category:Issime Walser]] insert(handlers, function(title, args) local lect = args.lect or args.dialect if lect ~= "" and yesno(lect, true) then -- Same as boolean in [[Module:parameters]]. return poscatboiler_subsystem, {label = title, args = args, raw = true} end end) -- poscatboiler per-language label, e.g. [[Category:English non-lemma forms]] insert(handlers, function(title, args) local lang, label = export.split_lang_label(title) if not lang then return end local baseLabel, script = label:match("(.+) in (.-)$") if script and baseLabel ~= "टर्म" then local scriptObj = require("Module:scripts").getByCategoryName(script) if scriptObj then return poscatboiler_subsystem, {label = baseLabel, code = lang:getCode(), sc = scriptObj:getCode(), args = args} end end return poscatboiler_subsystem, {label = label, code = lang:getCode(), args = args} end) -- poscatboiler label umbrella category insert(handlers, function(title, args) local label = title:match("(.+) भाषा अनुसार$") if label then -- The poscatboiler code will appropriately lowercase if needed. return poscatboiler_subsystem, {label = label, args = args} end end) -- poscatboiler raw handlers insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args, raw = true} end) -- poscatboiler umbrella handlers without 'by language' insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args} end) function export.show(frame) local args, other_args = require("Module:parameters").process(frame:getParent().args, { ["also"] = {type = "title", sublist = "comma without whitespace", namespace = 14} }, true) if args.also then for k, arg in next, args.also do args.also[k] = arg.prefixedText end end for k, arg in next, other_args do other_args[k] = trim(arg) end if namespace == 10 then -- Template return "(यह साँचा [[Help:Namespaces#Category|श्रेणी:]] नामस्थान में स्थित पृष्ठ पर प्रयोग किया जाना चाहिये।)" elseif namespace ~= 14 then -- Category error("यह साँचा/मॉड्यूल केवल [[mw:Help:Namespaces#Category|श्रेणी:]] नामस्थान में प्रयोग में लाया जा सकता है।") end local saw_tree_lookup_failure = false local failure_consumed_args = false -- Go through each handler in turn. If a handler doesn't recognize the format of the category, it will return nil, -- and we will consider the next handler. Otherwise, it returns a template name and arguments to call it with, but -- even then, that template might return an error, and we need to consider the next handler. This happens, for -- example, with the category "CAT:Mato Grosso, Brazil", where "Mato" is the name of a language, so the poscatboiler -- per-language label handler fires and tries to find a label "Grosso, Brazil". This throws an error, and -- previously, this blocked further handler consideration, but now we check for the error and continue checking -- handlers; eventually, the topic umbrella handler will fire and correctly handle the category. for _, handler in ipairs(handlers) do -- Use a new title object and args table for each handler, to keep them isolated. local submodule, info = handler(current_title.text, deep_copy(other_args)) if submodule then info.also = deep_copy(args.also) require("Module:debug").track("auto cat/" .. submodule) -- `failed` is true if no match was found in the category tree. submodule = require(category_tree_submodule_prefix .. submodule) local cattext, failed = generate_output(submodule.main(info)) if failed then saw_tree_lookup_failure = true failure_consumed_args = failure_consumed_args or not not info.args elseif not info.args and next(other_args) then error(extra_args_error) else return cattext end end end -- No handler produced a valid category-tree match. -- Preserve previous behavior: if no failing handler consumed args, surface extra-arg errors first. if saw_tree_lookup_failure and not failure_consumed_args and next(other_args) then error(extra_args_error) end error_not_in_category_tree() end -- TODO: new test entrypoint. return export pi1q2solt9nls1eyw6jh18y1arqxenh 487996 487995 2026-09-04T06:59:21Z SM7 6218 localization...more 487996 Scribunto text/plain -- Prevent substitution. if mw.isSubsting() then return require("Module:unsubst") end local export = {} local category_tree_submodule_prefix = "Module:category tree/" local category_tree_styles_css = "Module:category tree/styles.css" local m_str_utils = require("Module:string utilities") local m_template_parser = require("Module:template parser") local m_utilities = require("Module:utilities") local ceil = math.ceil local class_else_type = m_template_parser.class_else_type local concat = table.concat local deep_copy = require("Module:table").deepCopy local full_url = mw.uri.fullUrl local insert = table.insert local is_callable = require("Module:fun").is_callable local log10 = math.log10 or require("Module:math").log10 local new_title = mw.title.new local pages_in_category = mw.site.stats.pagesInCategory local parse = m_template_parser.parse local remove_comments = require("Module:string/removeComments") local sort = table.sort local split = m_str_utils.split local string_compare = require("Module:string/compare") local trim = m_str_utils.trim local uupper = m_str_utils.upper local yesno = require("Module:yesno") local current_frame = mw.getCurrentFrame() local current_title = mw.title.getCurrentTitle() local namespace = current_title.namespace local poscatboiler_subsystem = "poscatboiler" local extra_args_error = "Extra arguments to {{((}}auto cat{{))}} are not allowed for this category." -- Generates a sortkey for a numeral `n`, adding leading zeroes to avoid the "1, 10, 2, 3" sorting problem. `max_n` is the greatest expected value of `n`, and is used to determine how many leading zeroes are needed. If not supplied, it defaults to the number of languages. function export.numeral_sortkey(n, max_n) max_n = max_n or require("Module:list of languages").count() return ("#%%0%dd"):format(ceil(log10(max_n + 1))):format(n) end function export.split_lang_label(title_text) local getByCanonicalName = require("Module:languages").getByCanonicalName -- Progressively remove a word from the potential canonical name until it -- matches an actual canonical name. local words = split(title_text, " ", true) for i = #words - 1, 1, -1 do local lang = getByCanonicalName(concat(words, " ", 1, i)) if lang then return lang, concat(words, " ", i + 1) end end return nil, title_text end local function show_error(text, title) return require("Module:message box").maintenance( "red", "[[File:Codex icon Alert red.svg|40px|alt=alert]]", title or "This category is not defined in Wiktionary's category tree.", text ) end local function error_not_in_category_tree() error( "This category is not defined in Wiktionary's category tree. " .. "Double-check the category name for typos. " .. "Search existing categories or request definition at [[Wiktionary:Category and label treatment requests|WT:CLTR]]. " .. "Affected category: " .. current_title.fullText, 2 ) end -- Show the text that goes at the very top right of the page. local function show_topright(current) return current.getTopright and current:getTopright() or nil end local function link_box(content) return ("<div class=\"noprint plainlinks\" style=\"float: right; clear: both; margin: 0 0 .5em 1em; background: var(--wikt-palette-paleblue, #f9f9f9); border: 1px var(--border-color-base, #aaaaaa) solid; margin-top: -1px; padding: 5px; font-weight: bold;\">%s</div>"):format(content) end local function show_editlink(current) return link_box(("[%s श्रेणी आँकड़े संपादित करें]"):format(tostring(full_url(current:getDataModule(), "action=edit")))) end local function show_related_changes() local title = current_title.fullText return link_box(("[%s <span title=\"Recent edits and other changes to pages in %s\">हाल में हुए पारिवर्तन देखें</span>]"):format( tostring(full_url("Special:RecentChangesLinked", { target = title, showlinkedto = 0, })), title )) end --[==[ ******* चूँकि यहाँ DynamicPageList इंस्टाल नहीं है, पेज लिस्ट दिखाना बंद किया गया ********** ******* अगर भविष्य में यह सुविधा इंस्टाल होती है, इसे वापस सक्रिय कर लिया जायेगा ********** local function show_pagelist(current) local namespace = "namespace=" local info = current:getInfo() local lang_code = info.code if info.label == "citations" or info.label == "citations of undefined terms" then namespace = namespace .. "Citations" elseif lang_code then local lang = require("Module:languages").getByCode(lang_code, true, true) if lang then -- Proto-Norse (gmq-pro) is probably the only language with a code ending in -pro -- that's intended to have mostly non-reconstructed entries. if (lang_code:find("%-pro$") and lang_code ~= "gmq-pro") or lang:hasType("reconstructed") then namespace = namespace .. "विक्षनरी" elseif lang:hasType("appendix-constructed") then namespace = namespace .. "विक्षनरी" end end elseif info.label:match("templates") then namespace = namespace .. "साँचा" elseif info.label:match("modules") then namespace = namespace .. "Module" elseif info.label:match("^विक्षनरी") or info.label:match("^Pages") then namespace = "" end return ([=[ {| id="newest-and-oldest-pages" class="wikitable mw-collapsible" style="float: right; clear: both; margin: 0 0 .5em 1em;" ! Newest and oldest pages&nbsp; |- | id="recent-additions" style="font-size:0.9em;" | '''Newest pages ordered by last [[mw:Manual:Categorylinks table#cl_timestamp|category link update]]:''' %s |- | id="oldest-pages" style="font-size:0.9em;" | '''Oldest pages ordered by last edit:''' %s |}]=]):format( current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=categoryadd order=descending]=] ):format(current_title.text, namespace) ), current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=lastedit order=ascending]=] ):format(current_title.text, namespace) ) ) end ]==] -- Show navigational "breadcrumbs" at the top of the page. local function show_breadcrumbs(current) local steps = {} -- Start at the current label and move our way up the "chain" from child to parent, until we can't go further. while current do local category, display_name, nocap if type(current) == "string" then category = current display_name = current:gsub("^श्रेणी:", "") else if not current.getCategoryName then error("Internal error: Bad format in breadcrumb chain structure, probably a misformatted value for `parents`: " .. mw.dumpObject(current)) end category = "श्रेणी:" .. current:getCategoryName() display_name, nocap = current:getBreadcrumbName() end if not nocap then display_name = mw.getContentLanguage():ucfirst(display_name) end insert(steps, 1, ("[[:%s|%s]]"):format(category, display_name)) -- Move up the "chain" by one level. if type(current) == "string" then current = nil else current = current:getParents() end if current then current = current[1].name end end local templateStyles = require("Module:TemplateStyles")(category_tree_styles_css) local ol = mw.html.create("ol") for i, step in ipairs(steps) do local li = mw.html.create("li") if i ~= 1 then local span = mw.html.create("span") :attr("aria-hidden", "true") :addClass("ts-categoryBreadcrumbs-separator") :wikitext(" » ") li:node(span) end li:wikitext(step) ol:node(li) end return templateStyles .. tostring(mw.html.create("div") :attr("role", "navigation") :attr("aria-label", "Breadcrumb") :addClass("ts-categoryBreadcrumbs") :node(ol)) end local function show_also(current) local also = current._info.also if also and #also > 0 then return ('<div style="margin-top:-1em;margin-bottom:1.5em">%s</div>'):format(require("Module:also").main(also)) end return nil end -- Show a short description text for the category. local function show_description(current) return current.getDescription and current:getDescription() or nil end local function show_appendix(current) local appendix = current.getAppendix and current:getAppendix() return appendix and ("For more information, see [[%s]]."):format(appendix) or nil end local function sort_children(child1, child2) return string_compare(uupper(child1.sort), uupper(child2.sort)) end -- Show a list of child categories. local function show_children(current) local children = current.getChildren and current:getChildren() or nil if not children then return nil end sort(children, sort_children) local children_list = {} for _, child in ipairs(children) do local child_name, child_pagetitle = child.name if type(child_name) == "string" then child_pagetitle = child_name else child_pagetitle = "श्रेणी:" .. child_name:getCategoryName() end if new_title(child_pagetitle).exists then insert(children_list, ("* [[:%s]]: %s"):format( child_pagetitle, child.description or type(child_name) == "string" and child_name:gsub("^श्रेणी:", "") .. "." or child_name:getDescription("child") )) end end return concat(children_list, "\n") end -- Show a table of contents with links to each letter in the language's script. local function show_TOC(current) local titleText = current_title.text local inCategoryPages = pages_in_category(titleText, "pages") local inCategorySubcats = pages_in_category(titleText, "subcats") local TOC_type -- Compute type of table of contents required. if inCategoryPages > 2500 or inCategorySubcats > 2500 then TOC_type = "full" elseif inCategoryPages > 200 or inCategorySubcats > 200 then TOC_type = "normal" else -- No (usual) need for a TOC if all pages or subcategories can fit on one page; -- but allow this to be overridden by a custom TOC handler. TOC_type = "none" end if current.getTOC then local TOC_text = current:getTOC(TOC_type) if TOC_text ~= true then return TOC_text or nil end end if TOC_type ~= "none" then local templatename = current:getTOCTemplateName() local TOC_template if TOC_type == "full" then -- This category is very large, see if there is a "full" version of the TOC. local TOC_template_full = new_title(templatename .. "/full") if TOC_template_full.exists then TOC_template = TOC_template_full end end if not TOC_template then local TOC_template_normal = new_title(templatename) if TOC_template_normal.exists then TOC_template = TOC_template_normal end end if TOC_template then return current_frame:expandTemplate{title = TOC_template.text, args = {}} end end return nil end -- Show the "catfix" that adds language attributes and script classes to the page. local function show_catfix(current) local lang, sc = current:getCatfixInfo() return lang and m_utilities.catfix(lang, sc) or nil end -- Show the parent categories that the current category should be placed in. local function show_categories(current, categories) local parents = current.getParents and current:getParents() or nil if not parents then return nil end for _, parent in ipairs(parents) do local parent_name = parent.name local sortkey = type(parent.sort) == "table" and parent.sort:makeSortKey() or parent.sort if type(parent_name) == "string" then insert(categories, ("[[%s|%s]]"):format(parent_name, sortkey)) else insert(categories, ("[[श्रेणी:%s|%s]]"):format(parent_name:getCategoryName(), sortkey)) end end -- Also put the category in its corresponding "umbrella" or "by language" category. local umbrella = current:getUmbrella() if umbrella then -- FIXME: use a language-neutral sorting function like the Unicode Collation Algorithm. local sortkey = current._lang and current._lang:getCanonicalName() or current:getCategoryName() sortkey = require("Module:languages").getByCode("en", true):makeSortKey(sortkey) if type(umbrella) == "string" then insert(categories, ("[[%s|%s]]"):format(umbrella, sortkey)) else insert(categories, ("[[श्रेणी:%s|%s]]"):format(umbrella:getCategoryName(), sortkey)) end end -- Check for various unwanted parser functions, which should be integrated into the category tree data instead. -- Note: HTML comments shouldn't be removed from `content` until after this step, as they can affect the result. local content = current_title:getContent() if not content then -- This happens when using [[Special:ExpandTemplates]] to call {{auto cat}} on a nonexistent category page, -- which is needed by Benwing's create_wanted_categories.py script. return end local defaultsort, displaytitle, page_has_param for node in parse(content):iterate_nodes() do local node_class = class_else_type(node) if node_class == "template" then local name = node:get_name() if name == "DEFAULTSORT:" and not defaultsort then insert(categories, "[[Category:Pages with DEFAULTSORT conflicts]]") defaultsort = true elseif name == "DISPLAYTITLE:" and not displaytitle then insert(categories,"[[Category:Pages with DISPLAYTITLE conflicts]]") displaytitle = true end elseif node_class == "parameter" and not page_has_param then insert(categories,"[[Category:Pages with raw triple-brace template parameters]]") page_has_param = true end end -- Check for raw category markup, which should also be integrated into the category tree data. content = remove_comments(content, "BOTH") local head = content:find("[[", 1, true) while head do local close = content:find("]]", head + 2, true) if not close then break end -- Make sure there are no intervening "[[" between head and close. local open = content:find("[[", head + 2, true) while open and open < close do head = open open = content:find("[[", head + 2, true) end local cat = content:sub(head + 2, close - 1) local colon = cat:match("^[ _\128-\244]*[Cc][Aa][Tt][EeGgOoRrYy _\128-\244]*():") if colon then local pipe = cat:find("|", colon + 1, true) if pipe ~= #cat then local title = new_title(pipe and cat:sub(1, pipe - 1) or cat) if title and title.namespace == 14 then insert(categories,"[[Category:Categories with categories using raw markup]]") break end end end head = open end end local function generate_output(current) if current then for _, functionName in pairs{ "getBreadcrumbName", "getDataModule", "canBeEmpty", "getDescription", "getParents", "getChildren", "getUmbrella", "getAppendix", "getTOCTemplateName", } do if not is_callable(current[functionName]) then require("Module:debug").track{"category tree/missing function", "category tree/missing function/" .. functionName} end end end local boxes, display, categories = {}, {}, {} -- Categories should never show files as a gallery. insert(categories, "__NOGALLERY__") if current_frame:getParent():getTitle() == "साँचा:auto cat" then insert(categories, "[[श्रेणी:साँचा:auto cat को कॉल करने वाली श्रेणियाँ]]") end -- Check if the category is empty local totalPages = pages_in_category(current_title.text, "all") local hugeCategory = totalPages > 1000000 -- 1 million -- Categorize huge categories, as they cause DynamicPageList to time out and make the category inaccessible. if hugeCategory then insert(categories, "[[श्रेणी:बृहदाकार श्रेणियाँ]]") end -- Are the parameters valid? if not current then -- Signal failure so export.show can try the next handler. return nil, true end -- Does the category have the correct name? local currentName = current:getCategoryName() local correctName = current_title.text == currentName if not correctName then insert(categories, "[[श्रेणी:श्रेणियाँ त्रुटिपूर्ण नामों के साथ]]") insert(display, show_error( ("Based on the data in the category tree, this category should be called '''[[:श्रेणी:%s]]'''."):format(currentName), "इस श्रेणी में कोई ग़लत नाम है।" )) end -- Add cleanup category for empty categories. local canBeEmpty = current:canBeEmpty() if canBeEmpty and correctName then insert(categories, " __EXPECTUNUSEDCATEGORY__") elseif totalPages == 0 then insert(categories, "[[श्रेणी:खाली श्रेणियाँ]]") end if current:isHidden() then insert(categories, " __HIDDENCAT__") end -- Put all the float-right stuff into a <div> that does not clear, so that float-left stuff like the breadcrumbs and -- description can go opposite the float-right stuff without vertical space. insert(boxes, "<div style=\"float: right;\">") insert(boxes, show_topright(current)) insert(boxes, show_editlink(current)) insert(boxes, show_related_changes()) -- Show pagelist, unless it's a huge category (since they can't use DynamicPageList - see above). --[[ if not hugeCategory then insert(boxes, show_pagelist(current)) end ]] insert(boxes, "</div>") -- Generate the displayed information insert(display, show_breadcrumbs(current)) insert(display, show_also(current)) insert(display, show_description(current)) insert(display, show_appendix(current)) insert(display, show_children(current)) insert(display, show_TOC(current)) insert(display, show_catfix(current)) insert(display, '<br class="clear-both-in-vector-2022-only">') show_categories(current, categories) return concat(boxes, "\n") .. "\n" .. concat(display, "\n\n") .. concat(categories, "") end --[==[ List of handler functions that try to match the page name. A handler should return the name of a submodule to [[Module:category tree]] and an info table which is passed as an argument to the submodule. If a handler does not recognize the page name, it should return nil. Note that the order of handlers matters! ]==] local handlers = {} -- Thesaurus per-language category insert(handlers, function(title) local code, label = title:match("^विक्षनरी:(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Topic per-language category insert(handlers, function(title) local code, label = title:match("^(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Lect category e.g. for [[:Category:New Zealand English]] or [[:Category:Issime Walser]] insert(handlers, function(title, args) local lect = args.lect or args.dialect if lect ~= "" and yesno(lect, true) then -- Same as boolean in [[Module:parameters]]. return poscatboiler_subsystem, {label = title, args = args, raw = true} end end) -- poscatboiler per-language label, e.g. [[Category:English non-lemma forms]] insert(handlers, function(title, args) local lang, label = export.split_lang_label(title) if not lang then return end local baseLabel, script = label:match("(.+) in (.-)$") if script and baseLabel ~= "टर्म" then local scriptObj = require("Module:scripts").getByCategoryName(script) if scriptObj then return poscatboiler_subsystem, {label = baseLabel, code = lang:getCode(), sc = scriptObj:getCode(), args = args} end end return poscatboiler_subsystem, {label = label, code = lang:getCode(), args = args} end) -- poscatboiler label umbrella category insert(handlers, function(title, args) local label = title:match("(.+) भाषा अनुसार$") if label then -- The poscatboiler code will appropriately lowercase if needed. return poscatboiler_subsystem, {label = label, args = args} end end) -- poscatboiler raw handlers insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args, raw = true} end) -- poscatboiler umbrella handlers without 'by language' insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args} end) function export.show(frame) local args, other_args = require("Module:parameters").process(frame:getParent().args, { ["also"] = {type = "title", sublist = "comma without whitespace", namespace = 14} }, true) if args.also then for k, arg in next, args.also do args.also[k] = arg.prefixedText end end for k, arg in next, other_args do other_args[k] = trim(arg) end if namespace == 10 then -- Template return "(यह साँचा [[Help:Namespaces#Category|श्रेणी:]] नामस्थान में स्थित पृष्ठ पर प्रयोग किया जाना चाहिये।)" elseif namespace ~= 14 then -- Category error("यह साँचा/मॉड्यूल केवल [[mw:Help:Namespaces#Category|श्रेणी:]] नामस्थान में प्रयोग में लाया जा सकता है।") end local saw_tree_lookup_failure = false local failure_consumed_args = false -- Go through each handler in turn. If a handler doesn't recognize the format of the category, it will return nil, -- and we will consider the next handler. Otherwise, it returns a template name and arguments to call it with, but -- even then, that template might return an error, and we need to consider the next handler. This happens, for -- example, with the category "CAT:Mato Grosso, Brazil", where "Mato" is the name of a language, so the poscatboiler -- per-language label handler fires and tries to find a label "Grosso, Brazil". This throws an error, and -- previously, this blocked further handler consideration, but now we check for the error and continue checking -- handlers; eventually, the topic umbrella handler will fire and correctly handle the category. for _, handler in ipairs(handlers) do -- Use a new title object and args table for each handler, to keep them isolated. local submodule, info = handler(current_title.text, deep_copy(other_args)) if submodule then info.also = deep_copy(args.also) require("Module:debug").track("auto cat/" .. submodule) -- `failed` is true if no match was found in the category tree. submodule = require(category_tree_submodule_prefix .. submodule) local cattext, failed = generate_output(submodule.main(info)) if failed then saw_tree_lookup_failure = true failure_consumed_args = failure_consumed_args or not not info.args elseif not info.args and next(other_args) then error(extra_args_error) else return cattext end end end -- No handler produced a valid category-tree match. -- Preserve previous behavior: if no failing handler consumed args, surface extra-arg errors first. if saw_tree_lookup_failure and not failure_consumed_args and next(other_args) then error(extra_args_error) end error_not_in_category_tree() end -- TODO: new test entrypoint. return export j1au1ekbapce4mw6w8l31y5pp6ttrvv 488012 487996 2026-09-04T08:02:30Z SM7 6218 ±श्रेणी /त्रुटिपूर्ण नामों वाली श्रेणियाँ 488012 Scribunto text/plain -- Prevent substitution. if mw.isSubsting() then return require("Module:unsubst") end local export = {} local category_tree_submodule_prefix = "Module:category tree/" local category_tree_styles_css = "Module:category tree/styles.css" local m_str_utils = require("Module:string utilities") local m_template_parser = require("Module:template parser") local m_utilities = require("Module:utilities") local ceil = math.ceil local class_else_type = m_template_parser.class_else_type local concat = table.concat local deep_copy = require("Module:table").deepCopy local full_url = mw.uri.fullUrl local insert = table.insert local is_callable = require("Module:fun").is_callable local log10 = math.log10 or require("Module:math").log10 local new_title = mw.title.new local pages_in_category = mw.site.stats.pagesInCategory local parse = m_template_parser.parse local remove_comments = require("Module:string/removeComments") local sort = table.sort local split = m_str_utils.split local string_compare = require("Module:string/compare") local trim = m_str_utils.trim local uupper = m_str_utils.upper local yesno = require("Module:yesno") local current_frame = mw.getCurrentFrame() local current_title = mw.title.getCurrentTitle() local namespace = current_title.namespace local poscatboiler_subsystem = "poscatboiler" local extra_args_error = "Extra arguments to {{((}}auto cat{{))}} are not allowed for this category." -- Generates a sortkey for a numeral `n`, adding leading zeroes to avoid the "1, 10, 2, 3" sorting problem. `max_n` is the greatest expected value of `n`, and is used to determine how many leading zeroes are needed. If not supplied, it defaults to the number of languages. function export.numeral_sortkey(n, max_n) max_n = max_n or require("Module:list of languages").count() return ("#%%0%dd"):format(ceil(log10(max_n + 1))):format(n) end function export.split_lang_label(title_text) local getByCanonicalName = require("Module:languages").getByCanonicalName -- Progressively remove a word from the potential canonical name until it -- matches an actual canonical name. local words = split(title_text, " ", true) for i = #words - 1, 1, -1 do local lang = getByCanonicalName(concat(words, " ", 1, i)) if lang then return lang, concat(words, " ", i + 1) end end return nil, title_text end local function show_error(text, title) return require("Module:message box").maintenance( "red", "[[File:Codex icon Alert red.svg|40px|alt=alert]]", title or "This category is not defined in Wiktionary's category tree.", text ) end local function error_not_in_category_tree() error( "This category is not defined in Wiktionary's category tree. " .. "Double-check the category name for typos. " .. "Search existing categories or request definition at [[Wiktionary:Category and label treatment requests|WT:CLTR]]. " .. "Affected category: " .. current_title.fullText, 2 ) end -- Show the text that goes at the very top right of the page. local function show_topright(current) return current.getTopright and current:getTopright() or nil end local function link_box(content) return ("<div class=\"noprint plainlinks\" style=\"float: right; clear: both; margin: 0 0 .5em 1em; background: var(--wikt-palette-paleblue, #f9f9f9); border: 1px var(--border-color-base, #aaaaaa) solid; margin-top: -1px; padding: 5px; font-weight: bold;\">%s</div>"):format(content) end local function show_editlink(current) return link_box(("[%s श्रेणी आँकड़े संपादित करें]"):format(tostring(full_url(current:getDataModule(), "action=edit")))) end local function show_related_changes() local title = current_title.fullText return link_box(("[%s <span title=\"Recent edits and other changes to pages in %s\">हाल में हुए पारिवर्तन देखें</span>]"):format( tostring(full_url("Special:RecentChangesLinked", { target = title, showlinkedto = 0, })), title )) end --[==[ ******* चूँकि यहाँ DynamicPageList इंस्टाल नहीं है, पेज लिस्ट दिखाना बंद किया गया ********** ******* अगर भविष्य में यह सुविधा इंस्टाल होती है, इसे वापस सक्रिय कर लिया जायेगा ********** local function show_pagelist(current) local namespace = "namespace=" local info = current:getInfo() local lang_code = info.code if info.label == "citations" or info.label == "citations of undefined terms" then namespace = namespace .. "Citations" elseif lang_code then local lang = require("Module:languages").getByCode(lang_code, true, true) if lang then -- Proto-Norse (gmq-pro) is probably the only language with a code ending in -pro -- that's intended to have mostly non-reconstructed entries. if (lang_code:find("%-pro$") and lang_code ~= "gmq-pro") or lang:hasType("reconstructed") then namespace = namespace .. "विक्षनरी" elseif lang:hasType("appendix-constructed") then namespace = namespace .. "विक्षनरी" end end elseif info.label:match("templates") then namespace = namespace .. "साँचा" elseif info.label:match("modules") then namespace = namespace .. "Module" elseif info.label:match("^विक्षनरी") or info.label:match("^Pages") then namespace = "" end return ([=[ {| id="newest-and-oldest-pages" class="wikitable mw-collapsible" style="float: right; clear: both; margin: 0 0 .5em 1em;" ! Newest and oldest pages&nbsp; |- | id="recent-additions" style="font-size:0.9em;" | '''Newest pages ordered by last [[mw:Manual:Categorylinks table#cl_timestamp|category link update]]:''' %s |- | id="oldest-pages" style="font-size:0.9em;" | '''Oldest pages ordered by last edit:''' %s |}]=]):format( current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=categoryadd order=descending]=] ):format(current_title.text, namespace) ), current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=lastedit order=ascending]=] ):format(current_title.text, namespace) ) ) end ]==] -- Show navigational "breadcrumbs" at the top of the page. local function show_breadcrumbs(current) local steps = {} -- Start at the current label and move our way up the "chain" from child to parent, until we can't go further. while current do local category, display_name, nocap if type(current) == "string" then category = current display_name = current:gsub("^श्रेणी:", "") else if not current.getCategoryName then error("Internal error: Bad format in breadcrumb chain structure, probably a misformatted value for `parents`: " .. mw.dumpObject(current)) end category = "श्रेणी:" .. current:getCategoryName() display_name, nocap = current:getBreadcrumbName() end if not nocap then display_name = mw.getContentLanguage():ucfirst(display_name) end insert(steps, 1, ("[[:%s|%s]]"):format(category, display_name)) -- Move up the "chain" by one level. if type(current) == "string" then current = nil else current = current:getParents() end if current then current = current[1].name end end local templateStyles = require("Module:TemplateStyles")(category_tree_styles_css) local ol = mw.html.create("ol") for i, step in ipairs(steps) do local li = mw.html.create("li") if i ~= 1 then local span = mw.html.create("span") :attr("aria-hidden", "true") :addClass("ts-categoryBreadcrumbs-separator") :wikitext(" » ") li:node(span) end li:wikitext(step) ol:node(li) end return templateStyles .. tostring(mw.html.create("div") :attr("role", "navigation") :attr("aria-label", "Breadcrumb") :addClass("ts-categoryBreadcrumbs") :node(ol)) end local function show_also(current) local also = current._info.also if also and #also > 0 then return ('<div style="margin-top:-1em;margin-bottom:1.5em">%s</div>'):format(require("Module:also").main(also)) end return nil end -- Show a short description text for the category. local function show_description(current) return current.getDescription and current:getDescription() or nil end local function show_appendix(current) local appendix = current.getAppendix and current:getAppendix() return appendix and ("For more information, see [[%s]]."):format(appendix) or nil end local function sort_children(child1, child2) return string_compare(uupper(child1.sort), uupper(child2.sort)) end -- Show a list of child categories. local function show_children(current) local children = current.getChildren and current:getChildren() or nil if not children then return nil end sort(children, sort_children) local children_list = {} for _, child in ipairs(children) do local child_name, child_pagetitle = child.name if type(child_name) == "string" then child_pagetitle = child_name else child_pagetitle = "श्रेणी:" .. child_name:getCategoryName() end if new_title(child_pagetitle).exists then insert(children_list, ("* [[:%s]]: %s"):format( child_pagetitle, child.description or type(child_name) == "string" and child_name:gsub("^श्रेणी:", "") .. "." or child_name:getDescription("child") )) end end return concat(children_list, "\n") end -- Show a table of contents with links to each letter in the language's script. local function show_TOC(current) local titleText = current_title.text local inCategoryPages = pages_in_category(titleText, "pages") local inCategorySubcats = pages_in_category(titleText, "subcats") local TOC_type -- Compute type of table of contents required. if inCategoryPages > 2500 or inCategorySubcats > 2500 then TOC_type = "full" elseif inCategoryPages > 200 or inCategorySubcats > 200 then TOC_type = "normal" else -- No (usual) need for a TOC if all pages or subcategories can fit on one page; -- but allow this to be overridden by a custom TOC handler. TOC_type = "none" end if current.getTOC then local TOC_text = current:getTOC(TOC_type) if TOC_text ~= true then return TOC_text or nil end end if TOC_type ~= "none" then local templatename = current:getTOCTemplateName() local TOC_template if TOC_type == "full" then -- This category is very large, see if there is a "full" version of the TOC. local TOC_template_full = new_title(templatename .. "/full") if TOC_template_full.exists then TOC_template = TOC_template_full end end if not TOC_template then local TOC_template_normal = new_title(templatename) if TOC_template_normal.exists then TOC_template = TOC_template_normal end end if TOC_template then return current_frame:expandTemplate{title = TOC_template.text, args = {}} end end return nil end -- Show the "catfix" that adds language attributes and script classes to the page. local function show_catfix(current) local lang, sc = current:getCatfixInfo() return lang and m_utilities.catfix(lang, sc) or nil end -- Show the parent categories that the current category should be placed in. local function show_categories(current, categories) local parents = current.getParents and current:getParents() or nil if not parents then return nil end for _, parent in ipairs(parents) do local parent_name = parent.name local sortkey = type(parent.sort) == "table" and parent.sort:makeSortKey() or parent.sort if type(parent_name) == "string" then insert(categories, ("[[%s|%s]]"):format(parent_name, sortkey)) else insert(categories, ("[[श्रेणी:%s|%s]]"):format(parent_name:getCategoryName(), sortkey)) end end -- Also put the category in its corresponding "umbrella" or "by language" category. local umbrella = current:getUmbrella() if umbrella then -- FIXME: use a language-neutral sorting function like the Unicode Collation Algorithm. local sortkey = current._lang and current._lang:getCanonicalName() or current:getCategoryName() sortkey = require("Module:languages").getByCode("en", true):makeSortKey(sortkey) if type(umbrella) == "string" then insert(categories, ("[[%s|%s]]"):format(umbrella, sortkey)) else insert(categories, ("[[श्रेणी:%s|%s]]"):format(umbrella:getCategoryName(), sortkey)) end end -- Check for various unwanted parser functions, which should be integrated into the category tree data instead. -- Note: HTML comments shouldn't be removed from `content` until after this step, as they can affect the result. local content = current_title:getContent() if not content then -- This happens when using [[Special:ExpandTemplates]] to call {{auto cat}} on a nonexistent category page, -- which is needed by Benwing's create_wanted_categories.py script. return end local defaultsort, displaytitle, page_has_param for node in parse(content):iterate_nodes() do local node_class = class_else_type(node) if node_class == "template" then local name = node:get_name() if name == "DEFAULTSORT:" and not defaultsort then insert(categories, "[[Category:Pages with DEFAULTSORT conflicts]]") defaultsort = true elseif name == "DISPLAYTITLE:" and not displaytitle then insert(categories,"[[Category:Pages with DISPLAYTITLE conflicts]]") displaytitle = true end elseif node_class == "parameter" and not page_has_param then insert(categories,"[[Category:Pages with raw triple-brace template parameters]]") page_has_param = true end end -- Check for raw category markup, which should also be integrated into the category tree data. content = remove_comments(content, "BOTH") local head = content:find("[[", 1, true) while head do local close = content:find("]]", head + 2, true) if not close then break end -- Make sure there are no intervening "[[" between head and close. local open = content:find("[[", head + 2, true) while open and open < close do head = open open = content:find("[[", head + 2, true) end local cat = content:sub(head + 2, close - 1) local colon = cat:match("^[ _\128-\244]*[Cc][Aa][Tt][EeGgOoRrYy _\128-\244]*():") if colon then local pipe = cat:find("|", colon + 1, true) if pipe ~= #cat then local title = new_title(pipe and cat:sub(1, pipe - 1) or cat) if title and title.namespace == 14 then insert(categories,"[[Category:Categories with categories using raw markup]]") break end end end head = open end end local function generate_output(current) if current then for _, functionName in pairs{ "getBreadcrumbName", "getDataModule", "canBeEmpty", "getDescription", "getParents", "getChildren", "getUmbrella", "getAppendix", "getTOCTemplateName", } do if not is_callable(current[functionName]) then require("Module:debug").track{"category tree/missing function", "category tree/missing function/" .. functionName} end end end local boxes, display, categories = {}, {}, {} -- Categories should never show files as a gallery. insert(categories, "__NOGALLERY__") if current_frame:getParent():getTitle() == "साँचा:auto cat" then insert(categories, "[[श्रेणी:साँचा:auto cat को कॉल करने वाली श्रेणियाँ]]") end -- Check if the category is empty local totalPages = pages_in_category(current_title.text, "all") local hugeCategory = totalPages > 1000000 -- 1 million -- Categorize huge categories, as they cause DynamicPageList to time out and make the category inaccessible. if hugeCategory then insert(categories, "[[श्रेणी:बृहदाकार श्रेणियाँ]]") end -- Are the parameters valid? if not current then -- Signal failure so export.show can try the next handler. return nil, true end -- Does the category have the correct name? local currentName = current:getCategoryName() local correctName = current_title.text == currentName if not correctName then insert(categories, "[[श्रेणी:त्रुटिपूर्ण नामों वाली श्रेणियाँ]]") insert(display, show_error( ("Based on the data in the category tree, this category should be called '''[[:श्रेणी:%s]]'''."):format(currentName), "इस श्रेणी में कोई ग़लत नाम है।" )) end -- Add cleanup category for empty categories. local canBeEmpty = current:canBeEmpty() if canBeEmpty and correctName then insert(categories, " __EXPECTUNUSEDCATEGORY__") elseif totalPages == 0 then insert(categories, "[[श्रेणी:खाली श्रेणियाँ]]") end if current:isHidden() then insert(categories, " __HIDDENCAT__") end -- Put all the float-right stuff into a <div> that does not clear, so that float-left stuff like the breadcrumbs and -- description can go opposite the float-right stuff without vertical space. insert(boxes, "<div style=\"float: right;\">") insert(boxes, show_topright(current)) insert(boxes, show_editlink(current)) insert(boxes, show_related_changes()) -- Show pagelist, unless it's a huge category (since they can't use DynamicPageList - see above). --[[ if not hugeCategory then insert(boxes, show_pagelist(current)) end ]] insert(boxes, "</div>") -- Generate the displayed information insert(display, show_breadcrumbs(current)) insert(display, show_also(current)) insert(display, show_description(current)) insert(display, show_appendix(current)) insert(display, show_children(current)) insert(display, show_TOC(current)) insert(display, show_catfix(current)) insert(display, '<br class="clear-both-in-vector-2022-only">') show_categories(current, categories) return concat(boxes, "\n") .. "\n" .. concat(display, "\n\n") .. concat(categories, "") end --[==[ List of handler functions that try to match the page name. A handler should return the name of a submodule to [[Module:category tree]] and an info table which is passed as an argument to the submodule. If a handler does not recognize the page name, it should return nil. Note that the order of handlers matters! ]==] local handlers = {} -- Thesaurus per-language category insert(handlers, function(title) local code, label = title:match("^विक्षनरी:(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Topic per-language category insert(handlers, function(title) local code, label = title:match("^(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Lect category e.g. for [[:Category:New Zealand English]] or [[:Category:Issime Walser]] insert(handlers, function(title, args) local lect = args.lect or args.dialect if lect ~= "" and yesno(lect, true) then -- Same as boolean in [[Module:parameters]]. return poscatboiler_subsystem, {label = title, args = args, raw = true} end end) -- poscatboiler per-language label, e.g. [[Category:English non-lemma forms]] insert(handlers, function(title, args) local lang, label = export.split_lang_label(title) if not lang then return end local baseLabel, script = label:match("(.+) in (.-)$") if script and baseLabel ~= "टर्म" then local scriptObj = require("Module:scripts").getByCategoryName(script) if scriptObj then return poscatboiler_subsystem, {label = baseLabel, code = lang:getCode(), sc = scriptObj:getCode(), args = args} end end return poscatboiler_subsystem, {label = label, code = lang:getCode(), args = args} end) -- poscatboiler label umbrella category insert(handlers, function(title, args) local label = title:match("(.+) भाषा अनुसार$") if label then -- The poscatboiler code will appropriately lowercase if needed. return poscatboiler_subsystem, {label = label, args = args} end end) -- poscatboiler raw handlers insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args, raw = true} end) -- poscatboiler umbrella handlers without 'by language' insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args} end) function export.show(frame) local args, other_args = require("Module:parameters").process(frame:getParent().args, { ["also"] = {type = "title", sublist = "comma without whitespace", namespace = 14} }, true) if args.also then for k, arg in next, args.also do args.also[k] = arg.prefixedText end end for k, arg in next, other_args do other_args[k] = trim(arg) end if namespace == 10 then -- Template return "(यह साँचा [[Help:Namespaces#Category|श्रेणी:]] नामस्थान में स्थित पृष्ठ पर प्रयोग किया जाना चाहिये।)" elseif namespace ~= 14 then -- Category error("यह साँचा/मॉड्यूल केवल [[mw:Help:Namespaces#Category|श्रेणी:]] नामस्थान में प्रयोग में लाया जा सकता है।") end local saw_tree_lookup_failure = false local failure_consumed_args = false -- Go through each handler in turn. If a handler doesn't recognize the format of the category, it will return nil, -- and we will consider the next handler. Otherwise, it returns a template name and arguments to call it with, but -- even then, that template might return an error, and we need to consider the next handler. This happens, for -- example, with the category "CAT:Mato Grosso, Brazil", where "Mato" is the name of a language, so the poscatboiler -- per-language label handler fires and tries to find a label "Grosso, Brazil". This throws an error, and -- previously, this blocked further handler consideration, but now we check for the error and continue checking -- handlers; eventually, the topic umbrella handler will fire and correctly handle the category. for _, handler in ipairs(handlers) do -- Use a new title object and args table for each handler, to keep them isolated. local submodule, info = handler(current_title.text, deep_copy(other_args)) if submodule then info.also = deep_copy(args.also) require("Module:debug").track("auto cat/" .. submodule) -- `failed` is true if no match was found in the category tree. submodule = require(category_tree_submodule_prefix .. submodule) local cattext, failed = generate_output(submodule.main(info)) if failed then saw_tree_lookup_failure = true failure_consumed_args = failure_consumed_args or not not info.args elseif not info.args and next(other_args) then error(extra_args_error) else return cattext end end end -- No handler produced a valid category-tree match. -- Preserve previous behavior: if no failing handler consumed args, surface extra-arg errors first. if saw_tree_lookup_failure and not failure_consumed_args and next(other_args) then error(extra_args_error) end error_not_in_category_tree() end -- TODO: new test entrypoint. return export a388k7bsvbf00jaaofaht7zhxwm1ob7 488013 488012 2026-09-04T08:02:43Z SM7 6218 "[[मॉड्यूल:category tree]]" सुरक्षित किया ([सम्पादन=केवल प्रबंधक अनुमत] (हमेशा) [स्थानांतरण=केवल प्रबंधक अनुमत] (हमेशा)) 488012 Scribunto text/plain -- Prevent substitution. if mw.isSubsting() then return require("Module:unsubst") end local export = {} local category_tree_submodule_prefix = "Module:category tree/" local category_tree_styles_css = "Module:category tree/styles.css" local m_str_utils = require("Module:string utilities") local m_template_parser = require("Module:template parser") local m_utilities = require("Module:utilities") local ceil = math.ceil local class_else_type = m_template_parser.class_else_type local concat = table.concat local deep_copy = require("Module:table").deepCopy local full_url = mw.uri.fullUrl local insert = table.insert local is_callable = require("Module:fun").is_callable local log10 = math.log10 or require("Module:math").log10 local new_title = mw.title.new local pages_in_category = mw.site.stats.pagesInCategory local parse = m_template_parser.parse local remove_comments = require("Module:string/removeComments") local sort = table.sort local split = m_str_utils.split local string_compare = require("Module:string/compare") local trim = m_str_utils.trim local uupper = m_str_utils.upper local yesno = require("Module:yesno") local current_frame = mw.getCurrentFrame() local current_title = mw.title.getCurrentTitle() local namespace = current_title.namespace local poscatboiler_subsystem = "poscatboiler" local extra_args_error = "Extra arguments to {{((}}auto cat{{))}} are not allowed for this category." -- Generates a sortkey for a numeral `n`, adding leading zeroes to avoid the "1, 10, 2, 3" sorting problem. `max_n` is the greatest expected value of `n`, and is used to determine how many leading zeroes are needed. If not supplied, it defaults to the number of languages. function export.numeral_sortkey(n, max_n) max_n = max_n or require("Module:list of languages").count() return ("#%%0%dd"):format(ceil(log10(max_n + 1))):format(n) end function export.split_lang_label(title_text) local getByCanonicalName = require("Module:languages").getByCanonicalName -- Progressively remove a word from the potential canonical name until it -- matches an actual canonical name. local words = split(title_text, " ", true) for i = #words - 1, 1, -1 do local lang = getByCanonicalName(concat(words, " ", 1, i)) if lang then return lang, concat(words, " ", i + 1) end end return nil, title_text end local function show_error(text, title) return require("Module:message box").maintenance( "red", "[[File:Codex icon Alert red.svg|40px|alt=alert]]", title or "This category is not defined in Wiktionary's category tree.", text ) end local function error_not_in_category_tree() error( "This category is not defined in Wiktionary's category tree. " .. "Double-check the category name for typos. " .. "Search existing categories or request definition at [[Wiktionary:Category and label treatment requests|WT:CLTR]]. " .. "Affected category: " .. current_title.fullText, 2 ) end -- Show the text that goes at the very top right of the page. local function show_topright(current) return current.getTopright and current:getTopright() or nil end local function link_box(content) return ("<div class=\"noprint plainlinks\" style=\"float: right; clear: both; margin: 0 0 .5em 1em; background: var(--wikt-palette-paleblue, #f9f9f9); border: 1px var(--border-color-base, #aaaaaa) solid; margin-top: -1px; padding: 5px; font-weight: bold;\">%s</div>"):format(content) end local function show_editlink(current) return link_box(("[%s श्रेणी आँकड़े संपादित करें]"):format(tostring(full_url(current:getDataModule(), "action=edit")))) end local function show_related_changes() local title = current_title.fullText return link_box(("[%s <span title=\"Recent edits and other changes to pages in %s\">हाल में हुए पारिवर्तन देखें</span>]"):format( tostring(full_url("Special:RecentChangesLinked", { target = title, showlinkedto = 0, })), title )) end --[==[ ******* चूँकि यहाँ DynamicPageList इंस्टाल नहीं है, पेज लिस्ट दिखाना बंद किया गया ********** ******* अगर भविष्य में यह सुविधा इंस्टाल होती है, इसे वापस सक्रिय कर लिया जायेगा ********** local function show_pagelist(current) local namespace = "namespace=" local info = current:getInfo() local lang_code = info.code if info.label == "citations" or info.label == "citations of undefined terms" then namespace = namespace .. "Citations" elseif lang_code then local lang = require("Module:languages").getByCode(lang_code, true, true) if lang then -- Proto-Norse (gmq-pro) is probably the only language with a code ending in -pro -- that's intended to have mostly non-reconstructed entries. if (lang_code:find("%-pro$") and lang_code ~= "gmq-pro") or lang:hasType("reconstructed") then namespace = namespace .. "विक्षनरी" elseif lang:hasType("appendix-constructed") then namespace = namespace .. "विक्षनरी" end end elseif info.label:match("templates") then namespace = namespace .. "साँचा" elseif info.label:match("modules") then namespace = namespace .. "Module" elseif info.label:match("^विक्षनरी") or info.label:match("^Pages") then namespace = "" end return ([=[ {| id="newest-and-oldest-pages" class="wikitable mw-collapsible" style="float: right; clear: both; margin: 0 0 .5em 1em;" ! Newest and oldest pages&nbsp; |- | id="recent-additions" style="font-size:0.9em;" | '''Newest pages ordered by last [[mw:Manual:Categorylinks table#cl_timestamp|category link update]]:''' %s |- | id="oldest-pages" style="font-size:0.9em;" | '''Oldest pages ordered by last edit:''' %s |}]=]):format( current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=categoryadd order=descending]=] ):format(current_title.text, namespace) ), current_frame:extensionTag( "DynamicPageList", ([=[ category=%s %s count=10 mode=ordered ordermethod=lastedit order=ascending]=] ):format(current_title.text, namespace) ) ) end ]==] -- Show navigational "breadcrumbs" at the top of the page. local function show_breadcrumbs(current) local steps = {} -- Start at the current label and move our way up the "chain" from child to parent, until we can't go further. while current do local category, display_name, nocap if type(current) == "string" then category = current display_name = current:gsub("^श्रेणी:", "") else if not current.getCategoryName then error("Internal error: Bad format in breadcrumb chain structure, probably a misformatted value for `parents`: " .. mw.dumpObject(current)) end category = "श्रेणी:" .. current:getCategoryName() display_name, nocap = current:getBreadcrumbName() end if not nocap then display_name = mw.getContentLanguage():ucfirst(display_name) end insert(steps, 1, ("[[:%s|%s]]"):format(category, display_name)) -- Move up the "chain" by one level. if type(current) == "string" then current = nil else current = current:getParents() end if current then current = current[1].name end end local templateStyles = require("Module:TemplateStyles")(category_tree_styles_css) local ol = mw.html.create("ol") for i, step in ipairs(steps) do local li = mw.html.create("li") if i ~= 1 then local span = mw.html.create("span") :attr("aria-hidden", "true") :addClass("ts-categoryBreadcrumbs-separator") :wikitext(" » ") li:node(span) end li:wikitext(step) ol:node(li) end return templateStyles .. tostring(mw.html.create("div") :attr("role", "navigation") :attr("aria-label", "Breadcrumb") :addClass("ts-categoryBreadcrumbs") :node(ol)) end local function show_also(current) local also = current._info.also if also and #also > 0 then return ('<div style="margin-top:-1em;margin-bottom:1.5em">%s</div>'):format(require("Module:also").main(also)) end return nil end -- Show a short description text for the category. local function show_description(current) return current.getDescription and current:getDescription() or nil end local function show_appendix(current) local appendix = current.getAppendix and current:getAppendix() return appendix and ("For more information, see [[%s]]."):format(appendix) or nil end local function sort_children(child1, child2) return string_compare(uupper(child1.sort), uupper(child2.sort)) end -- Show a list of child categories. local function show_children(current) local children = current.getChildren and current:getChildren() or nil if not children then return nil end sort(children, sort_children) local children_list = {} for _, child in ipairs(children) do local child_name, child_pagetitle = child.name if type(child_name) == "string" then child_pagetitle = child_name else child_pagetitle = "श्रेणी:" .. child_name:getCategoryName() end if new_title(child_pagetitle).exists then insert(children_list, ("* [[:%s]]: %s"):format( child_pagetitle, child.description or type(child_name) == "string" and child_name:gsub("^श्रेणी:", "") .. "." or child_name:getDescription("child") )) end end return concat(children_list, "\n") end -- Show a table of contents with links to each letter in the language's script. local function show_TOC(current) local titleText = current_title.text local inCategoryPages = pages_in_category(titleText, "pages") local inCategorySubcats = pages_in_category(titleText, "subcats") local TOC_type -- Compute type of table of contents required. if inCategoryPages > 2500 or inCategorySubcats > 2500 then TOC_type = "full" elseif inCategoryPages > 200 or inCategorySubcats > 200 then TOC_type = "normal" else -- No (usual) need for a TOC if all pages or subcategories can fit on one page; -- but allow this to be overridden by a custom TOC handler. TOC_type = "none" end if current.getTOC then local TOC_text = current:getTOC(TOC_type) if TOC_text ~= true then return TOC_text or nil end end if TOC_type ~= "none" then local templatename = current:getTOCTemplateName() local TOC_template if TOC_type == "full" then -- This category is very large, see if there is a "full" version of the TOC. local TOC_template_full = new_title(templatename .. "/full") if TOC_template_full.exists then TOC_template = TOC_template_full end end if not TOC_template then local TOC_template_normal = new_title(templatename) if TOC_template_normal.exists then TOC_template = TOC_template_normal end end if TOC_template then return current_frame:expandTemplate{title = TOC_template.text, args = {}} end end return nil end -- Show the "catfix" that adds language attributes and script classes to the page. local function show_catfix(current) local lang, sc = current:getCatfixInfo() return lang and m_utilities.catfix(lang, sc) or nil end -- Show the parent categories that the current category should be placed in. local function show_categories(current, categories) local parents = current.getParents and current:getParents() or nil if not parents then return nil end for _, parent in ipairs(parents) do local parent_name = parent.name local sortkey = type(parent.sort) == "table" and parent.sort:makeSortKey() or parent.sort if type(parent_name) == "string" then insert(categories, ("[[%s|%s]]"):format(parent_name, sortkey)) else insert(categories, ("[[श्रेणी:%s|%s]]"):format(parent_name:getCategoryName(), sortkey)) end end -- Also put the category in its corresponding "umbrella" or "by language" category. local umbrella = current:getUmbrella() if umbrella then -- FIXME: use a language-neutral sorting function like the Unicode Collation Algorithm. local sortkey = current._lang and current._lang:getCanonicalName() or current:getCategoryName() sortkey = require("Module:languages").getByCode("en", true):makeSortKey(sortkey) if type(umbrella) == "string" then insert(categories, ("[[%s|%s]]"):format(umbrella, sortkey)) else insert(categories, ("[[श्रेणी:%s|%s]]"):format(umbrella:getCategoryName(), sortkey)) end end -- Check for various unwanted parser functions, which should be integrated into the category tree data instead. -- Note: HTML comments shouldn't be removed from `content` until after this step, as they can affect the result. local content = current_title:getContent() if not content then -- This happens when using [[Special:ExpandTemplates]] to call {{auto cat}} on a nonexistent category page, -- which is needed by Benwing's create_wanted_categories.py script. return end local defaultsort, displaytitle, page_has_param for node in parse(content):iterate_nodes() do local node_class = class_else_type(node) if node_class == "template" then local name = node:get_name() if name == "DEFAULTSORT:" and not defaultsort then insert(categories, "[[Category:Pages with DEFAULTSORT conflicts]]") defaultsort = true elseif name == "DISPLAYTITLE:" and not displaytitle then insert(categories,"[[Category:Pages with DISPLAYTITLE conflicts]]") displaytitle = true end elseif node_class == "parameter" and not page_has_param then insert(categories,"[[Category:Pages with raw triple-brace template parameters]]") page_has_param = true end end -- Check for raw category markup, which should also be integrated into the category tree data. content = remove_comments(content, "BOTH") local head = content:find("[[", 1, true) while head do local close = content:find("]]", head + 2, true) if not close then break end -- Make sure there are no intervening "[[" between head and close. local open = content:find("[[", head + 2, true) while open and open < close do head = open open = content:find("[[", head + 2, true) end local cat = content:sub(head + 2, close - 1) local colon = cat:match("^[ _\128-\244]*[Cc][Aa][Tt][EeGgOoRrYy _\128-\244]*():") if colon then local pipe = cat:find("|", colon + 1, true) if pipe ~= #cat then local title = new_title(pipe and cat:sub(1, pipe - 1) or cat) if title and title.namespace == 14 then insert(categories,"[[Category:Categories with categories using raw markup]]") break end end end head = open end end local function generate_output(current) if current then for _, functionName in pairs{ "getBreadcrumbName", "getDataModule", "canBeEmpty", "getDescription", "getParents", "getChildren", "getUmbrella", "getAppendix", "getTOCTemplateName", } do if not is_callable(current[functionName]) then require("Module:debug").track{"category tree/missing function", "category tree/missing function/" .. functionName} end end end local boxes, display, categories = {}, {}, {} -- Categories should never show files as a gallery. insert(categories, "__NOGALLERY__") if current_frame:getParent():getTitle() == "साँचा:auto cat" then insert(categories, "[[श्रेणी:साँचा:auto cat को कॉल करने वाली श्रेणियाँ]]") end -- Check if the category is empty local totalPages = pages_in_category(current_title.text, "all") local hugeCategory = totalPages > 1000000 -- 1 million -- Categorize huge categories, as they cause DynamicPageList to time out and make the category inaccessible. if hugeCategory then insert(categories, "[[श्रेणी:बृहदाकार श्रेणियाँ]]") end -- Are the parameters valid? if not current then -- Signal failure so export.show can try the next handler. return nil, true end -- Does the category have the correct name? local currentName = current:getCategoryName() local correctName = current_title.text == currentName if not correctName then insert(categories, "[[श्रेणी:त्रुटिपूर्ण नामों वाली श्रेणियाँ]]") insert(display, show_error( ("Based on the data in the category tree, this category should be called '''[[:श्रेणी:%s]]'''."):format(currentName), "इस श्रेणी में कोई ग़लत नाम है।" )) end -- Add cleanup category for empty categories. local canBeEmpty = current:canBeEmpty() if canBeEmpty and correctName then insert(categories, " __EXPECTUNUSEDCATEGORY__") elseif totalPages == 0 then insert(categories, "[[श्रेणी:खाली श्रेणियाँ]]") end if current:isHidden() then insert(categories, " __HIDDENCAT__") end -- Put all the float-right stuff into a <div> that does not clear, so that float-left stuff like the breadcrumbs and -- description can go opposite the float-right stuff without vertical space. insert(boxes, "<div style=\"float: right;\">") insert(boxes, show_topright(current)) insert(boxes, show_editlink(current)) insert(boxes, show_related_changes()) -- Show pagelist, unless it's a huge category (since they can't use DynamicPageList - see above). --[[ if not hugeCategory then insert(boxes, show_pagelist(current)) end ]] insert(boxes, "</div>") -- Generate the displayed information insert(display, show_breadcrumbs(current)) insert(display, show_also(current)) insert(display, show_description(current)) insert(display, show_appendix(current)) insert(display, show_children(current)) insert(display, show_TOC(current)) insert(display, show_catfix(current)) insert(display, '<br class="clear-both-in-vector-2022-only">') show_categories(current, categories) return concat(boxes, "\n") .. "\n" .. concat(display, "\n\n") .. concat(categories, "") end --[==[ List of handler functions that try to match the page name. A handler should return the name of a submodule to [[Module:category tree]] and an info table which is passed as an argument to the submodule. If a handler does not recognize the page name, it should return nil. Note that the order of handlers matters! ]==] local handlers = {} -- Thesaurus per-language category insert(handlers, function(title) local code, label = title:match("^विक्षनरी:(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Topic per-language category insert(handlers, function(title) local code, label = title:match("^(%l[%a-]*%a):(.+)") if code then return poscatboiler_subsystem, {label = title, raw = true} end end) -- Lect category e.g. for [[:Category:New Zealand English]] or [[:Category:Issime Walser]] insert(handlers, function(title, args) local lect = args.lect or args.dialect if lect ~= "" and yesno(lect, true) then -- Same as boolean in [[Module:parameters]]. return poscatboiler_subsystem, {label = title, args = args, raw = true} end end) -- poscatboiler per-language label, e.g. [[Category:English non-lemma forms]] insert(handlers, function(title, args) local lang, label = export.split_lang_label(title) if not lang then return end local baseLabel, script = label:match("(.+) in (.-)$") if script and baseLabel ~= "टर्म" then local scriptObj = require("Module:scripts").getByCategoryName(script) if scriptObj then return poscatboiler_subsystem, {label = baseLabel, code = lang:getCode(), sc = scriptObj:getCode(), args = args} end end return poscatboiler_subsystem, {label = label, code = lang:getCode(), args = args} end) -- poscatboiler label umbrella category insert(handlers, function(title, args) local label = title:match("(.+) भाषा अनुसार$") if label then -- The poscatboiler code will appropriately lowercase if needed. return poscatboiler_subsystem, {label = label, args = args} end end) -- poscatboiler raw handlers insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args, raw = true} end) -- poscatboiler umbrella handlers without 'by language' insert(handlers, function(title, args) return poscatboiler_subsystem, {label = title, args = args} end) function export.show(frame) local args, other_args = require("Module:parameters").process(frame:getParent().args, { ["also"] = {type = "title", sublist = "comma without whitespace", namespace = 14} }, true) if args.also then for k, arg in next, args.also do args.also[k] = arg.prefixedText end end for k, arg in next, other_args do other_args[k] = trim(arg) end if namespace == 10 then -- Template return "(यह साँचा [[Help:Namespaces#Category|श्रेणी:]] नामस्थान में स्थित पृष्ठ पर प्रयोग किया जाना चाहिये।)" elseif namespace ~= 14 then -- Category error("यह साँचा/मॉड्यूल केवल [[mw:Help:Namespaces#Category|श्रेणी:]] नामस्थान में प्रयोग में लाया जा सकता है।") end local saw_tree_lookup_failure = false local failure_consumed_args = false -- Go through each handler in turn. If a handler doesn't recognize the format of the category, it will return nil, -- and we will consider the next handler. Otherwise, it returns a template name and arguments to call it with, but -- even then, that template might return an error, and we need to consider the next handler. This happens, for -- example, with the category "CAT:Mato Grosso, Brazil", where "Mato" is the name of a language, so the poscatboiler -- per-language label handler fires and tries to find a label "Grosso, Brazil". This throws an error, and -- previously, this blocked further handler consideration, but now we check for the error and continue checking -- handlers; eventually, the topic umbrella handler will fire and correctly handle the category. for _, handler in ipairs(handlers) do -- Use a new title object and args table for each handler, to keep them isolated. local submodule, info = handler(current_title.text, deep_copy(other_args)) if submodule then info.also = deep_copy(args.also) require("Module:debug").track("auto cat/" .. submodule) -- `failed` is true if no match was found in the category tree. submodule = require(category_tree_submodule_prefix .. submodule) local cattext, failed = generate_output(submodule.main(info)) if failed then saw_tree_lookup_failure = true failure_consumed_args = failure_consumed_args or not not info.args elseif not info.args and next(other_args) then error(extra_args_error) else return cattext end end end -- No handler produced a valid category-tree match. -- Preserve previous behavior: if no failing handler consumed args, surface extra-arg errors first. if saw_tree_lookup_failure and not failure_consumed_args and next(other_args) then error(extra_args_error) end error_not_in_category_tree() end -- TODO: new test entrypoint. return export a388k7bsvbf00jaaofaht7zhxwm1ob7 मॉड्यूल:category tree/data 828 302328 487962 487827 2026-09-03T20:24:37Z SM7 6218 +1/ विक्षनरी 487962 Scribunto text/plain local labels = {} local raw_categories = {} local handlers = {} local raw_handlers = {} local labels = {} local raw_categories = {} local handlers = {} local raw_handlers = {} local subpages = { -- It should not matter much what order we do the handlers in, but topic handling historically -- preceded "poscatboiler" handling (i.e. everything else), so keep it that way for the moment. -- "विषय", -- "affixes and compounds", -- "वर्ण", "प्रविष्टि रखरखाव", "व्युत्पत्ति", "परिवार", -- "figures of speech", -- "grammatical classes", -- "lang-specific-raw", "भाषाएँ", -- "लेक्ट", "लेम्मा", -- "lexical properties", -- "miscellaneous", -- "मॉड्यूल", -- "नाम", -- "गैर-लेम्मा रूप", -- "phrases", -- "pragmatic properties", -- "तुक", "लिपियाँ", -- "semantic classes", -- "shortenings", -- "speech acts", -- "चिह्न", -- "साँचे", --"टर्म लिपि अनुसार", -- "ट्रांसलिट्रेशन", -- "युनिकोड", "विक्षनरी", -- "विक्षनरी रखरखाव", -- "विक्षनरी सदस्य'", -- "wiktionary votes", -- "word of the day", "हेडवर्ड", } -- Import subpages for _, subpage in ipairs(subpages) do local datamodule = "Module:category tree/" .. subpage local retval = require(datamodule) if retval["LABELS"] then for label, data in pairs(retval["LABELS"]) do if labels[label] and not retval["IGNOREDUP"] then error("लेबल " .. label .. " जिसे [[" .. datamodule .. "]] और [[" .. labels[label].module .. "]] दोनों में परिभाषित किया गया है।") end data.module = datamodule labels[label] = data end end if retval["RAW_CATEGORIES"] then for category, data in pairs(retval["RAW_CATEGORIES"]) do if raw_categories[category] and not retval["IGNOREDUP"] then error("प्रारूपहीन श्रेणी " .. category .. " जिसे [[" .. datamodule .. "]] और [[" .. raw_categories[category].module .. "]] दोनों में परिभाषित किया गया है।") end data.module = datamodule raw_categories[category] = data end end if retval["HANDLERS"] then for _, handler in ipairs(retval["HANDLERS"]) do table.insert(handlers, { module = datamodule, handler = handler }) end end if retval["RAW_HANDLERS"] then for _, handler in ipairs(retval["RAW_HANDLERS"]) do table.insert(raw_handlers, { module = datamodule, handler = handler }) end end end -- Add child categories to their parents local function add_children_to_parents(hierarchy, raw) for key, data in pairs(hierarchy) do local parents = data.parents if parents then if type(parents) ~= "table" then parents = {parents} end if parents.name or parents.module then parents = {parents} end for _, parent in ipairs(parents) do if type(parent) ~= "table" or not parent.name and not parent.module then parent = {name = parent} end if parent.name and not parent.module and type(parent.name) == "string" and not parent.name:find("^श्रेणी:") then local parent_is_raw if raw then parent_is_raw = not parent.is_label else parent_is_raw = parent.raw end -- Don't do anything if the child is raw and the parent is lang-specific, otherwise e.g. -- "Lemmas subcategories by language" will be listed as a child of every "LANG lemmas" category. -- FIXME: We need to rethink this mechanism. if not raw or parent_is_raw then local child_hierarchy = parent_is_raw and raw_categories or labels if child_hierarchy[parent.name] then local child = {name = key, sort = parent.sort, raw = raw} if child_hierarchy[parent.name].children then table.insert(child_hierarchy[parent.name].children, child) else child_hierarchy[parent.name].children = {child} end end end end end end end end add_children_to_parents(labels) add_children_to_parents(raw_categories, true) return { LABELS = labels, RAW_CATEGORIES = raw_categories, HANDLERS = handlers, RAW_HANDLERS = raw_handlers } ny3quet9wz3cq1al47myfqli8nu83tz 487977 487962 2026-09-04T05:18:59Z SM7 6218 miscellaneous / active ...यहीं "मूलभूत श्रेणी" परिभाषित होगी 487977 Scribunto text/plain local labels = {} local raw_categories = {} local handlers = {} local raw_handlers = {} local labels = {} local raw_categories = {} local handlers = {} local raw_handlers = {} local subpages = { -- It should not matter much what order we do the handlers in, but topic handling historically -- preceded "poscatboiler" handling (i.e. everything else), so keep it that way for the moment. -- "विषय", -- "affixes and compounds", -- "वर्ण", "प्रविष्टि रखरखाव", "व्युत्पत्ति", "परिवार", -- "figures of speech", -- "grammatical classes", -- "lang-specific-raw", "भाषाएँ", -- "लेक्ट", "लेम्मा", -- "lexical properties", "miscellaneous", -- "मॉड्यूल", -- "नाम", -- "गैर-लेम्मा रूप", -- "phrases", -- "pragmatic properties", -- "तुक", "लिपियाँ", -- "semantic classes", -- "shortenings", -- "speech acts", -- "चिह्न", -- "साँचे", --"टर्म लिपि अनुसार", -- "ट्रांसलिट्रेशन", -- "युनिकोड", "विक्षनरी", -- "विक्षनरी रखरखाव", -- "विक्षनरी सदस्य'", -- "wiktionary votes", -- "word of the day", "हेडवर्ड", } -- Import subpages for _, subpage in ipairs(subpages) do local datamodule = "Module:category tree/" .. subpage local retval = require(datamodule) if retval["LABELS"] then for label, data in pairs(retval["LABELS"]) do if labels[label] and not retval["IGNOREDUP"] then error("लेबल " .. label .. " जिसे [[" .. datamodule .. "]] और [[" .. labels[label].module .. "]] दोनों में परिभाषित किया गया है।") end data.module = datamodule labels[label] = data end end if retval["RAW_CATEGORIES"] then for category, data in pairs(retval["RAW_CATEGORIES"]) do if raw_categories[category] and not retval["IGNOREDUP"] then error("प्रारूपहीन श्रेणी " .. category .. " जिसे [[" .. datamodule .. "]] और [[" .. raw_categories[category].module .. "]] दोनों में परिभाषित किया गया है।") end data.module = datamodule raw_categories[category] = data end end if retval["HANDLERS"] then for _, handler in ipairs(retval["HANDLERS"]) do table.insert(handlers, { module = datamodule, handler = handler }) end end if retval["RAW_HANDLERS"] then for _, handler in ipairs(retval["RAW_HANDLERS"]) do table.insert(raw_handlers, { module = datamodule, handler = handler }) end end end -- Add child categories to their parents local function add_children_to_parents(hierarchy, raw) for key, data in pairs(hierarchy) do local parents = data.parents if parents then if type(parents) ~= "table" then parents = {parents} end if parents.name or parents.module then parents = {parents} end for _, parent in ipairs(parents) do if type(parent) ~= "table" or not parent.name and not parent.module then parent = {name = parent} end if parent.name and not parent.module and type(parent.name) == "string" and not parent.name:find("^श्रेणी:") then local parent_is_raw if raw then parent_is_raw = not parent.is_label else parent_is_raw = parent.raw end -- Don't do anything if the child is raw and the parent is lang-specific, otherwise e.g. -- "Lemmas subcategories by language" will be listed as a child of every "LANG lemmas" category. -- FIXME: We need to rethink this mechanism. if not raw or parent_is_raw then local child_hierarchy = parent_is_raw and raw_categories or labels if child_hierarchy[parent.name] then local child = {name = key, sort = parent.sort, raw = raw} if child_hierarchy[parent.name].children then table.insert(child_hierarchy[parent.name].children, child) else child_hierarchy[parent.name].children = {child} end end end end end end end end add_children_to_parents(labels) add_children_to_parents(raw_categories, true) return { LABELS = labels, RAW_CATEGORIES = raw_categories, HANDLERS = handlers, RAW_HANDLERS = raw_handlers } trb7c59i6pgomoo7ii0qyzhqrl20pst 487980 487977 2026-09-04T05:31:47Z SM7 6218 DESCRIPTION OF miscellaneous 487980 Scribunto text/plain local labels = {} local raw_categories = {} local handlers = {} local raw_handlers = {} local labels = {} local raw_categories = {} local handlers = {} local raw_handlers = {} local subpages = { -- It should not matter much what order we do the handlers in, but topic handling historically -- preceded "poscatboiler" handling (i.e. everything else), so keep it that way for the moment. -- "विषय", -- "affixes and compounds", -- "वर्ण", "प्रविष्टि रखरखाव", "व्युत्पत्ति", "परिवार", -- "figures of speech", -- "grammatical classes", -- "lang-specific-raw", "भाषाएँ", -- "लेक्ट", "लेम्मा", -- "lexical properties", "miscellaneous", -- सबसे ऊपर की श्रेणियाँ: "मूलभूत श्रेणी", "अंब्रेला मेटाश्रेणियाँ" और "परिशिष्ट" यहीं परिभाषित (RAW CATEGORIES) हैं। -- "मॉड्यूल", -- "नाम", -- "गैर-लेम्मा रूप", -- "phrases", -- "pragmatic properties", -- "तुक", "लिपियाँ", -- "semantic classes", -- "shortenings", -- "speech acts", -- "चिह्न", -- "साँचे", --"टर्म लिपि अनुसार", -- "ट्रांसलिट्रेशन", -- "युनिकोड", "विक्षनरी", -- "विक्षनरी रखरखाव", -- "विक्षनरी सदस्य'", -- "wiktionary votes", -- "word of the day", "हेडवर्ड", } -- Import subpages for _, subpage in ipairs(subpages) do local datamodule = "Module:category tree/" .. subpage local retval = require(datamodule) if retval["LABELS"] then for label, data in pairs(retval["LABELS"]) do if labels[label] and not retval["IGNOREDUP"] then error("लेबल " .. label .. " जिसे [[" .. datamodule .. "]] और [[" .. labels[label].module .. "]] दोनों में परिभाषित किया गया है।") end data.module = datamodule labels[label] = data end end if retval["RAW_CATEGORIES"] then for category, data in pairs(retval["RAW_CATEGORIES"]) do if raw_categories[category] and not retval["IGNOREDUP"] then error("प्रारूपहीन श्रेणी " .. category .. " जिसे [[" .. datamodule .. "]] और [[" .. raw_categories[category].module .. "]] दोनों में परिभाषित किया गया है।") end data.module = datamodule raw_categories[category] = data end end if retval["HANDLERS"] then for _, handler in ipairs(retval["HANDLERS"]) do table.insert(handlers, { module = datamodule, handler = handler }) end end if retval["RAW_HANDLERS"] then for _, handler in ipairs(retval["RAW_HANDLERS"]) do table.insert(raw_handlers, { module = datamodule, handler = handler }) end end end -- Add child categories to their parents local function add_children_to_parents(hierarchy, raw) for key, data in pairs(hierarchy) do local parents = data.parents if parents then if type(parents) ~= "table" then parents = {parents} end if parents.name or parents.module then parents = {parents} end for _, parent in ipairs(parents) do if type(parent) ~= "table" or not parent.name and not parent.module then parent = {name = parent} end if parent.name and not parent.module and type(parent.name) == "string" and not parent.name:find("^श्रेणी:") then local parent_is_raw if raw then parent_is_raw = not parent.is_label else parent_is_raw = parent.raw end -- Don't do anything if the child is raw and the parent is lang-specific, otherwise e.g. -- "Lemmas subcategories by language" will be listed as a child of every "LANG lemmas" category. -- FIXME: We need to rethink this mechanism. if not raw or parent_is_raw then local child_hierarchy = parent_is_raw and raw_categories or labels if child_hierarchy[parent.name] then local child = {name = key, sort = parent.sort, raw = raw} if child_hierarchy[parent.name].children then table.insert(child_hierarchy[parent.name].children, child) else child_hierarchy[parent.name].children = {child} end end end end end end end end add_children_to_parents(labels) add_children_to_parents(raw_categories, true) return { LABELS = labels, RAW_CATEGORIES = raw_categories, HANDLERS = handlers, RAW_HANDLERS = raw_handlers } dy3c3tc5qaoq7rzhyaft1lmndwq1arx 487990 487980 2026-09-04T06:25:22Z SM7 6218 corrected 487990 Scribunto text/plain local labels = {} local raw_categories = {} local handlers = {} local raw_handlers = {} local labels = {} local raw_categories = {} local handlers = {} local raw_handlers = {} local subpages = { -- It should not matter much what order we do the handlers in, but topic handling historically -- preceded "poscatboiler" handling (i.e. everything else), so keep it that way for the moment. -- "विषय", -- "affixes and compounds", -- "वर्ण", "प्रविष्टि रखरखाव", "व्युत्पत्ति", "परिवार", -- "figures of speech", -- "grammatical classes", -- "lang-specific-raw", "भाषाएँ", -- "लेक्ट", "लेम्मा", -- "lexical properties", "miscellaneous", -- सबसे ऊपर की श्रेणियाँ: "मूलभूत श्रेणी", "छतरी मेटाश्रेणियाँ" और "परिशिष्ट" यहीं परिभाषित (RAW CATEGORIES) हैं। -- "मॉड्यूल", -- "नाम", -- "गैर-लेम्मा रूप", -- "phrases", -- "pragmatic properties", -- "तुक", "लिपियाँ", -- "semantic classes", -- "shortenings", -- "speech acts", -- "चिह्न", -- "साँचे", --"टर्म लिपि अनुसार", -- "ट्रांसलिट्रेशन", -- "युनिकोड", "विक्षनरी", -- "विक्षनरी रखरखाव", -- "विक्षनरी सदस्य'", -- "wiktionary votes", -- "word of the day", "हेडवर्ड", } -- Import subpages for _, subpage in ipairs(subpages) do local datamodule = "Module:category tree/" .. subpage local retval = require(datamodule) if retval["LABELS"] then for label, data in pairs(retval["LABELS"]) do if labels[label] and not retval["IGNOREDUP"] then error("लेबल " .. label .. " जिसे [[" .. datamodule .. "]] और [[" .. labels[label].module .. "]] दोनों में परिभाषित किया गया है।") end data.module = datamodule labels[label] = data end end if retval["RAW_CATEGORIES"] then for category, data in pairs(retval["RAW_CATEGORIES"]) do if raw_categories[category] and not retval["IGNOREDUP"] then error("प्रारूपहीन श्रेणी " .. category .. " जिसे [[" .. datamodule .. "]] और [[" .. raw_categories[category].module .. "]] दोनों में परिभाषित किया गया है।") end data.module = datamodule raw_categories[category] = data end end if retval["HANDLERS"] then for _, handler in ipairs(retval["HANDLERS"]) do table.insert(handlers, { module = datamodule, handler = handler }) end end if retval["RAW_HANDLERS"] then for _, handler in ipairs(retval["RAW_HANDLERS"]) do table.insert(raw_handlers, { module = datamodule, handler = handler }) end end end -- Add child categories to their parents local function add_children_to_parents(hierarchy, raw) for key, data in pairs(hierarchy) do local parents = data.parents if parents then if type(parents) ~= "table" then parents = {parents} end if parents.name or parents.module then parents = {parents} end for _, parent in ipairs(parents) do if type(parent) ~= "table" or not parent.name and not parent.module then parent = {name = parent} end if parent.name and not parent.module and type(parent.name) == "string" and not parent.name:find("^श्रेणी:") then local parent_is_raw if raw then parent_is_raw = not parent.is_label else parent_is_raw = parent.raw end -- Don't do anything if the child is raw and the parent is lang-specific, otherwise e.g. -- "Lemmas subcategories by language" will be listed as a child of every "LANG lemmas" category. -- FIXME: We need to rethink this mechanism. if not raw or parent_is_raw then local child_hierarchy = parent_is_raw and raw_categories or labels if child_hierarchy[parent.name] then local child = {name = key, sort = parent.sort, raw = raw} if child_hierarchy[parent.name].children then table.insert(child_hierarchy[parent.name].children, child) else child_hierarchy[parent.name].children = {child} end end end end end end end end add_children_to_parents(labels) add_children_to_parents(raw_categories, true) return { LABELS = labels, RAW_CATEGORIES = raw_categories, HANDLERS = handlers, RAW_HANDLERS = raw_handlers } od02dcg2irttlunjih8xvdnf8sgfq46 487998 487990 2026-09-04T07:27:26Z SM7 6218 विक्षनरी रखरखाव / active 487998 Scribunto text/plain local labels = {} local raw_categories = {} local handlers = {} local raw_handlers = {} local labels = {} local raw_categories = {} local handlers = {} local raw_handlers = {} local subpages = { -- It should not matter much what order we do the handlers in, but topic handling historically -- preceded "poscatboiler" handling (i.e. everything else), so keep it that way for the moment. -- "विषय", -- "affixes and compounds", -- "वर्ण", "प्रविष्टि रखरखाव", "व्युत्पत्ति", "परिवार", -- "figures of speech", -- "grammatical classes", -- "lang-specific-raw", "भाषाएँ", -- "लेक्ट", "लेम्मा", -- "lexical properties", "miscellaneous", -- सबसे ऊपर की श्रेणियाँ: "मूलभूत श्रेणी", "छतरी मेटाश्रेणियाँ" और "परिशिष्ट" यहीं परिभाषित (RAW CATEGORIES) हैं। -- "मॉड्यूल", -- "नाम", -- "गैर-लेम्मा रूप", -- "phrases", -- "pragmatic properties", -- "तुक", "लिपियाँ", -- "semantic classes", -- "shortenings", -- "speech acts", -- "चिह्न", -- "साँचे", --"टर्म लिपि अनुसार", -- "ट्रांसलिट्रेशन", -- "युनिकोड", "विक्षनरी", "विक्षनरी रखरखाव", -- "विक्षनरी सदस्य'", -- "wiktionary votes", -- "word of the day", "हेडवर्ड", } -- Import subpages for _, subpage in ipairs(subpages) do local datamodule = "Module:category tree/" .. subpage local retval = require(datamodule) if retval["LABELS"] then for label, data in pairs(retval["LABELS"]) do if labels[label] and not retval["IGNOREDUP"] then error("लेबल " .. label .. " जिसे [[" .. datamodule .. "]] और [[" .. labels[label].module .. "]] दोनों में परिभाषित किया गया है।") end data.module = datamodule labels[label] = data end end if retval["RAW_CATEGORIES"] then for category, data in pairs(retval["RAW_CATEGORIES"]) do if raw_categories[category] and not retval["IGNOREDUP"] then error("प्रारूपहीन श्रेणी " .. category .. " जिसे [[" .. datamodule .. "]] और [[" .. raw_categories[category].module .. "]] दोनों में परिभाषित किया गया है।") end data.module = datamodule raw_categories[category] = data end end if retval["HANDLERS"] then for _, handler in ipairs(retval["HANDLERS"]) do table.insert(handlers, { module = datamodule, handler = handler }) end end if retval["RAW_HANDLERS"] then for _, handler in ipairs(retval["RAW_HANDLERS"]) do table.insert(raw_handlers, { module = datamodule, handler = handler }) end end end -- Add child categories to their parents local function add_children_to_parents(hierarchy, raw) for key, data in pairs(hierarchy) do local parents = data.parents if parents then if type(parents) ~= "table" then parents = {parents} end if parents.name or parents.module then parents = {parents} end for _, parent in ipairs(parents) do if type(parent) ~= "table" or not parent.name and not parent.module then parent = {name = parent} end if parent.name and not parent.module and type(parent.name) == "string" and not parent.name:find("^श्रेणी:") then local parent_is_raw if raw then parent_is_raw = not parent.is_label else parent_is_raw = parent.raw end -- Don't do anything if the child is raw and the parent is lang-specific, otherwise e.g. -- "Lemmas subcategories by language" will be listed as a child of every "LANG lemmas" category. -- FIXME: We need to rethink this mechanism. if not raw or parent_is_raw then local child_hierarchy = parent_is_raw and raw_categories or labels if child_hierarchy[parent.name] then local child = {name = key, sort = parent.sort, raw = raw} if child_hierarchy[parent.name].children then table.insert(child_hierarchy[parent.name].children, child) else child_hierarchy[parent.name].children = {child} end end end end end end end end add_children_to_parents(labels) add_children_to_parents(raw_categories, true) return { LABELS = labels, RAW_CATEGORIES = raw_categories, HANDLERS = handlers, RAW_HANDLERS = raw_handlers } rorywgmlyw9qh2ia14lzaqx761ib9oo मॉड्यूल:category tree/poscatboiler 828 302330 487958 487855 2026-09-03T20:04:31Z SM7 6218 सुधार 487958 Scribunto text/plain local lang_independent_data = require("Module:category tree/data") local lang_specific_module = "Module:category tree/lang" local lang_specific_module_prefix = lang_specific_module .. "/" local family_specific_module = "Module:category tree/fam" local family_specific_module_prefix = family_specific_module .. "/" local labels_utilities_module = "Module:labels/utilities" local template_parser_module = "Module:template parser" local concat = table.concat local dump = mw.dumpObject local expand_template = require("Module:frame").expandTemplate local insert = table.insert local is_callable = require("Module:fun").is_callable local lcfirst = require("Module:string utilities").lcfirst local list_to_set = require("Module:table").listToSet local make_title = mw.title.makeTitle local new_title = mw.title.new local parse = require(template_parser_module).parse local sparse_concat = require("Module:table").sparseConcat local tostring = tostring local type = type local ucfirst = require("Module:string utilities").ucfirst local uupper = require("Module:string utilities").upper local function internal_error(msg) error("Internal error: " .. msg) end local function get_lang(...) local _get_lang = require("Module:languages").getByCode function get_lang(...) return _get_lang(...) or require("Module:languages/errorGetBy").code(...) end return get_lang(...) end local function get_script(...) local _get_script = require("Module:scripts").getByCode function get_script(code) return _get_script(code) or require("Module:languages/error")(code, true, "script code") end return get_script(...) end -- Category object local Category = {} Category.__index = Category function Category:get_originating_info() local originating_info = "" if self._info.originating_label then originating_info = " (originating from label \"" .. self._info.originating_label .. "\" in module [[" .. self._info.originating_module .. "]])" end return originating_info end local valid_keys = list_to_set{"code", "label", "sc", "raw", "args", "also", "called_from_inside", "originating_label", "originating_module"} function Category.new(info) for key in pairs(info) do if not valid_keys[key] then internal_error("The parameter \"" .. key .. "\" was not recognized.") end end local self = setmetatable({}, Category) self._info = info if not self._info.label then internal_error("No label was specified.") end self:initCommon() if not self._data then internal_error("The " .. (self._info.raw and "raw " or "") .. "label \"" .. self._info.label .. "\" does not exist" .. self:get_originating_info() .. ".") end return self end function Category:initCommon() local function patch_args(args) -- This fixes the issue with Scribunto automatically converting keys -- in a table as numbers to strings, which in turn causes a circular -- error for having argument parameter names as numbers as strings. if type(args) ~= "table" then return args end local new_args = {} for k, v in pairs(args) do if type(k) == "string" and string.len(k) < 10 and not string.match(k, "^0") and string.match(k, "^%d+$") then new_args[tonumber(k)] = patch_args(v) else new_args[k] = patch_args(v) end end return new_args end local args_handled = false if self._info.raw then -- Check if the category exists local raw_categories = lang_independent_data["RAW_CATEGORIES"] self._data = raw_categories[self._info.label] if self._data then if self._data.lang then self._lang = get_lang(self._data.lang, nil, true) self._info.code = self._lang:getCode() end if self._data.sc then self._sc = get_script(self._data.sc) self._info.sc = self._sc:getCode() end else -- Go through raw handlers local data = { category = self._info.label, args = patch_args(self._info.args) or {}, called_from_inside = self._info.called_from_inside, } for _, handler in ipairs(lang_independent_data["RAW_HANDLERS"]) do self._data, args_handled = handler.handler(data) if self._data then self._data.module = self._data.module or handler.module break end end if self._data then -- Update the label if the handler specified a canonical name for it. if self._data.canonical_name then self._info.canonical_name = self._data.canonical_name end if self._data.lang then if type(self._data.lang) ~= "string" then internal_error("Received non-string value " .. dump(self._data.lang) .. " for self._data.lang, label \"" .. self._info.label .. "\"" .. self:get_originating_info() .. ".") end self._lang = get_lang(self._data.lang, nil, true) self._info.code = self._lang:getCode() end if self._data.sc then if type(self._data.sc) ~= "string" then internal_error("Received non-string value " .. dump(self._data.sc) .. " for self._data.sc, label \"" .. self._info.label .. "\"" .. self:get_originating_info() .. ".") end self._sc = get_script(self._data.sc) self._info.sc = self._sc:getCode() end end end else -- Already parsed into language + label if self._info.code then self._lang = get_lang(self._info.code, nil, true) else self._lang = nil end if self._info.sc then self._sc = get_script(self._info.sc) else self._sc = nil end self._info.orig_label = self._info.label if not self._lang then -- Umbrella categories without a preceding language always begin with a capital letter, but the actual label may be -- lowercase (cf. [[:Category:Nouns by language]] with label 'nouns' with per-language [[:Category:English nouns]]; -- but [[:Category:Reddit slang by language]] with label 'Reddit slang' with per-language -- [[:Category:English Reddit slang]]). Since the label is almost always lowercase, we lowercase it for umbrella -- categories, storing the original into `orig_label`, and correct it later if needed. self._info.label = lcfirst(self._info.label) end -- First, check lang-specific labels and handlers if this is not an umbrella category. if self._lang then local objects_with_modules = require(lang_specific_module) local obj, seen = self._lang, {} local object_specific_module_prefix = lang_specific_module_prefix local is_family = false repeat if objects_with_modules[obj:getCode()] then local module = object_specific_module_prefix .. obj:getCode() local labels_and_handlers = require(module) if labels_and_handlers.LABELS then self._data = labels_and_handlers.LABELS[self._info.label] if self._data then if not is_family and self._data.umbrella == nil and self._data.umbrella_parents == nil then self._data.umbrella = false end self._data.module = self._data.module or module end end if not self._data and labels_and_handlers.HANDLERS then for _, handler in ipairs(labels_and_handlers.HANDLERS) do local data = { label = self._info.label, lang = self._lang, sc = self._sc, args = patch_args(self._info.args) or {}, called_from_inside = self._info.called_from_inside, } self._data, args_handled = handler(data) if self._data then if not is_family and self._data.umbrella == nil and self._data.umbrella_parents == nil then self._data.umbrella = false end self._data.module = self._data.module or module break end end end if self._data then break end end seen[obj:getCode()] = true obj = obj:getFamily() if not is_family then is_family = true object_specific_module_prefix = family_specific_module_prefix objects_with_modules = require(family_specific_module) end until not obj or seen[obj:getCode()] end local function fetch_label_data(labels) self._data = labels[self._info.label] -- See comment above about uppercase- vs. lowercase-initial labels, which are indistinguishable -- in umbrella categories. if not self._data then self._data = labels[self._info.orig_label] if self._data then self._info.label = self._info.orig_label end end end -- Then check lang-independent labels. if not self._data then -- lang_independent_data.LABELS should always exist. fetch_label_data(lang_independent_data.LABELS) if not self._data and not self._lang then -- Check family-specific labels for umbrella label. local families_with_modules = require(family_specific_module) for famcode, _ in pairs(families_with_modules) do local module = family_specific_module_prefix .. famcode local labels_and_handlers = require(module) if labels_and_handlers.LABELS then fetch_label_data(labels_and_handlers.LABELS) if self._data then self._data.module = self._data.module or module break end end end end end -- Then check lang-independent handlers. if not self._data then local data = { label = self._info.label, lang = self._lang, sc = self._sc, args = patch_args(self._info.args) or {}, called_from_inside = self._info.called_from_inside, } for _, handler in ipairs(lang_independent_data["HANDLERS"]) do self._data, args_handled = handler.handler(data) if self._data then self._data.module = self._data.module or handler.module break end end if not self._data and not self._lang then -- Check family-specific labels for umbrella handler. local families_with_modules = require(family_specific_module) for famcode, _ in pairs(families_with_modules) do local module = family_specific_module_prefix .. famcode local labels_and_handlers = require(module) if labels_and_handlers.HANDLERS then for _, handler in ipairs(labels_and_handlers.HANDLERS) do local data = { label = self._info.label, sc = self._sc, args = patch_args(self._info.args) or {}, called_from_inside = self._info.called_from_inside, } self._data, args_handled = handler(data) if self._data then self._data.module = self._data.module or module break end end end if self._data then break end end end end end if not args_handled and self._data and self._info.args and next(self._info.args) then local module_text = " (handled in [[" .. (self._data.module or "UNKNOWN").. "]])" local args_text = {} for k, v in pairs(self._info.args) do insert(args_text, k .. "=" .. ((type(v) == "string" or type(v) == "number") and v or dump(v))) end error("poscatboiler label '" .. self._info.label .. "' " .. module_text .. " doesn't accept extra args " .. concat(args_text, ", ")) end if self._sc and not self._lang then internal_error("Umbrella categories cannot have a script specified.") end end function Category:convert_spec_to_string(desc) if not desc then return desc end local desc_type = type(desc) if desc_type == "string" then return desc elseif desc_type == "number" then return tostring(desc) elseif not is_callable(desc) then internal_error("`desc` must be a string, number, function, callable table or nil; received " .. dump(desc)) end desc = desc { lang = self._lang, sc = self._sc, label = self._info.label, raw = self._info.raw, } if not desc then return desc end desc_type = type(desc) if desc_type == "string" then return desc end internal_error("The value returned by `desc` must be a string or nil; received " .. dump(desc)) end local function add_obj_args(args, obj, obj_type, sc_lang) if obj then args[obj_type .. "code"] = obj:getCode() args[obj_type .. "name"] = obj:getCanonicalName(sc_lang) args[obj_type .. "disp"] = obj:getDisplayForm(sc_lang) args[obj_type .. "cat"] = obj:getCategoryName(false, sc_lang) args[obj_type .. "link"] = obj:makeCategoryLink(sc_lang) end end -- Expands `desc` like a template, passing values for specs like {{{langname}}}. function Category:substitute_template_specs(desc) -- This may end up happening twice but that's OK as the function is (usually) idempotent. -- FIXME: Not idempotent if a preprocessed template returns wikicode. desc = self:convert_spec_to_string(desc) if not desc then return nil end -- Populate the substitution arguments. local args = {} args.umbrella_msg = "This is an umbrella category. It contains no dictionary entries, but only other, language-specific categories, which in turn contain relevant terms in a given language." args.umbrella_meta_msg = "This is an umbrella metacategory, covering a general area such as \"lemmas\", \"names\" or \"terms by etymology\". It contains no dictionary entries, but holds only umbrella (\"by language\") categories covering specific subtopics, which in turn contain language-specific categories holding terms in a given language for that same topic." add_obj_args(args, self._lang, "lang") add_obj_args(args, self._sc, "sc", self._lang) return parse(desc, true):expand(args) end function Category:substitute_template_specs_in_args(args) if not args then return args end local pinfo = {} for k, v in pairs(args) do pinfo[self:substitute_template_specs(k)] = self:substitute_template_specs(v) end return pinfo end function Category:make_new(info) info.originating_label = self._info.label info.originating_module = self._data.module info.called_from_inside = true return Category.new(info) end function Category:getBreadcrumbName() local ret if self._sc then -- The parent of 'LANG POS in SCRIPT script' is always 'SCRIPT script' regardless of the parents normally set, -- so the breadcrumb should always be 'POS' regardless of the breadcrumb normally set. return self._info.label, nil end if self._lang or self._info.raw then ret = self._data.breadcrumb or self._data.breadcrumb_base or self._data.breadcrumb_and_first_sort_base or self._data.breadcrumb_key or self._data.breadcrumb_and_first_sort_key or nil else ret = self._data.umbrella and (self._data.umbrella.breadcrumb or self._data.umbrella.breadcrumb_base or self._data.umbrella.breadcrumb_and_first_sort_base or self._data.umbrella.breadcrumb_key or self._data.umbrella.breadcrumb_and_first_sort_key) or nil end if not ret then ret = self._info.label end if type(ret) ~= "table" then ret = {name = ret} end return self:substitute_template_specs(ret.name), ret.nocap end local function expand_toc_template_if(template) local template_obj = new_title(template, 10) if template_obj.exists then return expand_template{title = template_obj.text} end return nil end -- Return the textual expansion of the first existing template among the given templates, first performing -- substitutions on the template name such as replacing {{{langcode}}} with the current language's code (if any). -- If no templates exist after expansion, or if nil is passed in, return nil. If a single string is passed in, -- treat it like a one-element list consisting of that string. function Category:get_template_text(templates) if templates == nil then return nil elseif type(templates) ~= "table" then templates = {templates} end for _, template in ipairs(templates) do if template == false then return false end template = self:substitute_template_specs(template) return expand_toc_template_if(template) end return nil end function Category:getTOC(toc_type) -- Type "none" means everything fits on a single page; in that case, display nothing. if toc_type == "none" then return nil end local templates, fallback_templates -- If TOC type is "full" (more than 2500 entries), do the following, in order: -- 1. look up and expand the `toc_template_full` templates (normal or umbrella, depending on whether there is -- a current language); -- 2. look up and expand the `toc_template` templates (normal or umbrella, as above); -- 3. do the default behavior, which is as follows: -- 3a. look up a language-specific "full" template according to the current language (using English if there -- is no current language); -- 3b. look up a script-specific "full" template according to the first script of current language (using English -- if there is no current language); -- 3c. look up a language-specific "normal" template according to the current language (using English if there -- is no current language); -- 3d. look up a script-specific "normal" template according to the first script of the current language (using -- English if there is no current language); -- 3e. display nothing. -- -- If TOC type is "normal" (between 200 and 2500 entries), do the following, in order: -- 1. look up and expand the `toc_template` templates (normal or umbrella, depending on whether there is -- a current language); -- 2. do the default behavior, which is as follows: -- 2a. look up a language-specific "normal" template according to the current language (using English if there -- is no current language); -- 2b. look up a script-specific "normal" template according to the first script of the current language (using -- English if there is no current language); -- 2c. display nothing. local data_source if self._lang or self._info.raw then data_source = self._data else data_source = self._data.umbrella end if data_source then if toc_type == "full" then templates = data_source.toc_template_full fallback_templates = data_source.toc_template else templates = data_source.toc_template end end local text = self:get_template_text(templates) if text then return text elseif text == false then return nil end text = self:get_template_text(fallback_templates) if text then return text elseif text == false then return nil end local default_toc_templates_to_check = {} local lang, sc = self:getCatfixInfo() local langcode = lang and lang:getCode() or "hi" local sccode = sc and sc:getCode() or lang and lang:getScriptCodes()[1] or "Latn" -- FIXME: What is toctemplateprefix used for? local tocname = (self._data.toctemplateprefix or "") .. "categoryTOC" if toc_type == "full" then insert(default_toc_templates_to_check, ("%s-%s/full"):format(langcode, tocname)) insert(default_toc_templates_to_check, ("%s-%s/full"):format(sccode, tocname)) end insert(default_toc_templates_to_check, ("%s-%s"):format(langcode, tocname)) insert(default_toc_templates_to_check, ("%s-%s"):format(sccode, tocname)) for _, toc_template in ipairs(default_toc_templates_to_check) do local toc_template_text = expand_toc_template_if(toc_template) if toc_template_text then return toc_template_text end end return nil end function Category:getInfo() return self._info end function Category:getDataModule() return self._data.module end function Category:canBeEmpty() if self._lang or self._info.raw then return self._data.can_be_empty end return self._data.umbrella and self._data.umbrella.can_be_empty end function Category:isHidden() if self._lang or self._info.raw then return self._data.hidden end return self._data.umbrella and self._data.umbrella.hidden end function Category:getCategoryName() if self._info.raw then return self._info.canonical_name or self._info.label elseif self._lang then local ret = self._lang:getCanonicalName() .. " " .. self._info.label if self._sc then ret = ret .. " in " .. self._sc:getDisplayForm(self._lang) end return ucfirst(ret) end local ret = ucfirst(self._info.label) if not (self._data.no_by_language or self._data.umbrella and self._data.umbrella.no_by_language) then ret = ret .. " भाषा अनुसार" end return ret end function Category:getTopright() if self._lang or self._info.raw then return self:substitute_template_specs(self._data.topright) end return self._data.umbrella and self:substitute_template_specs(self._data.umbrella.topright) end function Category:display_title(displaytitle, lang) if type(displaytitle) == "string" then displaytitle = self:substitute_template_specs(displaytitle) else displaytitle = displaytitle(self:getCategoryName(), lang) end mw.getCurrentFrame():callParserFunction("DISPLAYTITLE", "श्रेणी:" .. displaytitle) end function Category:get_labels_categorizing() local m_labels_utilities = require(labels_utilities_module) local pos_cat_labels, sense_cat_labels, use_tlb pos_cat_labels = m_labels_utilities.find_labels_for_category(self._info.label, "pos", self._lang) local sense_label = self._info.label:match("^(.*) टर्म$") if sense_label then use_tlb = true else sense_label = self._info.label:match("^terms with (.*) senses$") end if not sense_label then return nil end sense_cat_labels = m_labels_utilities.find_labels_for_category(sense_label, "sense", self._lang) if use_tlb then return m_labels_utilities.format_labels_categorizing(pos_cat_labels, sense_cat_labels, self._lang) end local all_labels = pos_cat_labels for k, v in pairs(sense_cat_labels) do all_labels[k] = v end return m_labels_utilities.format_labels_categorizing(all_labels, nil, self._lang) end -- FIXME: this is clunky. local function remove_lang_params(desc) -- Simply remove a language name/code/category from the beginning of the string, but replace the language name -- in the middle of the string with either "specific languages" or "specific-language" depending on whether the -- language name appears to be an attributive qualifier of another noun or to stand by itself. This may be wrong, -- in which case the category in question should supply its own umbrella description. desc = desc:gsub("^{{{langname}}} ", "") :gsub("{{{langname}}} %(", "specific languages (") :gsub("{{{langname}}}([.,])", "specific languages%1") :gsub("{{{langname}}} ", "specific-language ") :gsub("{{{langdisp}}}", "specific languages") :gsub("{{{langlink}}}", "specific languages") return desc end function Category:getDescription(isChild) -- Allows different text in the list of a category's children local isChild = isChild == "child" if self._lang or self._info.raw then if not isChild and self._data.displaytitle then self:display_title(self._data.displaytitle, self._lang) end if self._sc then return self:getCategoryName() .. "." end local desc = self:substitute_template_specs(self._data.description) if not desc then return nil elseif isChild then return desc end return sparse_concat({ self:substitute_template_specs(self._data.preceding), desc, self:substitute_template_specs(self._data.additional), self:substitute_template_specs(self:get_labels_categorizing()), }, "\n\n") end local umbrella = self._data.umbrella if not isChild and umbrella and umbrella.displaytitle then self:display_title(umbrella.displaytitle) end local desc = self:substitute_template_specs(umbrella and umbrella.description) local has_umbrella_desc = not not desc if not desc then desc = self:convert_spec_to_string(self._data.description) if desc then desc = remove_lang_params(desc) desc = lcfirst(desc) desc = desc:gsub("%.$", "") desc = "Categories with " .. desc .. "." else desc = "Categories with " .. self._info.label .. " in various specific languages." end desc = self:substitute_template_specs(desc) end if isChild then return desc end return sparse_concat({ self:substitute_template_specs(umbrella and umbrella.preceding or not has_umbrella_desc and self._data.preceding), desc, self:substitute_template_specs(umbrella and umbrella.additional or not has_umbrella_desc and self._data.additional), self:substitute_template_specs("{{{umbrella_msg}}}"), self:substitute_template_specs(self:get_labels_categorizing()), }, "\n\n") end function Category:new_sortkey(sortkey) local sortkey_type = type(sortkey) if sortkey_type == "string" then sortkey = uupper(sortkey) elseif sortkey_type == "table" then function sortkey:makeSortKey() local sort_func = self.sort_func if sort_func ~= nil then return sort_func(self.sort_base) end local lang = self.lang if lang == nil then return self.sort_base end lang = get_lang(lang, nil, true) if lang == nil then return self.sort_base end local sc = self.sc if sc ~= nil then sc = get_script(sc) end return lang:makeSortKey(self.sort_base, sc) end end return sortkey end function Category:inherit_spec(spec, parent_spec, substitute_result) if spec == false then return nil end local retval = spec or parent_spec if substitute_result then retval = self:substitute_template_specs(retval) end return retval end function Category:canonicalize_parents_children(cats, is_children, fallback_sort_key, fallback_sort_base) if not cats then return nil elseif type(cats) == "table" then if cats.name or cats.module then cats = {cats} elseif #cats == 0 then return nil end else cats = {cats} end local ret = {} for _, cat in ipairs(cats) do if type(cat) ~= "table" or not cat.name and not cat.module then cat = {name = cat} end insert(ret, cat) end local is_umbrella = not self._lang and not self._info.raw local table_type = is_children and "extra_children" or "parents" for i, cat in ipairs(ret) do local raw if self._info.raw or is_umbrella then raw = not cat.is_label else raw = cat.raw end local lang = self:inherit_spec(cat.lang, not raw and self._info.code or nil, "substitute") local sc = self:inherit_spec(cat.sc, not raw and self._info.sc or nil, "substitute") -- Get the sortkey. local sortkey = self:inherit_spec(cat.sort, i == 1 and (fallback_sort_key or fallback_sort_base and {sort_base = fallback_sort_base}) or nil) if type(sortkey) == "table" then sortkey.sort_base = self:substitute_template_specs(sortkey.sort_base) or internal_error("Missing .sort_base in '" .. table_type .. "' .sort table for '" .. self._info.label .. "' category entry in module '" .. (self._data.module or "unknown") .. "'") if sortkey.sort_func then -- Not allowed to give a lang and/or script if sort_func is given. local bad_spec = sortkey.lang and "lang" or sortkey.sc and "sc" or nil if bad_spec then internal_error("Cannot specify both ." .. bad_spec .. " and .sort_func in '" .. table_type .. "' .sort table for '" .. self._info.label .. "' category entry in module '" .. (self._data.module or "unknown") .. "'") end else sortkey.lang = self:inherit_spec(sortkey.lang, lang, "substitute") sortkey.sc = self:inherit_spec(sortkey.sc, sc, "substitute") end else sortkey = self:substitute_template_specs(sortkey) end local name if cat.module then -- A reference to a category using another category tree module. if not cat.args then internal_error("Missing .args in '" .. table_type .. "' table with module=\"" .. cat.module .. "\" for '" .. self._info.label .. "' category entry in module '" .. (self._data.module or "unknown") .. "'") end name = require("Module:category tree/" .. cat.module).new(self:substitute_template_specs_in_args(cat.args)) else name = cat.name if not name then internal_error("Missing .name in " .. (is_umbrella and "umbrella " or "") .. "'" .. table_type .. "' table for '" .. self._info.label .. "' category entry in module '" .. (self._data.module or "unknown") .. "'") elseif type(name) == "string" then -- otherwise, assume it's a category object and use it directly name = self:substitute_template_specs(name) if name:find("^श्रेणी:") then -- It's a non-poscatboiler category name. sortkey = sortkey or is_children and name:gsub("^श्रेणी:", "") or self:getCategoryName() else -- It's a label. sortkey = sortkey or is_children and name or self._info.label name = self:make_new{ label = name, code = lang, sc = sc, raw = raw, args = self:substitute_template_specs_in_args(cat.args) } end end end sortkey = sortkey or is_children and " " or self._info.label ret[i] = { name = name, description = is_children and self:substitute_template_specs(cat.description) or nil, sort = self:new_sortkey(sortkey) } end return ret end function Category:getParents() local is_umbrella, ret = not self._lang and not self._info.raw if self._sc then local parent1 = self:make_new{code = self._info.code, label = "terms in " .. self._sc:getDisplayForm(self._lang)} local parent2 = self:make_new{code = self._info.code, label = self._info.label, raw = self._info.raw, args = self._info.args} ret = { {name = parent1, sort = self._sc:getCanonicalName(self._lang)}, {name = parent2, sort = self._sc:getCanonicalName(self._lang)}, } else local parents, fallback_sort_base, fallback_sort_key if is_umbrella then parents = self._data.umbrella and self._data.umbrella.parents or self._data.umbrella_parents fallback_sort_base = self._data.umbrella and (self._data.umbrella.breadcrumb_base or self._data.umbrella.breadcrumb_and_first_sort_base) or nil fallback_sort_key = self._data.umbrella and (self._data.umbrella.breadcrumb_key or self._data.umbrella.breadcrumb_and_first_sort_key) or nil else parents = self._data.parents fallback_sort_base = self._data.breadcrumb_base or self._data.breadcrumb_and_first_sort_base fallback_sort_key = self._data.breadcrumb_key or self._data.breadcrumb_and_first_sort_key end ret = self:canonicalize_parents_children(parents, nil, fallback_sort_key, fallback_sort_base) if not ret then return nil end end local self_cat = self:getCategoryName() for _, parent in ipairs(ret) do local parent_cat = parent.name.getCategoryName and parent.name:getCategoryName() if self_cat == parent_cat then internal_error(("Infinite loop would occur, as parent category '%s' is the same as the child category"):format(self_cat)) end end return ret end function Category:getChildren() local is_umbrella = not self._lang and not self._info.raw local children = self._data.children local ret = {} if not is_umbrella and children then for _, child in ipairs(children) do child = mw.clone(child) if type(child) ~= "table" then child = {name = child} end if not child.sort then child.sort = child.name end -- FIXME, is preserving the script correct? child.name = self:make_new{code = self._info.code, label = child.name, raw = child.raw, sc = self._info.sc} insert(ret, child) end end local extra_children if is_umbrella then extra_children = self._data.umbrella and self._data.umbrella.extra_children else extra_children = self._data.extra_children end extra_children = self:canonicalize_parents_children(extra_children, "children") if extra_children then for _, child in ipairs(extra_children) do insert(ret, child) end end return #ret > 0 and ret or nil end function Category:getUmbrella() local umbrella = self._data.umbrella if umbrella == false or self._info.raw or not self._lang or self._sc then return nil end -- If `umbrella` is a string, use that; otherwise, use the label. return self:make_new({label = type(umbrella) == "string" and umbrella or self._info.label}) end function Category:getAppendix() -- FIXME, this should be customizable. local lang, label = self._lang, self._info.label if self._info.raw or not (lang and label) then return nil end local appendix = make_title(100, lang:getCanonicalName() .. " " .. label) return appendix.exists and appendix.fullText or nil end function Category:getCatfixInfo() if self._lang or self._sc or self._info.raw then local langcode, sccode = self._data.catfix, self._data.catfix_sc local lang, sc if langcode then langcode = self:substitute_template_specs(langcode) lang = get_lang(langcode, nil, true) elseif langcode == nil then -- not false lang = self._lang end if sccode then sccode = self:substitute_template_specs(sccode) sc = get_script(sccode) elseif sccode == nil then -- not false sc = self._sc end if lang then lang = lang:getFull() end return lang, sc elseif not self._data.umbrella then return end -- umbrella local langcode, sccode = self._data.umbrella.catfix, self._data.umbrella.catfix_sc local lang, sc if langcode then langcode = self:substitute_template_specs(langcode) lang = get_lang(langcode, nil, true) end if sccode then sccode = self:substitute_template_specs(sccode) sc = get_script(sccode) end if lang then lang = lang:getFull() end return lang, sc end function Category:getTOCTemplateName() -- This should only be invoked if getTOC() returns true, meaning to do the default algorithm, but getTOC() -- implements its own default algorithm. internal_error("This should never get called") end local export = {} function export.main(info) local self = setmetatable({_info = info}, Category) self:initCommon() return self._data and self or nil end export.new = Category.new return export c7al5jscm0279sxhuofnjqmk0eipakg 487974 487958 2026-09-04T05:06:53Z SM7 6218 temp rm local... 487974 Scribunto text/plain local lang_independent_data = require("Module:category tree/data") local lang_specific_module = "Module:category tree/lang" local lang_specific_module_prefix = lang_specific_module .. "/" local family_specific_module = "Module:category tree/fam" local family_specific_module_prefix = family_specific_module .. "/" local labels_utilities_module = "Module:labels/utilities" local template_parser_module = "Module:template parser" local concat = table.concat local dump = mw.dumpObject local expand_template = require("Module:frame").expandTemplate local insert = table.insert local is_callable = require("Module:fun").is_callable local lcfirst = require("Module:string utilities").lcfirst local list_to_set = require("Module:table").listToSet local make_title = mw.title.makeTitle local new_title = mw.title.new local parse = require(template_parser_module).parse local sparse_concat = require("Module:table").sparseConcat local tostring = tostring local type = type local ucfirst = require("Module:string utilities").ucfirst local uupper = require("Module:string utilities").upper local function internal_error(msg) error("Internal error: " .. msg) end local function get_lang(...) local _get_lang = require("Module:languages").getByCode function get_lang(...) return _get_lang(...) or require("Module:languages/errorGetBy").code(...) end return get_lang(...) end local function get_script(...) local _get_script = require("Module:scripts").getByCode function get_script(code) return _get_script(code) or require("Module:languages/error")(code, true, "script code") end return get_script(...) end -- Category object local Category = {} Category.__index = Category function Category:get_originating_info() local originating_info = "" if self._info.originating_label then originating_info = " (originating from label \"" .. self._info.originating_label .. "\" in module [[" .. self._info.originating_module .. "]])" end return originating_info end local valid_keys = list_to_set{"code", "label", "sc", "raw", "args", "also", "called_from_inside", "originating_label", "originating_module"} function Category.new(info) for key in pairs(info) do if not valid_keys[key] then internal_error("The parameter \"" .. key .. "\" was not recognized.") end end local self = setmetatable({}, Category) self._info = info if not self._info.label then internal_error("No label was specified.") end self:initCommon() if not self._data then internal_error("The " .. (self._info.raw and "raw " or "") .. "label \"" .. self._info.label .. "\" does not exist" .. self:get_originating_info() .. ".") end return self end function Category:initCommon() local function patch_args(args) -- This fixes the issue with Scribunto automatically converting keys -- in a table as numbers to strings, which in turn causes a circular -- error for having argument parameter names as numbers as strings. if type(args) ~= "table" then return args end local new_args = {} for k, v in pairs(args) do if type(k) == "string" and string.len(k) < 10 and not string.match(k, "^0") and string.match(k, "^%d+$") then new_args[tonumber(k)] = patch_args(v) else new_args[k] = patch_args(v) end end return new_args end local args_handled = false if self._info.raw then -- Check if the category exists local raw_categories = lang_independent_data["RAW_CATEGORIES"] self._data = raw_categories[self._info.label] if self._data then if self._data.lang then self._lang = get_lang(self._data.lang, nil, true) self._info.code = self._lang:getCode() end if self._data.sc then self._sc = get_script(self._data.sc) self._info.sc = self._sc:getCode() end else -- Go through raw handlers local data = { category = self._info.label, args = patch_args(self._info.args) or {}, called_from_inside = self._info.called_from_inside, } for _, handler in ipairs(lang_independent_data["RAW_HANDLERS"]) do self._data, args_handled = handler.handler(data) if self._data then self._data.module = self._data.module or handler.module break end end if self._data then -- Update the label if the handler specified a canonical name for it. if self._data.canonical_name then self._info.canonical_name = self._data.canonical_name end if self._data.lang then if type(self._data.lang) ~= "string" then internal_error("Received non-string value " .. dump(self._data.lang) .. " for self._data.lang, label \"" .. self._info.label .. "\"" .. self:get_originating_info() .. ".") end self._lang = get_lang(self._data.lang, nil, true) self._info.code = self._lang:getCode() end if self._data.sc then if type(self._data.sc) ~= "string" then internal_error("Received non-string value " .. dump(self._data.sc) .. " for self._data.sc, label \"" .. self._info.label .. "\"" .. self:get_originating_info() .. ".") end self._sc = get_script(self._data.sc) self._info.sc = self._sc:getCode() end end end else -- Already parsed into language + label if self._info.code then self._lang = get_lang(self._info.code, nil, true) else self._lang = nil end if self._info.sc then self._sc = get_script(self._info.sc) else self._sc = nil end self._info.orig_label = self._info.label if not self._lang then -- Umbrella categories without a preceding language always begin with a capital letter, but the actual label may be -- lowercase (cf. [[:Category:Nouns by language]] with label 'nouns' with per-language [[:Category:English nouns]]; -- but [[:Category:Reddit slang by language]] with label 'Reddit slang' with per-language -- [[:Category:English Reddit slang]]). Since the label is almost always lowercase, we lowercase it for umbrella -- categories, storing the original into `orig_label`, and correct it later if needed. self._info.label = lcfirst(self._info.label) end -- First, check lang-specific labels and handlers if this is not an umbrella category. if self._lang then local objects_with_modules = require(lang_specific_module) local obj, seen = self._lang, {} local object_specific_module_prefix = lang_specific_module_prefix local is_family = false repeat if objects_with_modules[obj:getCode()] then local module = object_specific_module_prefix .. obj:getCode() local labels_and_handlers = require(module) if labels_and_handlers.LABELS then self._data = labels_and_handlers.LABELS[self._info.label] if self._data then if not is_family and self._data.umbrella == nil and self._data.umbrella_parents == nil then self._data.umbrella = false end self._data.module = self._data.module or module end end if not self._data and labels_and_handlers.HANDLERS then for _, handler in ipairs(labels_and_handlers.HANDLERS) do local data = { label = self._info.label, lang = self._lang, sc = self._sc, args = patch_args(self._info.args) or {}, called_from_inside = self._info.called_from_inside, } self._data, args_handled = handler(data) if self._data then if not is_family and self._data.umbrella == nil and self._data.umbrella_parents == nil then self._data.umbrella = false end self._data.module = self._data.module or module break end end end if self._data then break end end seen[obj:getCode()] = true obj = obj:getFamily() if not is_family then is_family = true object_specific_module_prefix = family_specific_module_prefix objects_with_modules = require(family_specific_module) end until not obj or seen[obj:getCode()] end local function fetch_label_data(labels) self._data = labels[self._info.label] -- See comment above about uppercase- vs. lowercase-initial labels, which are indistinguishable -- in umbrella categories. if not self._data then self._data = labels[self._info.orig_label] if self._data then self._info.label = self._info.orig_label end end end -- Then check lang-independent labels. if not self._data then -- lang_independent_data.LABELS should always exist. fetch_label_data(lang_independent_data.LABELS) if not self._data and not self._lang then -- Check family-specific labels for umbrella label. local families_with_modules = require(family_specific_module) for famcode, _ in pairs(families_with_modules) do local module = family_specific_module_prefix .. famcode local labels_and_handlers = require(module) if labels_and_handlers.LABELS then fetch_label_data(labels_and_handlers.LABELS) if self._data then self._data.module = self._data.module or module break end end end end end -- Then check lang-independent handlers. if not self._data then local data = { label = self._info.label, lang = self._lang, sc = self._sc, args = patch_args(self._info.args) or {}, called_from_inside = self._info.called_from_inside, } for _, handler in ipairs(lang_independent_data["HANDLERS"]) do self._data, args_handled = handler.handler(data) if self._data then self._data.module = self._data.module or handler.module break end end if not self._data and not self._lang then -- Check family-specific labels for umbrella handler. local families_with_modules = require(family_specific_module) for famcode, _ in pairs(families_with_modules) do local module = family_specific_module_prefix .. famcode local labels_and_handlers = require(module) if labels_and_handlers.HANDLERS then for _, handler in ipairs(labels_and_handlers.HANDLERS) do local data = { label = self._info.label, sc = self._sc, args = patch_args(self._info.args) or {}, called_from_inside = self._info.called_from_inside, } self._data, args_handled = handler(data) if self._data then self._data.module = self._data.module or module break end end end if self._data then break end end end end end if not args_handled and self._data and self._info.args and next(self._info.args) then local module_text = " (handled in [[" .. (self._data.module or "UNKNOWN").. "]])" local args_text = {} for k, v in pairs(self._info.args) do insert(args_text, k .. "=" .. ((type(v) == "string" or type(v) == "number") and v or dump(v))) end error("poscatboiler label '" .. self._info.label .. "' " .. module_text .. " doesn't accept extra args " .. concat(args_text, ", ")) end if self._sc and not self._lang then internal_error("Umbrella categories cannot have a script specified.") end end function Category:convert_spec_to_string(desc) if not desc then return desc end local desc_type = type(desc) if desc_type == "string" then return desc elseif desc_type == "number" then return tostring(desc) elseif not is_callable(desc) then internal_error("`desc` must be a string, number, function, callable table or nil; received " .. dump(desc)) end desc = desc { lang = self._lang, sc = self._sc, label = self._info.label, raw = self._info.raw, } if not desc then return desc end desc_type = type(desc) if desc_type == "string" then return desc end internal_error("The value returned by `desc` must be a string or nil; received " .. dump(desc)) end local function add_obj_args(args, obj, obj_type, sc_lang) if obj then args[obj_type .. "code"] = obj:getCode() args[obj_type .. "name"] = obj:getCanonicalName(sc_lang) args[obj_type .. "disp"] = obj:getDisplayForm(sc_lang) args[obj_type .. "cat"] = obj:getCategoryName(false, sc_lang) args[obj_type .. "link"] = obj:makeCategoryLink(sc_lang) end end -- Expands `desc` like a template, passing values for specs like {{{langname}}}. function Category:substitute_template_specs(desc) -- This may end up happening twice but that's OK as the function is (usually) idempotent. -- FIXME: Not idempotent if a preprocessed template returns wikicode. desc = self:convert_spec_to_string(desc) if not desc then return nil end -- Populate the substitution arguments. local args = {} args.umbrella_msg = "This is an umbrella category. It contains no dictionary entries, but only other, language-specific categories, which in turn contain relevant terms in a given language." args.umbrella_meta_msg = "This is an umbrella metacategory, covering a general area such as \"lemmas\", \"names\" or \"terms by etymology\". It contains no dictionary entries, but holds only umbrella (\"by language\") categories covering specific subtopics, which in turn contain language-specific categories holding terms in a given language for that same topic." add_obj_args(args, self._lang, "lang") add_obj_args(args, self._sc, "sc", self._lang) return parse(desc, true):expand(args) end function Category:substitute_template_specs_in_args(args) if not args then return args end local pinfo = {} for k, v in pairs(args) do pinfo[self:substitute_template_specs(k)] = self:substitute_template_specs(v) end return pinfo end function Category:make_new(info) info.originating_label = self._info.label info.originating_module = self._data.module info.called_from_inside = true return Category.new(info) end function Category:getBreadcrumbName() local ret if self._sc then -- The parent of 'LANG POS in SCRIPT script' is always 'SCRIPT script' regardless of the parents normally set, -- so the breadcrumb should always be 'POS' regardless of the breadcrumb normally set. return self._info.label, nil end if self._lang or self._info.raw then ret = self._data.breadcrumb or self._data.breadcrumb_base or self._data.breadcrumb_and_first_sort_base or self._data.breadcrumb_key or self._data.breadcrumb_and_first_sort_key or nil else ret = self._data.umbrella and (self._data.umbrella.breadcrumb or self._data.umbrella.breadcrumb_base or self._data.umbrella.breadcrumb_and_first_sort_base or self._data.umbrella.breadcrumb_key or self._data.umbrella.breadcrumb_and_first_sort_key) or nil end if not ret then ret = self._info.label end if type(ret) ~= "table" then ret = {name = ret} end return self:substitute_template_specs(ret.name), ret.nocap end local function expand_toc_template_if(template) local template_obj = new_title(template, 10) if template_obj.exists then return expand_template{title = template_obj.text} end return nil end -- Return the textual expansion of the first existing template among the given templates, first performing -- substitutions on the template name such as replacing {{{langcode}}} with the current language's code (if any). -- If no templates exist after expansion, or if nil is passed in, return nil. If a single string is passed in, -- treat it like a one-element list consisting of that string. function Category:get_template_text(templates) if templates == nil then return nil elseif type(templates) ~= "table" then templates = {templates} end for _, template in ipairs(templates) do if template == false then return false end template = self:substitute_template_specs(template) return expand_toc_template_if(template) end return nil end function Category:getTOC(toc_type) -- Type "none" means everything fits on a single page; in that case, display nothing. if toc_type == "none" then return nil end local templates, fallback_templates -- If TOC type is "full" (more than 2500 entries), do the following, in order: -- 1. look up and expand the `toc_template_full` templates (normal or umbrella, depending on whether there is -- a current language); -- 2. look up and expand the `toc_template` templates (normal or umbrella, as above); -- 3. do the default behavior, which is as follows: -- 3a. look up a language-specific "full" template according to the current language (using English if there -- is no current language); -- 3b. look up a script-specific "full" template according to the first script of current language (using English -- if there is no current language); -- 3c. look up a language-specific "normal" template according to the current language (using English if there -- is no current language); -- 3d. look up a script-specific "normal" template according to the first script of the current language (using -- English if there is no current language); -- 3e. display nothing. -- -- If TOC type is "normal" (between 200 and 2500 entries), do the following, in order: -- 1. look up and expand the `toc_template` templates (normal or umbrella, depending on whether there is -- a current language); -- 2. do the default behavior, which is as follows: -- 2a. look up a language-specific "normal" template according to the current language (using English if there -- is no current language); -- 2b. look up a script-specific "normal" template according to the first script of the current language (using -- English if there is no current language); -- 2c. display nothing. local data_source if self._lang or self._info.raw then data_source = self._data else data_source = self._data.umbrella end if data_source then if toc_type == "full" then templates = data_source.toc_template_full fallback_templates = data_source.toc_template else templates = data_source.toc_template end end local text = self:get_template_text(templates) if text then return text elseif text == false then return nil end text = self:get_template_text(fallback_templates) if text then return text elseif text == false then return nil end local default_toc_templates_to_check = {} local lang, sc = self:getCatfixInfo() local langcode = lang and lang:getCode() or "en" local sccode = sc and sc:getCode() or lang and lang:getScriptCodes()[1] or "Latn" -- FIXME: What is toctemplateprefix used for? local tocname = (self._data.toctemplateprefix or "") .. "categoryTOC" if toc_type == "full" then insert(default_toc_templates_to_check, ("%s-%s/full"):format(langcode, tocname)) insert(default_toc_templates_to_check, ("%s-%s/full"):format(sccode, tocname)) end insert(default_toc_templates_to_check, ("%s-%s"):format(langcode, tocname)) insert(default_toc_templates_to_check, ("%s-%s"):format(sccode, tocname)) for _, toc_template in ipairs(default_toc_templates_to_check) do local toc_template_text = expand_toc_template_if(toc_template) if toc_template_text then return toc_template_text end end return nil end function Category:getInfo() return self._info end function Category:getDataModule() return self._data.module end function Category:canBeEmpty() if self._lang or self._info.raw then return self._data.can_be_empty end return self._data.umbrella and self._data.umbrella.can_be_empty end function Category:isHidden() if self._lang or self._info.raw then return self._data.hidden end return self._data.umbrella and self._data.umbrella.hidden end function Category:getCategoryName() if self._info.raw then return self._info.canonical_name or self._info.label elseif self._lang then local ret = self._lang:getCanonicalName() .. " " .. self._info.label if self._sc then ret = ret .. " in " .. self._sc:getDisplayForm(self._lang) end return ucfirst(ret) end local ret = ucfirst(self._info.label) if not (self._data.no_by_language or self._data.umbrella and self._data.umbrella.no_by_language) then ret = ret .. " by language" end return ret end function Category:getTopright() if self._lang or self._info.raw then return self:substitute_template_specs(self._data.topright) end return self._data.umbrella and self:substitute_template_specs(self._data.umbrella.topright) end function Category:display_title(displaytitle, lang) if type(displaytitle) == "string" then displaytitle = self:substitute_template_specs(displaytitle) else displaytitle = displaytitle(self:getCategoryName(), lang) end mw.getCurrentFrame():callParserFunction("DISPLAYTITLE", "Category:" .. displaytitle) end function Category:get_labels_categorizing() local m_labels_utilities = require(labels_utilities_module) local pos_cat_labels, sense_cat_labels, use_tlb pos_cat_labels = m_labels_utilities.find_labels_for_category(self._info.label, "pos", self._lang) local sense_label = self._info.label:match("^(.*) terms$") if sense_label then use_tlb = true else sense_label = self._info.label:match("^terms with (.*) senses$") end if not sense_label then return nil end sense_cat_labels = m_labels_utilities.find_labels_for_category(sense_label, "sense", self._lang) if use_tlb then return m_labels_utilities.format_labels_categorizing(pos_cat_labels, sense_cat_labels, self._lang) end local all_labels = pos_cat_labels for k, v in pairs(sense_cat_labels) do all_labels[k] = v end return m_labels_utilities.format_labels_categorizing(all_labels, nil, self._lang) end -- FIXME: this is clunky. local function remove_lang_params(desc) -- Simply remove a language name/code/category from the beginning of the string, but replace the language name -- in the middle of the string with either "specific languages" or "specific-language" depending on whether the -- language name appears to be an attributive qualifier of another noun or to stand by itself. This may be wrong, -- in which case the category in question should supply its own umbrella description. desc = desc:gsub("^{{{langname}}} ", "") :gsub("{{{langname}}} %(", "specific languages (") :gsub("{{{langname}}}([.,])", "specific languages%1") :gsub("{{{langname}}} ", "specific-language ") :gsub("{{{langdisp}}}", "specific languages") :gsub("{{{langlink}}}", "specific languages") return desc end function Category:getDescription(isChild) -- Allows different text in the list of a category's children local isChild = isChild == "child" if self._lang or self._info.raw then if not isChild and self._data.displaytitle then self:display_title(self._data.displaytitle, self._lang) end if self._sc then return self:getCategoryName() .. "." end local desc = self:substitute_template_specs(self._data.description) if not desc then return nil elseif isChild then return desc end return sparse_concat({ self:substitute_template_specs(self._data.preceding), desc, self:substitute_template_specs(self._data.additional), self:substitute_template_specs(self:get_labels_categorizing()), }, "\n\n") end local umbrella = self._data.umbrella if not isChild and umbrella and umbrella.displaytitle then self:display_title(umbrella.displaytitle) end local desc = self:substitute_template_specs(umbrella and umbrella.description) local has_umbrella_desc = not not desc if not desc then desc = self:convert_spec_to_string(self._data.description) if desc then desc = remove_lang_params(desc) desc = lcfirst(desc) desc = desc:gsub("%.$", "") desc = "Categories with " .. desc .. "." else desc = "Categories with " .. self._info.label .. " in various specific languages." end desc = self:substitute_template_specs(desc) end if isChild then return desc end return sparse_concat({ self:substitute_template_specs(umbrella and umbrella.preceding or not has_umbrella_desc and self._data.preceding), desc, self:substitute_template_specs(umbrella and umbrella.additional or not has_umbrella_desc and self._data.additional), self:substitute_template_specs("{{{umbrella_msg}}}"), self:substitute_template_specs(self:get_labels_categorizing()), }, "\n\n") end function Category:new_sortkey(sortkey) local sortkey_type = type(sortkey) if sortkey_type == "string" then sortkey = uupper(sortkey) elseif sortkey_type == "table" then function sortkey:makeSortKey() local sort_func = self.sort_func if sort_func ~= nil then return sort_func(self.sort_base) end local lang = self.lang if lang == nil then return self.sort_base end lang = get_lang(lang, nil, true) if lang == nil then return self.sort_base end local sc = self.sc if sc ~= nil then sc = get_script(sc) end return lang:makeSortKey(self.sort_base, sc) end end return sortkey end function Category:inherit_spec(spec, parent_spec, substitute_result) if spec == false then return nil end local retval = spec or parent_spec if substitute_result then retval = self:substitute_template_specs(retval) end return retval end function Category:canonicalize_parents_children(cats, is_children, fallback_sort_key, fallback_sort_base) if not cats then return nil elseif type(cats) == "table" then if cats.name or cats.module then cats = {cats} elseif #cats == 0 then return nil end else cats = {cats} end local ret = {} for _, cat in ipairs(cats) do if type(cat) ~= "table" or not cat.name and not cat.module then cat = {name = cat} end insert(ret, cat) end local is_umbrella = not self._lang and not self._info.raw local table_type = is_children and "extra_children" or "parents" for i, cat in ipairs(ret) do local raw if self._info.raw or is_umbrella then raw = not cat.is_label else raw = cat.raw end local lang = self:inherit_spec(cat.lang, not raw and self._info.code or nil, "substitute") local sc = self:inherit_spec(cat.sc, not raw and self._info.sc or nil, "substitute") -- Get the sortkey. local sortkey = self:inherit_spec(cat.sort, i == 1 and (fallback_sort_key or fallback_sort_base and {sort_base = fallback_sort_base}) or nil) if type(sortkey) == "table" then sortkey.sort_base = self:substitute_template_specs(sortkey.sort_base) or internal_error("Missing .sort_base in '" .. table_type .. "' .sort table for '" .. self._info.label .. "' category entry in module '" .. (self._data.module or "unknown") .. "'") if sortkey.sort_func then -- Not allowed to give a lang and/or script if sort_func is given. local bad_spec = sortkey.lang and "lang" or sortkey.sc and "sc" or nil if bad_spec then internal_error("Cannot specify both ." .. bad_spec .. " and .sort_func in '" .. table_type .. "' .sort table for '" .. self._info.label .. "' category entry in module '" .. (self._data.module or "unknown") .. "'") end else sortkey.lang = self:inherit_spec(sortkey.lang, lang, "substitute") sortkey.sc = self:inherit_spec(sortkey.sc, sc, "substitute") end else sortkey = self:substitute_template_specs(sortkey) end local name if cat.module then -- A reference to a category using another category tree module. if not cat.args then internal_error("Missing .args in '" .. table_type .. "' table with module=\"" .. cat.module .. "\" for '" .. self._info.label .. "' category entry in module '" .. (self._data.module or "unknown") .. "'") end name = require("Module:category tree/" .. cat.module).new(self:substitute_template_specs_in_args(cat.args)) else name = cat.name if not name then internal_error("Missing .name in " .. (is_umbrella and "umbrella " or "") .. "'" .. table_type .. "' table for '" .. self._info.label .. "' category entry in module '" .. (self._data.module or "unknown") .. "'") elseif type(name) == "string" then -- otherwise, assume it's a category object and use it directly name = self:substitute_template_specs(name) if name:find("^Category:") then -- It's a non-poscatboiler category name. sortkey = sortkey or is_children and name:gsub("^Category:", "") or self:getCategoryName() else -- It's a label. sortkey = sortkey or is_children and name or self._info.label name = self:make_new{ label = name, code = lang, sc = sc, raw = raw, args = self:substitute_template_specs_in_args(cat.args) } end end end sortkey = sortkey or is_children and " " or self._info.label ret[i] = { name = name, description = is_children and self:substitute_template_specs(cat.description) or nil, sort = self:new_sortkey(sortkey) } end return ret end function Category:getParents() local is_umbrella, ret = not self._lang and not self._info.raw if self._sc then local parent1 = self:make_new{code = self._info.code, label = "terms in " .. self._sc:getDisplayForm(self._lang)} local parent2 = self:make_new{code = self._info.code, label = self._info.label, raw = self._info.raw, args = self._info.args} ret = { {name = parent1, sort = self._sc:getCanonicalName(self._lang)}, {name = parent2, sort = self._sc:getCanonicalName(self._lang)}, } else local parents, fallback_sort_base, fallback_sort_key if is_umbrella then parents = self._data.umbrella and self._data.umbrella.parents or self._data.umbrella_parents fallback_sort_base = self._data.umbrella and (self._data.umbrella.breadcrumb_base or self._data.umbrella.breadcrumb_and_first_sort_base) or nil fallback_sort_key = self._data.umbrella and (self._data.umbrella.breadcrumb_key or self._data.umbrella.breadcrumb_and_first_sort_key) or nil else parents = self._data.parents fallback_sort_base = self._data.breadcrumb_base or self._data.breadcrumb_and_first_sort_base fallback_sort_key = self._data.breadcrumb_key or self._data.breadcrumb_and_first_sort_key end ret = self:canonicalize_parents_children(parents, nil, fallback_sort_key, fallback_sort_base) if not ret then return nil end end local self_cat = self:getCategoryName() for _, parent in ipairs(ret) do local parent_cat = parent.name.getCategoryName and parent.name:getCategoryName() if self_cat == parent_cat then internal_error(("Infinite loop would occur, as parent category '%s' is the same as the child category"):format(self_cat)) end end return ret end function Category:getChildren() local is_umbrella = not self._lang and not self._info.raw local children = self._data.children local ret = {} if not is_umbrella and children then for _, child in ipairs(children) do child = mw.clone(child) if type(child) ~= "table" then child = {name = child} end if not child.sort then child.sort = child.name end -- FIXME, is preserving the script correct? child.name = self:make_new{code = self._info.code, label = child.name, raw = child.raw, sc = self._info.sc} insert(ret, child) end end local extra_children if is_umbrella then extra_children = self._data.umbrella and self._data.umbrella.extra_children else extra_children = self._data.extra_children end extra_children = self:canonicalize_parents_children(extra_children, "children") if extra_children then for _, child in ipairs(extra_children) do insert(ret, child) end end return #ret > 0 and ret or nil end function Category:getUmbrella() local umbrella = self._data.umbrella if umbrella == false or self._info.raw or not self._lang or self._sc then return nil end -- If `umbrella` is a string, use that; otherwise, use the label. return self:make_new({label = type(umbrella) == "string" and umbrella or self._info.label}) end function Category:getAppendix() -- FIXME, this should be customizable. local lang, label = self._lang, self._info.label if self._info.raw or not (lang and label) then return nil end local appendix = make_title(100, lang:getCanonicalName() .. " " .. label) return appendix.exists and appendix.fullText or nil end function Category:getCatfixInfo() if self._lang or self._sc or self._info.raw then local langcode, sccode = self._data.catfix, self._data.catfix_sc local lang, sc if langcode then langcode = self:substitute_template_specs(langcode) lang = get_lang(langcode, nil, true) elseif langcode == nil then -- not false lang = self._lang end if sccode then sccode = self:substitute_template_specs(sccode) sc = get_script(sccode) elseif sccode == nil then -- not false sc = self._sc end if lang then lang = lang:getFull() end return lang, sc elseif not self._data.umbrella then return end -- umbrella local langcode, sccode = self._data.umbrella.catfix, self._data.umbrella.catfix_sc local lang, sc if langcode then langcode = self:substitute_template_specs(langcode) lang = get_lang(langcode, nil, true) end if sccode then sccode = self:substitute_template_specs(sccode) sc = get_script(sccode) end if lang then lang = lang:getFull() end return lang, sc end function Category:getTOCTemplateName() -- This should only be invoked if getTOC() returns true, meaning to do the default algorithm, but getTOC() -- implements its own default algorithm. internal_error("This should never get called") end local export = {} function export.main(info) local self = setmetatable({_info = info}, Category) self:initCommon() return self._data and self or nil end export.new = Category.new return export 9b7irq94y5jplhe4pd0okuk8aoeevuh 488024 487974 2026-09-04T09:52:51Z SM7 6218 trying भाषा अनुसार in cat name 488024 Scribunto text/plain local lang_independent_data = require("Module:category tree/data") local lang_specific_module = "Module:category tree/lang" local lang_specific_module_prefix = lang_specific_module .. "/" local family_specific_module = "Module:category tree/fam" local family_specific_module_prefix = family_specific_module .. "/" local labels_utilities_module = "Module:labels/utilities" local template_parser_module = "Module:template parser" local concat = table.concat local dump = mw.dumpObject local expand_template = require("Module:frame").expandTemplate local insert = table.insert local is_callable = require("Module:fun").is_callable local lcfirst = require("Module:string utilities").lcfirst local list_to_set = require("Module:table").listToSet local make_title = mw.title.makeTitle local new_title = mw.title.new local parse = require(template_parser_module).parse local sparse_concat = require("Module:table").sparseConcat local tostring = tostring local type = type local ucfirst = require("Module:string utilities").ucfirst local uupper = require("Module:string utilities").upper local function internal_error(msg) error("Internal error: " .. msg) end local function get_lang(...) local _get_lang = require("Module:languages").getByCode function get_lang(...) return _get_lang(...) or require("Module:languages/errorGetBy").code(...) end return get_lang(...) end local function get_script(...) local _get_script = require("Module:scripts").getByCode function get_script(code) return _get_script(code) or require("Module:languages/error")(code, true, "script code") end return get_script(...) end -- Category object local Category = {} Category.__index = Category function Category:get_originating_info() local originating_info = "" if self._info.originating_label then originating_info = " (originating from label \"" .. self._info.originating_label .. "\" in module [[" .. self._info.originating_module .. "]])" end return originating_info end local valid_keys = list_to_set{"code", "label", "sc", "raw", "args", "also", "called_from_inside", "originating_label", "originating_module"} function Category.new(info) for key in pairs(info) do if not valid_keys[key] then internal_error("The parameter \"" .. key .. "\" was not recognized.") end end local self = setmetatable({}, Category) self._info = info if not self._info.label then internal_error("No label was specified.") end self:initCommon() if not self._data then internal_error("The " .. (self._info.raw and "raw " or "") .. "label \"" .. self._info.label .. "\" does not exist" .. self:get_originating_info() .. ".") end return self end function Category:initCommon() local function patch_args(args) -- This fixes the issue with Scribunto automatically converting keys -- in a table as numbers to strings, which in turn causes a circular -- error for having argument parameter names as numbers as strings. if type(args) ~= "table" then return args end local new_args = {} for k, v in pairs(args) do if type(k) == "string" and string.len(k) < 10 and not string.match(k, "^0") and string.match(k, "^%d+$") then new_args[tonumber(k)] = patch_args(v) else new_args[k] = patch_args(v) end end return new_args end local args_handled = false if self._info.raw then -- Check if the category exists local raw_categories = lang_independent_data["RAW_CATEGORIES"] self._data = raw_categories[self._info.label] if self._data then if self._data.lang then self._lang = get_lang(self._data.lang, nil, true) self._info.code = self._lang:getCode() end if self._data.sc then self._sc = get_script(self._data.sc) self._info.sc = self._sc:getCode() end else -- Go through raw handlers local data = { category = self._info.label, args = patch_args(self._info.args) or {}, called_from_inside = self._info.called_from_inside, } for _, handler in ipairs(lang_independent_data["RAW_HANDLERS"]) do self._data, args_handled = handler.handler(data) if self._data then self._data.module = self._data.module or handler.module break end end if self._data then -- Update the label if the handler specified a canonical name for it. if self._data.canonical_name then self._info.canonical_name = self._data.canonical_name end if self._data.lang then if type(self._data.lang) ~= "string" then internal_error("Received non-string value " .. dump(self._data.lang) .. " for self._data.lang, label \"" .. self._info.label .. "\"" .. self:get_originating_info() .. ".") end self._lang = get_lang(self._data.lang, nil, true) self._info.code = self._lang:getCode() end if self._data.sc then if type(self._data.sc) ~= "string" then internal_error("Received non-string value " .. dump(self._data.sc) .. " for self._data.sc, label \"" .. self._info.label .. "\"" .. self:get_originating_info() .. ".") end self._sc = get_script(self._data.sc) self._info.sc = self._sc:getCode() end end end else -- Already parsed into language + label if self._info.code then self._lang = get_lang(self._info.code, nil, true) else self._lang = nil end if self._info.sc then self._sc = get_script(self._info.sc) else self._sc = nil end self._info.orig_label = self._info.label if not self._lang then -- Umbrella categories without a preceding language always begin with a capital letter, but the actual label may be -- lowercase (cf. [[:Category:Nouns by language]] with label 'nouns' with per-language [[:Category:English nouns]]; -- but [[:Category:Reddit slang by language]] with label 'Reddit slang' with per-language -- [[:Category:English Reddit slang]]). Since the label is almost always lowercase, we lowercase it for umbrella -- categories, storing the original into `orig_label`, and correct it later if needed. self._info.label = lcfirst(self._info.label) end -- First, check lang-specific labels and handlers if this is not an umbrella category. if self._lang then local objects_with_modules = require(lang_specific_module) local obj, seen = self._lang, {} local object_specific_module_prefix = lang_specific_module_prefix local is_family = false repeat if objects_with_modules[obj:getCode()] then local module = object_specific_module_prefix .. obj:getCode() local labels_and_handlers = require(module) if labels_and_handlers.LABELS then self._data = labels_and_handlers.LABELS[self._info.label] if self._data then if not is_family and self._data.umbrella == nil and self._data.umbrella_parents == nil then self._data.umbrella = false end self._data.module = self._data.module or module end end if not self._data and labels_and_handlers.HANDLERS then for _, handler in ipairs(labels_and_handlers.HANDLERS) do local data = { label = self._info.label, lang = self._lang, sc = self._sc, args = patch_args(self._info.args) or {}, called_from_inside = self._info.called_from_inside, } self._data, args_handled = handler(data) if self._data then if not is_family and self._data.umbrella == nil and self._data.umbrella_parents == nil then self._data.umbrella = false end self._data.module = self._data.module or module break end end end if self._data then break end end seen[obj:getCode()] = true obj = obj:getFamily() if not is_family then is_family = true object_specific_module_prefix = family_specific_module_prefix objects_with_modules = require(family_specific_module) end until not obj or seen[obj:getCode()] end local function fetch_label_data(labels) self._data = labels[self._info.label] -- See comment above about uppercase- vs. lowercase-initial labels, which are indistinguishable -- in umbrella categories. if not self._data then self._data = labels[self._info.orig_label] if self._data then self._info.label = self._info.orig_label end end end -- Then check lang-independent labels. if not self._data then -- lang_independent_data.LABELS should always exist. fetch_label_data(lang_independent_data.LABELS) if not self._data and not self._lang then -- Check family-specific labels for umbrella label. local families_with_modules = require(family_specific_module) for famcode, _ in pairs(families_with_modules) do local module = family_specific_module_prefix .. famcode local labels_and_handlers = require(module) if labels_and_handlers.LABELS then fetch_label_data(labels_and_handlers.LABELS) if self._data then self._data.module = self._data.module or module break end end end end end -- Then check lang-independent handlers. if not self._data then local data = { label = self._info.label, lang = self._lang, sc = self._sc, args = patch_args(self._info.args) or {}, called_from_inside = self._info.called_from_inside, } for _, handler in ipairs(lang_independent_data["HANDLERS"]) do self._data, args_handled = handler.handler(data) if self._data then self._data.module = self._data.module or handler.module break end end if not self._data and not self._lang then -- Check family-specific labels for umbrella handler. local families_with_modules = require(family_specific_module) for famcode, _ in pairs(families_with_modules) do local module = family_specific_module_prefix .. famcode local labels_and_handlers = require(module) if labels_and_handlers.HANDLERS then for _, handler in ipairs(labels_and_handlers.HANDLERS) do local data = { label = self._info.label, sc = self._sc, args = patch_args(self._info.args) or {}, called_from_inside = self._info.called_from_inside, } self._data, args_handled = handler(data) if self._data then self._data.module = self._data.module or module break end end end if self._data then break end end end end end if not args_handled and self._data and self._info.args and next(self._info.args) then local module_text = " (handled in [[" .. (self._data.module or "UNKNOWN").. "]])" local args_text = {} for k, v in pairs(self._info.args) do insert(args_text, k .. "=" .. ((type(v) == "string" or type(v) == "number") and v or dump(v))) end error("poscatboiler label '" .. self._info.label .. "' " .. module_text .. " doesn't accept extra args " .. concat(args_text, ", ")) end if self._sc and not self._lang then internal_error("Umbrella categories cannot have a script specified.") end end function Category:convert_spec_to_string(desc) if not desc then return desc end local desc_type = type(desc) if desc_type == "string" then return desc elseif desc_type == "number" then return tostring(desc) elseif not is_callable(desc) then internal_error("`desc` must be a string, number, function, callable table or nil; received " .. dump(desc)) end desc = desc { lang = self._lang, sc = self._sc, label = self._info.label, raw = self._info.raw, } if not desc then return desc end desc_type = type(desc) if desc_type == "string" then return desc end internal_error("The value returned by `desc` must be a string or nil; received " .. dump(desc)) end local function add_obj_args(args, obj, obj_type, sc_lang) if obj then args[obj_type .. "code"] = obj:getCode() args[obj_type .. "name"] = obj:getCanonicalName(sc_lang) args[obj_type .. "disp"] = obj:getDisplayForm(sc_lang) args[obj_type .. "cat"] = obj:getCategoryName(false, sc_lang) args[obj_type .. "link"] = obj:makeCategoryLink(sc_lang) end end -- Expands `desc` like a template, passing values for specs like {{{langname}}}. function Category:substitute_template_specs(desc) -- This may end up happening twice but that's OK as the function is (usually) idempotent. -- FIXME: Not idempotent if a preprocessed template returns wikicode. desc = self:convert_spec_to_string(desc) if not desc then return nil end -- Populate the substitution arguments. local args = {} args.umbrella_msg = "This is an umbrella category. It contains no dictionary entries, but only other, language-specific categories, which in turn contain relevant terms in a given language." args.umbrella_meta_msg = "This is an umbrella metacategory, covering a general area such as \"lemmas\", \"names\" or \"terms by etymology\". It contains no dictionary entries, but holds only umbrella (\"by language\") categories covering specific subtopics, which in turn contain language-specific categories holding terms in a given language for that same topic." add_obj_args(args, self._lang, "lang") add_obj_args(args, self._sc, "sc", self._lang) return parse(desc, true):expand(args) end function Category:substitute_template_specs_in_args(args) if not args then return args end local pinfo = {} for k, v in pairs(args) do pinfo[self:substitute_template_specs(k)] = self:substitute_template_specs(v) end return pinfo end function Category:make_new(info) info.originating_label = self._info.label info.originating_module = self._data.module info.called_from_inside = true return Category.new(info) end function Category:getBreadcrumbName() local ret if self._sc then -- The parent of 'LANG POS in SCRIPT script' is always 'SCRIPT script' regardless of the parents normally set, -- so the breadcrumb should always be 'POS' regardless of the breadcrumb normally set. return self._info.label, nil end if self._lang or self._info.raw then ret = self._data.breadcrumb or self._data.breadcrumb_base or self._data.breadcrumb_and_first_sort_base or self._data.breadcrumb_key or self._data.breadcrumb_and_first_sort_key or nil else ret = self._data.umbrella and (self._data.umbrella.breadcrumb or self._data.umbrella.breadcrumb_base or self._data.umbrella.breadcrumb_and_first_sort_base or self._data.umbrella.breadcrumb_key or self._data.umbrella.breadcrumb_and_first_sort_key) or nil end if not ret then ret = self._info.label end if type(ret) ~= "table" then ret = {name = ret} end return self:substitute_template_specs(ret.name), ret.nocap end local function expand_toc_template_if(template) local template_obj = new_title(template, 10) if template_obj.exists then return expand_template{title = template_obj.text} end return nil end -- Return the textual expansion of the first existing template among the given templates, first performing -- substitutions on the template name such as replacing {{{langcode}}} with the current language's code (if any). -- If no templates exist after expansion, or if nil is passed in, return nil. If a single string is passed in, -- treat it like a one-element list consisting of that string. function Category:get_template_text(templates) if templates == nil then return nil elseif type(templates) ~= "table" then templates = {templates} end for _, template in ipairs(templates) do if template == false then return false end template = self:substitute_template_specs(template) return expand_toc_template_if(template) end return nil end function Category:getTOC(toc_type) -- Type "none" means everything fits on a single page; in that case, display nothing. if toc_type == "none" then return nil end local templates, fallback_templates -- If TOC type is "full" (more than 2500 entries), do the following, in order: -- 1. look up and expand the `toc_template_full` templates (normal or umbrella, depending on whether there is -- a current language); -- 2. look up and expand the `toc_template` templates (normal or umbrella, as above); -- 3. do the default behavior, which is as follows: -- 3a. look up a language-specific "full" template according to the current language (using English if there -- is no current language); -- 3b. look up a script-specific "full" template according to the first script of current language (using English -- if there is no current language); -- 3c. look up a language-specific "normal" template according to the current language (using English if there -- is no current language); -- 3d. look up a script-specific "normal" template according to the first script of the current language (using -- English if there is no current language); -- 3e. display nothing. -- -- If TOC type is "normal" (between 200 and 2500 entries), do the following, in order: -- 1. look up and expand the `toc_template` templates (normal or umbrella, depending on whether there is -- a current language); -- 2. do the default behavior, which is as follows: -- 2a. look up a language-specific "normal" template according to the current language (using English if there -- is no current language); -- 2b. look up a script-specific "normal" template according to the first script of the current language (using -- English if there is no current language); -- 2c. display nothing. local data_source if self._lang or self._info.raw then data_source = self._data else data_source = self._data.umbrella end if data_source then if toc_type == "full" then templates = data_source.toc_template_full fallback_templates = data_source.toc_template else templates = data_source.toc_template end end local text = self:get_template_text(templates) if text then return text elseif text == false then return nil end text = self:get_template_text(fallback_templates) if text then return text elseif text == false then return nil end local default_toc_templates_to_check = {} local lang, sc = self:getCatfixInfo() local langcode = lang and lang:getCode() or "hi" local sccode = sc and sc:getCode() or lang and lang:getScriptCodes()[1] or "Latn" -- FIXME: What is toctemplateprefix used for? local tocname = (self._data.toctemplateprefix or "") .. "categoryTOC" if toc_type == "full" then insert(default_toc_templates_to_check, ("%s-%s/full"):format(langcode, tocname)) insert(default_toc_templates_to_check, ("%s-%s/full"):format(sccode, tocname)) end insert(default_toc_templates_to_check, ("%s-%s"):format(langcode, tocname)) insert(default_toc_templates_to_check, ("%s-%s"):format(sccode, tocname)) for _, toc_template in ipairs(default_toc_templates_to_check) do local toc_template_text = expand_toc_template_if(toc_template) if toc_template_text then return toc_template_text end end return nil end function Category:getInfo() return self._info end function Category:getDataModule() return self._data.module end function Category:canBeEmpty() if self._lang or self._info.raw then return self._data.can_be_empty end return self._data.umbrella and self._data.umbrella.can_be_empty end function Category:isHidden() if self._lang or self._info.raw then return self._data.hidden end return self._data.umbrella and self._data.umbrella.hidden end function Category:getCategoryName() if self._info.raw then return self._info.canonical_name or self._info.label elseif self._lang then local ret = self._lang:getCanonicalName() .. " " .. self._info.label if self._sc then ret = ret .. " in " .. self._sc:getDisplayForm(self._lang) end return ucfirst(ret) end local ret = ucfirst(self._info.label) if not (self._data.no_by_language or self._data.umbrella and self._data.umbrella.no_by_language) then ret = ret .. " भाषा अनुसार" end return ret end function Category:getTopright() if self._lang or self._info.raw then return self:substitute_template_specs(self._data.topright) end return self._data.umbrella and self:substitute_template_specs(self._data.umbrella.topright) end function Category:display_title(displaytitle, lang) if type(displaytitle) == "string" then displaytitle = self:substitute_template_specs(displaytitle) else displaytitle = displaytitle(self:getCategoryName(), lang) end mw.getCurrentFrame():callParserFunction("DISPLAYTITLE", "श्रेणी:" .. displaytitle) end function Category:get_labels_categorizing() local m_labels_utilities = require(labels_utilities_module) local pos_cat_labels, sense_cat_labels, use_tlb pos_cat_labels = m_labels_utilities.find_labels_for_category(self._info.label, "pos", self._lang) local sense_label = self._info.label:match("^(.*) terms$") if sense_label then use_tlb = true else sense_label = self._info.label:match("^terms with (.*) senses$") end if not sense_label then return nil end sense_cat_labels = m_labels_utilities.find_labels_for_category(sense_label, "sense", self._lang) if use_tlb then return m_labels_utilities.format_labels_categorizing(pos_cat_labels, sense_cat_labels, self._lang) end local all_labels = pos_cat_labels for k, v in pairs(sense_cat_labels) do all_labels[k] = v end return m_labels_utilities.format_labels_categorizing(all_labels, nil, self._lang) end -- FIXME: this is clunky. local function remove_lang_params(desc) -- Simply remove a language name/code/category from the beginning of the string, but replace the language name -- in the middle of the string with either "specific languages" or "specific-language" depending on whether the -- language name appears to be an attributive qualifier of another noun or to stand by itself. This may be wrong, -- in which case the category in question should supply its own umbrella description. desc = desc:gsub("^{{{langname}}} ", "") :gsub("{{{langname}}} %(", "specific languages (") :gsub("{{{langname}}}([.,])", "specific languages%1") :gsub("{{{langname}}} ", "specific-language ") :gsub("{{{langdisp}}}", "specific languages") :gsub("{{{langlink}}}", "specific languages") return desc end function Category:getDescription(isChild) -- Allows different text in the list of a category's children local isChild = isChild == "child" if self._lang or self._info.raw then if not isChild and self._data.displaytitle then self:display_title(self._data.displaytitle, self._lang) end if self._sc then return self:getCategoryName() .. "." end local desc = self:substitute_template_specs(self._data.description) if not desc then return nil elseif isChild then return desc end return sparse_concat({ self:substitute_template_specs(self._data.preceding), desc, self:substitute_template_specs(self._data.additional), self:substitute_template_specs(self:get_labels_categorizing()), }, "\n\n") end local umbrella = self._data.umbrella if not isChild and umbrella and umbrella.displaytitle then self:display_title(umbrella.displaytitle) end local desc = self:substitute_template_specs(umbrella and umbrella.description) local has_umbrella_desc = not not desc if not desc then desc = self:convert_spec_to_string(self._data.description) if desc then desc = remove_lang_params(desc) desc = lcfirst(desc) desc = desc:gsub("%.$", "") desc = "Categories with " .. desc .. "." else desc = "Categories with " .. self._info.label .. " in various specific languages." end desc = self:substitute_template_specs(desc) end if isChild then return desc end return sparse_concat({ self:substitute_template_specs(umbrella and umbrella.preceding or not has_umbrella_desc and self._data.preceding), desc, self:substitute_template_specs(umbrella and umbrella.additional or not has_umbrella_desc and self._data.additional), self:substitute_template_specs("{{{umbrella_msg}}}"), self:substitute_template_specs(self:get_labels_categorizing()), }, "\n\n") end function Category:new_sortkey(sortkey) local sortkey_type = type(sortkey) if sortkey_type == "string" then sortkey = uupper(sortkey) elseif sortkey_type == "table" then function sortkey:makeSortKey() local sort_func = self.sort_func if sort_func ~= nil then return sort_func(self.sort_base) end local lang = self.lang if lang == nil then return self.sort_base end lang = get_lang(lang, nil, true) if lang == nil then return self.sort_base end local sc = self.sc if sc ~= nil then sc = get_script(sc) end return lang:makeSortKey(self.sort_base, sc) end end return sortkey end function Category:inherit_spec(spec, parent_spec, substitute_result) if spec == false then return nil end local retval = spec or parent_spec if substitute_result then retval = self:substitute_template_specs(retval) end return retval end function Category:canonicalize_parents_children(cats, is_children, fallback_sort_key, fallback_sort_base) if not cats then return nil elseif type(cats) == "table" then if cats.name or cats.module then cats = {cats} elseif #cats == 0 then return nil end else cats = {cats} end local ret = {} for _, cat in ipairs(cats) do if type(cat) ~= "table" or not cat.name and not cat.module then cat = {name = cat} end insert(ret, cat) end local is_umbrella = not self._lang and not self._info.raw local table_type = is_children and "extra_children" or "parents" for i, cat in ipairs(ret) do local raw if self._info.raw or is_umbrella then raw = not cat.is_label else raw = cat.raw end local lang = self:inherit_spec(cat.lang, not raw and self._info.code or nil, "substitute") local sc = self:inherit_spec(cat.sc, not raw and self._info.sc or nil, "substitute") -- Get the sortkey. local sortkey = self:inherit_spec(cat.sort, i == 1 and (fallback_sort_key or fallback_sort_base and {sort_base = fallback_sort_base}) or nil) if type(sortkey) == "table" then sortkey.sort_base = self:substitute_template_specs(sortkey.sort_base) or internal_error("Missing .sort_base in '" .. table_type .. "' .sort table for '" .. self._info.label .. "' category entry in module '" .. (self._data.module or "unknown") .. "'") if sortkey.sort_func then -- Not allowed to give a lang and/or script if sort_func is given. local bad_spec = sortkey.lang and "lang" or sortkey.sc and "sc" or nil if bad_spec then internal_error("Cannot specify both ." .. bad_spec .. " and .sort_func in '" .. table_type .. "' .sort table for '" .. self._info.label .. "' category entry in module '" .. (self._data.module or "unknown") .. "'") end else sortkey.lang = self:inherit_spec(sortkey.lang, lang, "substitute") sortkey.sc = self:inherit_spec(sortkey.sc, sc, "substitute") end else sortkey = self:substitute_template_specs(sortkey) end local name if cat.module then -- A reference to a category using another category tree module. if not cat.args then internal_error("Missing .args in '" .. table_type .. "' table with module=\"" .. cat.module .. "\" for '" .. self._info.label .. "' category entry in module '" .. (self._data.module or "unknown") .. "'") end name = require("Module:category tree/" .. cat.module).new(self:substitute_template_specs_in_args(cat.args)) else name = cat.name if not name then internal_error("Missing .name in " .. (is_umbrella and "umbrella " or "") .. "'" .. table_type .. "' table for '" .. self._info.label .. "' category entry in module '" .. (self._data.module or "unknown") .. "'") elseif type(name) == "string" then -- otherwise, assume it's a category object and use it directly name = self:substitute_template_specs(name) if name:find("^Category:") then -- It's a non-poscatboiler category name. sortkey = sortkey or is_children and name:gsub("^श्रेणी:", "") or self:getCategoryName() else -- It's a label. sortkey = sortkey or is_children and name or self._info.label name = self:make_new{ label = name, code = lang, sc = sc, raw = raw, args = self:substitute_template_specs_in_args(cat.args) } end end end sortkey = sortkey or is_children and " " or self._info.label ret[i] = { name = name, description = is_children and self:substitute_template_specs(cat.description) or nil, sort = self:new_sortkey(sortkey) } end return ret end function Category:getParents() local is_umbrella, ret = not self._lang and not self._info.raw if self._sc then local parent1 = self:make_new{code = self._info.code, label = "terms in " .. self._sc:getDisplayForm(self._lang)} local parent2 = self:make_new{code = self._info.code, label = self._info.label, raw = self._info.raw, args = self._info.args} ret = { {name = parent1, sort = self._sc:getCanonicalName(self._lang)}, {name = parent2, sort = self._sc:getCanonicalName(self._lang)}, } else local parents, fallback_sort_base, fallback_sort_key if is_umbrella then parents = self._data.umbrella and self._data.umbrella.parents or self._data.umbrella_parents fallback_sort_base = self._data.umbrella and (self._data.umbrella.breadcrumb_base or self._data.umbrella.breadcrumb_and_first_sort_base) or nil fallback_sort_key = self._data.umbrella and (self._data.umbrella.breadcrumb_key or self._data.umbrella.breadcrumb_and_first_sort_key) or nil else parents = self._data.parents fallback_sort_base = self._data.breadcrumb_base or self._data.breadcrumb_and_first_sort_base fallback_sort_key = self._data.breadcrumb_key or self._data.breadcrumb_and_first_sort_key end ret = self:canonicalize_parents_children(parents, nil, fallback_sort_key, fallback_sort_base) if not ret then return nil end end local self_cat = self:getCategoryName() for _, parent in ipairs(ret) do local parent_cat = parent.name.getCategoryName and parent.name:getCategoryName() if self_cat == parent_cat then internal_error(("Infinite loop would occur, as parent category '%s' is the same as the child category"):format(self_cat)) end end return ret end function Category:getChildren() local is_umbrella = not self._lang and not self._info.raw local children = self._data.children local ret = {} if not is_umbrella and children then for _, child in ipairs(children) do child = mw.clone(child) if type(child) ~= "table" then child = {name = child} end if not child.sort then child.sort = child.name end -- FIXME, is preserving the script correct? child.name = self:make_new{code = self._info.code, label = child.name, raw = child.raw, sc = self._info.sc} insert(ret, child) end end local extra_children if is_umbrella then extra_children = self._data.umbrella and self._data.umbrella.extra_children else extra_children = self._data.extra_children end extra_children = self:canonicalize_parents_children(extra_children, "children") if extra_children then for _, child in ipairs(extra_children) do insert(ret, child) end end return #ret > 0 and ret or nil end function Category:getUmbrella() local umbrella = self._data.umbrella if umbrella == false or self._info.raw or not self._lang or self._sc then return nil end -- If `umbrella` is a string, use that; otherwise, use the label. return self:make_new({label = type(umbrella) == "string" and umbrella or self._info.label}) end function Category:getAppendix() -- FIXME, this should be customizable. local lang, label = self._lang, self._info.label if self._info.raw or not (lang and label) then return nil end local appendix = make_title(100, lang:getCanonicalName() .. " " .. label) return appendix.exists and appendix.fullText or nil end function Category:getCatfixInfo() if self._lang or self._sc or self._info.raw then local langcode, sccode = self._data.catfix, self._data.catfix_sc local lang, sc if langcode then langcode = self:substitute_template_specs(langcode) lang = get_lang(langcode, nil, true) elseif langcode == nil then -- not false lang = self._lang end if sccode then sccode = self:substitute_template_specs(sccode) sc = get_script(sccode) elseif sccode == nil then -- not false sc = self._sc end if lang then lang = lang:getFull() end return lang, sc elseif not self._data.umbrella then return end -- umbrella local langcode, sccode = self._data.umbrella.catfix, self._data.umbrella.catfix_sc local lang, sc if langcode then langcode = self:substitute_template_specs(langcode) lang = get_lang(langcode, nil, true) end if sccode then sccode = self:substitute_template_specs(sccode) sc = get_script(sccode) end if lang then lang = lang:getFull() end return lang, sc end function Category:getTOCTemplateName() -- This should only be invoked if getTOC() returns true, meaning to do the default algorithm, but getTOC() -- implements its own default algorithm. internal_error("This should never get called") end local export = {} function export.main(info) local self = setmetatable({_info = info}, Category) self:initCommon() return self._data and self or nil end export.new = Category.new return export 8jdho83kxlqe1r9l6zdoa32w4ubrjqx मॉड्यूल:auto cat 828 302412 488018 477704 2026-09-04T09:06:07Z SM7 6218 trying भाषा अनुसार in cat name 488018 Scribunto text/plain local export = {} -- Used in multiple places; create a variable for ease in testing. local poscatboiler_submodule = "poscatboiler" local function splitLabelLang(titleObject) local getByCanonicalName = require("Module:languages").getByCanonicalName local canonicalName local lang -- Progressively add another word to the potential canonical name until it -- matches an actual canonical name. local words = mw.text.split(titleObject.text, " ") for i = #words - 1, 1, -1 do canonicalName = table.concat(words, " ", 1, i) lang = getByCanonicalName(canonicalName) if lang then break end end local label = lang and titleObject.text:sub(#canonicalName + 2) or titleObject.text return label, lang end -- Add the arguments in `source` to those in `receiver`, offsetting numeric arguments by `offset`. local function add_args(receiver, source, offset) for k, v in pairs(source) do if type(k) == "number" then receiver[k + offset] = v else receiver[k] = v end end return receiver end -- List of handler functions that try to match the page name. -- A handler should return a table of template title plus arguments -- that is passed to frame:expandTemplate. -- If a handler does not recognise the page name, it should return nil. -- Note that the order of functions matters! local handlers = {} local function add_handler(func) table.insert(handlers, func) end -- Topical categories add_handler(function(titleObject) if not titleObject.text:find("^[a-z-]+:.") then return nil end local code, label = titleObject.text:match("^([a-z-]+):(.+)$") return {title = "topic cat", args = {code, label}} end) -- Letter names add_handler(function(titleObject) if not titleObject.text:find("letter names$") then return nil end local langCode = titleObject.text:match("^([^:]+):") local lang, cat if langCode then lang = require("Module:languages").getByCode(langCode) or error('भाषा कोड "' .. langCode .. '" वैध नहीं है।') cat = titleObject.text:match(":(.+)$") else cat = titleObject.text end return {title = "topic cat", args = {lang and lang:getCode() or nil, cat}} end) -- letter cat add_handler(function(titleObject) -- Only recognize cases consisting of an uppercase letter followed by the -- corresponding lowercase letter, either as the entire category name or -- followed by a colon (for cases like [[Category:Gg: ⠛]]). Cases that -- don't fit this profile (e.g. for Turkish [[Category:İi]] and -- [[Category:Iı]]) need to call {{letter cat}} directly. Formerly this -- handler was much less restrictive and would fire on categories named -- [[Category:zh:]], [[Category:RFQ]], etc. local upper, lower = mw.ustring.match(titleObject.text, "^(%u)(%l)%f[:%z]") if not upper or mw.ustring.upper(lower) ~= upper then return nil end return {title = "letter cat"} end) -- poscatboiler lang-specific add_handler(function(titleObject, args) local label, lang = splitLabelLang(titleObject) if lang then local baseLabel, script = label:match("(.+) in (.-) script$") if script and baseLabel ~= "terms" then local scriptObj = require("Module:scripts").getByCanonicalName(script) if scriptObj then return {title = poscatboiler_submodule, args = add_args({lang:getCode(), baseLabel, scriptObj:getCode()}, args, 3)}, true end end return {title = poscatboiler_submodule, args = add_args({lang:getCode(), label}, args, 3)}, true end end) -- poscatboiler umbrella category add_handler(function(titleObject, args) local label = titleObject.text:match("(.+) भाषा अनुसार$") if label then return { title = poscatboiler_submodule, args = add_args({nil, mw.getContentLanguage():lcfirst(label)}, args, 3) }, true end end) -- topic cat add_handler(function(titleObject) return {title = "topic cat", args = {nil, titleObject.text}} end) -- poscatboiler raw handlers add_handler(function(titleObject, args) local args = add_args({nil, titleObject.text}, args, 3) args.raw = true return { title = poscatboiler_submodule, args = args, }, true end) -- poscatboiler umbrella handlers without 'by language' add_handler(function(titleObject, args) local args = add_args({nil, mw.getContentLanguage():lcfirst(titleObject.text)}, args, 3) return { title = poscatboiler_submodule, args = args, }, true end) function export.show(frame) local args = frame:getParent().args local titleObject = mw.title.getCurrentTitle() if titleObject.nsText == "साँचा" then return "(This template should be used on pages in the Category: namespace.)" elseif titleObject.nsText ~= "श्रेणी" then error("This template/module can only be used on pages in the Category: namespace.") end local function extra_args_error(templateObject) local numargstext = {} local argstext = {} local maxargnum = 0 for k, v in pairs(templateObject.args) do if type(v) == "number" and v > maxargnum then maxargnum = v else table.insert(numargstext, "|" .. k .. "=" .. v) end end for i = 1, maxargnum do local v = templateObject.args[i] if v == nil then v = "(nil)" elseif v == true then v = "(true)" elseif v == false then v = "(false)" end table.insert(argstext, "|" .. v) end error("Extra arguments to {{auto cat}} not allowed for this category (recognized as {{[[साँचा:" .. templateObject.title .. "|" .. templateObject.title .. "]]" .. numargstext .. argstext .. "}}") end local first_error_templateObject, first_error_args_handled, first_error_cattext -- Go through each handler in turn. If a handler doesn't recognize the format of the -- category, it will return nil, and we will consider the next handler. Otherwise, -- it returns a template name and arguments to call it with, but even then, that template -- might return an error, and we need to consider the next handler. This happens, -- for example, with the category "CAT:Mato Grosso, Brazil", where "Mato" is the name of -- a language, so the handler for {{poscatboiler}} fires and tries to find a label -- "Grosso, Brazil". This throws an error, and previously, this blocked fruther handler -- consideration, but now we check for the error and continue checking handlers; -- eventually, {{topic cat}} will fire and correctly handle the category. for _, handler in ipairs(handlers) do local templateObject, args_handled = handler(titleObject, args) if templateObject then require("Module:debug").track("auto cat/" .. templateObject.title) local cattext = frame:expandTemplate(templateObject) -- FIXME! We check for specific text found in most or all error messages generated -- by category tree templates (in particular, the second piece of text below should be -- in all error messages generated when a given module doesn't recognize a category name). -- If this text ever changes in the source modules (e.g. [[Module:category tree]], -- it needs to be changed here as well.) if cattext:find("श्रेणी:अवैध लेबल वाली श्रेणियाँ") or cattext:find("The automatically%-generated contents of this category has errors") then if not first_error_cattext then first_error_templateObject = templateObject first_error_args_handled = args_handled first_error_cattext = cattext end else if not args_handled and next(args) then extra_args_error(templateObject) end return cattext end end end if first_error_cattext then if not first_error_args_handled and next(args) then extra_args_error(first_error_templateObject) end return first_error_cattext end error("{{auto cat}} द्वारा श्रेणी नाम प्रारूप नहीं पहचाना जा सका।") end -- test function for injecting title string function export.test(title) if type(title) == "table" then if type(title.args[1]) == "string" then title = title.args[1] else title = title:getParent().args[1] end end local titleObject = {} titleObject.text = title for _, handler in ipairs(handlers) do local t = handler(titleObject) if t then return t.title end end end return export h8zi4m8us1x5t4jh1uo1tj19b7kyzym मॉड्यूल:Message box 828 302852 487955 477525 2026-09-03T19:49:12Z SM7 6218 updating... 487955 Scribunto text/plain local html_create = mw.html.create local tostring = tostring local export = {} local function make_box(tag, rows, image, header, text) tag = tag:addClass("noprint") :tag("table") :tag("tr") :tag("td") if rows > 1 then tag:attr("rowspan", rows) end tag = tag:wikitext(image) :done() if header then tag = tag:node(header) :done() :tag("tr") end return tostring(tag:tag("td") :wikitext(text) :allDone()) .. require("Module:TemplateStyles")("Module:message box/styles.css") end function export.maintenance(color, image, title, text) local div = html_create("div") :addClass("maintenance-box") :addClass("maintenance-box-" .. color) local header = html_create("th") :css("text-align", "left") :wikitext(title) return make_box(div, 2, image, header, text) end function export.request(image, text) local div = html_create("div") :addClass("request-box") return make_box(div, 1, image, nil, text) end return export 0njvtu4cuuvz98uci9fdhcz9qzscuod मॉड्यूल:affix 828 303047 487927 479696 2026-09-03T17:12:06Z SM7 6218 updating... 487927 Scribunto text/plain local export = {} local debug_force_cat = false -- if set to true, always display categories even on userspace pages local m_links = require("Module:links") local m_str_utils = require("Module:string utilities") local m_table = require("Module:table") local en_utilities_module = "Module:en-utilities" local etymology_module = "Module:etymology" local pron_qualifier_module = "Module:pron qualifier" local scripts_module = "Module:scripts" local utilities_module = "Module:utilities" -- Export this so the category code in [[Module:category tree/etymology]] can access it. export.affix_lang_data_module_prefix = "Module:affix/lang-data/" local ulen = m_str_utils.len local rfind = m_str_utils.find local rmatch = m_str_utils.match local pluralize = require(en_utilities_module).pluralize local u = m_str_utils.char local ucfirst = m_str_utils.ucfirst local unpack = unpack or table.unpack -- Lua 5.2 compatibility function export.affix_variants(canonical, variants) local mappings = {} for _, variant in ipairs(variants) do mappings[variant] = canonical end return mappings end function export.id_mapping(default, ids) local mapping = { default = default } if ids then for id, target in pairs(ids) do mapping[id] = target end end return mapping end function export.id_mapping_with_affix_variants(base, id_variants) local mappings = {} for id, variants in pairs(id_variants) do for _, variant in ipairs(variants) do mappings[variant] = export.id_mapping(base, {[id] = base}) end end return mappings end function export.merge_tables(...) local result = {} for i = 1, select('#', ...) do local t = select(i, ...) if t then for k, v in pairs(t) do result[k] = v end end end return result end -- Export this so the category code in [[Module:category tree/etymology]] can access it. export.langs_with_lang_specific_data = { ["az"] = true, ["fi"] = true, ["fr"] = true, ["izh"] = true, ["la"] = true, ["sah"] = true, ["tr"] = true, ["trk-pro"] = true, } local default_pos = "term" --[==[ intro: ===About different types of hyphens ("template", "display" and "lookup"):=== * The "template hyphen" is the per-script hyphen character that is used in template calls to indicate that a term is an affix. This is always a single Unicode char, but there may be multiple possible hyphens for a given script. Normally this is just the regular hyphen character "-", but for some non-Latin-script languages (currently only right-to-left languages), it is different. * The "display hyphen" is the string (which might be an empty string) that is added onto a term as displayed and linked, to indicate that a term is an affix. Currently this is always either the same as the template hyphen or an empty string, but the code below is written generally enough to handle arbitrary display hyphens. Specifically: *# For East Asian languages, the display hyphen is always blank. *# For Arabic-script languages, either tatweel (ـ) or ZWNJ (zero-width non-joiner) are allowed as template hyphens, where ZWNJ is supported primarily for Farsi, because some suffixes have non-joining behavior. The display hyphen corresponding to tatweel is also tatweel, but the display hyphen corresponding to ZWNJ is blank (tatweel is also the default display hyphen, for calls to {{tl|prefix}}/{{tl|suffix}}/etc. that don't include an explicit hyphen). * The "lookup hyphen" is the hyphen that is used when looking up language-specific affix mappings. (These mappings are discussed in more detail below when discussing link affixes.) It depends only on the script of the affix in question. Most scripts (including East Asian scripts) use a regular hyphen "-" as the lookup hyphen, but Hebrew and Arabic have their own lookup hyphens (respectively maqqef and tatweel). Note that for Arabic in particular, there are three possible template hyphens that are recognized (tatweel, ZWNJ and regular hyphen), but mappings must use tatweel. ===About different types of affixes ("template", "display", "link", "lookup" and "category"):=== * A "template affix" is an affix in its source form as it appears in a template call. Generally, a template affix has an attached template hyphen (see above) to indicate that it is an affix and indicate what type of affix it is (prefix, suffix, interfix or circumfix), but some of the older-style templates such as {{tl|suffix}}, {{tl|prefix}}, {{tl|confix}}, etc. have "positional" affixes where the presence of the affix in a certain position (e.g. the second or third parameter) indicates that it is a certain type of affix, whether or not it has an attached template hyphen. * A "display affix" is the corresponding affix as it is actually displayed to the user. The display affix may differ from the template affix for various reasons: *# The display affix may be specified explicitly using the {{para|alt<var>N</var>}} parameter, the `<alt:...>` inline modifier or a piped link of the form e.g. `<nowiki>[[-kas|-käs]]</nowiki>` (here indicating that the affix should display as `-käs` but be linked as `-kas`). Here, the template affix is arguably the entire piped link, while the display affix is `-käs`. *# Even in the absence of {{para|alt<var>N</var>}} parameters, `<alt:...>` inline modifiers and piped links, certain languages have differences between the "template hyphen" specified in the template (which always needs to be specified somehow or other in templates like {{tl|affix}}, to indicate that the term is an affix and what type of affix it is) and the display hyphen (see above), with corresponding differences between template and display affixes. * A (regular) "link affix" is the affix that is linked to when the affix is shown to the user. The link affix is usually the same as the display affix, but will differ in one of three circumstances: *# The display and link affixes are explicitly made different using {{para|alt<var>N</var>}} parameters, `<alt:...>` inline modifiers or piped links, as described above under "display affix". *# For certain languages, certain affixes are mapped to canonical form using language-specific mappings. For example, in Finnish, the adjective-forming suffix {{m|fi|-kas}} appears as {{m|fi|-käs}} after front vowels, but logically both forms are the same suffix and should be linked and categorized the same. Similarly, in Latin, the negative and intensive prefixes spelled {{m|la|in-}} (etymologically two distinct prefixes) appear variously as {{m|la|il-}}, {{m|la|im-}} or {{m|la|ir-}} before certain consonants. Mappings are supplied in [[Module:affix/lang-data/LANGCODE]] to convert Finnish {{m|fi|-käs}} to {{m|fi|-kas}} for linking and categorization purposes. Note that the affixes in the mappings use "lookup hyphens" to indicate the different types of affixes, which is usually the same as the template hyphen but differs for Arabic scripts, because there are multiple possible template hyphens recognized but only one lookup hyphen (tatweel). The form of the affix as used to look up in the mapping tables is called the "lookup affix"; see below. * A "stripped link affix" is a link affix that has been passed through the language's `stripDiacritics()` function, which may strip certain diacritics: e.g. macrons in Latin and Old English (indicating length); acute and grave accents in Russian and various other Slavic languages (indicating stress); vowel diacritics in most Arabic-script languages; and also tatweel in some Arabic-script languages (currently, for example, Persian, Arabic and Urdu strip tatweel, but Ottoman Turkish does not). Stripped link affixes are currently what are used in category names. * A "lookup affix" is the form of the affix as it is looked up in the language-specific lookup mappings described above under link affixes. There are actually two lookup stages: *# First, the affix is looked up in a modified display form (specifically, the same as the display affix but using lookup hyphens). Note that this lookup does not occur if an explicit display form is given using {{para|alt<var>N</var>}} or an `<alt:...>` inline modifier, or if the template affix contains a piped or embedded link. *# If no entry is found, the affix is then looked up in a modified link form (specifically, the modified display form passed through the language's `stripDiacritics()` function, which strips out certain diacritics, but with the lookup hyphen re-added if it was stripped out, as in the case of tatweel in many Arabic-script languages). The reason for this double lookup procedure is to allow for mappings that are sensitive to the extra diacritics, but also allow for mappings that are not sensitive in this fashion (e.g. Russian {{m|ru|-ливый}} occurs both stressed and unstressed, but is the same prefix either way). * A "category affix" is the affix as it appears in categories such as [[:Category:Finnish terms suffixed with -kas| Category:Finnish terms suffixed with ''-kas'']]. The category affix is currently always the same as the stripped link affix. This means that for Arabic-script languages, it may or may not have a tatweel, even if the correponding display affix and regular link affix have a tatweel. As mentioned above, stripDiacritics() strips tatweel for Arabic, Persian and Urdu, but not for Ottoman Turkish. Hence affix categories for Arabic, Persian and Urdu will be missing the tatweel, but affix categories for Ottoman Turkish will have it. An additional complication is that if the template affix contains a ZWNJ, the display (and hence the link and category affixes) will have no hyphen attached in any case. ]==] ----------------------------------------------------------------------------------------- -- Template and display hyphens -- ----------------------------------------------------------------------------------------- --[=[ Per-script template hyphens. The template hyphen is what appears in the {{affix}}/{{prefix}}/{{suffix}}/etc. template (in the wikicode). See above. They key below is a script code, after removing a hyphen and anything preceding. Hence, script codes like 'mnc-Mong' and 'xwo-Mong' will match 'Mong'. The value below is a string consisting of one or more hyphen characters. If there is more than one character, the default hyphen must come last and a non-default function must be specified for the script in display_hyphens[] so the correct display hyphen will be specified when no template hyphen is given (in {{suffix}}/{{prefix}}/etc.). Script detection is normally done when linking, but we need to do it earlier. However, under most circumstances we don't need to do script detection. Specifically, we only need to do script detection for a given language if (a) the language has multiple scripts; and (b) at least one of those scripts is listed below or in display_hyphens. ]=] local ZWNJ = u(0x200C) -- zero-width non-joiner local template_hyphens = { -- This covers all Arabic scripts. See above. ["Arab"] = "ـ" .. ZWNJ .. "-", -- tatweel + zero-width non-joiner + regular hyphen ["Aran"] = "ـ" .. ZWNJ .. "-", -- tatweel + zero-width non-joiner + regular hyphen ["Hebr"] = "־", -- Hebrew-specific hyphen termed "maqqef" ["Mong"] = "᠊", -- FIXME! What about the following right-to-left scripts? -- Adlm (Adlam) -- Armi (Imperial Aramaic) -- Avst (Avestan) -- Cprt (Cypriot) -- Khar (Kharoshthi) -- Mand (Mandaic/Mandaean) -- Mani (Manichaean) -- Mend (Mende/Mende Kikakui) -- Narb (Old North Arabian) -- Nbat (Nabataean/Nabatean) -- Nkoo (N'Ko) -- Orkh (Orkhon runes) -- Phli (Inscriptional Pahlavi) -- Phlp (Psalter Pahlavi) -- Phlv (Book Pahlavi) -- Phnx (Phoenician) -- Prti (Inscriptional Parthian) -- Rohg (Hanifi Rohingya) -- Samr (Samaritan) -- Sarb (Old South Arabian) -- Sogd (Sogdian) -- Sogo (Old Sogdian) -- Syrc (Syriac) -- Thaa (Thaana) } -- Hyphens used when looking up an affix in a lang-specific affix mapping. Defaults to regular hyphen (-). The keys -- are script codes, after removing a hyphen and anything preceding. Hence, script codes like 'mnc-Mong' and 'xwo-Mong' -- will match 'Mong'. The value should be a single character. local lookup_hyphens = { ["Hebr"] = "־", -- This covers all Arabic scripts. See above. ["Arab"] = "ـ", ["Aran"] = "ـ", } -- Default display-hyphen function. local function default_display_hyphen(script, hyph) if not hyph then return template_hyphens[script] or "-" end return hyph end local function arab_get_display_hyphen(_script, hyph) if not hyph then return "ـ" -- tatweel elseif hyph == ZWNJ then return "" else return hyph end end local function no_display_hyphen(_script, _hyph) return "" end -- Per-script function to return the correct display hyphen given the script and template hyphen. The function should -- also handle the case where the passed-in template hyphen is nil, corresponding to the situation in -- {{prefix}}/{{suffix}}/etc. where no template hyphen is specified. The key is the script code after removing a hyphen -- and anything preceding, so 'mnc-Mong', 'xwo-Mong' etc. will match 'Mong'. local display_hyphens = { -- This covers all Arabic scripts. See above. ["Arab"] = arab_get_display_hyphen, ["Aran"] = arab_get_display_hyphen, ["Bopo"] = no_display_hyphen, ["Hani"] = no_display_hyphen, ["Hans"] = no_display_hyphen, ["Hant"] = no_display_hyphen, -- The following is a mixture of several scripts. Hopefully the specs here are correct! ["Jpan"] = no_display_hyphen, ["Jurc"] = no_display_hyphen, ["Kitl"] = no_display_hyphen, ["Kits"] = no_display_hyphen, ["Laoo"] = no_display_hyphen, ["Nshu"] = no_display_hyphen, ["Shui"] = no_display_hyphen, ["Tang"] = no_display_hyphen, ["Thaa"] = no_display_hyphen, ["Thai"] = no_display_hyphen, ["Tibt"] = no_display_hyphen, } ----------------------------------------------------------------------------------------- -- Basic Utility functions -- ----------------------------------------------------------------------------------------- local function glossary_link(entry, text) text = text or entry return "[[Appendix:Glossary#" .. entry .. "|" .. text .. "]]" end local function track(page) if type(page) == "table" then for i, pg in ipairs(page) do page[i] = "affix/" .. pg end else page = "affix/" .. page end require("Module:debug/track")(page) end local function ine(val) return val ~= "" and val or nil end ----------------------------------------------------------------------------------------- -- Compound types -- ----------------------------------------------------------------------------------------- local function make_compound_type(typ, alttext) return { text = glossary_link(typ, alttext) .. " compound", cat = typ .. " compounds", } end -- Make a compound type entry with a simple rather than glossary link. -- These should be replaced with a glossary link when the entry in the glossary -- is created. local function make_non_glossary_compound_type(typ, alttext) local link = alttext and "[[" .. typ .. "|" .. alttext .. "]]" or "[[" .. typ .. "]]" return { text = link .. " compound", cat = typ .. " compounds", } end local function make_raw_compound_type(typ, alttext) return { text = glossary_link(typ, alttext), cat = pluralize(typ), } end local function make_borrowing_type(typ, alttext) return { text = glossary_link(typ, alttext), borrowing_type = pluralize(typ), } end export.etymology_types = { ["adapted borrowing"] = make_borrowing_type("adapted borrowing"), ["adap"] = "adapted borrowing", ["abor"] = "adapted borrowing", ["alliterative"] = make_non_glossary_compound_type("alliterative"), ["allit"] = "alliterative", ["antonymous"] = make_non_glossary_compound_type("antonymous"), ["ant"] = "antonymous", ["bahuvrihi"] = make_compound_type("bahuvrihi", "bahuvrīhi"), ["bahu"] = "bahuvrihi", ["bv"] = "bahuvrihi", ["coordinative"] = make_compound_type("coordinative"), ["coord"] = "coordinative", ["descriptive"] = make_compound_type("descriptive"), ["desc"] = "descriptive", ["determinative"] = make_compound_type("determinative"), ["det"] = "determinative", ["dvandva"] = make_compound_type("dvandva"), ["dva"] = "dvandva", ["dvigu"] = make_compound_type("dvigu"), ["dvi"] = "dvigu", ["endocentric"] = make_compound_type("endocentric"), ["endo"] = "endocentric", ["exocentric"] = make_compound_type("exocentric"), ["exo"] = "exocentric", ["izafet I"] = make_compound_type("izafet I"), ["iz1"] = "izafet I", ["izafet II"] = make_compound_type("izafet II"), ["iz2"] = "izafet II", ["izafet III"] = make_compound_type("izafet III"), ["iz3"] = "izafet III", ["karmadharaya"] = make_compound_type("karmadharaya", "karmadhāraya"), ["karma"] = "karmadharaya", ["kd"] = "karmadharaya", ["kenning"] = make_raw_compound_type("kenning"), ["ken"] = "kenning", ["rhyming"] = make_non_glossary_compound_type("rhyming"), ["rhy"] = "rhyming", ["synonymous"] = make_non_glossary_compound_type("synonymous"), ["syn"] = "synonymous", ["tatpurusa"] = make_compound_type("tatpurusa", "tatpuruṣa"), ["tat"] = "tatpurusa", ["tp"] = "tatpurusa", } local function process_etymology_type(typ, nocap, notext, has_parts) local text_sections = {} local categories = {} local borrowing_type if typ then local typdata = export.etymology_types[typ] if type(typdata) == "string" then typdata = export.etymology_types[typdata] end if not typdata then error("Internal error: Unrecognized type '" .. typ .. "'") end local text = typdata.text if not nocap then text = ucfirst(text) end local cat = typdata.cat borrowing_type = typdata.borrowing_type local oftext = typdata.oftext or " of" if not notext then table.insert(text_sections, text) if has_parts then table.insert(text_sections, oftext) table.insert(text_sections, " ") end end if cat then table.insert(categories, cat) end end return text_sections, categories, borrowing_type end ----------------------------------------------------------------------------------------- -- Utility functions -- ----------------------------------------------------------------------------------------- -- Iterate an array up to the greatest integer index found. local function ipairs_with_gaps(t) local indices = m_table.numKeys(t) local max_index = #indices > 0 and math.max(unpack(indices)) or 0 local i = 0 return function() if i < max_index then i = i + 1 return i, t[i] end end end export.ipairs_with_gaps = ipairs_with_gaps --[==[ Join formatted parts (in `parts_formatted`) together with any overall {{para|lit}} spec (in `lit`) plus categories, which are formatted by prepending the language name as found in `lang`. The value of an entry in `categories` can be either a string (which is formatted using `sort_key`) or a table of the form `{ {cat=<var>category</var>, sort_key=<var>sort_key</var>, sort_base=<var>sort_base</var>}`, specifying the sort key and sort base to use when formatting the category. If `nocat` is given, no categories are added; otherwise, `force_cat` causes categories to be added even on userspace pages. ]==] function export.join_formatted_parts(data) local cattext local lang = data.data.lang local force_cat = data.data.force_cat or debug_force_cat if data.data.nocat then cattext = "" else for i, cat in ipairs(data.categories) do if type(cat) == "table" then data.categories[i] = require(utilities_module).format_categories(lang:getFullName() .. " " .. cat.cat, lang, cat.sort_key, cat.sort_base, force_cat) else data.categories[i] = require(utilities_module).format_categories(lang:getFullName() .. " " .. cat, lang, data.data.sort_key, nil, force_cat) end end cattext = table.concat(data.categories) end local result = table.concat(data.parts_formatted, not data.separator_already_added and " +&lrm; " or nil) .. (data.data.lit and ", literally " .. m_links.mark(data.data.lit, "gloss") or "") local q = data.data.q local qq = data.data.qq local l = data.data.l local ll = data.data.ll local infl = data.data.infl if q and q[1] or qq and qq[1] or l and l[1] or ll and ll[1] or infl and infl[1] then result = require(pron_qualifier_module).format_qualifiers { lang = lang, text = result, q = q, qq = qq, l = l, ll = ll, infl = infl, } end return result .. cattext end -- Remove links and call lang:stripDiacritics(term). local function strip_diacritics_no_links(lang, term) return lang:stripDiacritics(m_links.remove_links(term)) end --[=[ Convert a raw part as passed into an entry point into a part ready for linking. `lang` and `sc` are the overall language and script objects. This uses the overall language and script objects as defaults for the part and parses off any fragment from the term. We need to do the latter so that fragments don't end up in categories and so that we correctly do affix mapping even in the presence of fragments. ]=] local function canonicalize_part(part, lang, sc) if not part then return end -- Save the original (user-specified, part-specific) value of `lang`. If such a value is specified, we don't insert -- a '*fixed with' category, and we format the part using format_derived() in [[Module:etymology]] rather than -- full_link() in [[Module:links]]. part.part_lang = part.lang part.lang = part.lang or lang part.sc = part.sc or sc local term = part.term if not term then return elseif not part.fragment then part.term, part.fragment = m_links.get_fragment(term) else part.term = m_links.get_fragment(term) end end --[==[ Construct a single linked part based on the information in `part`, for use by `show_affix()` and other entry points. This should be called after `canonicalize_part()` is called on the part. This is a thin wrapper around `full_link()` in [[Module:links]] unless `part.part_lang` is specified (indicating that a part-specific language was given), in which case `format_derived()` in [[Module:etymology]] is called to display a term in a language other than the language of the overall term (specified in `data.lang`). `data` contains the entire object passed into the entry point and is used to access information for constructing the categories added by `format_derived()`. ]==] function export.link_term(part, data, include_separator) local result if part.part_lang then result = require(etymology_module).format_derived { lang = data.lang, terms = {part}, sources = {part.lang}, sort_key = data.sort_key, nocat = data.nocat, template_name = "affix", qualifiers_labels_on_outside = true, borrowing_type = data.borrowing_type, force_cat = data.force_cat or debug_force_cat, } else result = m_links.full_link(part, "term", nil, "show qualifiers") end if include_separator and part.separator then return part.separator .. result else return result end end local function canonicalize_script_code(scode) -- Convert 'mnc-Mong', 'xwo-Mong' etc. to 'Mong'. return (scode:gsub("^.*%-", "")) end ----------------------------------------------------------------------------------------- -- Affix-handling functions -- ----------------------------------------------------------------------------------------- -- Figure out the appropriate script for the given affix and language (unless the script is explicitly passed in), and -- return the values of template_hyphens[], display_hyphens[] and lookup_hyphens[] for that script, substituting -- default values as appropriate. Four values are returned: -- DETECTED_SCRIPT, TEMPLATE_HYPHEN, DISPLAY_HYPHEN, LOOKUP_HYPHEN local function detect_script_and_hyphens(text, lang, sc) local scode -- 1. If the script is explicitly passed in, use it. if sc then scode = sc:getCode() else local possible_script_codes = lang:getScriptCodes() -- YUCK! `possible_script_codes` comes from loadData() so #possible_scripts doesn't work (always returns 0). local num_possible_script_codes = m_table.length(possible_script_codes) if num_possible_script_codes == 0 then -- This shouldn't happen; if the language has no script codes, -- the list {"None"} should be returned. error("Something is majorly wrong! Language " .. lang:getCanonicalName() .. " has no script codes.") end if num_possible_script_codes == 1 then -- 2. If the language has only one possible script, use it. scode = possible_script_codes[1] else -- 3. Check if any of the possible scripts for the language have non-default values for template_hyphens[] -- or display_hyphens[]. If so, we need to do script detection on the text. If not, just use "Latn", -- which may not be technically correct but produces the right results because Latn has all default -- values for template_hyphens[] and display_hyphens[]. local may_have_nondefault_hyphen = false for _, script_code in ipairs(possible_script_codes) do script_code = canonicalize_script_code(script_code) if template_hyphens[script_code] or display_hyphens[script_code] then may_have_nondefault_hyphen = true break end end if not may_have_nondefault_hyphen then scode = "Latn" else scode = lang:findBestScript(text):getCode() end end end scode = canonicalize_script_code(scode) local template_hyphen = template_hyphens[scode] or "-" local lookup_hyphen = lookup_hyphens[scode] or "-" local display_hyphen = display_hyphens[scode] or default_display_hyphen return scode, template_hyphen, display_hyphen, lookup_hyphen end --[=[ Given a template affix `term` and an affix type `affix_type`, change the relevant template hyphen(s) in the affix to the display or lookup hyphen specified in `new_hyphen`, or add them if they are missing. `new_hyphen` can be a string, specifying a fixed hyphen, or a function of two arguments (the script code `scode` and the discovered template hyphen, or nil of no relevant template hyphen is present). `thyph_re` is a Lua pattern (which must be enclosed in parens) that matches the possible template hyphens. Note that not all template hyphens present in the affix are changed, but only the "relevant" ones (e.g. for a prefix, a relevant template hyphen is one coming at the end of the affix). ]=] local function reconstruct_term_per_hyphens(term, affix_type, scode, thyph_re, new_hyphen) local function get_hyphen(hyph) if type(new_hyphen) == "string" then return new_hyphen end return new_hyphen(scode, hyph) end if affix_type == "non-affix" then return term elseif affix_type == "circumfix" then local before, before_hyphen, after_hyphen, after = rmatch(term, "^(.*)" .. thyph_re .. " " .. thyph_re .. "(.*)$") if not before or ulen(term) <= 3 then -- Unlike with other types of affixes, don't try to add hyphens in the middle of the term to convert it to -- a circumfix. Also, if the term is just hyphen + space + hyphen, return it. return term end return before .. get_hyphen(before_hyphen) .. " " .. get_hyphen(after_hyphen) .. after elseif affix_type == "infix" or affix_type == "interfix" then local before_hyphen, middle, after_hyphen = rmatch(term, "^" .. thyph_re .. "(.*)" .. thyph_re .. "$") if before_hyphen and ulen(term) <= 1 then -- If the term is just a hyphen, return it. return term end return get_hyphen(before_hyphen) .. (middle or term) .. get_hyphen(after_hyphen) elseif affix_type == "prefix" then local middle, after_hyphen = rmatch(term, "^(.*)" .. thyph_re .. "$") if middle and ulen(term) <= 1 then -- If the term is just a hyphen, return it. return term end return (middle or term) .. get_hyphen(after_hyphen) elseif affix_type == "suffix" then local before_hyphen, middle = rmatch(term, "^" .. thyph_re .. "(.*)$") if before_hyphen and ulen(term) <= 1 then -- If the term is just a hyphen, return it. return term end return get_hyphen(before_hyphen) .. (middle or term) else error(("Internal error: Unrecognized affix type '%s'"):format(affix_type)) end end --[=[ Look up a mapping from a given affix variant to the canonical form used in categories and links. The lookup tables are language-specific according to `lang`, and may be ID-specific according to `affix_id`. The affixes as they appear in the lookup tables (both the variant and the canonical form) are in "lookup affix" format (approximately speaking, they use a regular hyphen for most scripts, but a tatweel for Arabic-script entries and a maqqef for Hebrew-script entries), but the passed-in `affix` param is in "template affix" format (which differs from the lookup affix for Arabic-script entries, because more types of hyphens are allowed in template affixes; see the comments at the top of the file). The remaining parameters to this function are used to convert from template affixes to lookup affixes; see the reconstruct_term_per_hyphens() function above. If the affix contains brackets, no lookup is done. Otherwise, a two-stage process is used, first looking up the affix directly and then stripping diacritics and looking it up again. The reason for this is documented above in the comments at the top of the file (specifically, the comments describing lookup affixes). The value of a mapping can either be a string (do the mapping regardless of affix ID) or a table indexed by affix ID (where the special value `false` indicates no affix ID). The values of entries in this table can also be strings, or tables with keys `affix` and `id` (again, use `false` to indicate no ID). This allows an affix mapping to map from one ID to another (for example, this is used in English to map the [[an-]] prefix with no ID to the [[a-]] prefix with the ID 'not'). The Given a template affix `term` and an affix type `affix_type`, change the relevant template hyphen(s) in the affix to the display or lookup hyphen specified in `new_hyphen`, or add them if they are missing. `new_hyphen` can be a string, specifying a fixed hyphen, or a function of two arguments (the script code `scode` and the discovered template hyphen, or nil of no relevant template hyphen is present). `thyph_re` is a Lua pattern (which must be enclosed in parens) that matches the possible template hyphens. Note that not all template hyphens present in the affix are changed, but only the "relevant" ones (e.g. for a prefix, a relevant template hyphen is one coming at the end of the affix). ]=] local function lookup_affix_mapping(affix, affix_type, lang, scode, thyph_re, lookup_hyph, affix_id) local function do_lookup(afx) -- Ensure that the affix uses lookup hyphens regardless of whether it used a different type of hyphens before -- or no hyphens. local lookup_affix = reconstruct_term_per_hyphens(afx, affix_type, scode, thyph_re, lookup_hyph) local function do_lookup_for_langcode(langcode) if export.langs_with_lang_specific_data[langcode] then local langdata = mw.loadData(export.affix_lang_data_module_prefix .. langcode) if langdata.affix_mappings then local mapping = langdata.affix_mappings[lookup_affix] if mapping then if type(mapping) == "table" then mapping = mapping[affix_id] or mapping.default or mapping[affix_id or false] if mapping then return mapping end else return mapping end end end end end -- If `lang` is an etymology-only language, look for a mapping both for it and its full parent. local langcode = lang:getCode() local mapping = do_lookup_for_langcode(langcode) if mapping then return mapping end local full_langcode = lang:getFullCode() if full_langcode ~= langcode then mapping = do_lookup_for_langcode(full_langcode) if mapping then return mapping end end return nil end if affix:find("%[%[") then return nil end return do_lookup(affix) or do_lookup(lang:stripDiacritics(affix)) or nil end --[==[ For a given template term in a given language (see the definition of "template affix" near the top of the file), possibly in an explicitly specified script `sc` (but usually nil), return the term's affix type ({"prefix"}, {"interfix"}, {"suffix"}, {"circumfix"} or {"non-affix"}) along with the corresponding link and display affixes (see definitions near the top of the file); also the corresponding lookup affix (if `return_lookup_affix` is specified). The term passed in should already have any fragment (after the # sign) parsed off of it. Four values are returned: `affix_type`, `link_term`, `display_term` and `lookup_term`. The affix type can be passed in instead of autodetected; in this case, the template term need not have any attached hyphens, and the appropriate hyphens will be added in the appropriate places. If `do_affix_mapping` is specified, look up the affix in the lang-specific affix mappings, as described in the comment at the top of the file; otherwise, the link and display terms will always be the same. (They will be the same in any case if the template term has a bracketed link in it or is not an affix.) If `return_lookup_affix` is given, the fourth return value contains the term with appropriate lookup hyphens in the appropriate places; otherwise, it is the same as the display term. (This functionality is used in [[Module:category tree/affixes and compounds]] to convert link affixes into lookup affixes so that they can be looked up in the affix mapping tables.) Exported because used by [[Module:headword utilities]] to determine the affix type of a given pagename. ]==] function export.parse_term_for_affixes(term, lang, sc, affix_type, do_affix_mapping, return_lookup_affix, affix_id) if not term then return "non-affix", nil, nil, nil end if term == "^" then -- Indicates a null term to emulate the behavior of {{suffix|foo||bar}}. term = "" return "non-affix", term, term, term end if term:find("^%^") then -- HACK! ^ at the beginning of Korean languages has a special meaning, triggering capitalization of the -- transliteration. Don't interpret it as "force non-affix" for those languages. local langcode = lang:getCode() if langcode ~= "ko" and langcode ~= "okm" and langcode ~= "jje" then -- Formerly we allowed ^ to force non-affix type; this is now handled using an inline modifier -- <naf>, <root>, etc. Throw an error for the moment when the old way is encountered. error("Use of ^ to force non-affix status is no longer supported; use an inline modifier <naf> or <root> " .. "after the component") end end -- Remove an asterisk if the morpheme is reconstructed and add it back at the end. local reconstructed = "" if term:find("^%*") then reconstructed = "*" term = term:gsub("^%*", "") end local scode, thyph, dhyph, lhyph = detect_script_and_hyphens(term, lang, sc) thyph = "([" .. thyph .. "])" if not affix_type then if rfind(term, thyph .. " " .. thyph) then affix_type = "circumfix" else local has_beginning_hyphen = rfind(term, "^" .. thyph) local has_ending_hyphen = rfind(term, thyph .. "$") if has_beginning_hyphen and has_ending_hyphen then affix_type = "interfix" elseif has_ending_hyphen then affix_type = "prefix" elseif has_beginning_hyphen then affix_type = "suffix" else affix_type = "non-affix" end end end local link_term, display_term, lookup_term if affix_type == "non-affix" then link_term = term display_term = term lookup_term = term else display_term = reconstruct_term_per_hyphens(term, affix_type, scode, thyph, dhyph) if do_affix_mapping then link_term = lookup_affix_mapping(term, affix_type, lang, scode, thyph, lhyph, affix_id) -- The return value of lookup_affix_mapping() may be an affix mapping with lookup hyphens if a mapping -- was found, otherwise nil if a mapping was not found. We need to convert to display hyphens in -- either case, but in the latter case we can reuse the display term, which has already been converted. if link_term then link_term = reconstruct_term_per_hyphens(link_term, affix_type, scode, thyph, dhyph) else link_term = display_term end else link_term = display_term end if return_lookup_affix then lookup_term = reconstruct_term_per_hyphens(term, affix_type, scode, thyph, lhyph) else lookup_term = display_term end end link_term = reconstructed .. link_term display_term = reconstructed .. display_term lookup_term = reconstructed .. lookup_term return affix_type, link_term, display_term, lookup_term end --[==[ Add a hyphen to a term in the appropriate place, based on the specified affix type, stripping off any existing hyphens in that place. For example, if `affix_type` == {"prefix"}, we'll add a hyphen onto the end if it's not already there (or is of the wrong type). Three values are returned: the link term, display term and lookup term. This function is a thin wrapper around `parse_term_for_affixes`; see the comments above that function for more information. Note that this function is exposed externally because it is called by [[Module:category tree/affixes and compounds]]; see the comment in `parse_term_for_affixes` for more information. ]==] function export.make_affix(term, lang, sc, affix_type, do_affix_mapping, return_lookup_affix, affix_id) if not (affix_type == "prefix" or affix_type == "suffix" or affix_type == "circumfix" or affix_type == "infix" or affix_type == "interfix" or affix_type == "non-affix") then error("Internal error: Invalid affix type " .. (affix_type or "(nil)")) end local _, link_term, display_term, lookup_term = export.parse_term_for_affixes(term, lang, sc, affix_type, do_affix_mapping, return_lookup_affix, affix_id) return link_term, display_term, lookup_term end ----------------------------------------------------------------------------------------- -- Main entry points -- ----------------------------------------------------------------------------------------- --[==[ Core categorization logic for affixes. This is shared between show_affix(), show_compound_like() and get_affix_categories_only(). Returns the categories array and other metadata needed for formatting. ]==] local function generate_affix_categories(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) local text_sections, categories, borrowing_type = process_etymology_type(data.type, data.surface_analysis or data.nocap, data.notext, #data.parts > 0) data.borrowing_type = borrowing_type -- Process each part local whole_words = 0 local is_affix_or_compound = false -- Canonicalize and generate links for all the parts first; then do categorization in a separate step, because when -- processing the first part for categorization, we may access the second part and need it already canonicalized. for i, part in ipairs_with_gaps(data.parts) do part = part or {} data.parts[i] = part canonicalize_part(part, data.lang, data.sc) -- Determine affix type and get link and display terms (see text at top of file). Store them in the part -- (in fields that won't clash with fields used by full_link() in [[Module:links]] or link_term()), so they -- can be used in the loop below when categorizing. part.affix_type, part.affix_link_term, part.affix_display_term = export.parse_term_for_affixes(part.term, part.lang, part.sc, part.type, not part.alt, nil, part.id) -- If link_term is an empty string, either a bare ^ was specified or an empty term was used along with inline -- modifiers. The intention in either case is not to link the term. part.term = ine(part.affix_link_term) -- If part.alt would be the same as part.term, make it nil, so that it isn't erroneously tracked as being -- redundant alt text. part.alt = part.alt or (part.affix_display_term ~= part.affix_link_term and part.affix_display_term) or nil end if not data.noaffixcat then -- Now do categorization. for i, part in ipairs_with_gaps(data.parts) do local affix_type = part.affix_type if affix_type ~= "non-affix" then is_affix_or_compound = true -- Make a sort key. For the first part, use the second part as the sort key; the intention is that if the -- term has a prefix, sorting by the prefix won't be very useful so we sort by what follows, which is -- presumably the root. local part_sort_base = nil local part_sort = part.sort or data.sort_key if i == 1 and data.parts[2] and data.parts[2].term then local part2 = data.parts[2] -- If the second-part link term is empty, the user requested an unlinked term; avoid a wikitext error -- by using the alt value if available. part_sort_base = ine(part2.affix_link_term) or ine(part2.alt) if part_sort_base then part_sort_base = strip_diacritics_no_links(part2.lang, part_sort_base) end end if part.pos and rfind(part.pos, "patronym") then table.insert(categories, {cat = "patronymics", sort_key = part_sort, sort_base = part_sort_base}) end if data.pos ~= "terms" and part.pos and rfind(part.pos, "diminutive") then table.insert(categories, {cat = "diminutive " .. data.pos, sort_key = part_sort, sort_base = part_sort_base}) end -- Don't add a '*fixed with' category if the link term is empty or is in a different language. if ine(part.affix_link_term) and not part.part_lang then table.insert(categories, {cat = data.pos .. " " .. affix_type .. "ed with " .. strip_diacritics_no_links(part.lang, part.affix_link_term) .. (part.id and " (" .. part.id .. ")" or ""), sort_key = part_sort, sort_base = part_sort_base}) end else whole_words = whole_words + 1 if whole_words == 2 then is_affix_or_compound = true table.insert(categories, "compound " .. data.pos) end end end -- Make sure there was either an affix or a compound (two or more non-affix terms). if not is_affix_or_compound and not data.allow_no_affixes_or_compounds then error("The parameters did not include any affixes, and the term is not a compound. Please provide at least one affix.") end end return text_sections, categories, borrowing_type end --[==[ Implementation of {{tl|affix}} and {{tl|surface analysis}}. `data` contains all the information describing the affixes to be displayed, and contains the following: * `.lang` ('''required'''): Overall language object. Different from term-specific language objects (see `.parts` below). * `.sc`: Overall script object (usually omitted). Different from term-specific script objects. * `.parts` ('''required'''): List of objects describing the affixes to show. The general format of each object is as would be passed to `full_link()`, except that the `.lang` field should be missing unless the term is of a language different from the overall `.lang` value (in such a case, the language name is shown along with the term and an additional "derived from" category is added). '''WARNING''': The data in `.parts` will be destructively modified. * `.pos`: Overall part of speech (used in categories, defaults to {"terms"}). Different from term-specific part of speech. * `.sort_key`: Overall sort key. Normally omitted except e.g. in Japanese. * `.type`: Type of compound, if the parts in `.parts` describe a compound. Strictly optional, and if supplied, the compound type is displayed before the parts (normally capitalized, unless `.nocap` is given). * `.nocap`: Don't capitalize the first letter of text displayed before the parts (relevant only if `.type` or `.surface_analysis` is given). * `.notext`: Don't display any text before the parts (relevant only if `.type` or `.surface_analysis` is given). * `.nocat`: Disable all categorization. * `.noaffixcat`: Disable affix (and compound) categorization. Relevant for e.g. blends, which may otherwise be incorrectly categorized as compound terms. * `.lit`: Overall literal definition. Different from term-specific literal definitions. * `.force_cat`: Always display categories, even on userspace pages. * `.surface_analysis`: Implement {{surface analysis}}; adds `By surface analysis, ` before the parts. '''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`. ]==] function export.show_affix(data) local text_sections, categories, _ = generate_affix_categories(data) -- Process each part for display local parts_formatted = {} for i, part in ipairs_with_gaps(data.parts) do -- Make a link for the part table.insert(parts_formatted, export.link_term(part, data, "include_separator")) end if data.surface_analysis then local text = "by " .. glossary_link("surface analysis") .. ", " if not data.nocap then text = ucfirst(text) end table.insert(text_sections, 1, text) end table.insert(text_sections, export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories, separator_already_added = true }) return table.concat(text_sections) end --[==[ Get only the categories that would be generated by show_affix(), without any text output or formatting. This is used by Module:etymon to get affix categorization. Returns an array of category objects, where each entry is either a string (simple category name) or a table with keys `cat`, `sort_key`, and `sort_base` for more complex categorization. `data` should have the same structure as passed to show_affix(): * `.lang` (required): Overall language object * `.parts` (required): Array of affix part objects with `.term`, `.lang`, `.id`, etc. * `.pos`: Part of speech (defaults to "terms") * `.sort_key`: Overall sort key for categories '''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`. ]==] function export.get_affix_categories_only(data) local _, categories, _ = generate_affix_categories(data) return categories end function export.show_surface_analysis(data) data.surface_analysis = true data.allow_no_affixes_or_compounds = true return export.show_affix(data) end --[==[ Implementation of {{tl|compound}}. '''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`. ]==] function export.show_compound(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) local text_sections, categories, borrowing_type = process_etymology_type(data.type, data.nocap, data.notext, #data.parts > 0) data.borrowing_type = borrowing_type local parts_formatted = {} table.insert(categories, "compound " .. data.pos) -- Make links out of all the parts local whole_words = 0 for i, part in ipairs(data.parts) do canonicalize_part(part, data.lang, data.sc) -- Determine affix type and get link and display terms (see text at top of file). local affix_type, link_term, display_term = export.parse_term_for_affixes(part.term, part.lang, part.sc, part.type, not part.alt, nil, part.id) -- If the term is an interfix or the type was explicitly given, recognize it as such (which means e.g. that we -- will display the term without hyphens for East Asian languages). Otherwise, ignore the fact that it looks -- like an affix and display as specified in the template (but pay attention to the detected affix type for -- certain tracking purposes). if affix_type == "interfix" or (part.type and part.type ~= "non-affix") then -- If link_term is an empty string, either a bare ^ was specified or an empty term was used along with -- inline modifiers. The intention in either case is not to link the term. Don't add a '*fixed with' -- category in this case, or if the term is in a different language. -- If part.alt would be the same as part.term, make it nil, so that it isn't erroneously tracked as being -- redundant alt text. if link_term and link_term ~= "" and not part.part_lang then table.insert(categories, {cat = data.pos .. " " .. affix_type .. "ed with " .. strip_diacritics_no_links(part.lang, link_term), sort_key = part.sort or data.sort_key}) end part.term = link_term ~= "" and link_term or nil part.alt = part.alt or (display_term ~= link_term and display_term) or nil else if affix_type ~= "non-affix" then local langcode = data.lang:getCode() -- If `data.lang` is an etymology-only language, track both using its code and its full parent's code. track { affix_type, affix_type .. "/lang/" .. langcode } local full_langcode = data.lang:getFullCode() if langcode ~= full_langcode then track(affix_type .. "/lang/" .. full_langcode) end else whole_words = whole_words + 1 end end table.insert(parts_formatted, export.link_term(part, data, "include_separator")) end if whole_words == 1 then track("one whole word") elseif whole_words == 0 then track("looks like confix") end table.insert(text_sections, export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories, separator_already_added = true }) return table.concat(text_sections) end --[==[ Implementation of {{tl|blend}}, {{tl|univerbation}} and similar "compound-like" templates. '''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`. ]==] function export.show_compound_like(data) data.allow_no_affixes_or_compounds = true local text_sections, categories, _ = generate_affix_categories(data) if data.cat then table.insert(categories, data.cat) end -- Process each part for display local parts_formatted = {} for i, part in ipairs_with_gaps(data.parts) do -- Make a link for the part table.insert(parts_formatted, export.link_term(part, data, "include_separator")) end if #data.parts > 0 and data.oftext then table.insert(text_sections, 1, " " .. data.oftext .. " ") end if data.text then table.insert(text_sections, 1, data.text) end table.insert(text_sections, export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories, separator_already_added = true }) return table.concat(text_sections) end --[==[ Make `part` (a structure holding information on an affix part) into an affix of type `affix_type`, and apply any relevant affix mappings. For example, if the desired affix type is "suffix", this will (in general) add a hyphen onto the beginning of the term, alt, tr and ts components of the part if not already present. The hyphen that's added is the "display hyphen" (see above) and may be script-specific. (In the case of East Asian scripts, the display hyphen is an empty string whereas the template hyphen is the regular hyphen, meaning that any regular hyphen at the beginning of the part will be effectively removed.) `lang` and `sc` hold overall language and script objects. Note that this also applies any language-specific affix mappings, so that e.g. if the language is Finnish and the user specified [[-käs]] in the affix and didn't specify an `.alt` value, `part.term` will contain [[-kas]] and `part.alt` will contain [[-käs]]. This function is used by the "legacy" templates ({{tl|prefix}}, {{tl|suffix}}, {{tl|confix}}, etc.) where the nature of the affix is specified by the template itself rather than auto-determined from the affix, as is the case with {{tl|affix}}. '''WARNING''': This destructively modifies `part`. ]==] local function make_part_into_affix(part, lang, sc, affix_type) canonicalize_part(part, lang, sc) local link_term, display_term = export.make_affix(part.term, part.lang, part.sc, affix_type, not part.alt, nil, part.id) part.term = link_term -- When we don't specify `do_affix_mapping` to make_affix(), link and display terms (first and second retvals of -- make_affix()) are the same. -- If part.alt would be the same as part.term, make it nil, so that it isn't erroneously tracked as being -- redundant alt text. part.alt = part.alt and export.make_affix(part.alt, part.lang, part.sc, affix_type) or (display_term ~= link_term and display_term) or nil local Latn = require(scripts_module).getByCode("Latn") part.tr = export.make_affix(part.tr, part.lang, Latn, affix_type) part.ts = export.make_affix(part.ts, part.lang, Latn, affix_type) end local function track_wrong_affix_type(template, part, expected_affix_type) if part and not part.type then local affix_type = export.parse_term_for_affixes(part.term, part.lang, part.sc) if affix_type ~= expected_affix_type then local part_name = expected_affix_type or "base" local langcode = part.lang:getCode() local full_langcode = part.lang:getFullCode() require("Module:debug/track") { template, template .. "/" .. part_name, template .. "/" .. part_name .. "/" .. (affix_type or "none"), template .. "/" .. part_name .. "/" .. (affix_type or "none") .. "/lang/" .. langcode } -- If `part.lang` is an etymology-only language, track both using its code and its full parent's code. if full_langcode ~= langcode then require("Module:debug/track")( template .. "/" .. part_name .. "/" .. (affix_type or "none") .. "/lang/" .. full_langcode ) end end end end local function insert_affix_category(categories, pos, affix_type, part, sort_key, sort_base) -- Don't add a '*fixed with' category if the link term is empty or is in a different language. if part.term and not part.part_lang then local cat = pos .. " " .. affix_type .. "ed with " .. strip_diacritics_no_links(part.lang, part.term) .. (part.id and " (" .. part.id .. ")" or "") if sort_key or sort_base then table.insert(categories, {cat = cat, sort_key = sort_key, sort_base = sort_base}) else table.insert(categories, cat) end end end --[==[ Implementation of {{tl|circumfix}}. '''WARNING''': This destructively modifies both `data` and `.prefix`, `.base` and `.suffix`. ]==] function export.show_circumfix(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. make_part_into_affix(data.prefix, data.lang, data.sc, "prefix") make_part_into_affix(data.suffix, data.lang, data.sc, "suffix") track_wrong_affix_type("circumfix", data.prefix, "prefix") track_wrong_affix_type("circumfix", data.base, nil) track_wrong_affix_type("circumfix", data.suffix, "suffix") -- Create circumfix term. local circumfix = nil if data.prefix.term and data.suffix.term then circumfix = data.prefix.term .. " " .. data.suffix.term data.prefix.alt = data.prefix.alt or data.prefix.term data.suffix.alt = data.suffix.alt or data.suffix.term data.prefix.term = circumfix data.suffix.term = circumfix end -- Make links out of all the parts. local parts_formatted = {} local categories = {} local sort_base if data.base.term then sort_base = strip_diacritics_no_links(data.base.lang, data.base.term) end table.insert(parts_formatted, export.link_term(data.prefix, data)) table.insert(parts_formatted, export.link_term(data.base, data)) table.insert(parts_formatted, export.link_term(data.suffix, data)) -- Insert the categories, but don't add a '*fixed with' category if the link term is in a different language. if not data.prefix.part_lang then table.insert(categories, {cat=data.pos .. " circumfixed with " .. strip_diacritics_no_links(data.prefix.lang, circumfix), sort_key=data.sort_key, sort_base=sort_base}) end return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end --[==[ Implementation of {{tl|confix}}. '''WARNING''': This destructively modifies both `data` and `.prefix`, `.base` and `.suffix`. ]==] function export.show_confix(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. make_part_into_affix(data.prefix, data.lang, data.sc, "prefix") make_part_into_affix(data.suffix, data.lang, data.sc, "suffix") track_wrong_affix_type("confix", data.prefix, "prefix") track_wrong_affix_type("confix", data.base, nil) track_wrong_affix_type("confix", data.suffix, "suffix") -- Make links out of all the parts. local parts_formatted = {} local prefix_sort_base if data.base and data.base.term then prefix_sort_base = strip_diacritics_no_links(data.base.lang, data.base.term) elseif data.suffix.term then prefix_sort_base = strip_diacritics_no_links(data.suffix.lang, data.suffix.term) end -- Insert the categories and parts. local categories = {} table.insert(parts_formatted, export.link_term(data.prefix, data)) insert_affix_category(categories, data.pos, "prefix", data.prefix, data.sort_key, prefix_sort_base) if data.base then table.insert(parts_formatted, export.link_term(data.base, data)) end table.insert(parts_formatted, export.link_term(data.suffix, data)) -- FIXME, should we be specifying a sort base here? insert_affix_category(categories, data.pos, "suffix", data.suffix) return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end --[==[ Implementation of {{tl|infix}}. '''WARNING''': This destructively modifies both `data` and `.base` and `.infix`. ]==] function export.show_infix(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. make_part_into_affix(data.infix, data.lang, data.sc, "infix") track_wrong_affix_type("infix", data.base, nil) track_wrong_affix_type("infix", data.infix, "infix") -- Make links out of all the parts. local parts_formatted = {} local categories = {} table.insert(parts_formatted, export.link_term(data.base, data)) table.insert(parts_formatted, export.link_term(data.infix, data)) -- Insert the categories. -- FIXME, should we be specifying a sort base here? insert_affix_category(categories, data.pos, "infix", data.infix) return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end --[==[ Implementation of {{tl|prefix}}. '''WARNING''': This destructively modifies both `data` and the structures within `.prefixes`, as well as `.base`. ]==] function export.show_prefix(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. for i, prefix in ipairs(data.prefixes) do make_part_into_affix(prefix, data.lang, data.sc, "prefix") end for i, prefix in ipairs(data.prefixes) do track_wrong_affix_type("prefix", prefix, "prefix") end track_wrong_affix_type("prefix", data.base, nil) -- Make links out of all the parts. local parts_formatted = {} local first_sort_base = nil local categories = {} if data.prefixes[2] then first_sort_base = ine(data.prefixes[2].term) or ine(data.prefixes[2].alt) if first_sort_base then first_sort_base = strip_diacritics_no_links(data.prefixes[2].lang, first_sort_base) end elseif data.base then first_sort_base = ine(data.base.term) or ine(data.base.alt) if first_sort_base then first_sort_base = strip_diacritics_no_links(data.base.lang, first_sort_base) end end for i, prefix in ipairs(data.prefixes) do table.insert(parts_formatted, export.link_term(prefix, data)) insert_affix_category(categories, data.pos, "prefix", prefix, data.sort_key, i == 1 and first_sort_base or nil) end if data.base then table.insert(parts_formatted, export.link_term(data.base, data)) else table.insert(parts_formatted, "") end return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end --[==[ Implementation of {{tl|suffix}}. '''WARNING''': This destructively modifies both `data` and the structures within `.suffixes`, as well as `.base`. ]==] function export.show_suffix(data) local categories = {} data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. for i, suffix in ipairs(data.suffixes) do make_part_into_affix(suffix, data.lang, data.sc, "suffix") end track_wrong_affix_type("suffix", data.base, nil) for i, suffix in ipairs(data.suffixes) do track_wrong_affix_type("suffix", suffix, "suffix") end -- Make links out of all the parts. local parts_formatted = {} if data.base then table.insert(parts_formatted, export.link_term(data.base, data)) else table.insert(parts_formatted, "") end for i, suffix in ipairs(data.suffixes) do table.insert(parts_formatted, export.link_term(suffix, data)) end -- Insert the categories. for i, suffix in ipairs(data.suffixes) do -- FIXME, should we be specifying a sort base here? insert_affix_category(categories, data.pos, "suffix", suffix) if suffix.pos and rfind(suffix.pos, "patronym") then table.insert(categories, "patronymics") end end return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end return export evm87mqr9hae75grqj71pdo9ykf28z9 487942 487927 2026-09-03T17:44:59Z SM7 6218 localization...more 487942 Scribunto text/plain local export = {} local debug_force_cat = false -- if set to true, always display categories even on userspace pages local m_links = require("Module:links") local m_str_utils = require("Module:string utilities") local m_table = require("Module:table") local en_utilities_module = "Module:en-utilities" local etymology_module = "Module:etymology" local pron_qualifier_module = "Module:pron qualifier" local scripts_module = "Module:scripts" local utilities_module = "Module:utilities" -- Export this so the category code in [[Module:category tree/etymology]] can access it. export.affix_lang_data_module_prefix = "Module:affix/lang-data/" local ulen = m_str_utils.len local rfind = m_str_utils.find local rmatch = m_str_utils.match local pluralize = require(en_utilities_module).pluralize local u = m_str_utils.char local ucfirst = m_str_utils.ucfirst local unpack = unpack or table.unpack -- Lua 5.2 compatibility function export.affix_variants(canonical, variants) local mappings = {} for _, variant in ipairs(variants) do mappings[variant] = canonical end return mappings end function export.id_mapping(default, ids) local mapping = { default = default } if ids then for id, target in pairs(ids) do mapping[id] = target end end return mapping end function export.id_mapping_with_affix_variants(base, id_variants) local mappings = {} for id, variants in pairs(id_variants) do for _, variant in ipairs(variants) do mappings[variant] = export.id_mapping(base, {[id] = base}) end end return mappings end function export.merge_tables(...) local result = {} for i = 1, select('#', ...) do local t = select(i, ...) if t then for k, v in pairs(t) do result[k] = v end end end return result end -- Export this so the category code in [[Module:category tree/etymology]] can access it. export.langs_with_lang_specific_data = { ["az"] = true, ["fi"] = true, ["fr"] = true, ["izh"] = true, ["la"] = true, ["sah"] = true, ["tr"] = true, ["trk-pro"] = true, } local default_pos = "टर्म" --[==[ intro: ===About different types of hyphens ("template", "display" and "lookup"):=== * The "template hyphen" is the per-script hyphen character that is used in template calls to indicate that a term is an affix. This is always a single Unicode char, but there may be multiple possible hyphens for a given script. Normally this is just the regular hyphen character "-", but for some non-Latin-script languages (currently only right-to-left languages), it is different. * The "display hyphen" is the string (which might be an empty string) that is added onto a term as displayed and linked, to indicate that a term is an affix. Currently this is always either the same as the template hyphen or an empty string, but the code below is written generally enough to handle arbitrary display hyphens. Specifically: *# For East Asian languages, the display hyphen is always blank. *# For Arabic-script languages, either tatweel (ـ) or ZWNJ (zero-width non-joiner) are allowed as template hyphens, where ZWNJ is supported primarily for Farsi, because some suffixes have non-joining behavior. The display hyphen corresponding to tatweel is also tatweel, but the display hyphen corresponding to ZWNJ is blank (tatweel is also the default display hyphen, for calls to {{tl|prefix}}/{{tl|suffix}}/etc. that don't include an explicit hyphen). * The "lookup hyphen" is the hyphen that is used when looking up language-specific affix mappings. (These mappings are discussed in more detail below when discussing link affixes.) It depends only on the script of the affix in question. Most scripts (including East Asian scripts) use a regular hyphen "-" as the lookup hyphen, but Hebrew and Arabic have their own lookup hyphens (respectively maqqef and tatweel). Note that for Arabic in particular, there are three possible template hyphens that are recognized (tatweel, ZWNJ and regular hyphen), but mappings must use tatweel. ===About different types of affixes ("template", "display", "link", "lookup" and "category"):=== * A "template affix" is an affix in its source form as it appears in a template call. Generally, a template affix has an attached template hyphen (see above) to indicate that it is an affix and indicate what type of affix it is (prefix, suffix, interfix or circumfix), but some of the older-style templates such as {{tl|suffix}}, {{tl|prefix}}, {{tl|confix}}, etc. have "positional" affixes where the presence of the affix in a certain position (e.g. the second or third parameter) indicates that it is a certain type of affix, whether or not it has an attached template hyphen. * A "display affix" is the corresponding affix as it is actually displayed to the user. The display affix may differ from the template affix for various reasons: *# The display affix may be specified explicitly using the {{para|alt<var>N</var>}} parameter, the `<alt:...>` inline modifier or a piped link of the form e.g. `<nowiki>[[-kas|-käs]]</nowiki>` (here indicating that the affix should display as `-käs` but be linked as `-kas`). Here, the template affix is arguably the entire piped link, while the display affix is `-käs`. *# Even in the absence of {{para|alt<var>N</var>}} parameters, `<alt:...>` inline modifiers and piped links, certain languages have differences between the "template hyphen" specified in the template (which always needs to be specified somehow or other in templates like {{tl|affix}}, to indicate that the term is an affix and what type of affix it is) and the display hyphen (see above), with corresponding differences between template and display affixes. * A (regular) "link affix" is the affix that is linked to when the affix is shown to the user. The link affix is usually the same as the display affix, but will differ in one of three circumstances: *# The display and link affixes are explicitly made different using {{para|alt<var>N</var>}} parameters, `<alt:...>` inline modifiers or piped links, as described above under "display affix". *# For certain languages, certain affixes are mapped to canonical form using language-specific mappings. For example, in Finnish, the adjective-forming suffix {{m|fi|-kas}} appears as {{m|fi|-käs}} after front vowels, but logically both forms are the same suffix and should be linked and categorized the same. Similarly, in Latin, the negative and intensive prefixes spelled {{m|la|in-}} (etymologically two distinct prefixes) appear variously as {{m|la|il-}}, {{m|la|im-}} or {{m|la|ir-}} before certain consonants. Mappings are supplied in [[Module:affix/lang-data/LANGCODE]] to convert Finnish {{m|fi|-käs}} to {{m|fi|-kas}} for linking and categorization purposes. Note that the affixes in the mappings use "lookup hyphens" to indicate the different types of affixes, which is usually the same as the template hyphen but differs for Arabic scripts, because there are multiple possible template hyphens recognized but only one lookup hyphen (tatweel). The form of the affix as used to look up in the mapping tables is called the "lookup affix"; see below. * A "stripped link affix" is a link affix that has been passed through the language's `stripDiacritics()` function, which may strip certain diacritics: e.g. macrons in Latin and Old English (indicating length); acute and grave accents in Russian and various other Slavic languages (indicating stress); vowel diacritics in most Arabic-script languages; and also tatweel in some Arabic-script languages (currently, for example, Persian, Arabic and Urdu strip tatweel, but Ottoman Turkish does not). Stripped link affixes are currently what are used in category names. * A "lookup affix" is the form of the affix as it is looked up in the language-specific lookup mappings described above under link affixes. There are actually two lookup stages: *# First, the affix is looked up in a modified display form (specifically, the same as the display affix but using lookup hyphens). Note that this lookup does not occur if an explicit display form is given using {{para|alt<var>N</var>}} or an `<alt:...>` inline modifier, or if the template affix contains a piped or embedded link. *# If no entry is found, the affix is then looked up in a modified link form (specifically, the modified display form passed through the language's `stripDiacritics()` function, which strips out certain diacritics, but with the lookup hyphen re-added if it was stripped out, as in the case of tatweel in many Arabic-script languages). The reason for this double lookup procedure is to allow for mappings that are sensitive to the extra diacritics, but also allow for mappings that are not sensitive in this fashion (e.g. Russian {{m|ru|-ливый}} occurs both stressed and unstressed, but is the same prefix either way). * A "category affix" is the affix as it appears in categories such as [[:Category:Finnish terms suffixed with -kas| Category:Finnish terms suffixed with ''-kas'']]. The category affix is currently always the same as the stripped link affix. This means that for Arabic-script languages, it may or may not have a tatweel, even if the correponding display affix and regular link affix have a tatweel. As mentioned above, stripDiacritics() strips tatweel for Arabic, Persian and Urdu, but not for Ottoman Turkish. Hence affix categories for Arabic, Persian and Urdu will be missing the tatweel, but affix categories for Ottoman Turkish will have it. An additional complication is that if the template affix contains a ZWNJ, the display (and hence the link and category affixes) will have no hyphen attached in any case. ]==] ----------------------------------------------------------------------------------------- -- Template and display hyphens -- ----------------------------------------------------------------------------------------- --[=[ Per-script template hyphens. The template hyphen is what appears in the {{affix}}/{{prefix}}/{{suffix}}/etc. template (in the wikicode). See above. They key below is a script code, after removing a hyphen and anything preceding. Hence, script codes like 'mnc-Mong' and 'xwo-Mong' will match 'Mong'. The value below is a string consisting of one or more hyphen characters. If there is more than one character, the default hyphen must come last and a non-default function must be specified for the script in display_hyphens[] so the correct display hyphen will be specified when no template hyphen is given (in {{suffix}}/{{prefix}}/etc.). Script detection is normally done when linking, but we need to do it earlier. However, under most circumstances we don't need to do script detection. Specifically, we only need to do script detection for a given language if (a) the language has multiple scripts; and (b) at least one of those scripts is listed below or in display_hyphens. ]=] local ZWNJ = u(0x200C) -- zero-width non-joiner local template_hyphens = { -- This covers all Arabic scripts. See above. ["Arab"] = "ـ" .. ZWNJ .. "-", -- tatweel + zero-width non-joiner + regular hyphen ["Aran"] = "ـ" .. ZWNJ .. "-", -- tatweel + zero-width non-joiner + regular hyphen ["Hebr"] = "־", -- Hebrew-specific hyphen termed "maqqef" ["Mong"] = "᠊", -- FIXME! What about the following right-to-left scripts? -- Adlm (Adlam) -- Armi (Imperial Aramaic) -- Avst (Avestan) -- Cprt (Cypriot) -- Khar (Kharoshthi) -- Mand (Mandaic/Mandaean) -- Mani (Manichaean) -- Mend (Mende/Mende Kikakui) -- Narb (Old North Arabian) -- Nbat (Nabataean/Nabatean) -- Nkoo (N'Ko) -- Orkh (Orkhon runes) -- Phli (Inscriptional Pahlavi) -- Phlp (Psalter Pahlavi) -- Phlv (Book Pahlavi) -- Phnx (Phoenician) -- Prti (Inscriptional Parthian) -- Rohg (Hanifi Rohingya) -- Samr (Samaritan) -- Sarb (Old South Arabian) -- Sogd (Sogdian) -- Sogo (Old Sogdian) -- Syrc (Syriac) -- Thaa (Thaana) } -- Hyphens used when looking up an affix in a lang-specific affix mapping. Defaults to regular hyphen (-). The keys -- are script codes, after removing a hyphen and anything preceding. Hence, script codes like 'mnc-Mong' and 'xwo-Mong' -- will match 'Mong'. The value should be a single character. local lookup_hyphens = { ["Hebr"] = "־", -- This covers all Arabic scripts. See above. ["Arab"] = "ـ", ["Aran"] = "ـ", } -- Default display-hyphen function. local function default_display_hyphen(script, hyph) if not hyph then return template_hyphens[script] or "-" end return hyph end local function arab_get_display_hyphen(_script, hyph) if not hyph then return "ـ" -- tatweel elseif hyph == ZWNJ then return "" else return hyph end end local function no_display_hyphen(_script, _hyph) return "" end -- Per-script function to return the correct display hyphen given the script and template hyphen. The function should -- also handle the case where the passed-in template hyphen is nil, corresponding to the situation in -- {{prefix}}/{{suffix}}/etc. where no template hyphen is specified. The key is the script code after removing a hyphen -- and anything preceding, so 'mnc-Mong', 'xwo-Mong' etc. will match 'Mong'. local display_hyphens = { -- This covers all Arabic scripts. See above. ["Arab"] = arab_get_display_hyphen, ["Aran"] = arab_get_display_hyphen, ["Bopo"] = no_display_hyphen, ["Hani"] = no_display_hyphen, ["Hans"] = no_display_hyphen, ["Hant"] = no_display_hyphen, -- The following is a mixture of several scripts. Hopefully the specs here are correct! ["Jpan"] = no_display_hyphen, ["Jurc"] = no_display_hyphen, ["Kitl"] = no_display_hyphen, ["Kits"] = no_display_hyphen, ["Laoo"] = no_display_hyphen, ["Nshu"] = no_display_hyphen, ["Shui"] = no_display_hyphen, ["Tang"] = no_display_hyphen, ["Thaa"] = no_display_hyphen, ["Thai"] = no_display_hyphen, ["Tibt"] = no_display_hyphen, } ----------------------------------------------------------------------------------------- -- Basic Utility functions -- ----------------------------------------------------------------------------------------- local function glossary_link(entry, text) text = text or entry return "[[Appendix:Glossary#" .. entry .. "|" .. text .. "]]" end local function track(page) if type(page) == "table" then for i, pg in ipairs(page) do page[i] = "affix/" .. pg end else page = "affix/" .. page end require("Module:debug/track")(page) end local function ine(val) return val ~= "" and val or nil end ----------------------------------------------------------------------------------------- -- Compound types -- ----------------------------------------------------------------------------------------- local function make_compound_type(typ, alttext) return { text = glossary_link(typ, alttext) .. " कंपाउंड", cat = typ .. " कंपाउंड", } end -- Make a compound type entry with a simple rather than glossary link. -- These should be replaced with a glossary link when the entry in the glossary -- is created. local function make_non_glossary_compound_type(typ, alttext) local link = alttext and "[[" .. typ .. "|" .. alttext .. "]]" or "[[" .. typ .. "]]" return { text = link .. " कंपाउंड", cat = typ .. " कंपाउंड", } end local function make_raw_compound_type(typ, alttext) return { text = glossary_link(typ, alttext), cat = pluralize(typ), } end local function make_borrowing_type(typ, alttext) return { text = glossary_link(typ, alttext), borrowing_type = pluralize(typ), } end export.etymology_types = { ["adapted borrowing"] = make_borrowing_type("adapted borrowing"), ["adap"] = "adapted borrowing", ["abor"] = "adapted borrowing", ["alliterative"] = make_non_glossary_compound_type("alliterative"), ["allit"] = "alliterative", ["antonymous"] = make_non_glossary_compound_type("antonymous"), ["ant"] = "antonymous", ["bahuvrihi"] = make_compound_type("bahuvrihi", "bahuvrīhi"), ["bahu"] = "बहुवृद्धि", ["bv"] = "बहुवृद्धि", ["coordinative"] = make_compound_type("coordinative"), ["coord"] = "coordinative", ["descriptive"] = make_compound_type("descriptive"), ["desc"] = "descriptive", ["determinative"] = make_compound_type("determinative"), ["det"] = "determinative", ["dvandva"] = make_compound_type("dvandva"), ["dva"] = "द्वंद्व", ["dvigu"] = make_compound_type("dvigu"), ["dvi"] = "द्विगु", ["endocentric"] = make_compound_type("endocentric"), ["endo"] = "endocentric", ["exocentric"] = make_compound_type("exocentric"), ["exo"] = "exocentric", ["izafet I"] = make_compound_type("izafet I"), ["iz1"] = "izafet I", ["izafet II"] = make_compound_type("izafet II"), ["iz2"] = "izafet II", ["izafet III"] = make_compound_type("izafet III"), ["iz3"] = "izafet III", ["karmadharaya"] = make_compound_type("karmadharaya", "karmadhāraya"), ["karma"] = "कर्मधारय", ["kd"] = "कर्मधारय", ["kenning"] = make_raw_compound_type("kenning"), ["ken"] = "kenning", ["rhyming"] = make_non_glossary_compound_type("rhyming"), ["rhy"] = "rhyming", ["synonymous"] = make_non_glossary_compound_type("synonymous"), ["syn"] = "synonymous", ["tatpurusa"] = make_compound_type("tatpurusa", "tatpuruṣa"), ["tat"] = "तत्पुरुष", ["tp"] = "तत्पुरुष", } local function process_etymology_type(typ, nocap, notext, has_parts) local text_sections = {} local categories = {} local borrowing_type if typ then local typdata = export.etymology_types[typ] if type(typdata) == "string" then typdata = export.etymology_types[typdata] end if not typdata then error("Internal error: Unrecognized type '" .. typ .. "'") end local text = typdata.text if not nocap then text = ucfirst(text) end local cat = typdata.cat borrowing_type = typdata.borrowing_type local oftext = typdata.oftext or " of" if not notext then table.insert(text_sections, text) if has_parts then table.insert(text_sections, oftext) table.insert(text_sections, " ") end end if cat then table.insert(categories, cat) end end return text_sections, categories, borrowing_type end ----------------------------------------------------------------------------------------- -- Utility functions -- ----------------------------------------------------------------------------------------- -- Iterate an array up to the greatest integer index found. local function ipairs_with_gaps(t) local indices = m_table.numKeys(t) local max_index = #indices > 0 and math.max(unpack(indices)) or 0 local i = 0 return function() if i < max_index then i = i + 1 return i, t[i] end end end export.ipairs_with_gaps = ipairs_with_gaps --[==[ Join formatted parts (in `parts_formatted`) together with any overall {{para|lit}} spec (in `lit`) plus categories, which are formatted by prepending the language name as found in `lang`. The value of an entry in `categories` can be either a string (which is formatted using `sort_key`) or a table of the form `{ {cat=<var>category</var>, sort_key=<var>sort_key</var>, sort_base=<var>sort_base</var>}`, specifying the sort key and sort base to use when formatting the category. If `nocat` is given, no categories are added; otherwise, `force_cat` causes categories to be added even on userspace pages. ]==] function export.join_formatted_parts(data) local cattext local lang = data.data.lang local force_cat = data.data.force_cat or debug_force_cat if data.data.nocat then cattext = "" else for i, cat in ipairs(data.categories) do if type(cat) == "table" then data.categories[i] = require(utilities_module).format_categories(lang:getFullName() .. " " .. cat.cat, lang, cat.sort_key, cat.sort_base, force_cat) else data.categories[i] = require(utilities_module).format_categories(lang:getFullName() .. " " .. cat, lang, data.data.sort_key, nil, force_cat) end end cattext = table.concat(data.categories) end local result = table.concat(data.parts_formatted, not data.separator_already_added and " +&lrm; " or nil) .. (data.data.lit and ", literally " .. m_links.mark(data.data.lit, "gloss") or "") local q = data.data.q local qq = data.data.qq local l = data.data.l local ll = data.data.ll local infl = data.data.infl if q and q[1] or qq and qq[1] or l and l[1] or ll and ll[1] or infl and infl[1] then result = require(pron_qualifier_module).format_qualifiers { lang = lang, text = result, q = q, qq = qq, l = l, ll = ll, infl = infl, } end return result .. cattext end -- Remove links and call lang:stripDiacritics(term). local function strip_diacritics_no_links(lang, term) return lang:stripDiacritics(m_links.remove_links(term)) end --[=[ Convert a raw part as passed into an entry point into a part ready for linking. `lang` and `sc` are the overall language and script objects. This uses the overall language and script objects as defaults for the part and parses off any fragment from the term. We need to do the latter so that fragments don't end up in categories and so that we correctly do affix mapping even in the presence of fragments. ]=] local function canonicalize_part(part, lang, sc) if not part then return end -- Save the original (user-specified, part-specific) value of `lang`. If such a value is specified, we don't insert -- a '*fixed with' category, and we format the part using format_derived() in [[Module:etymology]] rather than -- full_link() in [[Module:links]]. part.part_lang = part.lang part.lang = part.lang or lang part.sc = part.sc or sc local term = part.term if not term then return elseif not part.fragment then part.term, part.fragment = m_links.get_fragment(term) else part.term = m_links.get_fragment(term) end end --[==[ Construct a single linked part based on the information in `part`, for use by `show_affix()` and other entry points. This should be called after `canonicalize_part()` is called on the part. This is a thin wrapper around `full_link()` in [[Module:links]] unless `part.part_lang` is specified (indicating that a part-specific language was given), in which case `format_derived()` in [[Module:etymology]] is called to display a term in a language other than the language of the overall term (specified in `data.lang`). `data` contains the entire object passed into the entry point and is used to access information for constructing the categories added by `format_derived()`. ]==] function export.link_term(part, data, include_separator) local result if part.part_lang then result = require(etymology_module).format_derived { lang = data.lang, terms = {part}, sources = {part.lang}, sort_key = data.sort_key, nocat = data.nocat, template_name = "affix", qualifiers_labels_on_outside = true, borrowing_type = data.borrowing_type, force_cat = data.force_cat or debug_force_cat, } else result = m_links.full_link(part, "term", nil, "show qualifiers") end if include_separator and part.separator then return part.separator .. result else return result end end local function canonicalize_script_code(scode) -- Convert 'mnc-Mong', 'xwo-Mong' etc. to 'Mong'. return (scode:gsub("^.*%-", "")) end ----------------------------------------------------------------------------------------- -- Affix-handling functions -- ----------------------------------------------------------------------------------------- -- Figure out the appropriate script for the given affix and language (unless the script is explicitly passed in), and -- return the values of template_hyphens[], display_hyphens[] and lookup_hyphens[] for that script, substituting -- default values as appropriate. Four values are returned: -- DETECTED_SCRIPT, TEMPLATE_HYPHEN, DISPLAY_HYPHEN, LOOKUP_HYPHEN local function detect_script_and_hyphens(text, lang, sc) local scode -- 1. If the script is explicitly passed in, use it. if sc then scode = sc:getCode() else local possible_script_codes = lang:getScriptCodes() -- YUCK! `possible_script_codes` comes from loadData() so #possible_scripts doesn't work (always returns 0). local num_possible_script_codes = m_table.length(possible_script_codes) if num_possible_script_codes == 0 then -- This shouldn't happen; if the language has no script codes, -- the list {"None"} should be returned. error("Something is majorly wrong! Language " .. lang:getCanonicalName() .. " has no script codes.") end if num_possible_script_codes == 1 then -- 2. If the language has only one possible script, use it. scode = possible_script_codes[1] else -- 3. Check if any of the possible scripts for the language have non-default values for template_hyphens[] -- or display_hyphens[]. If so, we need to do script detection on the text. If not, just use "Latn", -- which may not be technically correct but produces the right results because Latn has all default -- values for template_hyphens[] and display_hyphens[]. local may_have_nondefault_hyphen = false for _, script_code in ipairs(possible_script_codes) do script_code = canonicalize_script_code(script_code) if template_hyphens[script_code] or display_hyphens[script_code] then may_have_nondefault_hyphen = true break end end if not may_have_nondefault_hyphen then scode = "Latn" else scode = lang:findBestScript(text):getCode() end end end scode = canonicalize_script_code(scode) local template_hyphen = template_hyphens[scode] or "-" local lookup_hyphen = lookup_hyphens[scode] or "-" local display_hyphen = display_hyphens[scode] or default_display_hyphen return scode, template_hyphen, display_hyphen, lookup_hyphen end --[=[ Given a template affix `term` and an affix type `affix_type`, change the relevant template hyphen(s) in the affix to the display or lookup hyphen specified in `new_hyphen`, or add them if they are missing. `new_hyphen` can be a string, specifying a fixed hyphen, or a function of two arguments (the script code `scode` and the discovered template hyphen, or nil of no relevant template hyphen is present). `thyph_re` is a Lua pattern (which must be enclosed in parens) that matches the possible template hyphens. Note that not all template hyphens present in the affix are changed, but only the "relevant" ones (e.g. for a prefix, a relevant template hyphen is one coming at the end of the affix). ]=] local function reconstruct_term_per_hyphens(term, affix_type, scode, thyph_re, new_hyphen) local function get_hyphen(hyph) if type(new_hyphen) == "string" then return new_hyphen end return new_hyphen(scode, hyph) end if affix_type == "non-affix" then return term elseif affix_type == "circumfix" then local before, before_hyphen, after_hyphen, after = rmatch(term, "^(.*)" .. thyph_re .. " " .. thyph_re .. "(.*)$") if not before or ulen(term) <= 3 then -- Unlike with other types of affixes, don't try to add hyphens in the middle of the term to convert it to -- a circumfix. Also, if the term is just hyphen + space + hyphen, return it. return term end return before .. get_hyphen(before_hyphen) .. " " .. get_hyphen(after_hyphen) .. after elseif affix_type == "infix" or affix_type == "interfix" then local before_hyphen, middle, after_hyphen = rmatch(term, "^" .. thyph_re .. "(.*)" .. thyph_re .. "$") if before_hyphen and ulen(term) <= 1 then -- If the term is just a hyphen, return it. return term end return get_hyphen(before_hyphen) .. (middle or term) .. get_hyphen(after_hyphen) elseif affix_type == "prefix" then local middle, after_hyphen = rmatch(term, "^(.*)" .. thyph_re .. "$") if middle and ulen(term) <= 1 then -- If the term is just a hyphen, return it. return term end return (middle or term) .. get_hyphen(after_hyphen) elseif affix_type == "suffix" then local before_hyphen, middle = rmatch(term, "^" .. thyph_re .. "(.*)$") if before_hyphen and ulen(term) <= 1 then -- If the term is just a hyphen, return it. return term end return get_hyphen(before_hyphen) .. (middle or term) else error(("Internal error: Unrecognized affix type '%s'"):format(affix_type)) end end --[=[ Look up a mapping from a given affix variant to the canonical form used in categories and links. The lookup tables are language-specific according to `lang`, and may be ID-specific according to `affix_id`. The affixes as they appear in the lookup tables (both the variant and the canonical form) are in "lookup affix" format (approximately speaking, they use a regular hyphen for most scripts, but a tatweel for Arabic-script entries and a maqqef for Hebrew-script entries), but the passed-in `affix` param is in "template affix" format (which differs from the lookup affix for Arabic-script entries, because more types of hyphens are allowed in template affixes; see the comments at the top of the file). The remaining parameters to this function are used to convert from template affixes to lookup affixes; see the reconstruct_term_per_hyphens() function above. If the affix contains brackets, no lookup is done. Otherwise, a two-stage process is used, first looking up the affix directly and then stripping diacritics and looking it up again. The reason for this is documented above in the comments at the top of the file (specifically, the comments describing lookup affixes). The value of a mapping can either be a string (do the mapping regardless of affix ID) or a table indexed by affix ID (where the special value `false` indicates no affix ID). The values of entries in this table can also be strings, or tables with keys `affix` and `id` (again, use `false` to indicate no ID). This allows an affix mapping to map from one ID to another (for example, this is used in English to map the [[an-]] prefix with no ID to the [[a-]] prefix with the ID 'not'). The Given a template affix `term` and an affix type `affix_type`, change the relevant template hyphen(s) in the affix to the display or lookup hyphen specified in `new_hyphen`, or add them if they are missing. `new_hyphen` can be a string, specifying a fixed hyphen, or a function of two arguments (the script code `scode` and the discovered template hyphen, or nil of no relevant template hyphen is present). `thyph_re` is a Lua pattern (which must be enclosed in parens) that matches the possible template hyphens. Note that not all template hyphens present in the affix are changed, but only the "relevant" ones (e.g. for a prefix, a relevant template hyphen is one coming at the end of the affix). ]=] local function lookup_affix_mapping(affix, affix_type, lang, scode, thyph_re, lookup_hyph, affix_id) local function do_lookup(afx) -- Ensure that the affix uses lookup hyphens regardless of whether it used a different type of hyphens before -- or no hyphens. local lookup_affix = reconstruct_term_per_hyphens(afx, affix_type, scode, thyph_re, lookup_hyph) local function do_lookup_for_langcode(langcode) if export.langs_with_lang_specific_data[langcode] then local langdata = mw.loadData(export.affix_lang_data_module_prefix .. langcode) if langdata.affix_mappings then local mapping = langdata.affix_mappings[lookup_affix] if mapping then if type(mapping) == "table" then mapping = mapping[affix_id] or mapping.default or mapping[affix_id or false] if mapping then return mapping end else return mapping end end end end end -- If `lang` is an etymology-only language, look for a mapping both for it and its full parent. local langcode = lang:getCode() local mapping = do_lookup_for_langcode(langcode) if mapping then return mapping end local full_langcode = lang:getFullCode() if full_langcode ~= langcode then mapping = do_lookup_for_langcode(full_langcode) if mapping then return mapping end end return nil end if affix:find("%[%[") then return nil end return do_lookup(affix) or do_lookup(lang:stripDiacritics(affix)) or nil end --[==[ For a given template term in a given language (see the definition of "template affix" near the top of the file), possibly in an explicitly specified script `sc` (but usually nil), return the term's affix type ({"prefix"}, {"interfix"}, {"suffix"}, {"circumfix"} or {"non-affix"}) along with the corresponding link and display affixes (see definitions near the top of the file); also the corresponding lookup affix (if `return_lookup_affix` is specified). The term passed in should already have any fragment (after the # sign) parsed off of it. Four values are returned: `affix_type`, `link_term`, `display_term` and `lookup_term`. The affix type can be passed in instead of autodetected; in this case, the template term need not have any attached hyphens, and the appropriate hyphens will be added in the appropriate places. If `do_affix_mapping` is specified, look up the affix in the lang-specific affix mappings, as described in the comment at the top of the file; otherwise, the link and display terms will always be the same. (They will be the same in any case if the template term has a bracketed link in it or is not an affix.) If `return_lookup_affix` is given, the fourth return value contains the term with appropriate lookup hyphens in the appropriate places; otherwise, it is the same as the display term. (This functionality is used in [[Module:category tree/affixes and compounds]] to convert link affixes into lookup affixes so that they can be looked up in the affix mapping tables.) Exported because used by [[Module:headword utilities]] to determine the affix type of a given pagename. ]==] function export.parse_term_for_affixes(term, lang, sc, affix_type, do_affix_mapping, return_lookup_affix, affix_id) if not term then return "non-affix", nil, nil, nil end if term == "^" then -- Indicates a null term to emulate the behavior of {{suffix|foo||bar}}. term = "" return "non-affix", term, term, term end if term:find("^%^") then -- HACK! ^ at the beginning of Korean languages has a special meaning, triggering capitalization of the -- transliteration. Don't interpret it as "force non-affix" for those languages. local langcode = lang:getCode() if langcode ~= "ko" and langcode ~= "okm" and langcode ~= "jje" then -- Formerly we allowed ^ to force non-affix type; this is now handled using an inline modifier -- <naf>, <root>, etc. Throw an error for the moment when the old way is encountered. error("Use of ^ to force non-affix status is no longer supported; use an inline modifier <naf> or <root> " .. "after the component") end end -- Remove an asterisk if the morpheme is reconstructed and add it back at the end. local reconstructed = "" if term:find("^%*") then reconstructed = "*" term = term:gsub("^%*", "") end local scode, thyph, dhyph, lhyph = detect_script_and_hyphens(term, lang, sc) thyph = "([" .. thyph .. "])" if not affix_type then if rfind(term, thyph .. " " .. thyph) then affix_type = "circumfix" else local has_beginning_hyphen = rfind(term, "^" .. thyph) local has_ending_hyphen = rfind(term, thyph .. "$") if has_beginning_hyphen and has_ending_hyphen then affix_type = "interfix" elseif has_ending_hyphen then affix_type = "prefix" elseif has_beginning_hyphen then affix_type = "suffix" else affix_type = "non-affix" end end end local link_term, display_term, lookup_term if affix_type == "non-affix" then link_term = term display_term = term lookup_term = term else display_term = reconstruct_term_per_hyphens(term, affix_type, scode, thyph, dhyph) if do_affix_mapping then link_term = lookup_affix_mapping(term, affix_type, lang, scode, thyph, lhyph, affix_id) -- The return value of lookup_affix_mapping() may be an affix mapping with lookup hyphens if a mapping -- was found, otherwise nil if a mapping was not found. We need to convert to display hyphens in -- either case, but in the latter case we can reuse the display term, which has already been converted. if link_term then link_term = reconstruct_term_per_hyphens(link_term, affix_type, scode, thyph, dhyph) else link_term = display_term end else link_term = display_term end if return_lookup_affix then lookup_term = reconstruct_term_per_hyphens(term, affix_type, scode, thyph, lhyph) else lookup_term = display_term end end link_term = reconstructed .. link_term display_term = reconstructed .. display_term lookup_term = reconstructed .. lookup_term return affix_type, link_term, display_term, lookup_term end --[==[ Add a hyphen to a term in the appropriate place, based on the specified affix type, stripping off any existing hyphens in that place. For example, if `affix_type` == {"prefix"}, we'll add a hyphen onto the end if it's not already there (or is of the wrong type). Three values are returned: the link term, display term and lookup term. This function is a thin wrapper around `parse_term_for_affixes`; see the comments above that function for more information. Note that this function is exposed externally because it is called by [[Module:category tree/affixes and compounds]]; see the comment in `parse_term_for_affixes` for more information. ]==] function export.make_affix(term, lang, sc, affix_type, do_affix_mapping, return_lookup_affix, affix_id) if not (affix_type == "prefix" or affix_type == "suffix" or affix_type == "circumfix" or affix_type == "infix" or affix_type == "interfix" or affix_type == "non-affix") then error("Internal error: Invalid affix type " .. (affix_type or "(nil)")) end local _, link_term, display_term, lookup_term = export.parse_term_for_affixes(term, lang, sc, affix_type, do_affix_mapping, return_lookup_affix, affix_id) return link_term, display_term, lookup_term end ----------------------------------------------------------------------------------------- -- Main entry points -- ----------------------------------------------------------------------------------------- --[==[ Core categorization logic for affixes. This is shared between show_affix(), show_compound_like() and get_affix_categories_only(). Returns the categories array and other metadata needed for formatting. ]==] local function generate_affix_categories(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) local text_sections, categories, borrowing_type = process_etymology_type(data.type, data.surface_analysis or data.nocap, data.notext, #data.parts > 0) data.borrowing_type = borrowing_type -- Process each part local whole_words = 0 local is_affix_or_compound = false -- Canonicalize and generate links for all the parts first; then do categorization in a separate step, because when -- processing the first part for categorization, we may access the second part and need it already canonicalized. for i, part in ipairs_with_gaps(data.parts) do part = part or {} data.parts[i] = part canonicalize_part(part, data.lang, data.sc) -- Determine affix type and get link and display terms (see text at top of file). Store them in the part -- (in fields that won't clash with fields used by full_link() in [[Module:links]] or link_term()), so they -- can be used in the loop below when categorizing. part.affix_type, part.affix_link_term, part.affix_display_term = export.parse_term_for_affixes(part.term, part.lang, part.sc, part.type, not part.alt, nil, part.id) -- If link_term is an empty string, either a bare ^ was specified or an empty term was used along with inline -- modifiers. The intention in either case is not to link the term. part.term = ine(part.affix_link_term) -- If part.alt would be the same as part.term, make it nil, so that it isn't erroneously tracked as being -- redundant alt text. part.alt = part.alt or (part.affix_display_term ~= part.affix_link_term and part.affix_display_term) or nil end if not data.noaffixcat then -- Now do categorization. for i, part in ipairs_with_gaps(data.parts) do local affix_type = part.affix_type if affix_type ~= "non-affix" then is_affix_or_compound = true -- Make a sort key. For the first part, use the second part as the sort key; the intention is that if the -- term has a prefix, sorting by the prefix won't be very useful so we sort by what follows, which is -- presumably the root. local part_sort_base = nil local part_sort = part.sort or data.sort_key if i == 1 and data.parts[2] and data.parts[2].term then local part2 = data.parts[2] -- If the second-part link term is empty, the user requested an unlinked term; avoid a wikitext error -- by using the alt value if available. part_sort_base = ine(part2.affix_link_term) or ine(part2.alt) if part_sort_base then part_sort_base = strip_diacritics_no_links(part2.lang, part_sort_base) end end if part.pos and rfind(part.pos, "patronym") then table.insert(categories, {cat = "patronymics", sort_key = part_sort, sort_base = part_sort_base}) end if data.pos ~= "टर्म" and part.pos and rfind(part.pos, "diminutive") then table.insert(categories, {cat = "diminutive " .. data.pos, sort_key = part_sort, sort_base = part_sort_base}) end -- Don't add a '*fixed with' category if the link term is empty or is in a different language. if ine(part.affix_link_term) and not part.part_lang then table.insert(categories, {cat = data.pos .. " " .. affix_type .. "ed with " .. strip_diacritics_no_links(part.lang, part.affix_link_term) .. (part.id and " (" .. part.id .. ")" or ""), sort_key = part_sort, sort_base = part_sort_base}) end else whole_words = whole_words + 1 if whole_words == 2 then is_affix_or_compound = true table.insert(categories, "कंपाउंड " .. data.pos) end end end -- Make sure there was either an affix or a compound (two or more non-affix terms). if not is_affix_or_compound and not data.allow_no_affixes_or_compounds then error("The parameters did not include any affixes, and the term is not a compound. Please provide at least one affix.") end end return text_sections, categories, borrowing_type end --[==[ Implementation of {{tl|affix}} and {{tl|surface analysis}}. `data` contains all the information describing the affixes to be displayed, and contains the following: * `.lang` ('''required'''): Overall language object. Different from term-specific language objects (see `.parts` below). * `.sc`: Overall script object (usually omitted). Different from term-specific script objects. * `.parts` ('''required'''): List of objects describing the affixes to show. The general format of each object is as would be passed to `full_link()`, except that the `.lang` field should be missing unless the term is of a language different from the overall `.lang` value (in such a case, the language name is shown along with the term and an additional "derived from" category is added). '''WARNING''': The data in `.parts` will be destructively modified. * `.pos`: Overall part of speech (used in categories, defaults to {"terms"}). Different from term-specific part of speech. * `.sort_key`: Overall sort key. Normally omitted except e.g. in Japanese. * `.type`: Type of compound, if the parts in `.parts` describe a compound. Strictly optional, and if supplied, the compound type is displayed before the parts (normally capitalized, unless `.nocap` is given). * `.nocap`: Don't capitalize the first letter of text displayed before the parts (relevant only if `.type` or `.surface_analysis` is given). * `.notext`: Don't display any text before the parts (relevant only if `.type` or `.surface_analysis` is given). * `.nocat`: Disable all categorization. * `.noaffixcat`: Disable affix (and compound) categorization. Relevant for e.g. blends, which may otherwise be incorrectly categorized as compound terms. * `.lit`: Overall literal definition. Different from term-specific literal definitions. * `.force_cat`: Always display categories, even on userspace pages. * `.surface_analysis`: Implement {{surface analysis}}; adds `By surface analysis, ` before the parts. '''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`. ]==] function export.show_affix(data) local text_sections, categories, _ = generate_affix_categories(data) -- Process each part for display local parts_formatted = {} for i, part in ipairs_with_gaps(data.parts) do -- Make a link for the part table.insert(parts_formatted, export.link_term(part, data, "include_separator")) end if data.surface_analysis then local text = "by " .. glossary_link("surface analysis") .. ", " if not data.nocap then text = ucfirst(text) end table.insert(text_sections, 1, text) end table.insert(text_sections, export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories, separator_already_added = true }) return table.concat(text_sections) end --[==[ Get only the categories that would be generated by show_affix(), without any text output or formatting. This is used by Module:etymon to get affix categorization. Returns an array of category objects, where each entry is either a string (simple category name) or a table with keys `cat`, `sort_key`, and `sort_base` for more complex categorization. `data` should have the same structure as passed to show_affix(): * `.lang` (required): Overall language object * `.parts` (required): Array of affix part objects with `.term`, `.lang`, `.id`, etc. * `.pos`: Part of speech (defaults to "terms") * `.sort_key`: Overall sort key for categories '''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`. ]==] function export.get_affix_categories_only(data) local _, categories, _ = generate_affix_categories(data) return categories end function export.show_surface_analysis(data) data.surface_analysis = true data.allow_no_affixes_or_compounds = true return export.show_affix(data) end --[==[ Implementation of {{tl|compound}}. '''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`. ]==] function export.show_compound(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) local text_sections, categories, borrowing_type = process_etymology_type(data.type, data.nocap, data.notext, #data.parts > 0) data.borrowing_type = borrowing_type local parts_formatted = {} table.insert(categories, "कंपाउंड " .. data.pos) -- Make links out of all the parts local whole_words = 0 for i, part in ipairs(data.parts) do canonicalize_part(part, data.lang, data.sc) -- Determine affix type and get link and display terms (see text at top of file). local affix_type, link_term, display_term = export.parse_term_for_affixes(part.term, part.lang, part.sc, part.type, not part.alt, nil, part.id) -- If the term is an interfix or the type was explicitly given, recognize it as such (which means e.g. that we -- will display the term without hyphens for East Asian languages). Otherwise, ignore the fact that it looks -- like an affix and display as specified in the template (but pay attention to the detected affix type for -- certain tracking purposes). if affix_type == "interfix" or (part.type and part.type ~= "non-affix") then -- If link_term is an empty string, either a bare ^ was specified or an empty term was used along with -- inline modifiers. The intention in either case is not to link the term. Don't add a '*fixed with' -- category in this case, or if the term is in a different language. -- If part.alt would be the same as part.term, make it nil, so that it isn't erroneously tracked as being -- redundant alt text. if link_term and link_term ~= "" and not part.part_lang then table.insert(categories, {cat = data.pos .. " " .. affix_type .. "ed with " .. strip_diacritics_no_links(part.lang, link_term), sort_key = part.sort or data.sort_key}) end part.term = link_term ~= "" and link_term or nil part.alt = part.alt or (display_term ~= link_term and display_term) or nil else if affix_type ~= "non-affix" then local langcode = data.lang:getCode() -- If `data.lang` is an etymology-only language, track both using its code and its full parent's code. track { affix_type, affix_type .. "/lang/" .. langcode } local full_langcode = data.lang:getFullCode() if langcode ~= full_langcode then track(affix_type .. "/lang/" .. full_langcode) end else whole_words = whole_words + 1 end end table.insert(parts_formatted, export.link_term(part, data, "include_separator")) end if whole_words == 1 then track("one whole word") elseif whole_words == 0 then track("looks like confix") end table.insert(text_sections, export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories, separator_already_added = true }) return table.concat(text_sections) end --[==[ Implementation of {{tl|blend}}, {{tl|univerbation}} and similar "compound-like" templates. '''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`. ]==] function export.show_compound_like(data) data.allow_no_affixes_or_compounds = true local text_sections, categories, _ = generate_affix_categories(data) if data.cat then table.insert(categories, data.cat) end -- Process each part for display local parts_formatted = {} for i, part in ipairs_with_gaps(data.parts) do -- Make a link for the part table.insert(parts_formatted, export.link_term(part, data, "include_separator")) end if #data.parts > 0 and data.oftext then table.insert(text_sections, 1, " " .. data.oftext .. " ") end if data.text then table.insert(text_sections, 1, data.text) end table.insert(text_sections, export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories, separator_already_added = true }) return table.concat(text_sections) end --[==[ Make `part` (a structure holding information on an affix part) into an affix of type `affix_type`, and apply any relevant affix mappings. For example, if the desired affix type is "suffix", this will (in general) add a hyphen onto the beginning of the term, alt, tr and ts components of the part if not already present. The hyphen that's added is the "display hyphen" (see above) and may be script-specific. (In the case of East Asian scripts, the display hyphen is an empty string whereas the template hyphen is the regular hyphen, meaning that any regular hyphen at the beginning of the part will be effectively removed.) `lang` and `sc` hold overall language and script objects. Note that this also applies any language-specific affix mappings, so that e.g. if the language is Finnish and the user specified [[-käs]] in the affix and didn't specify an `.alt` value, `part.term` will contain [[-kas]] and `part.alt` will contain [[-käs]]. This function is used by the "legacy" templates ({{tl|prefix}}, {{tl|suffix}}, {{tl|confix}}, etc.) where the nature of the affix is specified by the template itself rather than auto-determined from the affix, as is the case with {{tl|affix}}. '''WARNING''': This destructively modifies `part`. ]==] local function make_part_into_affix(part, lang, sc, affix_type) canonicalize_part(part, lang, sc) local link_term, display_term = export.make_affix(part.term, part.lang, part.sc, affix_type, not part.alt, nil, part.id) part.term = link_term -- When we don't specify `do_affix_mapping` to make_affix(), link and display terms (first and second retvals of -- make_affix()) are the same. -- If part.alt would be the same as part.term, make it nil, so that it isn't erroneously tracked as being -- redundant alt text. part.alt = part.alt and export.make_affix(part.alt, part.lang, part.sc, affix_type) or (display_term ~= link_term and display_term) or nil local Latn = require(scripts_module).getByCode("Latn") part.tr = export.make_affix(part.tr, part.lang, Latn, affix_type) part.ts = export.make_affix(part.ts, part.lang, Latn, affix_type) end local function track_wrong_affix_type(template, part, expected_affix_type) if part and not part.type then local affix_type = export.parse_term_for_affixes(part.term, part.lang, part.sc) if affix_type ~= expected_affix_type then local part_name = expected_affix_type or "base" local langcode = part.lang:getCode() local full_langcode = part.lang:getFullCode() require("Module:debug/track") { template, template .. "/" .. part_name, template .. "/" .. part_name .. "/" .. (affix_type or "none"), template .. "/" .. part_name .. "/" .. (affix_type or "none") .. "/lang/" .. langcode } -- If `part.lang` is an etymology-only language, track both using its code and its full parent's code. if full_langcode ~= langcode then require("Module:debug/track")( template .. "/" .. part_name .. "/" .. (affix_type or "none") .. "/lang/" .. full_langcode ) end end end end local function insert_affix_category(categories, pos, affix_type, part, sort_key, sort_base) -- Don't add a '*fixed with' category if the link term is empty or is in a different language. if part.term and not part.part_lang then local cat = pos .. " " .. affix_type .. "ed with " .. strip_diacritics_no_links(part.lang, part.term) .. (part.id and " (" .. part.id .. ")" or "") if sort_key or sort_base then table.insert(categories, {cat = cat, sort_key = sort_key, sort_base = sort_base}) else table.insert(categories, cat) end end end --[==[ Implementation of {{tl|circumfix}}. '''WARNING''': This destructively modifies both `data` and `.prefix`, `.base` and `.suffix`. ]==] function export.show_circumfix(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. make_part_into_affix(data.prefix, data.lang, data.sc, "prefix") make_part_into_affix(data.suffix, data.lang, data.sc, "suffix") track_wrong_affix_type("circumfix", data.prefix, "prefix") track_wrong_affix_type("circumfix", data.base, nil) track_wrong_affix_type("circumfix", data.suffix, "suffix") -- Create circumfix term. local circumfix = nil if data.prefix.term and data.suffix.term then circumfix = data.prefix.term .. " " .. data.suffix.term data.prefix.alt = data.prefix.alt or data.prefix.term data.suffix.alt = data.suffix.alt or data.suffix.term data.prefix.term = circumfix data.suffix.term = circumfix end -- Make links out of all the parts. local parts_formatted = {} local categories = {} local sort_base if data.base.term then sort_base = strip_diacritics_no_links(data.base.lang, data.base.term) end table.insert(parts_formatted, export.link_term(data.prefix, data)) table.insert(parts_formatted, export.link_term(data.base, data)) table.insert(parts_formatted, export.link_term(data.suffix, data)) -- Insert the categories, but don't add a '*fixed with' category if the link term is in a different language. if not data.prefix.part_lang then table.insert(categories, {cat=data.pos .. " circumfixed with " .. strip_diacritics_no_links(data.prefix.lang, circumfix), sort_key=data.sort_key, sort_base=sort_base}) end return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end --[==[ Implementation of {{tl|confix}}. '''WARNING''': This destructively modifies both `data` and `.prefix`, `.base` and `.suffix`. ]==] function export.show_confix(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. make_part_into_affix(data.prefix, data.lang, data.sc, "prefix") make_part_into_affix(data.suffix, data.lang, data.sc, "suffix") track_wrong_affix_type("confix", data.prefix, "prefix") track_wrong_affix_type("confix", data.base, nil) track_wrong_affix_type("confix", data.suffix, "suffix") -- Make links out of all the parts. local parts_formatted = {} local prefix_sort_base if data.base and data.base.term then prefix_sort_base = strip_diacritics_no_links(data.base.lang, data.base.term) elseif data.suffix.term then prefix_sort_base = strip_diacritics_no_links(data.suffix.lang, data.suffix.term) end -- Insert the categories and parts. local categories = {} table.insert(parts_formatted, export.link_term(data.prefix, data)) insert_affix_category(categories, data.pos, "prefix", data.prefix, data.sort_key, prefix_sort_base) if data.base then table.insert(parts_formatted, export.link_term(data.base, data)) end table.insert(parts_formatted, export.link_term(data.suffix, data)) -- FIXME, should we be specifying a sort base here? insert_affix_category(categories, data.pos, "suffix", data.suffix) return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end --[==[ Implementation of {{tl|infix}}. '''WARNING''': This destructively modifies both `data` and `.base` and `.infix`. ]==] function export.show_infix(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. make_part_into_affix(data.infix, data.lang, data.sc, "infix") track_wrong_affix_type("infix", data.base, nil) track_wrong_affix_type("infix", data.infix, "infix") -- Make links out of all the parts. local parts_formatted = {} local categories = {} table.insert(parts_formatted, export.link_term(data.base, data)) table.insert(parts_formatted, export.link_term(data.infix, data)) -- Insert the categories. -- FIXME, should we be specifying a sort base here? insert_affix_category(categories, data.pos, "infix", data.infix) return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end --[==[ Implementation of {{tl|prefix}}. '''WARNING''': This destructively modifies both `data` and the structures within `.prefixes`, as well as `.base`. ]==] function export.show_prefix(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. for i, prefix in ipairs(data.prefixes) do make_part_into_affix(prefix, data.lang, data.sc, "prefix") end for i, prefix in ipairs(data.prefixes) do track_wrong_affix_type("prefix", prefix, "prefix") end track_wrong_affix_type("prefix", data.base, nil) -- Make links out of all the parts. local parts_formatted = {} local first_sort_base = nil local categories = {} if data.prefixes[2] then first_sort_base = ine(data.prefixes[2].term) or ine(data.prefixes[2].alt) if first_sort_base then first_sort_base = strip_diacritics_no_links(data.prefixes[2].lang, first_sort_base) end elseif data.base then first_sort_base = ine(data.base.term) or ine(data.base.alt) if first_sort_base then first_sort_base = strip_diacritics_no_links(data.base.lang, first_sort_base) end end for i, prefix in ipairs(data.prefixes) do table.insert(parts_formatted, export.link_term(prefix, data)) insert_affix_category(categories, data.pos, "prefix", prefix, data.sort_key, i == 1 and first_sort_base or nil) end if data.base then table.insert(parts_formatted, export.link_term(data.base, data)) else table.insert(parts_formatted, "") end return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end --[==[ Implementation of {{tl|suffix}}. '''WARNING''': This destructively modifies both `data` and the structures within `.suffixes`, as well as `.base`. ]==] function export.show_suffix(data) local categories = {} data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. for i, suffix in ipairs(data.suffixes) do make_part_into_affix(suffix, data.lang, data.sc, "suffix") end track_wrong_affix_type("suffix", data.base, nil) for i, suffix in ipairs(data.suffixes) do track_wrong_affix_type("suffix", suffix, "suffix") end -- Make links out of all the parts. local parts_formatted = {} if data.base then table.insert(parts_formatted, export.link_term(data.base, data)) else table.insert(parts_formatted, "") end for i, suffix in ipairs(data.suffixes) do table.insert(parts_formatted, export.link_term(suffix, data)) end -- Insert the categories. for i, suffix in ipairs(data.suffixes) do -- FIXME, should we be specifying a sort base here? insert_affix_category(categories, data.pos, "suffix", suffix) if suffix.pos and rfind(suffix.pos, "patronym") then table.insert(categories, "patronymics") end end return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end return export 48koefxvfvanurot1tu03qh9gkn7f5b 487946 487942 2026-09-03T18:01:59Z SM7 6218 टर्म को टर्मs बनाने की जरूरत नहीं 487946 Scribunto text/plain local export = {} local debug_force_cat = false -- if set to true, always display categories even on userspace pages local m_links = require("Module:links") local m_str_utils = require("Module:string utilities") local m_table = require("Module:table") local en_utilities_module = "Module:en-utilities" local etymology_module = "Module:etymology" local pron_qualifier_module = "Module:pron qualifier" local scripts_module = "Module:scripts" local utilities_module = "Module:utilities" -- Export this so the category code in [[Module:category tree/etymology]] can access it. export.affix_lang_data_module_prefix = "Module:affix/lang-data/" local ulen = m_str_utils.len local rfind = m_str_utils.find local rmatch = m_str_utils.match local pluralize = require(en_utilities_module).pluralize local u = m_str_utils.char local ucfirst = m_str_utils.ucfirst local unpack = unpack or table.unpack -- Lua 5.2 compatibility function export.affix_variants(canonical, variants) local mappings = {} for _, variant in ipairs(variants) do mappings[variant] = canonical end return mappings end function export.id_mapping(default, ids) local mapping = { default = default } if ids then for id, target in pairs(ids) do mapping[id] = target end end return mapping end function export.id_mapping_with_affix_variants(base, id_variants) local mappings = {} for id, variants in pairs(id_variants) do for _, variant in ipairs(variants) do mappings[variant] = export.id_mapping(base, {[id] = base}) end end return mappings end function export.merge_tables(...) local result = {} for i = 1, select('#', ...) do local t = select(i, ...) if t then for k, v in pairs(t) do result[k] = v end end end return result end -- Export this so the category code in [[Module:category tree/etymology]] can access it. export.langs_with_lang_specific_data = { ["az"] = true, ["fi"] = true, ["fr"] = true, ["izh"] = true, ["la"] = true, ["sah"] = true, ["tr"] = true, ["trk-pro"] = true, } local default_pos = "टर्म" --[==[ intro: ===About different types of hyphens ("template", "display" and "lookup"):=== * The "template hyphen" is the per-script hyphen character that is used in template calls to indicate that a term is an affix. This is always a single Unicode char, but there may be multiple possible hyphens for a given script. Normally this is just the regular hyphen character "-", but for some non-Latin-script languages (currently only right-to-left languages), it is different. * The "display hyphen" is the string (which might be an empty string) that is added onto a term as displayed and linked, to indicate that a term is an affix. Currently this is always either the same as the template hyphen or an empty string, but the code below is written generally enough to handle arbitrary display hyphens. Specifically: *# For East Asian languages, the display hyphen is always blank. *# For Arabic-script languages, either tatweel (ـ) or ZWNJ (zero-width non-joiner) are allowed as template hyphens, where ZWNJ is supported primarily for Farsi, because some suffixes have non-joining behavior. The display hyphen corresponding to tatweel is also tatweel, but the display hyphen corresponding to ZWNJ is blank (tatweel is also the default display hyphen, for calls to {{tl|prefix}}/{{tl|suffix}}/etc. that don't include an explicit hyphen). * The "lookup hyphen" is the hyphen that is used when looking up language-specific affix mappings. (These mappings are discussed in more detail below when discussing link affixes.) It depends only on the script of the affix in question. Most scripts (including East Asian scripts) use a regular hyphen "-" as the lookup hyphen, but Hebrew and Arabic have their own lookup hyphens (respectively maqqef and tatweel). Note that for Arabic in particular, there are three possible template hyphens that are recognized (tatweel, ZWNJ and regular hyphen), but mappings must use tatweel. ===About different types of affixes ("template", "display", "link", "lookup" and "category"):=== * A "template affix" is an affix in its source form as it appears in a template call. Generally, a template affix has an attached template hyphen (see above) to indicate that it is an affix and indicate what type of affix it is (prefix, suffix, interfix or circumfix), but some of the older-style templates such as {{tl|suffix}}, {{tl|prefix}}, {{tl|confix}}, etc. have "positional" affixes where the presence of the affix in a certain position (e.g. the second or third parameter) indicates that it is a certain type of affix, whether or not it has an attached template hyphen. * A "display affix" is the corresponding affix as it is actually displayed to the user. The display affix may differ from the template affix for various reasons: *# The display affix may be specified explicitly using the {{para|alt<var>N</var>}} parameter, the `<alt:...>` inline modifier or a piped link of the form e.g. `<nowiki>[[-kas|-käs]]</nowiki>` (here indicating that the affix should display as `-käs` but be linked as `-kas`). Here, the template affix is arguably the entire piped link, while the display affix is `-käs`. *# Even in the absence of {{para|alt<var>N</var>}} parameters, `<alt:...>` inline modifiers and piped links, certain languages have differences between the "template hyphen" specified in the template (which always needs to be specified somehow or other in templates like {{tl|affix}}, to indicate that the term is an affix and what type of affix it is) and the display hyphen (see above), with corresponding differences between template and display affixes. * A (regular) "link affix" is the affix that is linked to when the affix is shown to the user. The link affix is usually the same as the display affix, but will differ in one of three circumstances: *# The display and link affixes are explicitly made different using {{para|alt<var>N</var>}} parameters, `<alt:...>` inline modifiers or piped links, as described above under "display affix". *# For certain languages, certain affixes are mapped to canonical form using language-specific mappings. For example, in Finnish, the adjective-forming suffix {{m|fi|-kas}} appears as {{m|fi|-käs}} after front vowels, but logically both forms are the same suffix and should be linked and categorized the same. Similarly, in Latin, the negative and intensive prefixes spelled {{m|la|in-}} (etymologically two distinct prefixes) appear variously as {{m|la|il-}}, {{m|la|im-}} or {{m|la|ir-}} before certain consonants. Mappings are supplied in [[Module:affix/lang-data/LANGCODE]] to convert Finnish {{m|fi|-käs}} to {{m|fi|-kas}} for linking and categorization purposes. Note that the affixes in the mappings use "lookup hyphens" to indicate the different types of affixes, which is usually the same as the template hyphen but differs for Arabic scripts, because there are multiple possible template hyphens recognized but only one lookup hyphen (tatweel). The form of the affix as used to look up in the mapping tables is called the "lookup affix"; see below. * A "stripped link affix" is a link affix that has been passed through the language's `stripDiacritics()` function, which may strip certain diacritics: e.g. macrons in Latin and Old English (indicating length); acute and grave accents in Russian and various other Slavic languages (indicating stress); vowel diacritics in most Arabic-script languages; and also tatweel in some Arabic-script languages (currently, for example, Persian, Arabic and Urdu strip tatweel, but Ottoman Turkish does not). Stripped link affixes are currently what are used in category names. * A "lookup affix" is the form of the affix as it is looked up in the language-specific lookup mappings described above under link affixes. There are actually two lookup stages: *# First, the affix is looked up in a modified display form (specifically, the same as the display affix but using lookup hyphens). Note that this lookup does not occur if an explicit display form is given using {{para|alt<var>N</var>}} or an `<alt:...>` inline modifier, or if the template affix contains a piped or embedded link. *# If no entry is found, the affix is then looked up in a modified link form (specifically, the modified display form passed through the language's `stripDiacritics()` function, which strips out certain diacritics, but with the lookup hyphen re-added if it was stripped out, as in the case of tatweel in many Arabic-script languages). The reason for this double lookup procedure is to allow for mappings that are sensitive to the extra diacritics, but also allow for mappings that are not sensitive in this fashion (e.g. Russian {{m|ru|-ливый}} occurs both stressed and unstressed, but is the same prefix either way). * A "category affix" is the affix as it appears in categories such as [[:Category:Finnish terms suffixed with -kas| Category:Finnish terms suffixed with ''-kas'']]. The category affix is currently always the same as the stripped link affix. This means that for Arabic-script languages, it may or may not have a tatweel, even if the correponding display affix and regular link affix have a tatweel. As mentioned above, stripDiacritics() strips tatweel for Arabic, Persian and Urdu, but not for Ottoman Turkish. Hence affix categories for Arabic, Persian and Urdu will be missing the tatweel, but affix categories for Ottoman Turkish will have it. An additional complication is that if the template affix contains a ZWNJ, the display (and hence the link and category affixes) will have no hyphen attached in any case. ]==] ----------------------------------------------------------------------------------------- -- Template and display hyphens -- ----------------------------------------------------------------------------------------- --[=[ Per-script template hyphens. The template hyphen is what appears in the {{affix}}/{{prefix}}/{{suffix}}/etc. template (in the wikicode). See above. They key below is a script code, after removing a hyphen and anything preceding. Hence, script codes like 'mnc-Mong' and 'xwo-Mong' will match 'Mong'. The value below is a string consisting of one or more hyphen characters. If there is more than one character, the default hyphen must come last and a non-default function must be specified for the script in display_hyphens[] so the correct display hyphen will be specified when no template hyphen is given (in {{suffix}}/{{prefix}}/etc.). Script detection is normally done when linking, but we need to do it earlier. However, under most circumstances we don't need to do script detection. Specifically, we only need to do script detection for a given language if (a) the language has multiple scripts; and (b) at least one of those scripts is listed below or in display_hyphens. ]=] local ZWNJ = u(0x200C) -- zero-width non-joiner local template_hyphens = { -- This covers all Arabic scripts. See above. ["Arab"] = "ـ" .. ZWNJ .. "-", -- tatweel + zero-width non-joiner + regular hyphen ["Aran"] = "ـ" .. ZWNJ .. "-", -- tatweel + zero-width non-joiner + regular hyphen ["Hebr"] = "־", -- Hebrew-specific hyphen termed "maqqef" ["Mong"] = "᠊", -- FIXME! What about the following right-to-left scripts? -- Adlm (Adlam) -- Armi (Imperial Aramaic) -- Avst (Avestan) -- Cprt (Cypriot) -- Khar (Kharoshthi) -- Mand (Mandaic/Mandaean) -- Mani (Manichaean) -- Mend (Mende/Mende Kikakui) -- Narb (Old North Arabian) -- Nbat (Nabataean/Nabatean) -- Nkoo (N'Ko) -- Orkh (Orkhon runes) -- Phli (Inscriptional Pahlavi) -- Phlp (Psalter Pahlavi) -- Phlv (Book Pahlavi) -- Phnx (Phoenician) -- Prti (Inscriptional Parthian) -- Rohg (Hanifi Rohingya) -- Samr (Samaritan) -- Sarb (Old South Arabian) -- Sogd (Sogdian) -- Sogo (Old Sogdian) -- Syrc (Syriac) -- Thaa (Thaana) } -- Hyphens used when looking up an affix in a lang-specific affix mapping. Defaults to regular hyphen (-). The keys -- are script codes, after removing a hyphen and anything preceding. Hence, script codes like 'mnc-Mong' and 'xwo-Mong' -- will match 'Mong'. The value should be a single character. local lookup_hyphens = { ["Hebr"] = "־", -- This covers all Arabic scripts. See above. ["Arab"] = "ـ", ["Aran"] = "ـ", } -- Default display-hyphen function. local function default_display_hyphen(script, hyph) if not hyph then return template_hyphens[script] or "-" end return hyph end local function arab_get_display_hyphen(_script, hyph) if not hyph then return "ـ" -- tatweel elseif hyph == ZWNJ then return "" else return hyph end end local function no_display_hyphen(_script, _hyph) return "" end -- Per-script function to return the correct display hyphen given the script and template hyphen. The function should -- also handle the case where the passed-in template hyphen is nil, corresponding to the situation in -- {{prefix}}/{{suffix}}/etc. where no template hyphen is specified. The key is the script code after removing a hyphen -- and anything preceding, so 'mnc-Mong', 'xwo-Mong' etc. will match 'Mong'. local display_hyphens = { -- This covers all Arabic scripts. See above. ["Arab"] = arab_get_display_hyphen, ["Aran"] = arab_get_display_hyphen, ["Bopo"] = no_display_hyphen, ["Hani"] = no_display_hyphen, ["Hans"] = no_display_hyphen, ["Hant"] = no_display_hyphen, -- The following is a mixture of several scripts. Hopefully the specs here are correct! ["Jpan"] = no_display_hyphen, ["Jurc"] = no_display_hyphen, ["Kitl"] = no_display_hyphen, ["Kits"] = no_display_hyphen, ["Laoo"] = no_display_hyphen, ["Nshu"] = no_display_hyphen, ["Shui"] = no_display_hyphen, ["Tang"] = no_display_hyphen, ["Thaa"] = no_display_hyphen, ["Thai"] = no_display_hyphen, ["Tibt"] = no_display_hyphen, } ----------------------------------------------------------------------------------------- -- Basic Utility functions -- ----------------------------------------------------------------------------------------- local function glossary_link(entry, text) text = text or entry return "[[Appendix:Glossary#" .. entry .. "|" .. text .. "]]" end local function track(page) if type(page) == "table" then for i, pg in ipairs(page) do page[i] = "affix/" .. pg end else page = "affix/" .. page end require("Module:debug/track")(page) end local function ine(val) return val ~= "" and val or nil end ----------------------------------------------------------------------------------------- -- Compound types -- ----------------------------------------------------------------------------------------- local function make_compound_type(typ, alttext) return { text = glossary_link(typ, alttext) .. " कंपाउंड", cat = typ .. " कंपाउंड", } end -- Make a compound type entry with a simple rather than glossary link. -- These should be replaced with a glossary link when the entry in the glossary -- is created. local function make_non_glossary_compound_type(typ, alttext) local link = alttext and "[[" .. typ .. "|" .. alttext .. "]]" or "[[" .. typ .. "]]" return { text = link .. " कंपाउंड", cat = typ .. " कंपाउंड", } end local function make_raw_compound_type(typ, alttext) return { text = glossary_link(typ, alttext), cat = pluralize(typ), } end local function make_borrowing_type(typ, alttext) return { text = glossary_link(typ, alttext), borrowing_type = pluralize(typ), } end export.etymology_types = { ["adapted borrowing"] = make_borrowing_type("adapted borrowing"), ["adap"] = "adapted borrowing", ["abor"] = "adapted borrowing", ["alliterative"] = make_non_glossary_compound_type("alliterative"), ["allit"] = "alliterative", ["antonymous"] = make_non_glossary_compound_type("antonymous"), ["ant"] = "antonymous", ["bahuvrihi"] = make_compound_type("bahuvrihi", "bahuvrīhi"), ["bahu"] = "बहुवृद्धि", ["bv"] = "बहुवृद्धि", ["coordinative"] = make_compound_type("coordinative"), ["coord"] = "coordinative", ["descriptive"] = make_compound_type("descriptive"), ["desc"] = "descriptive", ["determinative"] = make_compound_type("determinative"), ["det"] = "determinative", ["dvandva"] = make_compound_type("dvandva"), ["dva"] = "द्वंद्व", ["dvigu"] = make_compound_type("dvigu"), ["dvi"] = "द्विगु", ["endocentric"] = make_compound_type("endocentric"), ["endo"] = "endocentric", ["exocentric"] = make_compound_type("exocentric"), ["exo"] = "exocentric", ["izafet I"] = make_compound_type("izafet I"), ["iz1"] = "izafet I", ["izafet II"] = make_compound_type("izafet II"), ["iz2"] = "izafet II", ["izafet III"] = make_compound_type("izafet III"), ["iz3"] = "izafet III", ["karmadharaya"] = make_compound_type("karmadharaya", "karmadhāraya"), ["karma"] = "कर्मधारय", ["kd"] = "कर्मधारय", ["kenning"] = make_raw_compound_type("kenning"), ["ken"] = "kenning", ["rhyming"] = make_non_glossary_compound_type("rhyming"), ["rhy"] = "rhyming", ["synonymous"] = make_non_glossary_compound_type("synonymous"), ["syn"] = "synonymous", ["tatpurusa"] = make_compound_type("tatpurusa", "tatpuruṣa"), ["tat"] = "तत्पुरुष", ["tp"] = "तत्पुरुष", } local function process_etymology_type(typ, nocap, notext, has_parts) local text_sections = {} local categories = {} local borrowing_type if typ then local typdata = export.etymology_types[typ] if type(typdata) == "string" then typdata = export.etymology_types[typdata] end if not typdata then error("Internal error: Unrecognized type '" .. typ .. "'") end local text = typdata.text if not nocap then text = ucfirst(text) end local cat = typdata.cat borrowing_type = typdata.borrowing_type local oftext = typdata.oftext or " of" if not notext then table.insert(text_sections, text) if has_parts then table.insert(text_sections, oftext) table.insert(text_sections, " ") end end if cat then table.insert(categories, cat) end end return text_sections, categories, borrowing_type end ----------------------------------------------------------------------------------------- -- Utility functions -- ----------------------------------------------------------------------------------------- -- Iterate an array up to the greatest integer index found. local function ipairs_with_gaps(t) local indices = m_table.numKeys(t) local max_index = #indices > 0 and math.max(unpack(indices)) or 0 local i = 0 return function() if i < max_index then i = i + 1 return i, t[i] end end end export.ipairs_with_gaps = ipairs_with_gaps --[==[ Join formatted parts (in `parts_formatted`) together with any overall {{para|lit}} spec (in `lit`) plus categories, which are formatted by prepending the language name as found in `lang`. The value of an entry in `categories` can be either a string (which is formatted using `sort_key`) or a table of the form `{ {cat=<var>category</var>, sort_key=<var>sort_key</var>, sort_base=<var>sort_base</var>}`, specifying the sort key and sort base to use when formatting the category. If `nocat` is given, no categories are added; otherwise, `force_cat` causes categories to be added even on userspace pages. ]==] function export.join_formatted_parts(data) local cattext local lang = data.data.lang local force_cat = data.data.force_cat or debug_force_cat if data.data.nocat then cattext = "" else for i, cat in ipairs(data.categories) do if type(cat) == "table" then data.categories[i] = require(utilities_module).format_categories(lang:getFullName() .. " " .. cat.cat, lang, cat.sort_key, cat.sort_base, force_cat) else data.categories[i] = require(utilities_module).format_categories(lang:getFullName() .. " " .. cat, lang, data.data.sort_key, nil, force_cat) end end cattext = table.concat(data.categories) end local result = table.concat(data.parts_formatted, not data.separator_already_added and " +&lrm; " or nil) .. (data.data.lit and ", literally " .. m_links.mark(data.data.lit, "gloss") or "") local q = data.data.q local qq = data.data.qq local l = data.data.l local ll = data.data.ll local infl = data.data.infl if q and q[1] or qq and qq[1] or l and l[1] or ll and ll[1] or infl and infl[1] then result = require(pron_qualifier_module).format_qualifiers { lang = lang, text = result, q = q, qq = qq, l = l, ll = ll, infl = infl, } end return result .. cattext end -- Remove links and call lang:stripDiacritics(term). local function strip_diacritics_no_links(lang, term) return lang:stripDiacritics(m_links.remove_links(term)) end --[=[ Convert a raw part as passed into an entry point into a part ready for linking. `lang` and `sc` are the overall language and script objects. This uses the overall language and script objects as defaults for the part and parses off any fragment from the term. We need to do the latter so that fragments don't end up in categories and so that we correctly do affix mapping even in the presence of fragments. ]=] local function canonicalize_part(part, lang, sc) if not part then return end -- Save the original (user-specified, part-specific) value of `lang`. If such a value is specified, we don't insert -- a '*fixed with' category, and we format the part using format_derived() in [[Module:etymology]] rather than -- full_link() in [[Module:links]]. part.part_lang = part.lang part.lang = part.lang or lang part.sc = part.sc or sc local term = part.term if not term then return elseif not part.fragment then part.term, part.fragment = m_links.get_fragment(term) else part.term = m_links.get_fragment(term) end end --[==[ Construct a single linked part based on the information in `part`, for use by `show_affix()` and other entry points. This should be called after `canonicalize_part()` is called on the part. This is a thin wrapper around `full_link()` in [[Module:links]] unless `part.part_lang` is specified (indicating that a part-specific language was given), in which case `format_derived()` in [[Module:etymology]] is called to display a term in a language other than the language of the overall term (specified in `data.lang`). `data` contains the entire object passed into the entry point and is used to access information for constructing the categories added by `format_derived()`. ]==] function export.link_term(part, data, include_separator) local result if part.part_lang then result = require(etymology_module).format_derived { lang = data.lang, terms = {part}, sources = {part.lang}, sort_key = data.sort_key, nocat = data.nocat, template_name = "affix", qualifiers_labels_on_outside = true, borrowing_type = data.borrowing_type, force_cat = data.force_cat or debug_force_cat, } else result = m_links.full_link(part, "term", nil, "show qualifiers") end if include_separator and part.separator then return part.separator .. result else return result end end local function canonicalize_script_code(scode) -- Convert 'mnc-Mong', 'xwo-Mong' etc. to 'Mong'. return (scode:gsub("^.*%-", "")) end ----------------------------------------------------------------------------------------- -- Affix-handling functions -- ----------------------------------------------------------------------------------------- -- Figure out the appropriate script for the given affix and language (unless the script is explicitly passed in), and -- return the values of template_hyphens[], display_hyphens[] and lookup_hyphens[] for that script, substituting -- default values as appropriate. Four values are returned: -- DETECTED_SCRIPT, TEMPLATE_HYPHEN, DISPLAY_HYPHEN, LOOKUP_HYPHEN local function detect_script_and_hyphens(text, lang, sc) local scode -- 1. If the script is explicitly passed in, use it. if sc then scode = sc:getCode() else local possible_script_codes = lang:getScriptCodes() -- YUCK! `possible_script_codes` comes from loadData() so #possible_scripts doesn't work (always returns 0). local num_possible_script_codes = m_table.length(possible_script_codes) if num_possible_script_codes == 0 then -- This shouldn't happen; if the language has no script codes, -- the list {"None"} should be returned. error("Something is majorly wrong! Language " .. lang:getCanonicalName() .. " has no script codes.") end if num_possible_script_codes == 1 then -- 2. If the language has only one possible script, use it. scode = possible_script_codes[1] else -- 3. Check if any of the possible scripts for the language have non-default values for template_hyphens[] -- or display_hyphens[]. If so, we need to do script detection on the text. If not, just use "Latn", -- which may not be technically correct but produces the right results because Latn has all default -- values for template_hyphens[] and display_hyphens[]. local may_have_nondefault_hyphen = false for _, script_code in ipairs(possible_script_codes) do script_code = canonicalize_script_code(script_code) if template_hyphens[script_code] or display_hyphens[script_code] then may_have_nondefault_hyphen = true break end end if not may_have_nondefault_hyphen then scode = "Latn" else scode = lang:findBestScript(text):getCode() end end end scode = canonicalize_script_code(scode) local template_hyphen = template_hyphens[scode] or "-" local lookup_hyphen = lookup_hyphens[scode] or "-" local display_hyphen = display_hyphens[scode] or default_display_hyphen return scode, template_hyphen, display_hyphen, lookup_hyphen end --[=[ Given a template affix `term` and an affix type `affix_type`, change the relevant template hyphen(s) in the affix to the display or lookup hyphen specified in `new_hyphen`, or add them if they are missing. `new_hyphen` can be a string, specifying a fixed hyphen, or a function of two arguments (the script code `scode` and the discovered template hyphen, or nil of no relevant template hyphen is present). `thyph_re` is a Lua pattern (which must be enclosed in parens) that matches the possible template hyphens. Note that not all template hyphens present in the affix are changed, but only the "relevant" ones (e.g. for a prefix, a relevant template hyphen is one coming at the end of the affix). ]=] local function reconstruct_term_per_hyphens(term, affix_type, scode, thyph_re, new_hyphen) local function get_hyphen(hyph) if type(new_hyphen) == "string" then return new_hyphen end return new_hyphen(scode, hyph) end if affix_type == "non-affix" then return term elseif affix_type == "circumfix" then local before, before_hyphen, after_hyphen, after = rmatch(term, "^(.*)" .. thyph_re .. " " .. thyph_re .. "(.*)$") if not before or ulen(term) <= 3 then -- Unlike with other types of affixes, don't try to add hyphens in the middle of the term to convert it to -- a circumfix. Also, if the term is just hyphen + space + hyphen, return it. return term end return before .. get_hyphen(before_hyphen) .. " " .. get_hyphen(after_hyphen) .. after elseif affix_type == "infix" or affix_type == "interfix" then local before_hyphen, middle, after_hyphen = rmatch(term, "^" .. thyph_re .. "(.*)" .. thyph_re .. "$") if before_hyphen and ulen(term) <= 1 then -- If the term is just a hyphen, return it. return term end return get_hyphen(before_hyphen) .. (middle or term) .. get_hyphen(after_hyphen) elseif affix_type == "prefix" then local middle, after_hyphen = rmatch(term, "^(.*)" .. thyph_re .. "$") if middle and ulen(term) <= 1 then -- If the term is just a hyphen, return it. return term end return (middle or term) .. get_hyphen(after_hyphen) elseif affix_type == "suffix" then local before_hyphen, middle = rmatch(term, "^" .. thyph_re .. "(.*)$") if before_hyphen and ulen(term) <= 1 then -- If the term is just a hyphen, return it. return term end return get_hyphen(before_hyphen) .. (middle or term) else error(("Internal error: Unrecognized affix type '%s'"):format(affix_type)) end end --[=[ Look up a mapping from a given affix variant to the canonical form used in categories and links. The lookup tables are language-specific according to `lang`, and may be ID-specific according to `affix_id`. The affixes as they appear in the lookup tables (both the variant and the canonical form) are in "lookup affix" format (approximately speaking, they use a regular hyphen for most scripts, but a tatweel for Arabic-script entries and a maqqef for Hebrew-script entries), but the passed-in `affix` param is in "template affix" format (which differs from the lookup affix for Arabic-script entries, because more types of hyphens are allowed in template affixes; see the comments at the top of the file). The remaining parameters to this function are used to convert from template affixes to lookup affixes; see the reconstruct_term_per_hyphens() function above. If the affix contains brackets, no lookup is done. Otherwise, a two-stage process is used, first looking up the affix directly and then stripping diacritics and looking it up again. The reason for this is documented above in the comments at the top of the file (specifically, the comments describing lookup affixes). The value of a mapping can either be a string (do the mapping regardless of affix ID) or a table indexed by affix ID (where the special value `false` indicates no affix ID). The values of entries in this table can also be strings, or tables with keys `affix` and `id` (again, use `false` to indicate no ID). This allows an affix mapping to map from one ID to another (for example, this is used in English to map the [[an-]] prefix with no ID to the [[a-]] prefix with the ID 'not'). The Given a template affix `term` and an affix type `affix_type`, change the relevant template hyphen(s) in the affix to the display or lookup hyphen specified in `new_hyphen`, or add them if they are missing. `new_hyphen` can be a string, specifying a fixed hyphen, or a function of two arguments (the script code `scode` and the discovered template hyphen, or nil of no relevant template hyphen is present). `thyph_re` is a Lua pattern (which must be enclosed in parens) that matches the possible template hyphens. Note that not all template hyphens present in the affix are changed, but only the "relevant" ones (e.g. for a prefix, a relevant template hyphen is one coming at the end of the affix). ]=] local function lookup_affix_mapping(affix, affix_type, lang, scode, thyph_re, lookup_hyph, affix_id) local function do_lookup(afx) -- Ensure that the affix uses lookup hyphens regardless of whether it used a different type of hyphens before -- or no hyphens. local lookup_affix = reconstruct_term_per_hyphens(afx, affix_type, scode, thyph_re, lookup_hyph) local function do_lookup_for_langcode(langcode) if export.langs_with_lang_specific_data[langcode] then local langdata = mw.loadData(export.affix_lang_data_module_prefix .. langcode) if langdata.affix_mappings then local mapping = langdata.affix_mappings[lookup_affix] if mapping then if type(mapping) == "table" then mapping = mapping[affix_id] or mapping.default or mapping[affix_id or false] if mapping then return mapping end else return mapping end end end end end -- If `lang` is an etymology-only language, look for a mapping both for it and its full parent. local langcode = lang:getCode() local mapping = do_lookup_for_langcode(langcode) if mapping then return mapping end local full_langcode = lang:getFullCode() if full_langcode ~= langcode then mapping = do_lookup_for_langcode(full_langcode) if mapping then return mapping end end return nil end if affix:find("%[%[") then return nil end return do_lookup(affix) or do_lookup(lang:stripDiacritics(affix)) or nil end --[==[ For a given template term in a given language (see the definition of "template affix" near the top of the file), possibly in an explicitly specified script `sc` (but usually nil), return the term's affix type ({"prefix"}, {"interfix"}, {"suffix"}, {"circumfix"} or {"non-affix"}) along with the corresponding link and display affixes (see definitions near the top of the file); also the corresponding lookup affix (if `return_lookup_affix` is specified). The term passed in should already have any fragment (after the # sign) parsed off of it. Four values are returned: `affix_type`, `link_term`, `display_term` and `lookup_term`. The affix type can be passed in instead of autodetected; in this case, the template term need not have any attached hyphens, and the appropriate hyphens will be added in the appropriate places. If `do_affix_mapping` is specified, look up the affix in the lang-specific affix mappings, as described in the comment at the top of the file; otherwise, the link and display terms will always be the same. (They will be the same in any case if the template term has a bracketed link in it or is not an affix.) If `return_lookup_affix` is given, the fourth return value contains the term with appropriate lookup hyphens in the appropriate places; otherwise, it is the same as the display term. (This functionality is used in [[Module:category tree/affixes and compounds]] to convert link affixes into lookup affixes so that they can be looked up in the affix mapping tables.) Exported because used by [[Module:headword utilities]] to determine the affix type of a given pagename. ]==] function export.parse_term_for_affixes(term, lang, sc, affix_type, do_affix_mapping, return_lookup_affix, affix_id) if not term then return "non-affix", nil, nil, nil end if term == "^" then -- Indicates a null term to emulate the behavior of {{suffix|foo||bar}}. term = "" return "non-affix", term, term, term end if term:find("^%^") then -- HACK! ^ at the beginning of Korean languages has a special meaning, triggering capitalization of the -- transliteration. Don't interpret it as "force non-affix" for those languages. local langcode = lang:getCode() if langcode ~= "ko" and langcode ~= "okm" and langcode ~= "jje" then -- Formerly we allowed ^ to force non-affix type; this is now handled using an inline modifier -- <naf>, <root>, etc. Throw an error for the moment when the old way is encountered. error("Use of ^ to force non-affix status is no longer supported; use an inline modifier <naf> or <root> " .. "after the component") end end -- Remove an asterisk if the morpheme is reconstructed and add it back at the end. local reconstructed = "" if term:find("^%*") then reconstructed = "*" term = term:gsub("^%*", "") end local scode, thyph, dhyph, lhyph = detect_script_and_hyphens(term, lang, sc) thyph = "([" .. thyph .. "])" if not affix_type then if rfind(term, thyph .. " " .. thyph) then affix_type = "circumfix" else local has_beginning_hyphen = rfind(term, "^" .. thyph) local has_ending_hyphen = rfind(term, thyph .. "$") if has_beginning_hyphen and has_ending_hyphen then affix_type = "interfix" elseif has_ending_hyphen then affix_type = "prefix" elseif has_beginning_hyphen then affix_type = "suffix" else affix_type = "non-affix" end end end local link_term, display_term, lookup_term if affix_type == "non-affix" then link_term = term display_term = term lookup_term = term else display_term = reconstruct_term_per_hyphens(term, affix_type, scode, thyph, dhyph) if do_affix_mapping then link_term = lookup_affix_mapping(term, affix_type, lang, scode, thyph, lhyph, affix_id) -- The return value of lookup_affix_mapping() may be an affix mapping with lookup hyphens if a mapping -- was found, otherwise nil if a mapping was not found. We need to convert to display hyphens in -- either case, but in the latter case we can reuse the display term, which has already been converted. if link_term then link_term = reconstruct_term_per_hyphens(link_term, affix_type, scode, thyph, dhyph) else link_term = display_term end else link_term = display_term end if return_lookup_affix then lookup_term = reconstruct_term_per_hyphens(term, affix_type, scode, thyph, lhyph) else lookup_term = display_term end end link_term = reconstructed .. link_term display_term = reconstructed .. display_term lookup_term = reconstructed .. lookup_term return affix_type, link_term, display_term, lookup_term end --[==[ Add a hyphen to a term in the appropriate place, based on the specified affix type, stripping off any existing hyphens in that place. For example, if `affix_type` == {"prefix"}, we'll add a hyphen onto the end if it's not already there (or is of the wrong type). Three values are returned: the link term, display term and lookup term. This function is a thin wrapper around `parse_term_for_affixes`; see the comments above that function for more information. Note that this function is exposed externally because it is called by [[Module:category tree/affixes and compounds]]; see the comment in `parse_term_for_affixes` for more information. ]==] function export.make_affix(term, lang, sc, affix_type, do_affix_mapping, return_lookup_affix, affix_id) if not (affix_type == "prefix" or affix_type == "suffix" or affix_type == "circumfix" or affix_type == "infix" or affix_type == "interfix" or affix_type == "non-affix") then error("Internal error: Invalid affix type " .. (affix_type or "(nil)")) end local _, link_term, display_term, lookup_term = export.parse_term_for_affixes(term, lang, sc, affix_type, do_affix_mapping, return_lookup_affix, affix_id) return link_term, display_term, lookup_term end ----------------------------------------------------------------------------------------- -- Main entry points -- ----------------------------------------------------------------------------------------- --[==[ Core categorization logic for affixes. This is shared between show_affix(), show_compound_like() and get_affix_categories_only(). Returns the categories array and other metadata needed for formatting. ]==] local function generate_affix_categories(data) data.pos = data.pos or default_pos -- data.pos = pluralize(data.pos) local text_sections, categories, borrowing_type = process_etymology_type(data.type, data.surface_analysis or data.nocap, data.notext, #data.parts > 0) data.borrowing_type = borrowing_type -- Process each part local whole_words = 0 local is_affix_or_compound = false -- Canonicalize and generate links for all the parts first; then do categorization in a separate step, because when -- processing the first part for categorization, we may access the second part and need it already canonicalized. for i, part in ipairs_with_gaps(data.parts) do part = part or {} data.parts[i] = part canonicalize_part(part, data.lang, data.sc) -- Determine affix type and get link and display terms (see text at top of file). Store them in the part -- (in fields that won't clash with fields used by full_link() in [[Module:links]] or link_term()), so they -- can be used in the loop below when categorizing. part.affix_type, part.affix_link_term, part.affix_display_term = export.parse_term_for_affixes(part.term, part.lang, part.sc, part.type, not part.alt, nil, part.id) -- If link_term is an empty string, either a bare ^ was specified or an empty term was used along with inline -- modifiers. The intention in either case is not to link the term. part.term = ine(part.affix_link_term) -- If part.alt would be the same as part.term, make it nil, so that it isn't erroneously tracked as being -- redundant alt text. part.alt = part.alt or (part.affix_display_term ~= part.affix_link_term and part.affix_display_term) or nil end if not data.noaffixcat then -- Now do categorization. for i, part in ipairs_with_gaps(data.parts) do local affix_type = part.affix_type if affix_type ~= "non-affix" then is_affix_or_compound = true -- Make a sort key. For the first part, use the second part as the sort key; the intention is that if the -- term has a prefix, sorting by the prefix won't be very useful so we sort by what follows, which is -- presumably the root. local part_sort_base = nil local part_sort = part.sort or data.sort_key if i == 1 and data.parts[2] and data.parts[2].term then local part2 = data.parts[2] -- If the second-part link term is empty, the user requested an unlinked term; avoid a wikitext error -- by using the alt value if available. part_sort_base = ine(part2.affix_link_term) or ine(part2.alt) if part_sort_base then part_sort_base = strip_diacritics_no_links(part2.lang, part_sort_base) end end if part.pos and rfind(part.pos, "patronym") then table.insert(categories, {cat = "patronymics", sort_key = part_sort, sort_base = part_sort_base}) end if data.pos ~= "टर्म" and part.pos and rfind(part.pos, "diminutive") then table.insert(categories, {cat = "diminutive " .. data.pos, sort_key = part_sort, sort_base = part_sort_base}) end -- Don't add a '*fixed with' category if the link term is empty or is in a different language. if ine(part.affix_link_term) and not part.part_lang then table.insert(categories, {cat = data.pos .. " " .. affix_type .. "ed with " .. strip_diacritics_no_links(part.lang, part.affix_link_term) .. (part.id and " (" .. part.id .. ")" or ""), sort_key = part_sort, sort_base = part_sort_base}) end else whole_words = whole_words + 1 if whole_words == 2 then is_affix_or_compound = true table.insert(categories, "कंपाउंड " .. data.pos) end end end -- Make sure there was either an affix or a compound (two or more non-affix terms). if not is_affix_or_compound and not data.allow_no_affixes_or_compounds then error("The parameters did not include any affixes, and the term is not a compound. Please provide at least one affix.") end end return text_sections, categories, borrowing_type end --[==[ Implementation of {{tl|affix}} and {{tl|surface analysis}}. `data` contains all the information describing the affixes to be displayed, and contains the following: * `.lang` ('''required'''): Overall language object. Different from term-specific language objects (see `.parts` below). * `.sc`: Overall script object (usually omitted). Different from term-specific script objects. * `.parts` ('''required'''): List of objects describing the affixes to show. The general format of each object is as would be passed to `full_link()`, except that the `.lang` field should be missing unless the term is of a language different from the overall `.lang` value (in such a case, the language name is shown along with the term and an additional "derived from" category is added). '''WARNING''': The data in `.parts` will be destructively modified. * `.pos`: Overall part of speech (used in categories, defaults to {"terms"}). Different from term-specific part of speech. * `.sort_key`: Overall sort key. Normally omitted except e.g. in Japanese. * `.type`: Type of compound, if the parts in `.parts` describe a compound. Strictly optional, and if supplied, the compound type is displayed before the parts (normally capitalized, unless `.nocap` is given). * `.nocap`: Don't capitalize the first letter of text displayed before the parts (relevant only if `.type` or `.surface_analysis` is given). * `.notext`: Don't display any text before the parts (relevant only if `.type` or `.surface_analysis` is given). * `.nocat`: Disable all categorization. * `.noaffixcat`: Disable affix (and compound) categorization. Relevant for e.g. blends, which may otherwise be incorrectly categorized as compound terms. * `.lit`: Overall literal definition. Different from term-specific literal definitions. * `.force_cat`: Always display categories, even on userspace pages. * `.surface_analysis`: Implement {{surface analysis}}; adds `By surface analysis, ` before the parts. '''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`. ]==] function export.show_affix(data) local text_sections, categories, _ = generate_affix_categories(data) -- Process each part for display local parts_formatted = {} for i, part in ipairs_with_gaps(data.parts) do -- Make a link for the part table.insert(parts_formatted, export.link_term(part, data, "include_separator")) end if data.surface_analysis then local text = "by " .. glossary_link("surface analysis") .. ", " if not data.nocap then text = ucfirst(text) end table.insert(text_sections, 1, text) end table.insert(text_sections, export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories, separator_already_added = true }) return table.concat(text_sections) end --[==[ Get only the categories that would be generated by show_affix(), without any text output or formatting. This is used by Module:etymon to get affix categorization. Returns an array of category objects, where each entry is either a string (simple category name) or a table with keys `cat`, `sort_key`, and `sort_base` for more complex categorization. `data` should have the same structure as passed to show_affix(): * `.lang` (required): Overall language object * `.parts` (required): Array of affix part objects with `.term`, `.lang`, `.id`, etc. * `.pos`: Part of speech (defaults to "terms") * `.sort_key`: Overall sort key for categories '''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`. ]==] function export.get_affix_categories_only(data) local _, categories, _ = generate_affix_categories(data) return categories end function export.show_surface_analysis(data) data.surface_analysis = true data.allow_no_affixes_or_compounds = true return export.show_affix(data) end --[==[ Implementation of {{tl|compound}}. '''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`. ]==] function export.show_compound(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) local text_sections, categories, borrowing_type = process_etymology_type(data.type, data.nocap, data.notext, #data.parts > 0) data.borrowing_type = borrowing_type local parts_formatted = {} table.insert(categories, "कंपाउंड " .. data.pos) -- Make links out of all the parts local whole_words = 0 for i, part in ipairs(data.parts) do canonicalize_part(part, data.lang, data.sc) -- Determine affix type and get link and display terms (see text at top of file). local affix_type, link_term, display_term = export.parse_term_for_affixes(part.term, part.lang, part.sc, part.type, not part.alt, nil, part.id) -- If the term is an interfix or the type was explicitly given, recognize it as such (which means e.g. that we -- will display the term without hyphens for East Asian languages). Otherwise, ignore the fact that it looks -- like an affix and display as specified in the template (but pay attention to the detected affix type for -- certain tracking purposes). if affix_type == "interfix" or (part.type and part.type ~= "non-affix") then -- If link_term is an empty string, either a bare ^ was specified or an empty term was used along with -- inline modifiers. The intention in either case is not to link the term. Don't add a '*fixed with' -- category in this case, or if the term is in a different language. -- If part.alt would be the same as part.term, make it nil, so that it isn't erroneously tracked as being -- redundant alt text. if link_term and link_term ~= "" and not part.part_lang then table.insert(categories, {cat = data.pos .. " " .. affix_type .. "ed with " .. strip_diacritics_no_links(part.lang, link_term), sort_key = part.sort or data.sort_key}) end part.term = link_term ~= "" and link_term or nil part.alt = part.alt or (display_term ~= link_term and display_term) or nil else if affix_type ~= "non-affix" then local langcode = data.lang:getCode() -- If `data.lang` is an etymology-only language, track both using its code and its full parent's code. track { affix_type, affix_type .. "/lang/" .. langcode } local full_langcode = data.lang:getFullCode() if langcode ~= full_langcode then track(affix_type .. "/lang/" .. full_langcode) end else whole_words = whole_words + 1 end end table.insert(parts_formatted, export.link_term(part, data, "include_separator")) end if whole_words == 1 then track("one whole word") elseif whole_words == 0 then track("looks like confix") end table.insert(text_sections, export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories, separator_already_added = true }) return table.concat(text_sections) end --[==[ Implementation of {{tl|blend}}, {{tl|univerbation}} and similar "compound-like" templates. '''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`. ]==] function export.show_compound_like(data) data.allow_no_affixes_or_compounds = true local text_sections, categories, _ = generate_affix_categories(data) if data.cat then table.insert(categories, data.cat) end -- Process each part for display local parts_formatted = {} for i, part in ipairs_with_gaps(data.parts) do -- Make a link for the part table.insert(parts_formatted, export.link_term(part, data, "include_separator")) end if #data.parts > 0 and data.oftext then table.insert(text_sections, 1, " " .. data.oftext .. " ") end if data.text then table.insert(text_sections, 1, data.text) end table.insert(text_sections, export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories, separator_already_added = true }) return table.concat(text_sections) end --[==[ Make `part` (a structure holding information on an affix part) into an affix of type `affix_type`, and apply any relevant affix mappings. For example, if the desired affix type is "suffix", this will (in general) add a hyphen onto the beginning of the term, alt, tr and ts components of the part if not already present. The hyphen that's added is the "display hyphen" (see above) and may be script-specific. (In the case of East Asian scripts, the display hyphen is an empty string whereas the template hyphen is the regular hyphen, meaning that any regular hyphen at the beginning of the part will be effectively removed.) `lang` and `sc` hold overall language and script objects. Note that this also applies any language-specific affix mappings, so that e.g. if the language is Finnish and the user specified [[-käs]] in the affix and didn't specify an `.alt` value, `part.term` will contain [[-kas]] and `part.alt` will contain [[-käs]]. This function is used by the "legacy" templates ({{tl|prefix}}, {{tl|suffix}}, {{tl|confix}}, etc.) where the nature of the affix is specified by the template itself rather than auto-determined from the affix, as is the case with {{tl|affix}}. '''WARNING''': This destructively modifies `part`. ]==] local function make_part_into_affix(part, lang, sc, affix_type) canonicalize_part(part, lang, sc) local link_term, display_term = export.make_affix(part.term, part.lang, part.sc, affix_type, not part.alt, nil, part.id) part.term = link_term -- When we don't specify `do_affix_mapping` to make_affix(), link and display terms (first and second retvals of -- make_affix()) are the same. -- If part.alt would be the same as part.term, make it nil, so that it isn't erroneously tracked as being -- redundant alt text. part.alt = part.alt and export.make_affix(part.alt, part.lang, part.sc, affix_type) or (display_term ~= link_term and display_term) or nil local Latn = require(scripts_module).getByCode("Latn") part.tr = export.make_affix(part.tr, part.lang, Latn, affix_type) part.ts = export.make_affix(part.ts, part.lang, Latn, affix_type) end local function track_wrong_affix_type(template, part, expected_affix_type) if part and not part.type then local affix_type = export.parse_term_for_affixes(part.term, part.lang, part.sc) if affix_type ~= expected_affix_type then local part_name = expected_affix_type or "base" local langcode = part.lang:getCode() local full_langcode = part.lang:getFullCode() require("Module:debug/track") { template, template .. "/" .. part_name, template .. "/" .. part_name .. "/" .. (affix_type or "none"), template .. "/" .. part_name .. "/" .. (affix_type or "none") .. "/lang/" .. langcode } -- If `part.lang` is an etymology-only language, track both using its code and its full parent's code. if full_langcode ~= langcode then require("Module:debug/track")( template .. "/" .. part_name .. "/" .. (affix_type or "none") .. "/lang/" .. full_langcode ) end end end end local function insert_affix_category(categories, pos, affix_type, part, sort_key, sort_base) -- Don't add a '*fixed with' category if the link term is empty or is in a different language. if part.term and not part.part_lang then local cat = pos .. " " .. affix_type .. "ed with " .. strip_diacritics_no_links(part.lang, part.term) .. (part.id and " (" .. part.id .. ")" or "") if sort_key or sort_base then table.insert(categories, {cat = cat, sort_key = sort_key, sort_base = sort_base}) else table.insert(categories, cat) end end end --[==[ Implementation of {{tl|circumfix}}. '''WARNING''': This destructively modifies both `data` and `.prefix`, `.base` and `.suffix`. ]==] function export.show_circumfix(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. make_part_into_affix(data.prefix, data.lang, data.sc, "prefix") make_part_into_affix(data.suffix, data.lang, data.sc, "suffix") track_wrong_affix_type("circumfix", data.prefix, "prefix") track_wrong_affix_type("circumfix", data.base, nil) track_wrong_affix_type("circumfix", data.suffix, "suffix") -- Create circumfix term. local circumfix = nil if data.prefix.term and data.suffix.term then circumfix = data.prefix.term .. " " .. data.suffix.term data.prefix.alt = data.prefix.alt or data.prefix.term data.suffix.alt = data.suffix.alt or data.suffix.term data.prefix.term = circumfix data.suffix.term = circumfix end -- Make links out of all the parts. local parts_formatted = {} local categories = {} local sort_base if data.base.term then sort_base = strip_diacritics_no_links(data.base.lang, data.base.term) end table.insert(parts_formatted, export.link_term(data.prefix, data)) table.insert(parts_formatted, export.link_term(data.base, data)) table.insert(parts_formatted, export.link_term(data.suffix, data)) -- Insert the categories, but don't add a '*fixed with' category if the link term is in a different language. if not data.prefix.part_lang then table.insert(categories, {cat=data.pos .. " circumfixed with " .. strip_diacritics_no_links(data.prefix.lang, circumfix), sort_key=data.sort_key, sort_base=sort_base}) end return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end --[==[ Implementation of {{tl|confix}}. '''WARNING''': This destructively modifies both `data` and `.prefix`, `.base` and `.suffix`. ]==] function export.show_confix(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. make_part_into_affix(data.prefix, data.lang, data.sc, "prefix") make_part_into_affix(data.suffix, data.lang, data.sc, "suffix") track_wrong_affix_type("confix", data.prefix, "prefix") track_wrong_affix_type("confix", data.base, nil) track_wrong_affix_type("confix", data.suffix, "suffix") -- Make links out of all the parts. local parts_formatted = {} local prefix_sort_base if data.base and data.base.term then prefix_sort_base = strip_diacritics_no_links(data.base.lang, data.base.term) elseif data.suffix.term then prefix_sort_base = strip_diacritics_no_links(data.suffix.lang, data.suffix.term) end -- Insert the categories and parts. local categories = {} table.insert(parts_formatted, export.link_term(data.prefix, data)) insert_affix_category(categories, data.pos, "prefix", data.prefix, data.sort_key, prefix_sort_base) if data.base then table.insert(parts_formatted, export.link_term(data.base, data)) end table.insert(parts_formatted, export.link_term(data.suffix, data)) -- FIXME, should we be specifying a sort base here? insert_affix_category(categories, data.pos, "suffix", data.suffix) return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end --[==[ Implementation of {{tl|infix}}. '''WARNING''': This destructively modifies both `data` and `.base` and `.infix`. ]==] function export.show_infix(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. make_part_into_affix(data.infix, data.lang, data.sc, "infix") track_wrong_affix_type("infix", data.base, nil) track_wrong_affix_type("infix", data.infix, "infix") -- Make links out of all the parts. local parts_formatted = {} local categories = {} table.insert(parts_formatted, export.link_term(data.base, data)) table.insert(parts_formatted, export.link_term(data.infix, data)) -- Insert the categories. -- FIXME, should we be specifying a sort base here? insert_affix_category(categories, data.pos, "infix", data.infix) return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end --[==[ Implementation of {{tl|prefix}}. '''WARNING''': This destructively modifies both `data` and the structures within `.prefixes`, as well as `.base`. ]==] function export.show_prefix(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. for i, prefix in ipairs(data.prefixes) do make_part_into_affix(prefix, data.lang, data.sc, "prefix") end for i, prefix in ipairs(data.prefixes) do track_wrong_affix_type("prefix", prefix, "prefix") end track_wrong_affix_type("prefix", data.base, nil) -- Make links out of all the parts. local parts_formatted = {} local first_sort_base = nil local categories = {} if data.prefixes[2] then first_sort_base = ine(data.prefixes[2].term) or ine(data.prefixes[2].alt) if first_sort_base then first_sort_base = strip_diacritics_no_links(data.prefixes[2].lang, first_sort_base) end elseif data.base then first_sort_base = ine(data.base.term) or ine(data.base.alt) if first_sort_base then first_sort_base = strip_diacritics_no_links(data.base.lang, first_sort_base) end end for i, prefix in ipairs(data.prefixes) do table.insert(parts_formatted, export.link_term(prefix, data)) insert_affix_category(categories, data.pos, "prefix", prefix, data.sort_key, i == 1 and first_sort_base or nil) end if data.base then table.insert(parts_formatted, export.link_term(data.base, data)) else table.insert(parts_formatted, "") end return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end --[==[ Implementation of {{tl|suffix}}. '''WARNING''': This destructively modifies both `data` and the structures within `.suffixes`, as well as `.base`. ]==] function export.show_suffix(data) local categories = {} data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. for i, suffix in ipairs(data.suffixes) do make_part_into_affix(suffix, data.lang, data.sc, "suffix") end track_wrong_affix_type("suffix", data.base, nil) for i, suffix in ipairs(data.suffixes) do track_wrong_affix_type("suffix", suffix, "suffix") end -- Make links out of all the parts. local parts_formatted = {} if data.base then table.insert(parts_formatted, export.link_term(data.base, data)) else table.insert(parts_formatted, "") end for i, suffix in ipairs(data.suffixes) do table.insert(parts_formatted, export.link_term(suffix, data)) end -- Insert the categories. for i, suffix in ipairs(data.suffixes) do -- FIXME, should we be specifying a sort base here? insert_affix_category(categories, data.pos, "suffix", suffix) if suffix.pos and rfind(suffix.pos, "patronym") then table.insert(categories, "patronymics") end end return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end return export 3z7dmmz75b6xc7vpmvbkfroh0iwquqa 487947 487946 2026-09-03T18:18:21Z SM7 6218 making it look like "हिंदी टर्म suffix -इक के साथ" / "suffix" itself will be translated latter 487947 Scribunto text/plain local export = {} local debug_force_cat = false -- if set to true, always display categories even on userspace pages local m_links = require("Module:links") local m_str_utils = require("Module:string utilities") local m_table = require("Module:table") local en_utilities_module = "Module:en-utilities" local etymology_module = "Module:etymology" local pron_qualifier_module = "Module:pron qualifier" local scripts_module = "Module:scripts" local utilities_module = "Module:utilities" -- Export this so the category code in [[Module:category tree/etymology]] can access it. export.affix_lang_data_module_prefix = "Module:affix/lang-data/" local ulen = m_str_utils.len local rfind = m_str_utils.find local rmatch = m_str_utils.match local pluralize = require(en_utilities_module).pluralize local u = m_str_utils.char local ucfirst = m_str_utils.ucfirst local unpack = unpack or table.unpack -- Lua 5.2 compatibility function export.affix_variants(canonical, variants) local mappings = {} for _, variant in ipairs(variants) do mappings[variant] = canonical end return mappings end function export.id_mapping(default, ids) local mapping = { default = default } if ids then for id, target in pairs(ids) do mapping[id] = target end end return mapping end function export.id_mapping_with_affix_variants(base, id_variants) local mappings = {} for id, variants in pairs(id_variants) do for _, variant in ipairs(variants) do mappings[variant] = export.id_mapping(base, {[id] = base}) end end return mappings end function export.merge_tables(...) local result = {} for i = 1, select('#', ...) do local t = select(i, ...) if t then for k, v in pairs(t) do result[k] = v end end end return result end -- Export this so the category code in [[Module:category tree/etymology]] can access it. export.langs_with_lang_specific_data = { ["az"] = true, ["fi"] = true, ["fr"] = true, ["izh"] = true, ["la"] = true, ["sah"] = true, ["tr"] = true, ["trk-pro"] = true, } local default_pos = "टर्म" --[==[ intro: ===About different types of hyphens ("template", "display" and "lookup"):=== * The "template hyphen" is the per-script hyphen character that is used in template calls to indicate that a term is an affix. This is always a single Unicode char, but there may be multiple possible hyphens for a given script. Normally this is just the regular hyphen character "-", but for some non-Latin-script languages (currently only right-to-left languages), it is different. * The "display hyphen" is the string (which might be an empty string) that is added onto a term as displayed and linked, to indicate that a term is an affix. Currently this is always either the same as the template hyphen or an empty string, but the code below is written generally enough to handle arbitrary display hyphens. Specifically: *# For East Asian languages, the display hyphen is always blank. *# For Arabic-script languages, either tatweel (ـ) or ZWNJ (zero-width non-joiner) are allowed as template hyphens, where ZWNJ is supported primarily for Farsi, because some suffixes have non-joining behavior. The display hyphen corresponding to tatweel is also tatweel, but the display hyphen corresponding to ZWNJ is blank (tatweel is also the default display hyphen, for calls to {{tl|prefix}}/{{tl|suffix}}/etc. that don't include an explicit hyphen). * The "lookup hyphen" is the hyphen that is used when looking up language-specific affix mappings. (These mappings are discussed in more detail below when discussing link affixes.) It depends only on the script of the affix in question. Most scripts (including East Asian scripts) use a regular hyphen "-" as the lookup hyphen, but Hebrew and Arabic have their own lookup hyphens (respectively maqqef and tatweel). Note that for Arabic in particular, there are three possible template hyphens that are recognized (tatweel, ZWNJ and regular hyphen), but mappings must use tatweel. ===About different types of affixes ("template", "display", "link", "lookup" and "category"):=== * A "template affix" is an affix in its source form as it appears in a template call. Generally, a template affix has an attached template hyphen (see above) to indicate that it is an affix and indicate what type of affix it is (prefix, suffix, interfix or circumfix), but some of the older-style templates such as {{tl|suffix}}, {{tl|prefix}}, {{tl|confix}}, etc. have "positional" affixes where the presence of the affix in a certain position (e.g. the second or third parameter) indicates that it is a certain type of affix, whether or not it has an attached template hyphen. * A "display affix" is the corresponding affix as it is actually displayed to the user. The display affix may differ from the template affix for various reasons: *# The display affix may be specified explicitly using the {{para|alt<var>N</var>}} parameter, the `<alt:...>` inline modifier or a piped link of the form e.g. `<nowiki>[[-kas|-käs]]</nowiki>` (here indicating that the affix should display as `-käs` but be linked as `-kas`). Here, the template affix is arguably the entire piped link, while the display affix is `-käs`. *# Even in the absence of {{para|alt<var>N</var>}} parameters, `<alt:...>` inline modifiers and piped links, certain languages have differences between the "template hyphen" specified in the template (which always needs to be specified somehow or other in templates like {{tl|affix}}, to indicate that the term is an affix and what type of affix it is) and the display hyphen (see above), with corresponding differences between template and display affixes. * A (regular) "link affix" is the affix that is linked to when the affix is shown to the user. The link affix is usually the same as the display affix, but will differ in one of three circumstances: *# The display and link affixes are explicitly made different using {{para|alt<var>N</var>}} parameters, `<alt:...>` inline modifiers or piped links, as described above under "display affix". *# For certain languages, certain affixes are mapped to canonical form using language-specific mappings. For example, in Finnish, the adjective-forming suffix {{m|fi|-kas}} appears as {{m|fi|-käs}} after front vowels, but logically both forms are the same suffix and should be linked and categorized the same. Similarly, in Latin, the negative and intensive prefixes spelled {{m|la|in-}} (etymologically two distinct prefixes) appear variously as {{m|la|il-}}, {{m|la|im-}} or {{m|la|ir-}} before certain consonants. Mappings are supplied in [[Module:affix/lang-data/LANGCODE]] to convert Finnish {{m|fi|-käs}} to {{m|fi|-kas}} for linking and categorization purposes. Note that the affixes in the mappings use "lookup hyphens" to indicate the different types of affixes, which is usually the same as the template hyphen but differs for Arabic scripts, because there are multiple possible template hyphens recognized but only one lookup hyphen (tatweel). The form of the affix as used to look up in the mapping tables is called the "lookup affix"; see below. * A "stripped link affix" is a link affix that has been passed through the language's `stripDiacritics()` function, which may strip certain diacritics: e.g. macrons in Latin and Old English (indicating length); acute and grave accents in Russian and various other Slavic languages (indicating stress); vowel diacritics in most Arabic-script languages; and also tatweel in some Arabic-script languages (currently, for example, Persian, Arabic and Urdu strip tatweel, but Ottoman Turkish does not). Stripped link affixes are currently what are used in category names. * A "lookup affix" is the form of the affix as it is looked up in the language-specific lookup mappings described above under link affixes. There are actually two lookup stages: *# First, the affix is looked up in a modified display form (specifically, the same as the display affix but using lookup hyphens). Note that this lookup does not occur if an explicit display form is given using {{para|alt<var>N</var>}} or an `<alt:...>` inline modifier, or if the template affix contains a piped or embedded link. *# If no entry is found, the affix is then looked up in a modified link form (specifically, the modified display form passed through the language's `stripDiacritics()` function, which strips out certain diacritics, but with the lookup hyphen re-added if it was stripped out, as in the case of tatweel in many Arabic-script languages). The reason for this double lookup procedure is to allow for mappings that are sensitive to the extra diacritics, but also allow for mappings that are not sensitive in this fashion (e.g. Russian {{m|ru|-ливый}} occurs both stressed and unstressed, but is the same prefix either way). * A "category affix" is the affix as it appears in categories such as [[:Category:Finnish terms suffixed with -kas| Category:Finnish terms suffixed with ''-kas'']]. The category affix is currently always the same as the stripped link affix. This means that for Arabic-script languages, it may or may not have a tatweel, even if the correponding display affix and regular link affix have a tatweel. As mentioned above, stripDiacritics() strips tatweel for Arabic, Persian and Urdu, but not for Ottoman Turkish. Hence affix categories for Arabic, Persian and Urdu will be missing the tatweel, but affix categories for Ottoman Turkish will have it. An additional complication is that if the template affix contains a ZWNJ, the display (and hence the link and category affixes) will have no hyphen attached in any case. ]==] ----------------------------------------------------------------------------------------- -- Template and display hyphens -- ----------------------------------------------------------------------------------------- --[=[ Per-script template hyphens. The template hyphen is what appears in the {{affix}}/{{prefix}}/{{suffix}}/etc. template (in the wikicode). See above. They key below is a script code, after removing a hyphen and anything preceding. Hence, script codes like 'mnc-Mong' and 'xwo-Mong' will match 'Mong'. The value below is a string consisting of one or more hyphen characters. If there is more than one character, the default hyphen must come last and a non-default function must be specified for the script in display_hyphens[] so the correct display hyphen will be specified when no template hyphen is given (in {{suffix}}/{{prefix}}/etc.). Script detection is normally done when linking, but we need to do it earlier. However, under most circumstances we don't need to do script detection. Specifically, we only need to do script detection for a given language if (a) the language has multiple scripts; and (b) at least one of those scripts is listed below or in display_hyphens. ]=] local ZWNJ = u(0x200C) -- zero-width non-joiner local template_hyphens = { -- This covers all Arabic scripts. See above. ["Arab"] = "ـ" .. ZWNJ .. "-", -- tatweel + zero-width non-joiner + regular hyphen ["Aran"] = "ـ" .. ZWNJ .. "-", -- tatweel + zero-width non-joiner + regular hyphen ["Hebr"] = "־", -- Hebrew-specific hyphen termed "maqqef" ["Mong"] = "᠊", -- FIXME! What about the following right-to-left scripts? -- Adlm (Adlam) -- Armi (Imperial Aramaic) -- Avst (Avestan) -- Cprt (Cypriot) -- Khar (Kharoshthi) -- Mand (Mandaic/Mandaean) -- Mani (Manichaean) -- Mend (Mende/Mende Kikakui) -- Narb (Old North Arabian) -- Nbat (Nabataean/Nabatean) -- Nkoo (N'Ko) -- Orkh (Orkhon runes) -- Phli (Inscriptional Pahlavi) -- Phlp (Psalter Pahlavi) -- Phlv (Book Pahlavi) -- Phnx (Phoenician) -- Prti (Inscriptional Parthian) -- Rohg (Hanifi Rohingya) -- Samr (Samaritan) -- Sarb (Old South Arabian) -- Sogd (Sogdian) -- Sogo (Old Sogdian) -- Syrc (Syriac) -- Thaa (Thaana) } -- Hyphens used when looking up an affix in a lang-specific affix mapping. Defaults to regular hyphen (-). The keys -- are script codes, after removing a hyphen and anything preceding. Hence, script codes like 'mnc-Mong' and 'xwo-Mong' -- will match 'Mong'. The value should be a single character. local lookup_hyphens = { ["Hebr"] = "־", -- This covers all Arabic scripts. See above. ["Arab"] = "ـ", ["Aran"] = "ـ", } -- Default display-hyphen function. local function default_display_hyphen(script, hyph) if not hyph then return template_hyphens[script] or "-" end return hyph end local function arab_get_display_hyphen(_script, hyph) if not hyph then return "ـ" -- tatweel elseif hyph == ZWNJ then return "" else return hyph end end local function no_display_hyphen(_script, _hyph) return "" end -- Per-script function to return the correct display hyphen given the script and template hyphen. The function should -- also handle the case where the passed-in template hyphen is nil, corresponding to the situation in -- {{prefix}}/{{suffix}}/etc. where no template hyphen is specified. The key is the script code after removing a hyphen -- and anything preceding, so 'mnc-Mong', 'xwo-Mong' etc. will match 'Mong'. local display_hyphens = { -- This covers all Arabic scripts. See above. ["Arab"] = arab_get_display_hyphen, ["Aran"] = arab_get_display_hyphen, ["Bopo"] = no_display_hyphen, ["Hani"] = no_display_hyphen, ["Hans"] = no_display_hyphen, ["Hant"] = no_display_hyphen, -- The following is a mixture of several scripts. Hopefully the specs here are correct! ["Jpan"] = no_display_hyphen, ["Jurc"] = no_display_hyphen, ["Kitl"] = no_display_hyphen, ["Kits"] = no_display_hyphen, ["Laoo"] = no_display_hyphen, ["Nshu"] = no_display_hyphen, ["Shui"] = no_display_hyphen, ["Tang"] = no_display_hyphen, ["Thaa"] = no_display_hyphen, ["Thai"] = no_display_hyphen, ["Tibt"] = no_display_hyphen, } ----------------------------------------------------------------------------------------- -- Basic Utility functions -- ----------------------------------------------------------------------------------------- local function glossary_link(entry, text) text = text or entry return "[[Appendix:Glossary#" .. entry .. "|" .. text .. "]]" end local function track(page) if type(page) == "table" then for i, pg in ipairs(page) do page[i] = "affix/" .. pg end else page = "affix/" .. page end require("Module:debug/track")(page) end local function ine(val) return val ~= "" and val or nil end ----------------------------------------------------------------------------------------- -- Compound types -- ----------------------------------------------------------------------------------------- local function make_compound_type(typ, alttext) return { text = glossary_link(typ, alttext) .. " कंपाउंड", cat = typ .. " कंपाउंड", } end -- Make a compound type entry with a simple rather than glossary link. -- These should be replaced with a glossary link when the entry in the glossary -- is created. local function make_non_glossary_compound_type(typ, alttext) local link = alttext and "[[" .. typ .. "|" .. alttext .. "]]" or "[[" .. typ .. "]]" return { text = link .. " कंपाउंड", cat = typ .. " कंपाउंड", } end local function make_raw_compound_type(typ, alttext) return { text = glossary_link(typ, alttext), cat = pluralize(typ), } end local function make_borrowing_type(typ, alttext) return { text = glossary_link(typ, alttext), borrowing_type = pluralize(typ), } end export.etymology_types = { ["adapted borrowing"] = make_borrowing_type("adapted borrowing"), ["adap"] = "adapted borrowing", ["abor"] = "adapted borrowing", ["alliterative"] = make_non_glossary_compound_type("alliterative"), ["allit"] = "alliterative", ["antonymous"] = make_non_glossary_compound_type("antonymous"), ["ant"] = "antonymous", ["bahuvrihi"] = make_compound_type("bahuvrihi", "bahuvrīhi"), ["bahu"] = "बहुवृद्धि", ["bv"] = "बहुवृद्धि", ["coordinative"] = make_compound_type("coordinative"), ["coord"] = "coordinative", ["descriptive"] = make_compound_type("descriptive"), ["desc"] = "descriptive", ["determinative"] = make_compound_type("determinative"), ["det"] = "determinative", ["dvandva"] = make_compound_type("dvandva"), ["dva"] = "द्वंद्व", ["dvigu"] = make_compound_type("dvigu"), ["dvi"] = "द्विगु", ["endocentric"] = make_compound_type("endocentric"), ["endo"] = "endocentric", ["exocentric"] = make_compound_type("exocentric"), ["exo"] = "exocentric", ["izafet I"] = make_compound_type("izafet I"), ["iz1"] = "izafet I", ["izafet II"] = make_compound_type("izafet II"), ["iz2"] = "izafet II", ["izafet III"] = make_compound_type("izafet III"), ["iz3"] = "izafet III", ["karmadharaya"] = make_compound_type("karmadharaya", "karmadhāraya"), ["karma"] = "कर्मधारय", ["kd"] = "कर्मधारय", ["kenning"] = make_raw_compound_type("kenning"), ["ken"] = "kenning", ["rhyming"] = make_non_glossary_compound_type("rhyming"), ["rhy"] = "rhyming", ["synonymous"] = make_non_glossary_compound_type("synonymous"), ["syn"] = "synonymous", ["tatpurusa"] = make_compound_type("tatpurusa", "tatpuruṣa"), ["tat"] = "तत्पुरुष", ["tp"] = "तत्पुरुष", } local function process_etymology_type(typ, nocap, notext, has_parts) local text_sections = {} local categories = {} local borrowing_type if typ then local typdata = export.etymology_types[typ] if type(typdata) == "string" then typdata = export.etymology_types[typdata] end if not typdata then error("Internal error: Unrecognized type '" .. typ .. "'") end local text = typdata.text if not nocap then text = ucfirst(text) end local cat = typdata.cat borrowing_type = typdata.borrowing_type local oftext = typdata.oftext or " of" if not notext then table.insert(text_sections, text) if has_parts then table.insert(text_sections, oftext) table.insert(text_sections, " ") end end if cat then table.insert(categories, cat) end end return text_sections, categories, borrowing_type end ----------------------------------------------------------------------------------------- -- Utility functions -- ----------------------------------------------------------------------------------------- -- Iterate an array up to the greatest integer index found. local function ipairs_with_gaps(t) local indices = m_table.numKeys(t) local max_index = #indices > 0 and math.max(unpack(indices)) or 0 local i = 0 return function() if i < max_index then i = i + 1 return i, t[i] end end end export.ipairs_with_gaps = ipairs_with_gaps --[==[ Join formatted parts (in `parts_formatted`) together with any overall {{para|lit}} spec (in `lit`) plus categories, which are formatted by prepending the language name as found in `lang`. The value of an entry in `categories` can be either a string (which is formatted using `sort_key`) or a table of the form `{ {cat=<var>category</var>, sort_key=<var>sort_key</var>, sort_base=<var>sort_base</var>}`, specifying the sort key and sort base to use when formatting the category. If `nocat` is given, no categories are added; otherwise, `force_cat` causes categories to be added even on userspace pages. ]==] function export.join_formatted_parts(data) local cattext local lang = data.data.lang local force_cat = data.data.force_cat or debug_force_cat if data.data.nocat then cattext = "" else for i, cat in ipairs(data.categories) do if type(cat) == "table" then data.categories[i] = require(utilities_module).format_categories(lang:getFullName() .. " " .. cat.cat, lang, cat.sort_key, cat.sort_base, force_cat) else data.categories[i] = require(utilities_module).format_categories(lang:getFullName() .. " " .. cat, lang, data.data.sort_key, nil, force_cat) end end cattext = table.concat(data.categories) end local result = table.concat(data.parts_formatted, not data.separator_already_added and " +&lrm; " or nil) .. (data.data.lit and ", literally " .. m_links.mark(data.data.lit, "gloss") or "") local q = data.data.q local qq = data.data.qq local l = data.data.l local ll = data.data.ll local infl = data.data.infl if q and q[1] or qq and qq[1] or l and l[1] or ll and ll[1] or infl and infl[1] then result = require(pron_qualifier_module).format_qualifiers { lang = lang, text = result, q = q, qq = qq, l = l, ll = ll, infl = infl, } end return result .. cattext end -- Remove links and call lang:stripDiacritics(term). local function strip_diacritics_no_links(lang, term) return lang:stripDiacritics(m_links.remove_links(term)) end --[=[ Convert a raw part as passed into an entry point into a part ready for linking. `lang` and `sc` are the overall language and script objects. This uses the overall language and script objects as defaults for the part and parses off any fragment from the term. We need to do the latter so that fragments don't end up in categories and so that we correctly do affix mapping even in the presence of fragments. ]=] local function canonicalize_part(part, lang, sc) if not part then return end -- Save the original (user-specified, part-specific) value of `lang`. If such a value is specified, we don't insert -- a '*fixed with' category, and we format the part using format_derived() in [[Module:etymology]] rather than -- full_link() in [[Module:links]]. part.part_lang = part.lang part.lang = part.lang or lang part.sc = part.sc or sc local term = part.term if not term then return elseif not part.fragment then part.term, part.fragment = m_links.get_fragment(term) else part.term = m_links.get_fragment(term) end end --[==[ Construct a single linked part based on the information in `part`, for use by `show_affix()` and other entry points. This should be called after `canonicalize_part()` is called on the part. This is a thin wrapper around `full_link()` in [[Module:links]] unless `part.part_lang` is specified (indicating that a part-specific language was given), in which case `format_derived()` in [[Module:etymology]] is called to display a term in a language other than the language of the overall term (specified in `data.lang`). `data` contains the entire object passed into the entry point and is used to access information for constructing the categories added by `format_derived()`. ]==] function export.link_term(part, data, include_separator) local result if part.part_lang then result = require(etymology_module).format_derived { lang = data.lang, terms = {part}, sources = {part.lang}, sort_key = data.sort_key, nocat = data.nocat, template_name = "affix", qualifiers_labels_on_outside = true, borrowing_type = data.borrowing_type, force_cat = data.force_cat or debug_force_cat, } else result = m_links.full_link(part, "term", nil, "show qualifiers") end if include_separator and part.separator then return part.separator .. result else return result end end local function canonicalize_script_code(scode) -- Convert 'mnc-Mong', 'xwo-Mong' etc. to 'Mong'. return (scode:gsub("^.*%-", "")) end ----------------------------------------------------------------------------------------- -- Affix-handling functions -- ----------------------------------------------------------------------------------------- -- Figure out the appropriate script for the given affix and language (unless the script is explicitly passed in), and -- return the values of template_hyphens[], display_hyphens[] and lookup_hyphens[] for that script, substituting -- default values as appropriate. Four values are returned: -- DETECTED_SCRIPT, TEMPLATE_HYPHEN, DISPLAY_HYPHEN, LOOKUP_HYPHEN local function detect_script_and_hyphens(text, lang, sc) local scode -- 1. If the script is explicitly passed in, use it. if sc then scode = sc:getCode() else local possible_script_codes = lang:getScriptCodes() -- YUCK! `possible_script_codes` comes from loadData() so #possible_scripts doesn't work (always returns 0). local num_possible_script_codes = m_table.length(possible_script_codes) if num_possible_script_codes == 0 then -- This shouldn't happen; if the language has no script codes, -- the list {"None"} should be returned. error("Something is majorly wrong! Language " .. lang:getCanonicalName() .. " has no script codes.") end if num_possible_script_codes == 1 then -- 2. If the language has only one possible script, use it. scode = possible_script_codes[1] else -- 3. Check if any of the possible scripts for the language have non-default values for template_hyphens[] -- or display_hyphens[]. If so, we need to do script detection on the text. If not, just use "Latn", -- which may not be technically correct but produces the right results because Latn has all default -- values for template_hyphens[] and display_hyphens[]. local may_have_nondefault_hyphen = false for _, script_code in ipairs(possible_script_codes) do script_code = canonicalize_script_code(script_code) if template_hyphens[script_code] or display_hyphens[script_code] then may_have_nondefault_hyphen = true break end end if not may_have_nondefault_hyphen then scode = "Latn" else scode = lang:findBestScript(text):getCode() end end end scode = canonicalize_script_code(scode) local template_hyphen = template_hyphens[scode] or "-" local lookup_hyphen = lookup_hyphens[scode] or "-" local display_hyphen = display_hyphens[scode] or default_display_hyphen return scode, template_hyphen, display_hyphen, lookup_hyphen end --[=[ Given a template affix `term` and an affix type `affix_type`, change the relevant template hyphen(s) in the affix to the display or lookup hyphen specified in `new_hyphen`, or add them if they are missing. `new_hyphen` can be a string, specifying a fixed hyphen, or a function of two arguments (the script code `scode` and the discovered template hyphen, or nil of no relevant template hyphen is present). `thyph_re` is a Lua pattern (which must be enclosed in parens) that matches the possible template hyphens. Note that not all template hyphens present in the affix are changed, but only the "relevant" ones (e.g. for a prefix, a relevant template hyphen is one coming at the end of the affix). ]=] local function reconstruct_term_per_hyphens(term, affix_type, scode, thyph_re, new_hyphen) local function get_hyphen(hyph) if type(new_hyphen) == "string" then return new_hyphen end return new_hyphen(scode, hyph) end if affix_type == "non-affix" then return term elseif affix_type == "circumfix" then local before, before_hyphen, after_hyphen, after = rmatch(term, "^(.*)" .. thyph_re .. " " .. thyph_re .. "(.*)$") if not before or ulen(term) <= 3 then -- Unlike with other types of affixes, don't try to add hyphens in the middle of the term to convert it to -- a circumfix. Also, if the term is just hyphen + space + hyphen, return it. return term end return before .. get_hyphen(before_hyphen) .. " " .. get_hyphen(after_hyphen) .. after elseif affix_type == "infix" or affix_type == "interfix" then local before_hyphen, middle, after_hyphen = rmatch(term, "^" .. thyph_re .. "(.*)" .. thyph_re .. "$") if before_hyphen and ulen(term) <= 1 then -- If the term is just a hyphen, return it. return term end return get_hyphen(before_hyphen) .. (middle or term) .. get_hyphen(after_hyphen) elseif affix_type == "prefix" then local middle, after_hyphen = rmatch(term, "^(.*)" .. thyph_re .. "$") if middle and ulen(term) <= 1 then -- If the term is just a hyphen, return it. return term end return (middle or term) .. get_hyphen(after_hyphen) elseif affix_type == "suffix" then local before_hyphen, middle = rmatch(term, "^" .. thyph_re .. "(.*)$") if before_hyphen and ulen(term) <= 1 then -- If the term is just a hyphen, return it. return term end return get_hyphen(before_hyphen) .. (middle or term) else error(("Internal error: Unrecognized affix type '%s'"):format(affix_type)) end end --[=[ Look up a mapping from a given affix variant to the canonical form used in categories and links. The lookup tables are language-specific according to `lang`, and may be ID-specific according to `affix_id`. The affixes as they appear in the lookup tables (both the variant and the canonical form) are in "lookup affix" format (approximately speaking, they use a regular hyphen for most scripts, but a tatweel for Arabic-script entries and a maqqef for Hebrew-script entries), but the passed-in `affix` param is in "template affix" format (which differs from the lookup affix for Arabic-script entries, because more types of hyphens are allowed in template affixes; see the comments at the top of the file). The remaining parameters to this function are used to convert from template affixes to lookup affixes; see the reconstruct_term_per_hyphens() function above. If the affix contains brackets, no lookup is done. Otherwise, a two-stage process is used, first looking up the affix directly and then stripping diacritics and looking it up again. The reason for this is documented above in the comments at the top of the file (specifically, the comments describing lookup affixes). The value of a mapping can either be a string (do the mapping regardless of affix ID) or a table indexed by affix ID (where the special value `false` indicates no affix ID). The values of entries in this table can also be strings, or tables with keys `affix` and `id` (again, use `false` to indicate no ID). This allows an affix mapping to map from one ID to another (for example, this is used in English to map the [[an-]] prefix with no ID to the [[a-]] prefix with the ID 'not'). The Given a template affix `term` and an affix type `affix_type`, change the relevant template hyphen(s) in the affix to the display or lookup hyphen specified in `new_hyphen`, or add them if they are missing. `new_hyphen` can be a string, specifying a fixed hyphen, or a function of two arguments (the script code `scode` and the discovered template hyphen, or nil of no relevant template hyphen is present). `thyph_re` is a Lua pattern (which must be enclosed in parens) that matches the possible template hyphens. Note that not all template hyphens present in the affix are changed, but only the "relevant" ones (e.g. for a prefix, a relevant template hyphen is one coming at the end of the affix). ]=] local function lookup_affix_mapping(affix, affix_type, lang, scode, thyph_re, lookup_hyph, affix_id) local function do_lookup(afx) -- Ensure that the affix uses lookup hyphens regardless of whether it used a different type of hyphens before -- or no hyphens. local lookup_affix = reconstruct_term_per_hyphens(afx, affix_type, scode, thyph_re, lookup_hyph) local function do_lookup_for_langcode(langcode) if export.langs_with_lang_specific_data[langcode] then local langdata = mw.loadData(export.affix_lang_data_module_prefix .. langcode) if langdata.affix_mappings then local mapping = langdata.affix_mappings[lookup_affix] if mapping then if type(mapping) == "table" then mapping = mapping[affix_id] or mapping.default or mapping[affix_id or false] if mapping then return mapping end else return mapping end end end end end -- If `lang` is an etymology-only language, look for a mapping both for it and its full parent. local langcode = lang:getCode() local mapping = do_lookup_for_langcode(langcode) if mapping then return mapping end local full_langcode = lang:getFullCode() if full_langcode ~= langcode then mapping = do_lookup_for_langcode(full_langcode) if mapping then return mapping end end return nil end if affix:find("%[%[") then return nil end return do_lookup(affix) or do_lookup(lang:stripDiacritics(affix)) or nil end --[==[ For a given template term in a given language (see the definition of "template affix" near the top of the file), possibly in an explicitly specified script `sc` (but usually nil), return the term's affix type ({"prefix"}, {"interfix"}, {"suffix"}, {"circumfix"} or {"non-affix"}) along with the corresponding link and display affixes (see definitions near the top of the file); also the corresponding lookup affix (if `return_lookup_affix` is specified). The term passed in should already have any fragment (after the # sign) parsed off of it. Four values are returned: `affix_type`, `link_term`, `display_term` and `lookup_term`. The affix type can be passed in instead of autodetected; in this case, the template term need not have any attached hyphens, and the appropriate hyphens will be added in the appropriate places. If `do_affix_mapping` is specified, look up the affix in the lang-specific affix mappings, as described in the comment at the top of the file; otherwise, the link and display terms will always be the same. (They will be the same in any case if the template term has a bracketed link in it or is not an affix.) If `return_lookup_affix` is given, the fourth return value contains the term with appropriate lookup hyphens in the appropriate places; otherwise, it is the same as the display term. (This functionality is used in [[Module:category tree/affixes and compounds]] to convert link affixes into lookup affixes so that they can be looked up in the affix mapping tables.) Exported because used by [[Module:headword utilities]] to determine the affix type of a given pagename. ]==] function export.parse_term_for_affixes(term, lang, sc, affix_type, do_affix_mapping, return_lookup_affix, affix_id) if not term then return "non-affix", nil, nil, nil end if term == "^" then -- Indicates a null term to emulate the behavior of {{suffix|foo||bar}}. term = "" return "non-affix", term, term, term end if term:find("^%^") then -- HACK! ^ at the beginning of Korean languages has a special meaning, triggering capitalization of the -- transliteration. Don't interpret it as "force non-affix" for those languages. local langcode = lang:getCode() if langcode ~= "ko" and langcode ~= "okm" and langcode ~= "jje" then -- Formerly we allowed ^ to force non-affix type; this is now handled using an inline modifier -- <naf>, <root>, etc. Throw an error for the moment when the old way is encountered. error("Use of ^ to force non-affix status is no longer supported; use an inline modifier <naf> or <root> " .. "after the component") end end -- Remove an asterisk if the morpheme is reconstructed and add it back at the end. local reconstructed = "" if term:find("^%*") then reconstructed = "*" term = term:gsub("^%*", "") end local scode, thyph, dhyph, lhyph = detect_script_and_hyphens(term, lang, sc) thyph = "([" .. thyph .. "])" if not affix_type then if rfind(term, thyph .. " " .. thyph) then affix_type = "circumfix" else local has_beginning_hyphen = rfind(term, "^" .. thyph) local has_ending_hyphen = rfind(term, thyph .. "$") if has_beginning_hyphen and has_ending_hyphen then affix_type = "interfix" elseif has_ending_hyphen then affix_type = "prefix" elseif has_beginning_hyphen then affix_type = "suffix" else affix_type = "non-affix" end end end local link_term, display_term, lookup_term if affix_type == "non-affix" then link_term = term display_term = term lookup_term = term else display_term = reconstruct_term_per_hyphens(term, affix_type, scode, thyph, dhyph) if do_affix_mapping then link_term = lookup_affix_mapping(term, affix_type, lang, scode, thyph, lhyph, affix_id) -- The return value of lookup_affix_mapping() may be an affix mapping with lookup hyphens if a mapping -- was found, otherwise nil if a mapping was not found. We need to convert to display hyphens in -- either case, but in the latter case we can reuse the display term, which has already been converted. if link_term then link_term = reconstruct_term_per_hyphens(link_term, affix_type, scode, thyph, dhyph) else link_term = display_term end else link_term = display_term end if return_lookup_affix then lookup_term = reconstruct_term_per_hyphens(term, affix_type, scode, thyph, lhyph) else lookup_term = display_term end end link_term = reconstructed .. link_term display_term = reconstructed .. display_term lookup_term = reconstructed .. lookup_term return affix_type, link_term, display_term, lookup_term end --[==[ Add a hyphen to a term in the appropriate place, based on the specified affix type, stripping off any existing hyphens in that place. For example, if `affix_type` == {"prefix"}, we'll add a hyphen onto the end if it's not already there (or is of the wrong type). Three values are returned: the link term, display term and lookup term. This function is a thin wrapper around `parse_term_for_affixes`; see the comments above that function for more information. Note that this function is exposed externally because it is called by [[Module:category tree/affixes and compounds]]; see the comment in `parse_term_for_affixes` for more information. ]==] function export.make_affix(term, lang, sc, affix_type, do_affix_mapping, return_lookup_affix, affix_id) if not (affix_type == "prefix" or affix_type == "suffix" or affix_type == "circumfix" or affix_type == "infix" or affix_type == "interfix" or affix_type == "non-affix") then error("Internal error: Invalid affix type " .. (affix_type or "(nil)")) end local _, link_term, display_term, lookup_term = export.parse_term_for_affixes(term, lang, sc, affix_type, do_affix_mapping, return_lookup_affix, affix_id) return link_term, display_term, lookup_term end ----------------------------------------------------------------------------------------- -- Main entry points -- ----------------------------------------------------------------------------------------- --[==[ Core categorization logic for affixes. This is shared between show_affix(), show_compound_like() and get_affix_categories_only(). Returns the categories array and other metadata needed for formatting. ]==] local function generate_affix_categories(data) data.pos = data.pos or default_pos -- data.pos = pluralize(data.pos) local text_sections, categories, borrowing_type = process_etymology_type(data.type, data.surface_analysis or data.nocap, data.notext, #data.parts > 0) data.borrowing_type = borrowing_type -- Process each part local whole_words = 0 local is_affix_or_compound = false -- Canonicalize and generate links for all the parts first; then do categorization in a separate step, because when -- processing the first part for categorization, we may access the second part and need it already canonicalized. for i, part in ipairs_with_gaps(data.parts) do part = part or {} data.parts[i] = part canonicalize_part(part, data.lang, data.sc) -- Determine affix type and get link and display terms (see text at top of file). Store them in the part -- (in fields that won't clash with fields used by full_link() in [[Module:links]] or link_term()), so they -- can be used in the loop below when categorizing. part.affix_type, part.affix_link_term, part.affix_display_term = export.parse_term_for_affixes(part.term, part.lang, part.sc, part.type, not part.alt, nil, part.id) -- If link_term is an empty string, either a bare ^ was specified or an empty term was used along with inline -- modifiers. The intention in either case is not to link the term. part.term = ine(part.affix_link_term) -- If part.alt would be the same as part.term, make it nil, so that it isn't erroneously tracked as being -- redundant alt text. part.alt = part.alt or (part.affix_display_term ~= part.affix_link_term and part.affix_display_term) or nil end if not data.noaffixcat then -- Now do categorization. for i, part in ipairs_with_gaps(data.parts) do local affix_type = part.affix_type if affix_type ~= "non-affix" then is_affix_or_compound = true -- Make a sort key. For the first part, use the second part as the sort key; the intention is that if the -- term has a prefix, sorting by the prefix won't be very useful so we sort by what follows, which is -- presumably the root. local part_sort_base = nil local part_sort = part.sort or data.sort_key if i == 1 and data.parts[2] and data.parts[2].term then local part2 = data.parts[2] -- If the second-part link term is empty, the user requested an unlinked term; avoid a wikitext error -- by using the alt value if available. part_sort_base = ine(part2.affix_link_term) or ine(part2.alt) if part_sort_base then part_sort_base = strip_diacritics_no_links(part2.lang, part_sort_base) end end if part.pos and rfind(part.pos, "patronym") then table.insert(categories, {cat = "patronymics", sort_key = part_sort, sort_base = part_sort_base}) end if data.pos ~= "टर्म" and part.pos and rfind(part.pos, "diminutive") then table.insert(categories, {cat = "diminutive " .. data.pos, sort_key = part_sort, sort_base = part_sort_base}) end -- Don't add a '*fixed with' category if the link term is empty or is in a different language. if ine(part.affix_link_term) and not part.part_lang then table.insert(categories, {cat = data.pos .. " " .. affix_type .. " " .. strip_diacritics_no_links(part.lang, part.affix_link_term) .. " के साथ" .. (part.id and " (" .. part.id .. ")" or ""), sort_key = part_sort, sort_base = part_sort_base}) end else whole_words = whole_words + 1 if whole_words == 2 then is_affix_or_compound = true table.insert(categories, "कंपाउंड " .. data.pos) end end end -- Make sure there was either an affix or a compound (two or more non-affix terms). if not is_affix_or_compound and not data.allow_no_affixes_or_compounds then error("The parameters did not include any affixes, and the term is not a compound. Please provide at least one affix.") end end return text_sections, categories, borrowing_type end --[==[ Implementation of {{tl|affix}} and {{tl|surface analysis}}. `data` contains all the information describing the affixes to be displayed, and contains the following: * `.lang` ('''required'''): Overall language object. Different from term-specific language objects (see `.parts` below). * `.sc`: Overall script object (usually omitted). Different from term-specific script objects. * `.parts` ('''required'''): List of objects describing the affixes to show. The general format of each object is as would be passed to `full_link()`, except that the `.lang` field should be missing unless the term is of a language different from the overall `.lang` value (in such a case, the language name is shown along with the term and an additional "derived from" category is added). '''WARNING''': The data in `.parts` will be destructively modified. * `.pos`: Overall part of speech (used in categories, defaults to {"terms"}). Different from term-specific part of speech. * `.sort_key`: Overall sort key. Normally omitted except e.g. in Japanese. * `.type`: Type of compound, if the parts in `.parts` describe a compound. Strictly optional, and if supplied, the compound type is displayed before the parts (normally capitalized, unless `.nocap` is given). * `.nocap`: Don't capitalize the first letter of text displayed before the parts (relevant only if `.type` or `.surface_analysis` is given). * `.notext`: Don't display any text before the parts (relevant only if `.type` or `.surface_analysis` is given). * `.nocat`: Disable all categorization. * `.noaffixcat`: Disable affix (and compound) categorization. Relevant for e.g. blends, which may otherwise be incorrectly categorized as compound terms. * `.lit`: Overall literal definition. Different from term-specific literal definitions. * `.force_cat`: Always display categories, even on userspace pages. * `.surface_analysis`: Implement {{surface analysis}}; adds `By surface analysis, ` before the parts. '''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`. ]==] function export.show_affix(data) local text_sections, categories, _ = generate_affix_categories(data) -- Process each part for display local parts_formatted = {} for i, part in ipairs_with_gaps(data.parts) do -- Make a link for the part table.insert(parts_formatted, export.link_term(part, data, "include_separator")) end if data.surface_analysis then local text = "by " .. glossary_link("surface analysis") .. ", " if not data.nocap then text = ucfirst(text) end table.insert(text_sections, 1, text) end table.insert(text_sections, export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories, separator_already_added = true }) return table.concat(text_sections) end --[==[ Get only the categories that would be generated by show_affix(), without any text output or formatting. This is used by Module:etymon to get affix categorization. Returns an array of category objects, where each entry is either a string (simple category name) or a table with keys `cat`, `sort_key`, and `sort_base` for more complex categorization. `data` should have the same structure as passed to show_affix(): * `.lang` (required): Overall language object * `.parts` (required): Array of affix part objects with `.term`, `.lang`, `.id`, etc. * `.pos`: Part of speech (defaults to "terms") * `.sort_key`: Overall sort key for categories '''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`. ]==] function export.get_affix_categories_only(data) local _, categories, _ = generate_affix_categories(data) return categories end function export.show_surface_analysis(data) data.surface_analysis = true data.allow_no_affixes_or_compounds = true return export.show_affix(data) end --[==[ Implementation of {{tl|compound}}. '''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`. ]==] function export.show_compound(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) local text_sections, categories, borrowing_type = process_etymology_type(data.type, data.nocap, data.notext, #data.parts > 0) data.borrowing_type = borrowing_type local parts_formatted = {} table.insert(categories, "कंपाउंड " .. data.pos) -- Make links out of all the parts local whole_words = 0 for i, part in ipairs(data.parts) do canonicalize_part(part, data.lang, data.sc) -- Determine affix type and get link and display terms (see text at top of file). local affix_type, link_term, display_term = export.parse_term_for_affixes(part.term, part.lang, part.sc, part.type, not part.alt, nil, part.id) -- If the term is an interfix or the type was explicitly given, recognize it as such (which means e.g. that we -- will display the term without hyphens for East Asian languages). Otherwise, ignore the fact that it looks -- like an affix and display as specified in the template (but pay attention to the detected affix type for -- certain tracking purposes). if affix_type == "interfix" or (part.type and part.type ~= "non-affix") then -- If link_term is an empty string, either a bare ^ was specified or an empty term was used along with -- inline modifiers. The intention in either case is not to link the term. Don't add a '*fixed with' -- category in this case, or if the term is in a different language. -- If part.alt would be the same as part.term, make it nil, so that it isn't erroneously tracked as being -- redundant alt text. if link_term and link_term ~= "" and not part.part_lang then table.insert(categories, {cat = data.pos .. " " .. affix_type .. "ed with " .. strip_diacritics_no_links(part.lang, link_term), sort_key = part.sort or data.sort_key}) end part.term = link_term ~= "" and link_term or nil part.alt = part.alt or (display_term ~= link_term and display_term) or nil else if affix_type ~= "non-affix" then local langcode = data.lang:getCode() -- If `data.lang` is an etymology-only language, track both using its code and its full parent's code. track { affix_type, affix_type .. "/lang/" .. langcode } local full_langcode = data.lang:getFullCode() if langcode ~= full_langcode then track(affix_type .. "/lang/" .. full_langcode) end else whole_words = whole_words + 1 end end table.insert(parts_formatted, export.link_term(part, data, "include_separator")) end if whole_words == 1 then track("one whole word") elseif whole_words == 0 then track("looks like confix") end table.insert(text_sections, export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories, separator_already_added = true }) return table.concat(text_sections) end --[==[ Implementation of {{tl|blend}}, {{tl|univerbation}} and similar "compound-like" templates. '''WARNING''': This destructively modifies both `data` and the individual structures within `.parts`. ]==] function export.show_compound_like(data) data.allow_no_affixes_or_compounds = true local text_sections, categories, _ = generate_affix_categories(data) if data.cat then table.insert(categories, data.cat) end -- Process each part for display local parts_formatted = {} for i, part in ipairs_with_gaps(data.parts) do -- Make a link for the part table.insert(parts_formatted, export.link_term(part, data, "include_separator")) end if #data.parts > 0 and data.oftext then table.insert(text_sections, 1, " " .. data.oftext .. " ") end if data.text then table.insert(text_sections, 1, data.text) end table.insert(text_sections, export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories, separator_already_added = true }) return table.concat(text_sections) end --[==[ Make `part` (a structure holding information on an affix part) into an affix of type `affix_type`, and apply any relevant affix mappings. For example, if the desired affix type is "suffix", this will (in general) add a hyphen onto the beginning of the term, alt, tr and ts components of the part if not already present. The hyphen that's added is the "display hyphen" (see above) and may be script-specific. (In the case of East Asian scripts, the display hyphen is an empty string whereas the template hyphen is the regular hyphen, meaning that any regular hyphen at the beginning of the part will be effectively removed.) `lang` and `sc` hold overall language and script objects. Note that this also applies any language-specific affix mappings, so that e.g. if the language is Finnish and the user specified [[-käs]] in the affix and didn't specify an `.alt` value, `part.term` will contain [[-kas]] and `part.alt` will contain [[-käs]]. This function is used by the "legacy" templates ({{tl|prefix}}, {{tl|suffix}}, {{tl|confix}}, etc.) where the nature of the affix is specified by the template itself rather than auto-determined from the affix, as is the case with {{tl|affix}}. '''WARNING''': This destructively modifies `part`. ]==] local function make_part_into_affix(part, lang, sc, affix_type) canonicalize_part(part, lang, sc) local link_term, display_term = export.make_affix(part.term, part.lang, part.sc, affix_type, not part.alt, nil, part.id) part.term = link_term -- When we don't specify `do_affix_mapping` to make_affix(), link and display terms (first and second retvals of -- make_affix()) are the same. -- If part.alt would be the same as part.term, make it nil, so that it isn't erroneously tracked as being -- redundant alt text. part.alt = part.alt and export.make_affix(part.alt, part.lang, part.sc, affix_type) or (display_term ~= link_term and display_term) or nil local Latn = require(scripts_module).getByCode("Latn") part.tr = export.make_affix(part.tr, part.lang, Latn, affix_type) part.ts = export.make_affix(part.ts, part.lang, Latn, affix_type) end local function track_wrong_affix_type(template, part, expected_affix_type) if part and not part.type then local affix_type = export.parse_term_for_affixes(part.term, part.lang, part.sc) if affix_type ~= expected_affix_type then local part_name = expected_affix_type or "base" local langcode = part.lang:getCode() local full_langcode = part.lang:getFullCode() require("Module:debug/track") { template, template .. "/" .. part_name, template .. "/" .. part_name .. "/" .. (affix_type or "none"), template .. "/" .. part_name .. "/" .. (affix_type or "none") .. "/lang/" .. langcode } -- If `part.lang` is an etymology-only language, track both using its code and its full parent's code. if full_langcode ~= langcode then require("Module:debug/track")( template .. "/" .. part_name .. "/" .. (affix_type or "none") .. "/lang/" .. full_langcode ) end end end end local function insert_affix_category(categories, pos, affix_type, part, sort_key, sort_base) -- Don't add a '*fixed with' category if the link term is empty or is in a different language. if part.term and not part.part_lang then local cat = pos .. " " .. affix_type .. "ed with " .. strip_diacritics_no_links(part.lang, part.term) .. (part.id and " (" .. part.id .. ")" or "") if sort_key or sort_base then table.insert(categories, {cat = cat, sort_key = sort_key, sort_base = sort_base}) else table.insert(categories, cat) end end end --[==[ Implementation of {{tl|circumfix}}. '''WARNING''': This destructively modifies both `data` and `.prefix`, `.base` and `.suffix`. ]==] function export.show_circumfix(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. make_part_into_affix(data.prefix, data.lang, data.sc, "prefix") make_part_into_affix(data.suffix, data.lang, data.sc, "suffix") track_wrong_affix_type("circumfix", data.prefix, "prefix") track_wrong_affix_type("circumfix", data.base, nil) track_wrong_affix_type("circumfix", data.suffix, "suffix") -- Create circumfix term. local circumfix = nil if data.prefix.term and data.suffix.term then circumfix = data.prefix.term .. " " .. data.suffix.term data.prefix.alt = data.prefix.alt or data.prefix.term data.suffix.alt = data.suffix.alt or data.suffix.term data.prefix.term = circumfix data.suffix.term = circumfix end -- Make links out of all the parts. local parts_formatted = {} local categories = {} local sort_base if data.base.term then sort_base = strip_diacritics_no_links(data.base.lang, data.base.term) end table.insert(parts_formatted, export.link_term(data.prefix, data)) table.insert(parts_formatted, export.link_term(data.base, data)) table.insert(parts_formatted, export.link_term(data.suffix, data)) -- Insert the categories, but don't add a '*fixed with' category if the link term is in a different language. if not data.prefix.part_lang then table.insert(categories, {cat=data.pos .. " circumfixed with " .. strip_diacritics_no_links(data.prefix.lang, circumfix), sort_key=data.sort_key, sort_base=sort_base}) end return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end --[==[ Implementation of {{tl|confix}}. '''WARNING''': This destructively modifies both `data` and `.prefix`, `.base` and `.suffix`. ]==] function export.show_confix(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. make_part_into_affix(data.prefix, data.lang, data.sc, "prefix") make_part_into_affix(data.suffix, data.lang, data.sc, "suffix") track_wrong_affix_type("confix", data.prefix, "prefix") track_wrong_affix_type("confix", data.base, nil) track_wrong_affix_type("confix", data.suffix, "suffix") -- Make links out of all the parts. local parts_formatted = {} local prefix_sort_base if data.base and data.base.term then prefix_sort_base = strip_diacritics_no_links(data.base.lang, data.base.term) elseif data.suffix.term then prefix_sort_base = strip_diacritics_no_links(data.suffix.lang, data.suffix.term) end -- Insert the categories and parts. local categories = {} table.insert(parts_formatted, export.link_term(data.prefix, data)) insert_affix_category(categories, data.pos, "prefix", data.prefix, data.sort_key, prefix_sort_base) if data.base then table.insert(parts_formatted, export.link_term(data.base, data)) end table.insert(parts_formatted, export.link_term(data.suffix, data)) -- FIXME, should we be specifying a sort base here? insert_affix_category(categories, data.pos, "suffix", data.suffix) return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end --[==[ Implementation of {{tl|infix}}. '''WARNING''': This destructively modifies both `data` and `.base` and `.infix`. ]==] function export.show_infix(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. make_part_into_affix(data.infix, data.lang, data.sc, "infix") track_wrong_affix_type("infix", data.base, nil) track_wrong_affix_type("infix", data.infix, "infix") -- Make links out of all the parts. local parts_formatted = {} local categories = {} table.insert(parts_formatted, export.link_term(data.base, data)) table.insert(parts_formatted, export.link_term(data.infix, data)) -- Insert the categories. -- FIXME, should we be specifying a sort base here? insert_affix_category(categories, data.pos, "infix", data.infix) return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end --[==[ Implementation of {{tl|prefix}}. '''WARNING''': This destructively modifies both `data` and the structures within `.prefixes`, as well as `.base`. ]==] function export.show_prefix(data) data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. for i, prefix in ipairs(data.prefixes) do make_part_into_affix(prefix, data.lang, data.sc, "prefix") end for i, prefix in ipairs(data.prefixes) do track_wrong_affix_type("prefix", prefix, "prefix") end track_wrong_affix_type("prefix", data.base, nil) -- Make links out of all the parts. local parts_formatted = {} local first_sort_base = nil local categories = {} if data.prefixes[2] then first_sort_base = ine(data.prefixes[2].term) or ine(data.prefixes[2].alt) if first_sort_base then first_sort_base = strip_diacritics_no_links(data.prefixes[2].lang, first_sort_base) end elseif data.base then first_sort_base = ine(data.base.term) or ine(data.base.alt) if first_sort_base then first_sort_base = strip_diacritics_no_links(data.base.lang, first_sort_base) end end for i, prefix in ipairs(data.prefixes) do table.insert(parts_formatted, export.link_term(prefix, data)) insert_affix_category(categories, data.pos, "prefix", prefix, data.sort_key, i == 1 and first_sort_base or nil) end if data.base then table.insert(parts_formatted, export.link_term(data.base, data)) else table.insert(parts_formatted, "") end return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end --[==[ Implementation of {{tl|suffix}}. '''WARNING''': This destructively modifies both `data` and the structures within `.suffixes`, as well as `.base`. ]==] function export.show_suffix(data) local categories = {} data.pos = data.pos or default_pos data.pos = pluralize(data.pos) canonicalize_part(data.base, data.lang, data.sc) -- Hyphenate the affixes and apply any affix mappings. for i, suffix in ipairs(data.suffixes) do make_part_into_affix(suffix, data.lang, data.sc, "suffix") end track_wrong_affix_type("suffix", data.base, nil) for i, suffix in ipairs(data.suffixes) do track_wrong_affix_type("suffix", suffix, "suffix") end -- Make links out of all the parts. local parts_formatted = {} if data.base then table.insert(parts_formatted, export.link_term(data.base, data)) else table.insert(parts_formatted, "") end for i, suffix in ipairs(data.suffixes) do table.insert(parts_formatted, export.link_term(suffix, data)) end -- Insert the categories. for i, suffix in ipairs(data.suffixes) do -- FIXME, should we be specifying a sort base here? insert_affix_category(categories, data.pos, "suffix", suffix) if suffix.pos and rfind(suffix.pos, "patronym") then table.insert(categories, "patronymics") end end return export.join_formatted_parts { data = data, parts_formatted = parts_formatted, categories = categories } end return export paxbkre2vibf4cvew8lljjpvxvpfmle मॉड्यूल:hi-IPA 828 303608 487915 487249 2026-09-03T15:57:26Z SM7 6218 updating... 487915 Scribunto text/plain local export = {} local lang = require("Module:languages").getByCode("hi") local sc = require("Module:scripts").getByCode("Deva") local m_IPA = require("Module:IPA") local m_a = require("Module:accent qualifier") local m_str_utils = require("Module:string utilities") local find = m_str_utils.find local gcodepoint = m_str_utils.gcodepoint local gmatch = m_str_utils.gmatch local gsub = m_str_utils.gsub local u = m_str_utils.char local correspondences = { ["ṅ"] = "ŋ", ["g"] = "ɡ", ["c"] = "t͡ʃ", ["j"] = "d͡ʒ", ["ñ"] = "ɲ", ["ṭ"] = "ʈ", ["ḍ"] = "ɖ", ["ṇ"] = "ɳ", ["t"] = "t̪", ["d"] = "d̪", ["y"] = "j", ["r"] = "ɾ", ["v"] = "ʋ", ["ś"] = "ʃ", ["ṣ"] = "ʂ", ["ź"] = "ʒ", ["ž"] = "ʒ", ["h"] = "ɦ", ["ṛ"] = "ɽ", ["ẓ"] = "ʒ", ["ḷ"] = "l", ["ḻ"] = "l", ["ġ"] = "ɣ", ["q"] = "q", ["x"] = "x", ["ṉ"] = "n", ["ṟ"] = "ɾ", ["a"] = "ə", ["ā"] = "ɑː", ["i"] = "ɪ", ["ī"] = "iː", ["o"] = "oː", ["e"] = "eː", ["u"] = "ʊ", ["ū"] = "uː", ["ŏ"] = "ɔ", ["ĕ"] = "æ", ["ẽ"] = "ẽː", ["ũ"] = "ʊ̃", ["õ"] = "õː", ["ã"] = "ə̃", ["ā̃"] = "ɑ̃ː", ["ĩ"] = "ɪ̃", ["ī̃"] = "ĩː", ["ॐ"] = "oːm", ["ḥ"] = "(ɦ)", ["'"] = "(ʔ)", } local perso_arabic = { ["x"] = "kh", ["ġ"] = "g", ["q"] = "k", ["ź"] = "z", ["z"] = "j", ["f"] = "ph", ["'"] = "", } local urdu = { ["ṣ"] = "ʃ", ["ṇ"] = "n", } local deccani = { ["q"] = "x", } local lengthen = { ["a"] = "ā", ["i"] = "ī", ["u"] = "ū", } local vowels = "aāiīuūoǒŏěĕʊɪɔɔ̃ɛeæãā̃ẽĩī̃õũū̃ː" local vowel = "[aāiīuūoǒŏěĕʊɪɔɔ̃ɛeæãā̃ẽĩī̃õũū̃]ː?" local weak_h = "([gjdḍbṛnm])h" local aspirate = "([kctṭp])" local syllabify_pattern = "([" .. vowels .. "]̃?)([^" .. vowels .. "%.%-]+)([" .. vowels .. "]̃?)" local function find_consonants(text) local current = "" local cons = {} for cc in gcodepoint(text .. " ") do local ch = u(cc) if find(current .. ch, "^[kgṅcjñṭḍṇtdnpbmyrlvśṣshqxġzžḻṛṟfθṉḥ]$") or find(current .. ch, "^[kgcjṭḍtdpbṛ]h$") then current = current .. ch else table.insert(cons, current) current = ch end end return cons end local function syllabify(text) for count = 1, 2 do text = gsub(text, syllabify_pattern, function(a, b, c) b_set = find_consonants(b) table.insert(b_set, #b_set > 1 and 2 or 1, ".") return a .. table.concat(b_set) .. c end) text = gsub(text, "(" .. vowel .. ")(?=" .. vowel .. ")", "%1.") end for count = 1, 2 do text = gsub(text, "(" .. vowel .. ")(" .. vowel .. ")", "%1.%2") end -- syllabification corrections -- ([^.]) is added in front, just in case one of the (unlikely) clusters -- would occur after a blank space (temporarily reformatted as '..') text = gsub(text, '([^.])%.([kqgcjṭḍtdpb])(h?)([kqgcjṭḍtdpbxġfnɳmsśzź])', '%1%2%3.%4') text = gsub(text, '([^.])%.([qgcjṭḍtdpb])(h?)ṣ', '%1%2%3.ṣ') text = gsub(text, '([^.])%.khṣ', '%1kh.ṣ') -- not kṣ/क्ष text = gsub(text, '([^.])%.([xġfnɳmzźyrlv])([kqgcjṭḍtdpbxġfnɳmsśṣzźh])', '%1%2.%3') text = gsub(text, '([^.])%.([sśṣ])([gjḍdbġsśṣzźh])', '%1%2.%3') return text end local identical = "knlsfzθ" for character in gmatch(identical, ".") do correspondences[character] = character end local function transliterate(text) return (lang:transliterate(text)) end function export.link(term) return require("Module:links").full_link{ term = term, lang = lang, sc = sc } end function export.toIPA(text, style) text = gsub(text, '॰', '-') local translit = text if lang:findBestScript(text):isTransliterated() then translit = transliterate(text) end if not translit then error('The term "' .. text .. '" could not be transliterated.') end if style == "nonpersianized" then translit = gsub(translit, "[xġqźzf']", perso_arabic) end if style == "dakhini" then translit = gsub(translit, "[q]", deccani) end -- force final schwa for Hindi translit = gsub(translit, "a~$", "ə") if style == "desanskritize" then translit = gsub(translit, "(...)ə$", "%1ɑ(ː)") translit = gsub(translit, "[ṣṇ]", urdu) end -- vowels translit = gsub(translit, "͠", "̃") translit = gsub(translit, 'a(̃?)i', 'ɛ%1ː') translit = gsub(translit, 'a(̃?)u', 'ɔ%1ː') translit = gsub(translit, "%-$", "") translit = gsub(translit, "^%-", "") translit = gsub(translit, "ŕ$", "r") translit = gsub(translit, "ŕ(" .. vowel .. ")", "r%1") translit = gsub(translit, "ŕ", "ri") translit = gsub(translit, ",", "") translit = gsub(translit, " ", "..") translit = syllabify(translit) translit = gsub(translit, "%.ː", "ː.") translit = gsub(translit, "%.̃", "̃") translit = gsub(translit, aspirate .. "h", '%1ʰ') translit = gsub(translit, weak_h, '%1ʱ') local result = gsub(translit, ".", correspondences) -- remove final schwa (Pandey, 2014) -- actually weaken result = gsub(result, "(...)ə$", "%1ᵊ") result = gsub(result, "(...)ə ", "%1ᵊ ") result = gsub(result, "(...)ə%.?%-", "%1ᵊ-") -- formatting result = gsub(result, "%.?%-", ".") result = gsub(result, "%.%.", " ") result = gsub(result, "ː̃", "̃ː") result = gsub(result, "ː%.̃", "̃ː.") result = gsub(result, "%.$", "") -- ñ result = gsub(result, "d͡ʒɲ", "@@@@") -- protect the jñ sequence result = gsub(result, "ɲ", "n") -- replace all remaining ñ result = gsub(result, "@@@@", "d͡ʒɲ") -- restore -- i and u lengthening result = gsub(result, "ʊ(̃?)(ɦ?)$", "u%1ː%2") result = gsub(result, "ɪ(̃?)(ɦ?)$", "i%1ː%2") -- deaffricate first affricate in geminates result = gsub(result, "t͡ʃ(%.?)t͡ʃ", "t̪%1t͡ʃ") result = gsub(result, "d͡ʒ(%.?)d͡ʒ", "d̪%1d͡ʒ") -- silent h in 'lh-', 'vh-' (Ohala 1983, p.45) result = gsub(result, "^([lʋ])ɦ", "%1") result = gsub(result, "([ .])([lʋ])ɦ", "%1%2") result = gsub(result, "ɛː(%.?)j", function(a) local res = "ə̯i" res = res .. a .. "j" return res end) result = gsub(result, "ɔː(%.?)ʋ", function(a) local res = "ə̯u" res = res .. a .. "ʋ" return res end) return result end function export.narrow_IPA(ipa) -- what /ɑ/ and /ə/ really are ipa = gsub(ipa, 'ɑ', 'ä') ipa = gsub(ipa, 'ə', 'ɐ') -- uvular /x/, /ɣ/ ?? -- ipa = gsub(ipa, 'x', 'χ') -- ipa = gsub(ipa, 'ɣ', 'ʁ') -- jña rule ipa = gsub(ipa, 'd͡ʒɲ', 'ɡj') -- retroflex s rules ipa = gsub(ipa, 'ʂ(%.?)([^ʈɖ.])', 'ʃ%1%2') ipa = gsub(ipa, 'ʂ$', 'ʃ') -- nasal allophones ipa = gsub(ipa, 'ŋ(%.?)([qχʁ])', 'ɴ%1%2') ipa = gsub(ipa, 'n%.j', 'ɲ.j') ipa = gsub(ipa, '[nɳ](%.?)ʃ', 'ɲ%1ʃ') -- this nasal is likely more front than before /j/, but not doing a too narrow transcription seems preferable ipa = gsub(ipa, 'n(%.?)([td])̪', 'n̪%1%2̪') ipa = gsub(ipa, 'm(%.?)f', 'ɱ%1f') -- nasals induce nasalization ipa = gsub(ipa, '([ɐäɪiʊueɛoɔæ])(ː?)([nɳɲŋɴmɱ])', '%1̃%2%3') -- cc, jj ipa = gsub(ipa, 't̪(%.?)t͡ʃ', 't̚%1t͡ʃ') ipa = gsub(ipa, 'd̪(%.?)d͡ʒ', 'd̚%1d͡ʒ') -- syllable boundary consonants ipa = gsub(ipa, '([kɡ])%.([kɡ])', '%1̚.%2') ipa = gsub(ipa, '([ʈɖ])%.([ʈɖ])', '%1̚.%2') ipa = gsub(ipa, '([td]̪?)%.([tdn])', '%1̚.%2') ipa = gsub(ipa, '([pb])%.([pb])', '%1̚.%2') -- aspiration rules ipa = gsub(ipa, 'ɐɦ([%. ])', 'ɛɦ%1') ipa = gsub(ipa, 'ɐɦ$', 'ɛɦ') ipa = gsub(ipa, 'ɐ%.ɦɐ', 'ɛ.ɦɛ') ipa = gsub(ipa, 'ɐ%(ɦ%)', 'ɛ(ɦ)') ipa = gsub(ipa, 'ʊɦ%.', 'ɔɦ.') ipa = gsub(ipa, 'ʊ%.ɦɐ', 'ɔ.ɦɔ') ipa = gsub(ipa, 'ɐ%.ɦʊ', 'ɔ.ɦɔ') ipa = gsub(ipa, '([ɐäɪiʊueɛoɔæ])(̃?)(ː?)ɦ', '%1%2%3ʱ') -- v/w ipa = gsub(ipa, '([kɡŋtdɲʈɖɳnpbm]̪?%.?)ʋ', '%1w') -- geminate /ɾ/ is trill ipa = gsub(ipa, "ɾ%.ɾ", "r.r") -- for onomatopeic words ending on -र्र ipa = gsub(ipa, "ɾɾ", "rː") -- final geminates often pronounced as singletons ipa = gsub(ipa, "([kɡʈɖɳtdnpbml]̪?)%1", "%1(ː)") -- final cc, jj ipa = gsub(ipa, "t̚t͡ʃ", "(t̚)t͡ʃ") ipa = gsub(ipa, "d̚d͡ʒ", "(d̚)d͡ʒ") ipa = gsub(ipa, "ɪ%.j", "i.j") ipa = gsub(ipa, " ", "‿") return ipa end function export.make(frame) local args = frame:getParent().args local pagetitle = mw.loadData("Module:headword/data").pagename local p, results = {}, {}, {} if args[1] then for index, item in ipairs(args) do table.insert(p, (item ~= "") and item or nil) end else p = { pagetitle } end for _, Hindi in ipairs(p) do local persianized = export.toIPA(Hindi, "persianized") local nonpersianized = export.toIPA(Hindi, "nonpersianized") table.insert(results, { pron = "/" .. persianized .. "/" }) local narrow = export.narrow_IPA(persianized) if narrow ~= persianized then table.insert(results, { pron = "[" .. narrow .. "]" }) end if persianized ~= nonpersianized then table.insert(results, { pron = "/" .. nonpersianized .. "/" }) local narrow = export.narrow_IPA(nonpersianized) if narrow ~= nonpersianized then table.insert(results, { pron = "[" .. narrow .. "]" }) end end end return m_a.format_qualifiers(lang, {"Standard Hindi"}) .. " " .. m_IPA.format_IPA_full { lang = lang, items = results } end function export.make_ur(frame) local args = frame:getParent().args local pagetitle = mw.loadData("Module:headword/data").pagename local lang = require("Module:languages").getByCode("ur") local sc = require("Module:scripts").getByCode("Aran") local p, results = {}, {}, {} if args[1] then for index, item in ipairs(args) do table.insert(p, (item ~= "") and item or nil) end else error("No transliterations given.") end for _, Urdu in ipairs(p) do Urdu = lang:transliterate(Urdu) or Urdu local desanskritize = export.toIPA(Urdu, "desanskritize") table.insert(results, { pron = "/" .. desanskritize .. "/" }) end return m_a.format_qualifiers(lang, {"ur"}) .. ' ' .. m_IPA.format_IPA_full { lang = lang, items = results } end function export.make_deccani(frame) local args = frame:getParent().args local pagetitle = mw.loadData("Module:headword/data").pagename local lang = require("Module:languages").getByCode("ur") local sc = require("Module:scripts").getByCode("Aran") local p, results = {}, {}, {} if args[1] then for index, item in ipairs(args) do table.insert(p, (item ~= "") and item or nil) end else error("No transliterations given.") end for _, Urdu in ipairs(p) do local dakhini = export.toIPA(Urdu, "dakhini") table.insert(results, { pron = "/" .. dakhini .. "/" }) end return m_a.format_qualifiers(lang, {"Deccani"}) .. ' ' .. m_IPA.format_IPA_full { lang = lang, items = results } end return export miu86o88edw9h56vl7eq9x8nt691ajr पारंपरिक 0 303638 487935 473712 2026-09-03T17:16:55Z SM7 6218 af 487935 wikitext text/x-wiki ==हिन्दी== ===व्युत्पत्ति=== {{af|hi|परंपरा|tr1=paramparā|-इक}} ===विशेषण=== {{शब्द|hi|विशेषण}} # [[परंपरागत]] ti9vmk2jhr5ky5atdw663u7jnofi9zb मॉड्यूल:Unicode data/Unicode 828 303696 487973 473994 2026-09-04T05:01:54Z SM7 6218 देवनागरी 487973 Scribunto text/plain local export = {} local Array = require("Module:array") local fun = require("Module:fun") local m_table = require("Module:table") local m_Unicode_data = require("Module:Unicode data") local lookup_name = m_Unicode_data.lookup_name local is_combining = m_Unicode_data.is_combining local capitalize = m_table.listToSet { "latin", "greek", "coptic", "cyrillic", "armenian", "hebrew", "arabic", "syriac", "thaana", "samaritan", "mandaic", "देवनागरी", "bengali", } -- ... local special = { ipa = "IPA", nko = "NKo", } local function get_name(char) return lookup_name(mw.ustring.codepoint(char)) :lower() :gsub("%S+", function(word) if capitalize[word] then return word:gsub("^%l", string.upper) else return special[word] end end) end function export.get_names(frame) local text = fun.map(get_name, frame.args[1]) return table.concat(text, ", ") end local function exists(pagename) return mw.title.new(pagename).exists end local function safe_exists(pagename) local success, exists = pcall(exists, pagename) return success and exists end local output_mt = {} function output_mt:insert(str) self.n = self.n + 1 self[self.n] = str end function output_mt:insert_format(...) self:insert(string.format(...)) end output_mt.join = table.concat output_mt.__index = output_mt local function Output() return setmetatable({ n = 0 }, output_mt) end function export.show_modules() local output = Output() output:insert [[ {| class="wikitable" style="text-align: center;"' |+ Unicode name and image modules,<br>organized by first three digits of codepoint in hexadecimal base]] for i = -1, 0xF do if i >= 0 then output:insert_format('\n! %X', i) else output:insert '\n!' end end output:insert '\n|-' local function range(start, ending) if not (start and ending) then error("Expected two arguments") end local output = Array() for i = start, ending do output:insert(i) end return output end local function make_module_row(type, first_two_digits, attribute) local found_module = false local output = range(0x0, 0xF):map( function(i) local first_three_digits = first_two_digits * 0x10 + i local module = ('Module:Unicode data/' .. type .. '/%03X') :format(first_three_digits) local link if safe_exists(module) then link = ("[[%s|" .. type .. "]]"):format(module) found_module = true else link = "&nbsp;" end return ('| title="U+%Xxxx"%s | %s') :format(first_three_digits, attribute, link) end) :concat "\n" return output, found_module end local first = true for first_two_digits = 0x00, 0x0E do local attribute = not first and ' style="border-top-width: 3px;"' or "" local row1, found_module1 = make_module_row("names", first_two_digits, attribute) local row2, found_module2 = make_module_row("images", first_two_digits, "") if found_module1 or found_module2 then output:insert_format('\n|-\n! rowspan="2"%s | %02Xx\n%s\n|-\n%s', attribute, first_two_digits, row1, row2) first = false end end output:insert "\n|}" return output:join() end export.show = export.show_modules return export id4xxhxn463jxmd2jw621kgscnqvssq मॉड्यूल:translations/egy 828 304117 487907 475432 2026-09-03T15:28:28Z SM7 6218 updating... 487907 Scribunto text/plain local m_links = require("Module:links") local export = {} function export.show(frame) local params = { [1] = {required = true}, [2] = {list = true}, ["h"] = {}, ["alt"] = {}, ["id"] = {}, ["lit"] = {}, } local args = require("Module:parameters").process(frame:getParent().args, params) local terminfo = { lang = require("Module:languages").getByCode("egy"), tr = nil, term = args[1], alt = args["alt"], id = args["id"], genders = args[2], lit = args["lit"], } local result = m_links.full_link(terminfo, "translation", true) if args["h"] then local hiero = frame:preprocess("{{egy-h|" .. args["h"] .. "}}") result = hiero .. ' (' .. result .. ')' end return result end return export rh1wmifdb818cp5c774kmxypm2nal9d मॉड्यूल:translations/multi-nowiki 828 304118 487910 475433 2026-09-03T15:33:09Z SM7 6218 updating+localization... 487910 Scribunto text/plain local export = {} function export.expand(frame) local args if mw.title.getCurrentTitle().nsText == "मॉड्यूल" then args = frame.args else args = frame:getParent().args end return require("Module:translations/multi").show(frame:newChild{args = {data = mw.text.trim(mw.text.unstripNoWiki(args[1]))}}:newChild{}) end return export fbsgk8esk87bczaujt8feaah15anhjx मॉड्यूल:interproject 828 304234 487899 487847 2026-09-03T14:01:18Z SM7 6218 localization... 487899 Scribunto text/plain local export = {} local m_links = require("Module:links") local m_params = require("Module:parameters") local en_utilities_module = "Module:en-utilities" local parse_interface_module = "Module:parse interface" local parse_utilities_module = "Module:parse utilities" local string_utilities_module = "Module:string utilities" local table_module = "Module:table" local wikimedia_languages_module = "Module:wikimedia languages" local full_link = m_links.full_link local concat = table.concat local insert = table.insert local boolean_param = {type = "boolean"} local function track(page) require("Module:debug/track")("interproject/" .. page) end local disambiguation_data local function get_disambiguation_format_string(language) if not disambiguation_data then disambiguation_data = mw.loadData("Module:interproject/data/disambiguation") end return disambiguation_data[language] or "%s (बहुविकल्पी)" end -- Split an argument on comma, but not comma followed by whitespace, or backslash + comma, or comma inside of brackets. local function split_on_comma(val) if val:find(",") then return require(parse_interface_module).split_on_comma(val) else return {val} end end -- Join one or more items using commas, with "and" between the last two items. local function join_on_comma(val) if val[2] then return require(table_module).serialCommaJoin(val) else return val[1] end end -- Replace + with the pagename, but replace \+ with +. local function substitute_plus(val, pagename) if not val then return val end if val:find("%+") then val = val:gsub("%\\%+", "\1"):gsub("%+", require(string_utilities_module).replacement_escape(pagename)): gsub("\1", "+") end return val end local function process_links(linkdata, prefix, name, wmlang, sc) local links = {} local iplinks = {} for _, link in ipairs(linkdata) do local this_wmlang = link.wmlang or wmlang local this_prefix = prefix .. ":" .. (this_wmlang:getCode() == "hi" and "" or this_wmlang:getCode() .. ":") local lang = this_wmlang:getWiktionaryLanguage() local ipalt = name .. " " .. (this_wmlang:getCode() == "hi" and "" or "<sup>" .. this_wmlang:getCode() .. "</sup>") link.lang = lang link.sc = sc link.track_sc = true link.no_nonstandard_sc_cat = true link.tr = "-" -- Strip diacritics according to Wiktionary language principles. This isn't done automatically with Wikipedia -- links but seems a good idea to do. Prefix the link with a colon to override this. We try to separate the -- fragment before doing this to avoid the term getting converted to an unsupported title, and don't do any -- diacritic stripping on non-mainspace Wikipedia links. if link.term:find("^:") then link.term = link.term:sub(2) elseif not link.term:find(":") then -- Apply some Wikipedia-style transformations before calling stripDiacritics() to avoid problems with -- the punctuation getting stripped. local term, fragment = m_links.get_fragment(link.term:gsub("_", " "):gsub("%?", "%%3F"):gsub("!", "%%21")) -- FIXME: This isn't sustainable and has to be removed. local stripped_term = lang:stripDiacritics(term) if stripped_term ~= term then link.alt = link.alt or link.term link.term = stripped_term .. (fragment and "#" .. fragment or "") end end if link.fragment ~= nil then link.alt = (link.alt or link.term) .. " § " .. link.fragment end if link.alt == link.term then link.alt = nil end link.term = this_prefix .. link.term insert(iplinks, "<span class=\"interProject\">[[" .. mw.ustring.gsub(link.term, "'''?", "") .. "|" .. ipalt .. "]]</span>") insert(links, full_link(link, "bold")) end return links, iplinks end local function parse_one_wikipedia_link(val, pagename, default_wmlang, link_prefix) local origval = val local rest, dab = val:match("^(.*)<(dab!?)>$") val = rest or val local langcode, rest = val:match("^([a-z][a-z-]+):(.*)$") if rest and not rest:find("^ ") then val = rest else langcode = nil end local wmlang if langcode then wmlang = require(wikimedia_languages_module).getByCodeWithFallback(langcode) if not wmlang then error(("न पहचाना जा सकने वाला विकिपीडिया अथवा विक्षनरी कोड '%s': %s"):format(langcode, -- FIXME, move escape_wikicode() elsewhere require(parse_utilities_module).escape_wikicode(origval))) end else wmlang = default_wmlang end local link, label = val:match("^%[%[(.-)|(.*)%]%]$") if not link then link = val:match("^%[%[(.*)%]%]$") end link = link or val local rest, fragment = link:match("^(.-)#(.*)$") link = rest or link if link == "" then link = "+" end link = substitute_plus(link, pagename) label = substitute_plus(label, pagename) fragment = substitute_plus(fragment, pagename) local user_specified_label = not not label label = label or link if label == "" then -- implement pipe trick rest = link:match("^(.+) %(.-%)$") if rest then label = rest else label = link:gsub(",.*$", "") end end if dab == "dab" or dab == "dab!" then link = get_disambiguation_format_string(wmlang:getCode()):format(link) end if dab == "dab!" then label = get_disambiguation_format_string(wmlang:getCode()):format(label) end if user_specified_label and fragment then link = link .. "#" .. fragment fragment = nil end return {wmlang = wmlang, term = link_prefix .. link, alt = label, fragment = fragment} end local function parse_wikipedia_links(val, pagename, default_wmlang, link_prefix) local raw_links = split_on_comma(val) for i, raw_link in ipairs(raw_links) do raw_links[i] = parse_one_wikipedia_link(raw_link, pagename, default_wmlang, link_prefix) default_wmlang = raw_links[i].wmlang end return raw_links end -- FIXME: From [[Module:zh/templates]] implementation of old {{zh-wp}}; do we want something like this? --local wp_data = { -- ["zh"] = { "Written Standard Chinese<sup>[[w:Written vernacular Chinese|?]]</sup>", "zh" }, -- ["cdo"] = { "Eastern Min", "cdo" }, -- ["gan"] = { "Gan", "zh" }, -- ["hak"] = { "Hakka", "hak" }, -- ["lzh"] = { "Classical", "zh" }, -- ["nan"] = { "Southern Min", "nan" }, -- ["wuu"] = { "Wu", "zh" }, -- ["yue"] = { "Cantonese", "zh" }, --} local function format_wikipedia_box(frame, linkdata, linktype, slim, sc) local wmlangcode, multibox for i, linkspec in ipairs(linkdata) do if i == 1 then wmlangcode = linkspec.wmlang:getCode() elseif wmlangcode ~= linkspec.wmlang:getCode() then multibox = true break end end if slim and not multibox then for _, linkspec in ipairs(linkdata) do if linktype == "category" then linkspec.alt = "Category:" .. linkspec.alt elseif linktype == "portal" then linkspec.alt = "Portal:" .. linkspec.alt end end end -- if not linkdata[2] then -- linktype = require(en_utilities_module).add_indefinite_article(linktype) -- else -- linktype = require(en_utilities_module).pluralize(linktype) -- end local links, iplinks = process_links(linkdata, "w", "Wikipedia", nil, sc) local div_prefix = "<div class=\"interproject-box sister-wikipedia sister-project noprint floatright\">" local template_extension = frame:extensionTag("templatestyles", "", {src="Module:interproject/style.css"}) if multibox then local result = { div_prefix .. "<div style=\"float: left;\">[[File:Wikipedia-logo.png|32px|none|link=|alt=]]</div>" .. "<div style=\"margin-left: 40px;\">[[विकिपीडिया]] पर " .. linktype .. " देखें:<ul>" } for i, linkspec in ipairs(linkdata) do local annotation = " <span style=\"font-size:80%\">(" .. linkspec.wmlang:getCanonicalName() .. ")</span>" insert(result, "<li>" .. links[i] .. annotation .. "</li>") end insert(result, "</ul></div></div>" .. template_extension) return concat(result) elseif slim then local wmlang = linkdata[1].wmlang return div_prefix .. "<div style=\"float: left;\">[[File:Wikipedia-logo.png|14px|none| ]]</div>" .. "<div style=\"margin-left: 15px;\">" .. " &nbsp;" .. join_on_comma(links) .. " को देखें " .. (wmlang:getCode() == "hi" and "" or wmlang:getCanonicalName() .. "&nbsp;") .. "विकिपीडिया पर" .. "</div></div>" .. template_extension else local wmlang = linkdata[1].wmlang return div_prefix .. "<div style=\"float: left;\" class=\"interproject-box-logo\">[[File:Wikipedia-logo-v2.svg|x40px|none|link=|alt=]]</div>" .. "<div style=\"margin-left: 60px;\">" .. wmlang:getCanonicalName() .. " [[विकिपीडिया]] पर " .. linktype .. " देखें:" .. "<div style=\"margin-left: 10px;\">" .. join_on_comma(links) .. "</div>" .. "</div>" .. concat(iplinks) .. "</div>" .. template_extension end end function export.wikipedia_box(frame) local params = { [1] = true, ["cat"] = true, ["category"] = {alias_of = "cat"}, ["i"] = boolean_param, ["lang"] = {type = "Wikimedia language", fallback = true, default = "hi"}, ["portal"] = true, ["sc"] = {type = "script"}, ["pagename"] = true, -- make old parameters throw an explanatory error; FIXME: eventually remove these. [2] = {replaced_by = false, instead = "use a piped link in 1=, e.g. {{!((}}foo{{!}}bar{{))!}}"}, ["mul"] = {replaced_by = false, instead = "use comma-separated items in 1="}, ["mullabel"] = {replaced_by = false, instead = "use a piped link in 1=, e.g. {{!((}}foo{{!}}bar{{))!}}"}, ["mulcat"] = {replaced_by = false, instead = "use comma-separated items in cat="}, ["mulcatlabel"] = {replaced_by = false, instead = "use a piped link in cat=, e.g. {{!((}}foo{{!}}bar{{))!}}"}, ["section"] = {replaced_by = false, instead = "use the syntax 'article#Section' in 1="}, } local parargs = frame:getParent().args local args = m_params.process(parargs, params) local pagename = args.pagename or mw.loadData("Module:headword/data").pagename local sc = args.sc local linkdata, linktype if parargs.lang then -- Tracking for old use of lang= instead of a language prefix. track("old-wp") end if (args[1] and 1 or 0) + (args.cat and 1 or 0) + (args.portal and 1 or 0) > 1 then error("Can't specify more than one of 1=, cat= and portal=") end local rawval, link_prefix if args.cat then linktype = "category" link_prefix = "Category:" rawval = args.cat elseif args.portal then linktype = "portal" link_prefix = "Portal:" rawval = args.portal else linktype = "लेख" link_prefix = "" rawval = args[1] or "" end linkdata = parse_wikipedia_links(rawval, pagename, args.lang, link_prefix) return format_wikipedia_box(frame, linkdata, linktype, frame.args.slim, sc) end function export.projectlink(frame, compat) local required = {required = true} local iparams = { ["prefix"] = required, ["name"] = required, ["image"] = required, ["requirelang"] = boolean_param, ["compat"] = boolean_param, } local iargs = m_params.process(frame.args, iparams) compat = compat or iargs.compat local lang_required = iargs.requirelang or false local lang_param = compat and "lang" or 1 local term_param = compat and 1 or 2 local alt_param = compat and 2 or 3 local params = { [lang_param] = {type = "Wikimedia language", method = "fallback", required = lang_required, default = "hi"}, [term_param] = true, [alt_param] = true, ["i"] = boolean_param, ["nodot"] = true, ["sc"] = {type = "script"}, ["section"] = true } local args = m_params.process(frame:getParent().args, params) local wmlang = args[lang_param] local sc = args["sc"] local term = args[term_param] or mw.loadData("Module:headword/data").pagename local linkdata = {term = term, alt = args[alt_param], fragment = args["section"]} if args["i"] then local prefixed = "''" if (iargs["prefix"] == "commons:Category") then prefixed = "Category:" .. prefixed end if linkdata.alt then linkdata.alt = prefixed .. linkdata.alt .. "''" else -- While it is true that the link module automatically removes italics from terms, -- linkdata.term is used outside this module too (image link and "interProject" link) linkdata.alt = prefixed .. linkdata.term .. "''" end end local links, iplinks = process_links({linkdata}, iargs["prefix"], iargs["name"], wmlang, sc) return "[[Image:" .. iargs["image"] .. "|15px|link=" .. iargs["prefix"] .. ":" .. (wmlang:getCode() == "hi" and "" or wmlang:getCode() .. ":") .. term .. "]] " .. concat(links, " एवं ") .. " पर " .. (wmlang:getCode() == "hi" and "" or " " .. wmlang:getCanonicalName() .. " ") .. " " .. iargs["name"] .. (args["nodot"] and "" or ".") .. concat(iplinks) end return export tkafavz9ufq2b7oolc3ifay2gj4hked 487900 487899 2026-09-03T14:02:17Z SM7 6218 "[[मॉड्यूल:interproject]]" सुरक्षित किया ([सम्पादन=केवल प्रबंधक अनुमत] (हमेशा) [स्थानांतरण=केवल प्रबंधक अनुमत] (हमेशा)) 487899 Scribunto text/plain local export = {} local m_links = require("Module:links") local m_params = require("Module:parameters") local en_utilities_module = "Module:en-utilities" local parse_interface_module = "Module:parse interface" local parse_utilities_module = "Module:parse utilities" local string_utilities_module = "Module:string utilities" local table_module = "Module:table" local wikimedia_languages_module = "Module:wikimedia languages" local full_link = m_links.full_link local concat = table.concat local insert = table.insert local boolean_param = {type = "boolean"} local function track(page) require("Module:debug/track")("interproject/" .. page) end local disambiguation_data local function get_disambiguation_format_string(language) if not disambiguation_data then disambiguation_data = mw.loadData("Module:interproject/data/disambiguation") end return disambiguation_data[language] or "%s (बहुविकल्पी)" end -- Split an argument on comma, but not comma followed by whitespace, or backslash + comma, or comma inside of brackets. local function split_on_comma(val) if val:find(",") then return require(parse_interface_module).split_on_comma(val) else return {val} end end -- Join one or more items using commas, with "and" between the last two items. local function join_on_comma(val) if val[2] then return require(table_module).serialCommaJoin(val) else return val[1] end end -- Replace + with the pagename, but replace \+ with +. local function substitute_plus(val, pagename) if not val then return val end if val:find("%+") then val = val:gsub("%\\%+", "\1"):gsub("%+", require(string_utilities_module).replacement_escape(pagename)): gsub("\1", "+") end return val end local function process_links(linkdata, prefix, name, wmlang, sc) local links = {} local iplinks = {} for _, link in ipairs(linkdata) do local this_wmlang = link.wmlang or wmlang local this_prefix = prefix .. ":" .. (this_wmlang:getCode() == "hi" and "" or this_wmlang:getCode() .. ":") local lang = this_wmlang:getWiktionaryLanguage() local ipalt = name .. " " .. (this_wmlang:getCode() == "hi" and "" or "<sup>" .. this_wmlang:getCode() .. "</sup>") link.lang = lang link.sc = sc link.track_sc = true link.no_nonstandard_sc_cat = true link.tr = "-" -- Strip diacritics according to Wiktionary language principles. This isn't done automatically with Wikipedia -- links but seems a good idea to do. Prefix the link with a colon to override this. We try to separate the -- fragment before doing this to avoid the term getting converted to an unsupported title, and don't do any -- diacritic stripping on non-mainspace Wikipedia links. if link.term:find("^:") then link.term = link.term:sub(2) elseif not link.term:find(":") then -- Apply some Wikipedia-style transformations before calling stripDiacritics() to avoid problems with -- the punctuation getting stripped. local term, fragment = m_links.get_fragment(link.term:gsub("_", " "):gsub("%?", "%%3F"):gsub("!", "%%21")) -- FIXME: This isn't sustainable and has to be removed. local stripped_term = lang:stripDiacritics(term) if stripped_term ~= term then link.alt = link.alt or link.term link.term = stripped_term .. (fragment and "#" .. fragment or "") end end if link.fragment ~= nil then link.alt = (link.alt or link.term) .. " § " .. link.fragment end if link.alt == link.term then link.alt = nil end link.term = this_prefix .. link.term insert(iplinks, "<span class=\"interProject\">[[" .. mw.ustring.gsub(link.term, "'''?", "") .. "|" .. ipalt .. "]]</span>") insert(links, full_link(link, "bold")) end return links, iplinks end local function parse_one_wikipedia_link(val, pagename, default_wmlang, link_prefix) local origval = val local rest, dab = val:match("^(.*)<(dab!?)>$") val = rest or val local langcode, rest = val:match("^([a-z][a-z-]+):(.*)$") if rest and not rest:find("^ ") then val = rest else langcode = nil end local wmlang if langcode then wmlang = require(wikimedia_languages_module).getByCodeWithFallback(langcode) if not wmlang then error(("न पहचाना जा सकने वाला विकिपीडिया अथवा विक्षनरी कोड '%s': %s"):format(langcode, -- FIXME, move escape_wikicode() elsewhere require(parse_utilities_module).escape_wikicode(origval))) end else wmlang = default_wmlang end local link, label = val:match("^%[%[(.-)|(.*)%]%]$") if not link then link = val:match("^%[%[(.*)%]%]$") end link = link or val local rest, fragment = link:match("^(.-)#(.*)$") link = rest or link if link == "" then link = "+" end link = substitute_plus(link, pagename) label = substitute_plus(label, pagename) fragment = substitute_plus(fragment, pagename) local user_specified_label = not not label label = label or link if label == "" then -- implement pipe trick rest = link:match("^(.+) %(.-%)$") if rest then label = rest else label = link:gsub(",.*$", "") end end if dab == "dab" or dab == "dab!" then link = get_disambiguation_format_string(wmlang:getCode()):format(link) end if dab == "dab!" then label = get_disambiguation_format_string(wmlang:getCode()):format(label) end if user_specified_label and fragment then link = link .. "#" .. fragment fragment = nil end return {wmlang = wmlang, term = link_prefix .. link, alt = label, fragment = fragment} end local function parse_wikipedia_links(val, pagename, default_wmlang, link_prefix) local raw_links = split_on_comma(val) for i, raw_link in ipairs(raw_links) do raw_links[i] = parse_one_wikipedia_link(raw_link, pagename, default_wmlang, link_prefix) default_wmlang = raw_links[i].wmlang end return raw_links end -- FIXME: From [[Module:zh/templates]] implementation of old {{zh-wp}}; do we want something like this? --local wp_data = { -- ["zh"] = { "Written Standard Chinese<sup>[[w:Written vernacular Chinese|?]]</sup>", "zh" }, -- ["cdo"] = { "Eastern Min", "cdo" }, -- ["gan"] = { "Gan", "zh" }, -- ["hak"] = { "Hakka", "hak" }, -- ["lzh"] = { "Classical", "zh" }, -- ["nan"] = { "Southern Min", "nan" }, -- ["wuu"] = { "Wu", "zh" }, -- ["yue"] = { "Cantonese", "zh" }, --} local function format_wikipedia_box(frame, linkdata, linktype, slim, sc) local wmlangcode, multibox for i, linkspec in ipairs(linkdata) do if i == 1 then wmlangcode = linkspec.wmlang:getCode() elseif wmlangcode ~= linkspec.wmlang:getCode() then multibox = true break end end if slim and not multibox then for _, linkspec in ipairs(linkdata) do if linktype == "category" then linkspec.alt = "Category:" .. linkspec.alt elseif linktype == "portal" then linkspec.alt = "Portal:" .. linkspec.alt end end end -- if not linkdata[2] then -- linktype = require(en_utilities_module).add_indefinite_article(linktype) -- else -- linktype = require(en_utilities_module).pluralize(linktype) -- end local links, iplinks = process_links(linkdata, "w", "Wikipedia", nil, sc) local div_prefix = "<div class=\"interproject-box sister-wikipedia sister-project noprint floatright\">" local template_extension = frame:extensionTag("templatestyles", "", {src="Module:interproject/style.css"}) if multibox then local result = { div_prefix .. "<div style=\"float: left;\">[[File:Wikipedia-logo.png|32px|none|link=|alt=]]</div>" .. "<div style=\"margin-left: 40px;\">[[विकिपीडिया]] पर " .. linktype .. " देखें:<ul>" } for i, linkspec in ipairs(linkdata) do local annotation = " <span style=\"font-size:80%\">(" .. linkspec.wmlang:getCanonicalName() .. ")</span>" insert(result, "<li>" .. links[i] .. annotation .. "</li>") end insert(result, "</ul></div></div>" .. template_extension) return concat(result) elseif slim then local wmlang = linkdata[1].wmlang return div_prefix .. "<div style=\"float: left;\">[[File:Wikipedia-logo.png|14px|none| ]]</div>" .. "<div style=\"margin-left: 15px;\">" .. " &nbsp;" .. join_on_comma(links) .. " को देखें " .. (wmlang:getCode() == "hi" and "" or wmlang:getCanonicalName() .. "&nbsp;") .. "विकिपीडिया पर" .. "</div></div>" .. template_extension else local wmlang = linkdata[1].wmlang return div_prefix .. "<div style=\"float: left;\" class=\"interproject-box-logo\">[[File:Wikipedia-logo-v2.svg|x40px|none|link=|alt=]]</div>" .. "<div style=\"margin-left: 60px;\">" .. wmlang:getCanonicalName() .. " [[विकिपीडिया]] पर " .. linktype .. " देखें:" .. "<div style=\"margin-left: 10px;\">" .. join_on_comma(links) .. "</div>" .. "</div>" .. concat(iplinks) .. "</div>" .. template_extension end end function export.wikipedia_box(frame) local params = { [1] = true, ["cat"] = true, ["category"] = {alias_of = "cat"}, ["i"] = boolean_param, ["lang"] = {type = "Wikimedia language", fallback = true, default = "hi"}, ["portal"] = true, ["sc"] = {type = "script"}, ["pagename"] = true, -- make old parameters throw an explanatory error; FIXME: eventually remove these. [2] = {replaced_by = false, instead = "use a piped link in 1=, e.g. {{!((}}foo{{!}}bar{{))!}}"}, ["mul"] = {replaced_by = false, instead = "use comma-separated items in 1="}, ["mullabel"] = {replaced_by = false, instead = "use a piped link in 1=, e.g. {{!((}}foo{{!}}bar{{))!}}"}, ["mulcat"] = {replaced_by = false, instead = "use comma-separated items in cat="}, ["mulcatlabel"] = {replaced_by = false, instead = "use a piped link in cat=, e.g. {{!((}}foo{{!}}bar{{))!}}"}, ["section"] = {replaced_by = false, instead = "use the syntax 'article#Section' in 1="}, } local parargs = frame:getParent().args local args = m_params.process(parargs, params) local pagename = args.pagename or mw.loadData("Module:headword/data").pagename local sc = args.sc local linkdata, linktype if parargs.lang then -- Tracking for old use of lang= instead of a language prefix. track("old-wp") end if (args[1] and 1 or 0) + (args.cat and 1 or 0) + (args.portal and 1 or 0) > 1 then error("Can't specify more than one of 1=, cat= and portal=") end local rawval, link_prefix if args.cat then linktype = "category" link_prefix = "Category:" rawval = args.cat elseif args.portal then linktype = "portal" link_prefix = "Portal:" rawval = args.portal else linktype = "लेख" link_prefix = "" rawval = args[1] or "" end linkdata = parse_wikipedia_links(rawval, pagename, args.lang, link_prefix) return format_wikipedia_box(frame, linkdata, linktype, frame.args.slim, sc) end function export.projectlink(frame, compat) local required = {required = true} local iparams = { ["prefix"] = required, ["name"] = required, ["image"] = required, ["requirelang"] = boolean_param, ["compat"] = boolean_param, } local iargs = m_params.process(frame.args, iparams) compat = compat or iargs.compat local lang_required = iargs.requirelang or false local lang_param = compat and "lang" or 1 local term_param = compat and 1 or 2 local alt_param = compat and 2 or 3 local params = { [lang_param] = {type = "Wikimedia language", method = "fallback", required = lang_required, default = "hi"}, [term_param] = true, [alt_param] = true, ["i"] = boolean_param, ["nodot"] = true, ["sc"] = {type = "script"}, ["section"] = true } local args = m_params.process(frame:getParent().args, params) local wmlang = args[lang_param] local sc = args["sc"] local term = args[term_param] or mw.loadData("Module:headword/data").pagename local linkdata = {term = term, alt = args[alt_param], fragment = args["section"]} if args["i"] then local prefixed = "''" if (iargs["prefix"] == "commons:Category") then prefixed = "Category:" .. prefixed end if linkdata.alt then linkdata.alt = prefixed .. linkdata.alt .. "''" else -- While it is true that the link module automatically removes italics from terms, -- linkdata.term is used outside this module too (image link and "interProject" link) linkdata.alt = prefixed .. linkdata.term .. "''" end end local links, iplinks = process_links({linkdata}, iargs["prefix"], iargs["name"], wmlang, sc) return "[[Image:" .. iargs["image"] .. "|15px|link=" .. iargs["prefix"] .. ":" .. (wmlang:getCode() == "hi" and "" or wmlang:getCode() .. ":") .. term .. "]] " .. concat(links, " एवं ") .. " पर " .. (wmlang:getCode() == "hi" and "" or " " .. wmlang:getCanonicalName() .. " ") .. " " .. iargs["name"] .. (args["nodot"] and "" or ".") .. concat(iplinks) end return export tkafavz9ufq2b7oolc3ifay2gj4hked मॉड्यूल:translations/multi 828 304387 487906 487556 2026-09-03T15:26:01Z SM7 6218 updating... 487906 Scribunto text/plain --[=[ This module implements the {{multitrans}} template. Original author: Benwing2, based on an idea from Rua. Significantly reworked by Theknightwho. The idea is to reduce the memory usage of large translation tables by computing the whole table at once instead of through several separate calls. The entire text of the translation table should be passed as follows: {{multitrans|data= * Abkhaz: {{tt|ab|аиқәаҵәа}} * Acehnese: {{tt|ace|itam}} * Afrikaans: {{tt+|af|swart}} * Albanian: {{tt+|sq|zi}} * Amharic: {{tt|am|ጥቁር}} * अरबी: {{tt+|ar|أَسْوَد|m}}, {{tt|ar|سَوْدَاء|f}}, {{tt|ar|سُود|p}} *: Moroccan Arabic: {{tt|ary|كحال|tr=kḥāl}} * Armenian: {{tt|hy|սև}} * Aromanian: {{tt|rup|negru}}, {{tt+|rup|laiu}} * Asháninka: {{tt|cni|cheenkari}}, {{tt|cni|kisaari}} * असमिया: {{tt|as|ক‌’লা}}, {{tt|as|কুলা}} {{qualifier|सेंट्रल}} * Asturian: {{tt|ast|ñegru}}, {{tt|ast|negru}}, {{tt|ast|prietu}} * Atikamekw: {{tt|atj|makatewaw}} * Avar: {{tt|av|чӏегӏера}} * Aymara: {{tt|ay|ch’iyara}} * Azerbaijani: {{tt+|az|qara}} [etc.] }} That is, take the original text and add a 't' to the beginning of translation templates: {{t|...}} -> {{tt|...}} {{t+|...}} -> {{tt+|...}} {{t-check|...}} -> {{tt-check|...}} {{t+check|...}} -> {{tt+check|...}} The {{tt*|...}} templates are pass-throughs, so that e.g. {{tt|ary|كحال|tr=kḥāl}} generates the literal text "{{t|ary|كحال|tr=kḥāl}}". This is then parsed by the template parser to extract the arguments, which are then passed into the same code that underlyingly implements the regular translation templates. Because all of this happens inside a single module invocation instead of lots of separate ones, it's much faster and more memory-efficient. ]=] local export = {} local m_template_parser = require("Module:template parser") local class_else_type = m_template_parser.class_else_type local parse = m_template_parser.parse local pcall = pcall local process_params = require("Module:parameters").process local show_terminfo = require("Module:translations").show_terminfo local templates = { ["t"] = true, ["t+"] = true, ["t-check"] = true, ["t+check"] = true, } local params = mw.loadData("Module:parameters/data").translation local function process_template(name, args) args = process_params(args, params) return show_terminfo({ lang = args[1], sc = args["sc"], track_sc = true, term = args[2], alt = args["alt"], id = args["id"], genders = args[3], tr = args["tr"], ts = args["ts"], lit = args["lit"], interwiki = (name == "t+" or name == "t+check") and "tpos", }, name == "t-check" or name == "t+check") end function export.show(frame) local text = frame:getParent().args["data"] if not text then return "" end text = parse(frame:getParent().args["data"]) for node, parent, key in text:iterate_nodes() do local class = class_else_type(node) if class ~= "wikitext" then local new if class == "template" then local name = node:get_name() if templates[name] then local success, result = pcall(process_template, name, node:get_arguments()) if success then new = result end end end if not new then new = node:expand() end if parent then parent[key] = new else text = new end end end return tostring(text) end return export oxpvr2wit0aomkmvqe6kxe8qqs6zhx9 विक्षनरी:HotCat 4 304582 488007 477458 2026-09-04T07:55:01Z SM7 6218 +नोटिस 488007 wikitext text/x-wiki {{center|'''सामान्यतः विक्षनरी के किसी पृष्ठ पर [[साँचा:auto cat|सीधे कोई श्रेणी नहीं]] जोड़ी जाती!<br> अतः इस उपकरण का प्रयोग यहाँ पर विकिपीडिया की भाँति अंधाधुंध न करें। सबसे पहले [[विक्षनरी:श्रेणीकरण]] को ध्यानपूर्वक पढ़ लें!'''}} '''हॉटकैट''' (HotCat) एक जावास्क्रिप्ट आधारित उपकरण है जो स्वतः स्थापित सदस्यों को श्रेणियाँ जोड़ने, हटाने अथवा बदलने में सहायक है। ::अधिक जानकारी हेतु '''[[w:विकिपीडिया:HotCat|विकिपीडिया:HotCat]]''' देखें। [[श्रेणी:विक्षनरी रखरखाव]] 5ti9lilcga7zgmlabohyrjazszlnyjo 488010 488007 2026-09-04T07:59:21Z SM7 6218 सुधार 488010 wikitext text/x-wiki {{mbox | type = content | text = '''ध्यान दें: '''सामान्यतः विक्षनरी के किसी पृष्ठ पर [[साँचा:auto cat|सीधे कोई श्रेणी नहीं]] जोड़ी जाती!<br> अतः इस उपकरण का प्रयोग यहाँ पर विकिपीडिया की भाँति अंधाधुंध न करें। सबसे पहले [[विक्षनरी:श्रेणीकरण]] को ध्यानपूर्वक पढ़ लें! }} '''हॉटकैट''' (HotCat) एक जावास्क्रिप्ट आधारित उपकरण है जो स्वतः स्थापित सदस्यों को श्रेणियाँ जोड़ने, हटाने अथवा बदलने में सहायक है। ::अधिक जानकारी हेतु '''[[w:विकिपीडिया:HotCat|विकिपीडिया:HotCat]]''' देखें। [[श्रेणी:विक्षनरी रखरखाव]] 22cky2g3eiloj29kfpkzd8xei8liucq 488011 488010 2026-09-04T07:59:34Z SM7 6218 "[[विक्षनरी:HotCat]]" सुरक्षित किया ([सम्पादन=केवल प्रबंधक अनुमत] (हमेशा) [स्थानांतरण=केवल प्रबंधक अनुमत] (हमेशा)) 488010 wikitext text/x-wiki {{mbox | type = content | text = '''ध्यान दें: '''सामान्यतः विक्षनरी के किसी पृष्ठ पर [[साँचा:auto cat|सीधे कोई श्रेणी नहीं]] जोड़ी जाती!<br> अतः इस उपकरण का प्रयोग यहाँ पर विकिपीडिया की भाँति अंधाधुंध न करें। सबसे पहले [[विक्षनरी:श्रेणीकरण]] को ध्यानपूर्वक पढ़ लें! }} '''हॉटकैट''' (HotCat) एक जावास्क्रिप्ट आधारित उपकरण है जो स्वतः स्थापित सदस्यों को श्रेणियाँ जोड़ने, हटाने अथवा बदलने में सहायक है। ::अधिक जानकारी हेतु '''[[w:विकिपीडिया:HotCat|विकिपीडिया:HotCat]]''' देखें। [[श्रेणी:विक्षनरी रखरखाव]] 22cky2g3eiloj29kfpkzd8xei8liucq श्रेणी:विक्षनरी रखरखाव 14 304584 488006 477451 2026-09-04T07:48:22Z SM7 6218 implementing "auto cat" 488006 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx मॉड्यूल:languages/data/2 828 304604 487890 487764 2026-09-03T12:11:56Z SM7 6218 "भाषा" से "language" / गैर-जरूरी लोकलाइजेशन रहल 487890 Scribunto text/plain local m_langdata = require("Module:languages/data") -- Loaded on demand, as it may not be needed (depending on the data). local function u(...) u = require("Module:string utilities").char return u(...) end local c = m_langdata.chars local p = m_langdata.puaChars local s = m_langdata.shared -- Ideally, we want to move these into [[Module:languages/data]], but because (a) it's necessary to use require on that module, and (b) they're only used in this data module, it's less memory-efficient to do that at the moment. If it becomes possible to use mw.loadData, then these should be moved there. s["de-Latn-sortkey"] = { remove_diacritics = c.grave .. c.acute .. c.circ .. c.diaer .. c.ringabove, from = {"æ", "œ", "ß"}, to = {"ae", "oe", "ss"} } s["de-Latn-standardchars"] = "AaÄäBbCcDdEeFfGgHhIiJjKkLlMmNnOoÖöPpQqRrSsẞßTtUuÜüVvWwXxYyZz" s["ka-stripdiacritics"] = {remove_diacritics = c.circ} s["no-sortkey"] = { remove_diacritics = c.grave .. c.acute .. c.circ .. c.tilde .. c.macron .. c.dacute .. c.caron .. c.cedilla, remove_exceptions = {"å"}, from = {"æ", "ø", "å"}, to = {"z" .. p[1], "z" .. p[2], "z" .. p[3]} } s["no-standardchars"] = "AaBbDdEeFfGgHhIiJjKkLlMmNnOoPpRrSsTtUuVvYyÆæØøÅå" .. c.punc s["sa-Deva-stripdiacritics"] = { -- Don't use remove_diacritics for accent marks, as १ and ३ should also be removed if (and only if) they carry any. from = {"ॐ", "[१३]?[" .. c.anudatta .. c.udatta .. c.dsvarita .. c.tsvarita .. "]+"}, to = {"ओँ"}, } s["tg-stripdiacritics"] = {remove_diacritics = c.grave .. c.acute} s["tk-stripdiacritics"] = {remove_diacritics = c.macron} local m = {} m["aa"] = { "Afar", 27811, "cus-eas", "Latn, Ethi", strip_diacritics = { Latn = {remove_diacritics = c.acute}, }, } m["ab"] = { "Abkhaz", 5111, "cau-abz", "Cyrl, Geor, Latn", translit = { Cyrl = "ab-translit", -- Geor translit in [[Module:scripts/data]] }, override_translit = true, display_text = { Cyrl = s["cau-Cyrl-displaytext"] }, strip_diacritics = { Cyrl = { remove_diacritics = c.acute, from = {"^а%-"}, to = {"а"}, }, Latn = s["cau-Latn-stripdiacritics"], }, sort_key = { Cyrl = { from = { "х'ә", -- 3 chars "гь", "гә", "ӷь", "ҕь", "ӷә", "ҕә", "дә", "ё", "жь", "жә", "ҙә", "ӡә", "ӡ'", "кь", "кә", "қь", "қә", "ҟь", "ҟә", "ҫә", "тә", "ҭә", "ф'", "хь", "хә", "х'", "ҳә", "ць", "цә", "ц'", "ҵә", "ҵ'", "шь", "шә", "џь", -- 2 chars "ӷ", "ҕ", "ҙ", "ӡ", "қ", "ҟ", "ԥ", "ҧ", "ҫ", "ҭ", "ҳ", "ҵ", "ҷ", "ҽ", "ҿ", "ҩ", "џ", "ә", -- 1 char "^а", }, to = { "х" .. p[4], "г" .. p[1], "г" .. p[2], "г" .. p[5], "г" .. p[6], "г" .. p[7], "г" .. p[8], "д" .. p[1], "е" .. p[1], "ж" .. p[1], "ж" .. p[2], "з" .. p[2], "з" .. p[4], "з" .. p[5], "к" .. p[1], "к" .. p[2], "к" .. p[4], "к" .. p[5], "к" .. p[7], "к" .. p[8], "с" .. p[2], "т" .. p[1], "т" .. p[3], "ф" .. p[1], "х" .. p[1], "х" .. p[2], "х" .. p[3], "х" .. p[6], "ц" .. p[1], "ц" .. p[2], "ц" .. p[3], "ц" .. p[5], "ц" .. p[6], "ш" .. p[1], "ш" .. p[2], "ы" .. p[3], "г" .. p[3], "г" .. p[4], "з" .. p[1], "з" .. p[3], "к" .. p[3], "к" .. p[6], "п" .. p[1], "п" .. p[2], "с" .. p[1], "т" .. p[2], "х" .. p[5], "ц" .. p[4], "ч" .. p[1], "ч" .. p[2], "ч" .. p[3], "ы" .. p[1], "ы" .. p[2], "ь" .. p[1], "", } }, }, } m["ae"] = { "Avestan", 29572, "ira-cen", "Avst, Gujr, Deva", translit = { Avst = "Avst-translit" }, } m["af"] = { "Afrikaans", 14196, "gmw-frk", "Latn, Arab", ancestors = "nl", sort_key = { Latn = { remove_diacritics = c.grave .. c.acute .. c.circ .. c.tilde .. c.diaer .. c.ringabove .. c.cedilla .. "'", from = {"['ʼ]n"}, to = {"n" .. p[1]} } }, } m["ak"] = { "Akan", 28026, "alv-ctn", "Latn", } m["am"] = { "Amharic", 28244, "sem-eth", "Ethi", translit = "Ethi-translit", } m["an"] = { "Aragonese", 8765, "roa-nar", "Latn", } m["ar"] = { "Arabic", 13955, "sem-arb", "Arab, Hebr, Syrc, Brai, Nbat", translit = { Arab = "ar-translit" }, strip_diacritics = { Arab = "ar-stripdiacritics", }, -- Hebr display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["as"] = { "असमिया", 29401, "inc-bas", "as-Beng", ancestors = "inc-mas", translit = "as-translit", } m["av"] = { "Avar", 29561, "cau-ava", "Cyrl, Latn, Arab", ancestors = "oav", translit = { Cyrl = "cau-nec-translit", Arab = "ar-translit", }, override_translit = true, display_text = { Cyrl = s["cau-Cyrl-displaytext"], }, strip_diacritics = { Cyrl = s["cau-Cyrl-stripdiacritics"], Latn = s["cau-Latn-stripdiacritics"], }, sort_key = { Cyrl = { from = {"гъ", "гь", "гӏ", "ё", "кк", "къ", "кь", "кӏ", "лъ", "лӏ", "тӏ", "хх", "хъ", "хь", "хӏ", "цӏ", "чӏ"}, to = {"г" .. p[1], "г" .. p[2], "г" .. p[3], "е" .. p[1], "к" .. p[1], "к" .. p[2], "к" .. p[3], "к" .. p[4], "л" .. p[1], "л" .. p[2], "т" .. p[1], "х" .. p[1], "х" .. p[2], "х" .. p[3], "х" .. p[4], "ц" .. p[1], "ч" .. p[1]} }, }, } m["ay"] = { "Aymara", 4627, "sai-aym", "Latn", } m["az"] = { "Azerbaijani", 9292, "trk-ogz", "Latn, Cyrl, Arab", ancestors = "trk-oat", dotted_dotless_i = true, strip_diacritics = { Latn = { from = {"ʼ"}, to = {"'"}, }, Arab = { module = "ar-stripdiacritics", ["from"] = { "ۆ", "ۇ", "وْ", "ڲ", "ؽ", }, ["to"] = { "و", "و", "و", "گ", "ی", }, }, }, display_text = { Latn = { from = {"'"}, to = {"ʼ"} } }, sort_key = { Latn = { from = { "i", -- Ensure "i" comes after "ı". "ç", "ə", "ğ", "x", "ı", "q", "ö", "ş", "ü", "w" }, to = { "i" .. p[1], "c" .. p[1], "e" .. p[1], "g" .. p[1], "h" .. p[1], "i", "k" .. p[1], "o" .. p[1], "s" .. p[1], "u" .. p[1], "z" .. p[1] } }, Cyrl = { from = {"ғ", "ә", "ы", "ј", "ҝ", "ө", "ү", "һ", "ҹ"}, to = {"г" .. p[1], "е" .. p[1], "и" .. p[1], "и" .. p[2], "к" .. p[1], "о" .. p[1], "у" .. p[1], "х" .. p[1], "ч" .. p[1]} }, }, } m["ba"] = { "Bashkir", 13389, "trk-kbu", "Cyrl", translit = "ba-translit", override_translit = true, sort_key = { from = {"ғ", "ҙ", "ё", "ҡ", "ң", "ө", "ҫ", "ү", "һ", "ә"}, to = {"г" .. p[1], "д" .. p[1], "е" .. p[1], "к" .. p[1], "н" .. p[1], "о" .. p[1], "с" .. p[1], "у" .. p[1], "х" .. p[1], "э" .. p[1]} }, } m["be"] = { "Belarusian", 9091, "zle", "Cyrl, Latn", ancestors = "zle-mbe", translit = { Cyrl = "be-translit", }, strip_diacritics = { Cyrl = { remove_diacritics = c.grave .. c.acute, }, Latn = { remove_diacritics = c.grave .. c.acute, remove_exceptions = {"Ć", "ć", "Ń", "ń", "Ś", "ś", "Ź", "ź"}, }, }, sort_key = { Cyrl = { remove_diacritics = c.grave .. c.acute, from = {"ґ", "ё", "і", "ў"}, to = {"г" .. p[1], "е" .. p[1], "и" .. p[1], "у" .. p[1]} }, Latn = { remove_diacritics = c.grave .. c.acute, remove_exceptions = {"Ć", "ć", "Ń", "ń", "Ś", "ś", "Ź", "ź"}, from = {"ć", "č", "dz", "dź", "dž", "ch", "ł", "ń", "ś", "š", "ŭ", "ź", "ž"}, to = {"c" .. p[1], "c" .. p[2], "d" .. p[1], "d" .. p[2], "d" .. p[3], "h" .. p[1], "l" .. p[1], "n" .. p[1], "s" .. p[1], "s" .. p[2], "u" .. p[1], "z" .. p[1], "z" .. p[2]} }, }, standard_chars = { Cyrl = "АаБбВвГгДдЕеЁёЖжЗзІіЙйКкЛлМмНнОоПпРрСсТтУуЎўФфХхЦцЧчШшЫыЬьЭэЮюЯя", Latn = "AaBbCcĆćČčDdEeFfGgHhIiJjKkLlŁłMmNnŃńOoPpRrSsŚśŠšTtUuŬŭVvYyZzŹźŽž", (c.punc:gsub("'", "")) -- Exclude apostrophe. }, } m["bg"] = { "Bulgarian", 7918, "zls", "Cyrl", ancestors = "cu-bgm", translit = "bg-translit", strip_diacritics = { remove_diacritics = c.grave .. c.acute, remove_exceptions = {"%f[^%z%s]ѝ%f[%z%s]"}, }, sort_key = { remove_diacritics = c.grave .. c.acute, remove_exceptions = {"%f[^%z%s]ѝ%f[%z%s]"}, }, standard_chars = "АаБбВвГгДдЕеЖжЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЪъЬьЮюЯя" .. c.punc, } m["bh"] = { "बिहारी", 135305, "inc-eas", "Deva", } m["bi"] = { "Bislama", 35452, "crp", "Latn", ancestors = "en", } m["bm"] = { "Bambara", 33243, "dmn-emn", "Latn, Nkoo", sort_key = { Latn = { from = {"ɛ", "ɲ", "ŋ", "ɔ"}, to = {"e" .. p[1], "n" .. p[1], "n" .. p[2], "o" .. p[1]} }, }, } m["bn"] = { "बंगाली", 9610, "inc-bas", "Beng, Newa", ancestors = "inc-mbn", translit = { Beng = "bn-translit" }, } m["bo"] = { "Tibetan", 34271, "sit-tib", "Tibt", -- sometimes Deva? ancestors = "xct", override_translit = true, -- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["br"] = { "Breton", 12107, "cel-brs", "Latn", ancestors = "xbm", sort_key = { from = {"ch", "c['ʼ’]h"}, to = {"c" .. p[1], "c" .. p[2]} }, } m["ca"] = { "Catalan", 7026, "roa-ocr", "Latn", ancestors = "roa-oca", sort_key = {remove_diacritics = c.grave .. c.acute .. c.diaer .. c.cedilla .. "·"}, standard_chars = "AaÀàBbCcÇçDdEeÉéÈèFfGgHhIiÍíÏïJjLlMmNnOoÓóÒòPpQqRrSsTtUuÚúÜüVvXxYyZz·" .. c.punc, } m["ce"] = { "Chechen", 33350, "cau-vay", "Cyrl, Latn, Arab", translit = { Cyrl = "cau-nec-translit", Arab = "ar-translit", }, override_translit = true, display_text = { Cyrl = s["cau-Cyrl-displaytext"] }, strip_diacritics = { Cyrl = s["cau-Cyrl-stripdiacritics"], Latn = s["cau-Latn-stripdiacritics"], }, sort_key = { Cyrl = { from = {"аь", "гӏ", "ё", "кх", "къ", "кӏ", "оь", "пӏ", "тӏ", "уь", "хь", "хӏ", "цӏ", "чӏ", "юь", "яь"}, to = {"а" .. p[1], "г" .. p[1], "е" .. p[1], "к" .. p[1], "к" .. p[2], "к" .. p[3], "о" .. p[1], "п" .. p[1], "т" .. p[1], "у" .. p[1], "х" .. p[1], "х" .. p[2], "ц" .. p[1], "ч" .. p[1], "ю" .. p[1], "я" .. p[1]} }, }, } m["ch"] = { "Chamorro", 33262, "poz", "Latn", sort_key = { remove_diacritics = "'", from = {"å", "ch", "ñ", "ng"}, to = {"a" .. p[1], "c" .. p[1], "n" .. p[1], "n" .. p[2]} }, } m["co"] = { "Corsican", 33111, "roa-itr", "Latn", sort_key = { from = {"chj", "ghj", "sc", "sg"}, to = {"c" .. p[1], "g" .. p[1], "s" .. p[1], "s" .. p[2]} }, standard_chars = "AaÀàBbCcDdEeÈèFfGgHhIiÌìÏïJjLlMmNnOoÒòPpQqRrSsTtUuÙùÜüVvZz" .. c.punc, } m["cr"] = { "Cree", 33390, "alg", "Latn, Cans", translit = { Cans = "cr-translit" }, } m["cs"] = { "Czech", 9056, "zlw", "Latn", ancestors = "cs-ear", sort_key = { from = {"á", "č", "ď", "é", "ě", "ch", "í", "ň", "ó", "ř", "š", "ť", "ú", "ů", "ý", "ž"}, to = {"a" .. p[1], "c" .. p[1], "d" .. p[1], "e" .. p[1], "e" .. p[2], "h" .. p[1], "i" .. p[1], "n" .. p[1], "o" .. p[1], "r" .. p[1], "s" .. p[1], "t" .. p[1], "u" .. p[1], "u" .. p[2], "y" .. p[1], "z" .. p[1]} }, standard_chars = "AaÁáBbCcČčDdĎďEeÉéĚěFfGgHhIiÍíJjKkLlMmNnŇňOoÓóPpRrŘřSsŠšTtŤťUuÚúŮůVvYyÝýZzŽž" .. c.punc, } m["cu"] = { "Old Church Slavonic", 35499, "zls", "Cyrs, Glag, Zname", translit = { Cyrs = "Cyrs-translit", Glag = "Glag-translit" }, -- Cyrs strip_diacritics, sort_key in [[Module:scripts/data]] } m["cv"] = { "Chuvash", 33348, "trk-ogr", "Cyrl", ancestors = "cv-mid", translit = "cv-translit", override_translit = true, sort_key = { from = {"ӑ", "ё", "ӗ", "ҫ", "ӳ"}, to = {"а" .. p[1], "е" .. p[1], "е" .. p[2], "с" .. p[1], "у" .. p[1]} }, } m["cy"] = { "Welsh", 9309, "cel-brw", "Latn", ancestors = "wlm", sort_key = { remove_diacritics = c.grave .. c.acute .. c.circ .. c.diaer .. "'", from = {"ch", "dd", "ff", "ng", "ll", "ph", "rh", "th"}, to = {"c" .. p[1], "d" .. p[1], "f" .. p[1], "g" .. p[1], "l" .. p[1], "p" .. p[1], "r" .. p[1], "t" .. p[1]} }, standard_chars = "ÂâAaBbCcDdEeÊêFfGgHhIiÎîLlMmNnOoÔôPpRrSsTtUuÛûWwŴŵYyŶŷ" .. c.punc, } m["da"] = { "Danish", 9035, "gmq-eas", "Latn", ancestors = "gmq-oda", sort_key = { remove_diacritics = c.grave .. c.acute .. c.circ .. c.tilde .. c.macron .. c.dacute .. c.caron .. c.cedilla, remove_exceptions = {"å"}, from = {"æ", "ø", "å"}, to = {"z" .. p[1], "z" .. p[2], "z" .. p[3]} }, standard_chars = "AaBbDdEeFfGgHhIiJjKkLlMmNnOoPpRrSsTtUuVvYyÆæØøÅå" .. c.punc, } m["de"] = { "German", 188, "gmw-hgm", "Latn, Latf, Brai", ancestors = "de-ear", sort_key = { Latn = s["de-Latn-sortkey"], Latf = s["de-Latn-sortkey"], }, standard_chars = { Latn = s["de-Latn-standardchars"], Latf = s["de-Latn-standardchars"], Brai = c.braille, c.punc } } m["dv"] = { "Dhivehi", 32656, "inc-ins", "Thaa, Diak", translit = { Thaa = "dv-translit", Diak = "Diak-translit", }, ancestors = "dv-old", override_translit = true, } m["dz"] = { "Dzongkha", 33081, "sit-tib", "Tibt", ancestors = "xct", override_translit = true, -- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["ee"] = { "Ewe", 30005, "alv-gbe", "Latn", sort_key = { remove_diacritics = c.tilde, from = {"ɖ", "dz", "ɛ", "ƒ", "gb", "ɣ", "kp", "ny", "ŋ", "ɔ", "ts", "ʋ"}, to = {"d" .. p[1], "d" .. p[2], "e" .. p[1], "f" .. p[1], "g" .. p[1], "g" .. p[2], "k" .. p[1], "n" .. p[1], "n" .. p[2], "o" .. p[1], "t" .. p[1], "v" .. p[1]} }, } m["el"] = { "Greek", 9129, "grk", "Grek, Polyt, Brai", ancestors = "el-kth", translit = "el-translit", override_translit = true, -- Grek and Polyt display_text, strip_diacritics, sort_key in [[Module:scripts/data]] standard_chars = { Grek = "΅·ͺ΄ΑαΆάΒβΓγΔδΕεέΈΖζΗηΉήΘθΙιΊίΪϊΐΚκΛλΜμΝνΞξΟοΌόΠπΡρΣσςΤτΥυΎύΫϋΰΦφΧχΨψΩωΏώ", Brai = c.braille, c.punc }, } m["en"] = { "अंग्रेज़ी", 1860, "gmw-ang", "Latn, Brai, Shaw, Dsrt", -- entries in Shaw or Dsrt might require prior discussion wikimedia_codes = "en, simple", ancestors = "en-ear", sort_key = { Latn = { -- Many of these are needed for sorting language names. remove_diacritics = "'\"%-%.,%s·ʻʼ" .. c.diacritics, -- These are found in pagenames. from = {"[ɒæ🅱¢©ᴄðđəǝɜɡħʜıɨłŋɲøɔœꝑꝓꝕßʋ]"}, to = {{ ["ɒ"] = "a", ["æ"] = "ae", ["🅱"] = "b", ["¢"] = "c", ["©"] = "c", ["ᴄ"] = "c", ["ð"] = "d", ["đ"] = "d", ["ə"] = "e", ["ǝ"] = "e", ["ɜ"] = "e", ["ɡ"] = "g", ["ħ"] = "h", ["ʜ"] = "h", ["ı"] = "i", ["ɨ"] = "i", ["ł"] = "l", ["ŋ"] = "n", ["ɲ"] = "n", ["ø"] = "o", ["ɔ"] = "o", ["œ"] = "oe", ["ꝑ"] = "p", ["ꝓ"] = "p", ["ꝕ"] = "p", ["ß"] = "ss", ["ʋ"] = "v", }}, }, }, standard_chars = { Latn = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz", Brai = c.braille, c.punc }, } m["eo"] = { "Esperanto", 143, "art", "Latn", sort_key = { remove_diacritics = c.grave .. c.acute, from = {"ĉ", "ĝ", "ĥ", "ĵ", "ŝ", "ŭ"}, to = {"c" .. p[1], "g" .. p[1], "h" .. p[1], "j" .. p[1], "s" .. p[1], "u" .. p[1]} }, standard_chars = "AaBbCcĈĉDdEeFfGgĜĝHhĤĥIiJjĴĵKkLlMmNnOoPpRrSsŜŝTtUuŬŭVvZz" .. c.punc, } m["es"] = { "स्पैनिश", 1321, "roa-cas", "Latn, Brai", ancestors = "es-ear", sort_key = { Latn = { remove_exceptions = {"ñ"}, remove_diacritics = c.grave .. c.acute .. c.circ .. c.tilde .. c.macron .. c.diaer .. c.cedilla, from = {"ª", "æ", "ñ", "º", "œ"}, to = {"a", "ae", "n" .. p[1], "o", "oe"} }, }, standard_chars = { Latn = "AaÁáBbCcDdEeÉéFfGgHhIiÍíJjLlMmNnÑñOoÓóPpQqRrSsTtUuÚúÜüVvXxYyZz", Brai = c.braille, c.punc }, } m["et"] = { "Estonian", 9072, "urj-fin", "Latn", sort_key = { from = { "š", "ž", "õ", "ä", "ö", "ü", -- 2 chars "z" -- 1 char }, to = { "s" .. p[1], "s" .. p[3], "w" .. p[1], "w" .. p[2], "w" .. p[3], "w" .. p[4], "s" .. p[2] } }, standard_chars = "AaBbDdEeFfGgHhIiJjKkLlMmNnOoPpRrSsTtUuVvÕõÄäÖöÜü" .. c.punc, } m["eu"] = { "Basque", 8752, "euq", "Latn", sort_key = { from = {"ç", "ñ"}, to = {"c" .. p[1], "n" .. p[1]} }, standard_chars = "AaBbDdEeFfGgHhIiJjKkLlMmNnÑñOoPpRrSsTtUuXxZz" .. c.punc, } m["fa"] = { "फ़ारसी", 9168, "ira-swi", "Arab, Hebr", ancestors = "fa-cls", strip_diacritics = { Arab = { -- character "ۂ" code U+06C2 to "ه" and "هٔ" (U+0647 + U+0654) to "ه"; hamzatu l-waṣli to a regular alif from = {"هٔ", "ٱ"}, -- character "ۂ" code U+06C2 to "ه"; hamzatu l-waṣli to a regular alif to = {"ه", "ا"}, remove_diacritics = c.fathatan .. c.dammatan .. c.kasratan .. c.fatha .. c.damma .. c.kasra .. c.shadda .. c.sukun .. c.superalef, }, }, -- Hebr display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["ff"] = { "Fula", 33454, "alv-fwo", "Latn, Adlm", } m["fi"] = { "Finnish", 1412, "urj-fin", "Latn", display_text = { from = {"'"}, to = {"’"} }, strip_diacritics = { -- used to indicate gemination of the next consonant remove_diacritics = "ˣ", from = {"’"}, to = {"'"}, }, sort_key = { -- [[Appendix:Finnish alphabet#Collation]] + "aͤ" and "oͤ" as historical variants of "ä" and "ö". remove_diacritics = "'’:" .. c.diacritics, remove_exceptions = { "a[" .. c.ringabove .. c.diaer .. c.small_e .. "]", -- åäaͤ "o[" .. c.diaer .. c.tilde .. c.dacute .. c.small_e .. "]", -- öõőoͤ "u[" .. c.diaer .. c.dacute .. "]" -- üű }, from = {"æ", "[ðđ]", "ł", "ŋ", "œ", "ß", "þ", "u[" .. c.diaer .. c.dacute .. "]", "å", "aͤ", "o[" .. c.tilde .. c.dacute .. c.small_e .. "]", "ø", "(.)['%-]"}, to = {"ae", "d", "l", "n", "oe", "ss", "th", "y", "z" .. p[1], "ä", "ö", "ö", "%1"} }, standard_chars = "AaBbDdEeFfGgHhIiJjKkLlMmNnOoPpRrSsTtUuVvYyÄäÖö" .. c.punc, } m["fj"] = { "Fijian", 33295, "poz-pcc", "Latn", } m["fo"] = { "Faroese", 25258, "gmq-ins", "Latn", sort_key = { from = {"á", "ð", "í", "ó", "ú", "ý", "æ", "ø"}, to = {"a" .. p[1], "d" .. p[1], "i" .. p[1], "o" .. p[1], "u" .. p[1], "y" .. p[1], "z" .. p[1], "z" .. p[2]} }, standard_chars = "AaÁáBbDdÐðEeFfGgHhIiÍíJjKkLlMmNnOoÓóPpRrSsTtUuÚúVvYyÝýÆæØø" .. c.punc, } m["fr"] = { "फ़्रांसीसी", 150, "roa-oil", "Latn, Brai", ancestors = "frm", sort_key = { Latn = s["roa-oil-sortkey"] }, standard_chars = { Latn = "AaÀàÂâBbCcÇçDdEeÉéÈèÊêËëFfGgHhIiÎîÏïJjLlMmNnOoÔôŒœPpQqRrSsTtUuÙùÛûÜüVvXxYyZz", Brai = c.braille, c.punc }, } m["fy"] = { "West Frisian", 27175, "gmw-fri", "Latn", sort_key = { remove_diacritics = c.grave .. c.acute .. c.circ .. c.diaer, from = {"y"}, to = {"i"} }, standard_chars = "AaâäàÆæBbCcDdEeéêëèFfGgHhIiïìYyỳJjKkLlMmNnOoôöòPpRrSsTtUuúûüùVvWwZz" .. c.punc, } m["ga"] = { "Irish", 9142, "cel-gae", "Latn, Latg", ancestors = "mga", sort_key = { remove_diacritics = c.acute, from = {"ḃ", "ċ", "ḋ", "ḟ", "ġ", "ṁ", "ṗ", "ṡ", "ṫ"}, to = {"bh", "ch", "dh", "fh", "gh", "mh", "ph", "sh", "th"} }, standard_chars = "AaÁáBbCcDdEeÉéFfGgHhIiÍíLlMmNnOoÓóPpRrSsTtUuÚúVv" .. c.punc, } m["gd"] = { "Scottish Gaelic", 9314, "cel-gae", "Latn, Latg", ancestors = "mga", sort_key = {remove_diacritics = c.grave .. c.acute}, standard_chars = "AaÀàBbCcDdEeÈèFfGgHhIiÌìLlMmNnOoÒòPpRrSsTtUuÙù" .. c.punc, } m["gl"] = { "Galician", 9307, "roa-gap", "Latn", sort_key = { remove_diacritics = c.acute, from = {"ñ"}, to = {"n" .. p[1]} }, standard_chars = "AaÁáBbCcDdEeÉéFfGgHhIiÍíÏïLlMmNnÑñOoÓóPpQqRrSsTtUuÚúÜüVvXxZz" .. c.punc, } m["gu"] = { "Gujarati", 5137, "inc-wes", "Arab, Gujr", ancestors = "inc-mgu", translit = { Gujr = "gu-translit", }, strip_diacritics = { Arab = {remove_diacritics = c.fathatan .. c.dammatan .. c.kasratan .. c.fatha .. c.damma .. c.kasra .. c.kasra .. c.shadda .. c.sukun}, Gujr = {remove_diacritics = "઼"}, }, } m["gv"] = { "Manx", 12175, "cel-gae", "Latn", ancestors = "mga", sort_key = {remove_diacritics = c.cedilla .. "-"}, standard_chars = "AaBbCcÇçDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwYy" .. c.punc, } m["ha"] = { "Hausa", 56475, "cdc-wst", "Latn, Arab", strip_diacritics = { Latn = {remove_diacritics = c.grave .. c.acute .. c.circ .. c.tilde .. c.macron} }, sort_key = { Latn = { from = {"ɓ", "b'", "ɗ", "d'", "ƙ", "k'", "sh", "ƴ", "'y"}, to = {"b" .. p[1], "b" .. p[2], "d" .. p[1], "d" .. p[2], "k" .. p[1], "k" .. p[2], "s" .. p[1], "y" .. p[1], "y" .. p[2]} }, }, } m["he"] = { "Hebrew", 9288, "sem-can", "Hebr, Phnx, Brai, Samr", ancestors = "he-med", -- Hebr display_text, strip_diacritics, sort_key in [[Module:scripts/data]] -- Samr strip_diacritics, sort_key in [[Module:scripts/data]] -- Phnx translit in [[Module:scripts/data]] (NOTE: not present before, presumably an accidental omission) } m["hi"] = { "हिंदी", 1568, "inc-hnd", "Deva, Kthi, Newa", translit = { Deva = "hi-translit" }, standard_chars = { Deva = "अआइईउऊएऐओऔकखगघङचछजझञटठडढणतथदधनपफबभमयरलवशषसहत्रज्ञक्षक़ख़ग़ज़झ़ड़ढ़फ़काखागाघाङाचाछाजाझाञाटाठाडाढाणाताथादाधानापाफाबाभामायारालावाशाषासाहात्राज्ञाक्षाक़ाख़ाग़ाज़ाझ़ाड़ाढ़ाफ़ाकिखिगिघिङिचिछिजिझिञिटिठिडिढिणितिथिदिधिनिपिफिबिभिमियिरिलिविशिषिसिहित्रिज्ञिक्षिक़िख़िग़िज़िझ़िड़िढ़िफ़िकीखीगीघीङीचीछीजीझीञीटीठीडीढीणीतीथीदीधीनीपीफीबीभीमीयीरीलीवीशीषीसीहीत्रीज्ञीक्षीक़ीख़ीग़ीज़ीझ़ीड़ीढ़ीफ़ीकुखुगुघुङुचुछुजुझुञुटुठुडुढुणुतुथुदुधुनुपुफुबुभुमुयुरुलुवुशुषुसुहुत्रुज्ञुक्षुक़ुख़ुग़ुज़ुझ़ुड़ुढ़ुफ़ुकूखूगूघूङूचूछूजूझूञूटूठूडूढूणूतूथूदूधूनूपूफूबूभूमूयूरूलूवूशूषूसूहूत्रूज्ञूक्षूक़ूख़ूग़ूज़ूझ़ूड़ूढ़ूफ़ूकेखेगेघेङेचेछेजेझेञेटेठेडेढेणेतेथेदेधेनेपेफेबेभेमेयेरेलेवेशेषेसेहेत्रेज्ञेक्षेक़ेख़ेग़ेज़ेझ़ेड़ेढ़ेफ़ेकैखैगैघैङैचैछैजैझैञैटैठैडैढैणैतैथैदैधैनैपैफैबैभैमैयैरैलैवैशैषैसैहैत्रैज्ञैक्षैक़ैख़ैग़ैज़ैझ़ैड़ैढ़ैफ़ैकोखोगोघोङोचोछोजोझोञोटोठोडोढोणोतोथोदोधोनोपोफोबोभोमोयोरोलोवोशोषोसोहोत्रोज्ञोक्षोक़ोख़ोग़ोज़ोझ़ोड़ोढ़ोफ़ोकौखौगौघौङौचौछौजौझौञौटौठौडौढौणौतौथौदौधौनौपौफौबौभौमौयौरौलौवौशौषौसौहौत्रौज्ञौक्षौक़ौख़ौग़ौज़ौझ़ौड़ौढ़ौफ़ौक्ख्ग्घ्ङ्च्छ्ज्झ्ञ्ट्ठ्ड्ढ्ण्त्थ्द्ध्न्प्फ्ब्भ्म्य्र्ल्व्श्ष्स्ह्त्र्ज्ञ्क्ष्क़्ख़्ग़्ज़्झ़्ड़्ढ़्फ़्।॥०१२३४५६७८९॰", c.punc }, } m["ho"] = { "Hiri Motu", 33617, "crp", "Latn", ancestors = "meu", } m["ht"] = { "Haitian Creole", 33491, "crp", "Latn", ancestors = "ht-sdm", sort_key = { from = { "oun", -- 3 chars "an", "ch", "è", "en", "ng", "ò", "on", "ou", "ui" -- 2 chars }, to = { "o" .. p[4], "a" .. p[1], "c" .. p[1], "e" .. p[1], "e" .. p[2], "n" .. p[1], "o" .. p[1], "o" .. p[2], "o" .. p[3], "u" .. p[1] } }, } m["hu"] = { "Hungarian", 9067, "urj-ugr", "Latn, Hung", ancestors = "ohu", sort_key = { Latn = { from = { "dzs", -- 3 chars "á", "cs", "dz", "é", "gy", "í", "ly", "ny", "ó", "ö", "ő", "sz", "ty", "ú", "ü", "ű", "zs", -- 2 chars }, to = { "d" .. p[2], "a" .. p[1], "c" .. p[1], "d" .. p[1], "e" .. p[1], "g" .. p[1], "i" .. p[1], "l" .. p[1], "n" .. p[1], "o" .. p[1], "o" .. p[2], "o" .. p[3], "s" .. p[1], "t" .. p[1], "u" .. p[1], "u" .. p[2], "u" .. p[3], "z" .. p[1], } }, }, standard_chars = { Latn = "AaÁáBbCcDdEeÉéFfGgHhIiÍíJjKkLlMmNnOoÓóÖöŐőPpQqRrSsTtUuÚúÜüŰűVvWwXxYyZz", c.punc }, } m["hy"] = { "Armenian", 8785, "hyx", "Armn, Brai", ancestors = "axm", -- Armn translit in [[Module:scripts/data]] override_translit = true, strip_diacritics = { Armn = { remove_diacritics = "՛՜՞՟", from = {"եւ", "<sup>յ</sup>", "<sup>ի</sup>", "<sup>է</sup>", "յ̵", "ՙ", "՚"}, to = {"և", "յ", "ի", "է", "ֈ", "ʻ", "’"} }, }, sort_key = { Armn = { from = { "ու", "եւ", -- 2 chars "և" -- 1 char }, to = { "ւ", "եվ", "եվ" } }, }, } m["hz"] = { "Herero", 33315, "bnt-swb", "Latn", } m["ia"] = { "Interlingua", 35934, "art", "Latn", } m["id"] = { "Indonesian", 9240, "poz-mly", "Latn", ancestors = "ms", standard_chars = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz" .. c.punc, } m["ie"] = { "Interlingue", 35850, "art", "Latn", type = "appendix-constructed", strip_diacritics = {remove_diacritics = c.grave .. c.acute .. c.circ}, } m["ig"] = { "Igbo", 33578, "alv-igb", "Latn", strip_diacritics = {remove_diacritics = c.grave .. c.acute .. c.macron}, sort_key = { from = {"gb", "gh", "gw", "ị", "kp", "kw", "ṅ", "nw", "ny", "ọ", "sh", "ụ"}, to = {"g" .. p[1], "g" .. p[2], "g" .. p[3], "i" .. p[1], "k" .. p[1], "k" .. p[2], "n" .. p[1], "n" .. p[2], "n" .. p[3], "o" .. p[1], "s" .. p[1], "u" .. p[1]} }, } m["ii"] = { "Nuosu", 34235, "tbq-nlo", "Yiii", translit = "ii-translit", } m["ik"] = { "Inupiaq", 27183, "esx-inu", "Latn", sort_key = { from = { "ch", "ġ", "dj", "ḷ", "ł̣", "ñ", "ng", "r̂", "sr", "zr", -- 2 chars "ł", "ŋ", "ʼ" -- 1 char }, to = { "c" .. p[1], "g" .. p[1], "h" .. p[1], "l" .. p[1], "l" .. p[3], "n" .. p[1], "n" .. p[2], "r" .. p[1], "s" .. p[1], "z" .. p[1], "l" .. p[2], "n" .. p[2], "z" .. p[2] } }, } m["io"] = { "Ido", 35224, "art", "Latn", } m["is"] = { "Icelandic", 294, "gmq-ins", "Latn", sort_key = { from = {"á", "ð", "é", "í", "ó", "ú", "ý", "þ", "æ", "ö"}, to = {"a" .. p[1], "d" .. p[1], "e" .. p[1], "i" .. p[1], "o" .. p[1], "u" .. p[1], "y" .. p[1], "z" .. p[1], "z" .. p[2], "z" .. p[3]} }, standard_chars = "AaÁáBbDdÐðEeÉéFfGgHhIiÍíJjKkLlMmNnOoÓóPpRrSsTtUuÚúVvXxYyÝýÞþÆæÖö" .. c.punc, } m["it"] = { "Italian", 652, "roa-itr", "Latn", ancestors = "roa-oit", sort_key = {remove_diacritics = c.grave .. c.acute .. c.circ .. c.diaer .. c.ringabove}, standard_chars = "AaÀàBbCcDdEeÈèÉéFfGgHhIiÌìLlMmNnOoÒòPpQqRrSsTtUuÙùVvZz" .. c.punc, } m["iu"] = { "Inuktitut", 29921, "esx-inu", "Cans, Latn", translit = { Cans = "cr-translit" }, override_translit = true, } m["ja"] = { "Japanese", 5287, "jpx", "Jpan, Latn, Brai", ancestors = "ja-ear", translit = s["jpx-translit"], link_tr = true, display_text = s["jpx-displaytext"], strip_diacritics = s["jpx-stripdiacritics"], sort_key = s["jpx-sortkey"], } m["jv"] = { "Javanese", 33549, "poz", "Latn, Java, Arab", ancestors = "kaw", translit = { Java = "jv-translit" }, link_tr = true, strip_diacritics = { Latn = {remove_diacritics = c.circ} -- Modern jv don't use ê }, sort_key = { Latn = { from = {"å", "dh", "é", "è", "ng", "ny", "th"}, to = {"a" .. p[1], "d" .. p[1], "e" .. p[1], "e" .. p[2], "n" .. p[1], "n" .. p[2], "t" .. p[1]} }, }, } m["ka"] = { "Georgian", 8108, "ccs-gzn", "Geor, Geok, Hebr", -- Hebr is used to write Judeo-Georgian ancestors = "ka-mid", -- Geor, Geok translit in [[Module:scripts/data]] override_translit = true, strip_diacritics = { Geor = s["ka-stripdiacritics"], Geok = s["ka-stripdiacritics"], }, -- Hebr display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["kg"] = { "Kongo", 33702, "bnt-kng", "Latn", } m["ki"] = { "Kikuyu", 33587, "bnt-kka", "Latn", } m["kj"] = { "Kwanyama", 1405077, "bnt-ova", "Latn", } m["kk"] = { "Kazakh", 9252, "trk-kno", "Cyrl, Latn, Arab", translit = "kk-translit", -- override_translit = true, sort_key = { Cyrl = { from = {"ә", "ғ", "ё", "қ", "ң", "ө", "ұ", "ү", "һ", "і"}, to = {"а" .. p[1], "г" .. p[1], "е" .. p[1], "к" .. p[1], "н" .. p[1], "о" .. p[1], "у" .. p[1], "у" .. p[2], "х" .. p[1], "ы" .. p[1]} }, }, standard_chars = { Cyrl = "АаӘәБбВвГгҒғДдЕеЁёЖжЗзИиЙйКкҚқЛлМмНнҢңОоӨөПпРрСсТтУуҰұҮүФфХхҺһЦцЧчШшЩщЪъЫыІіЬьЭэЮюЯя", c.punc }, } m["kl"] = { "Greenlandic", 25355, "esx-inu", "Latn", sort_key = { from = {"æ", "ø", "å"}, to = {"z" .. p[1], "z" .. p[2], "z" .. p[3]} } } m["km"] = { "Khmer", 9205, "mkh-kmr", "Khmr", ancestors = "xhm", translit = "km-translit", --This might yield unwanted result unless its entry has {{km-IPA}}. } m["kn"] = { "Kannada", 33673, "dra-kan", "Knda, Tutg", ancestors = "dra-mkn", -- Knda translit in [[Module:scripts/data]] } m["ko"] = { "Korean", 9176, "qfa-kor", "Kore, Brai", ancestors = "ko-ear", translit = { Kore = "ko-translit", }, -- Kore strip_diacritics in [[Module:scripts/data]] } m["kr"] = { "Kanuri", 36094, "ssa-sah", "Latn, Arab", -- the sortkey and strip_diacritics are only for standard Kanuri; when dialectal entries get added, someone will have to work out how the dialects should be represented orthographically strip_diacritics = { Latn = {remove_diacritics = c.grave .. c.acute .. c.circ .. c.breve} }, sort_key = { Latn = { from = {"ǝ", "ny", "ɍ", "sh"}, to = {"e" .. p[1], "n" .. p[1], "r" .. p[1], "s" .. p[1]} }, }, } m["ks"] = { "Kashmiri", 33552, "inc-kas", "Aran, Deva, Shrd, Latn", translit = { Aran = "ks-Aran-translit", Deva = "ks-Deva-translit", -- Shrd translit in [[Module:scripts/data]] }, } -- "kv" is treated as "koi", "kpv", see [[WT:LT]] m["kw"] = { "Cornish", 25289, "cel-brs", "Latn", ancestors = "cnx", sort_key = { from = {"ch"}, to = {"c" .. p[1]} }, } m["ky"] = { "Kyrgyz", 9255, "trk-kkp", "Cyrl, Latn, Arab", translit = { Cyrl = "ky-translit" }, override_translit = true, sort_key = { Cyrl = { from = {"ё", "ң", "ө", "ү"}, to = {"е" .. p[1], "н" .. p[1], "о" .. p[1], "у" .. p[1]} }, }, } m["la"] = { "Latin", 397, "itc-laf", "Latn, Ital", ancestors = "itc-ola", -- Ital translit in [[Module:scripts/data]] (NOTE: formerly not present, probably an accidental omission) display_text = { Latn = s["itc-Latn-displaytext"] }, strip_diacritics = { Latn = s["itc-Latn-stripdiacritics"] }, sort_key = { Latn = s["itc-Latn-sortkey"] }, standard_chars = { Latn = "AaBbCcDdEeFfGgHhIiLlMmNnOoPpQqRrSsTtUuVvXx", c.punc }, } m["lb"] = { "Luxembourgish", 9051, "gmw-hgm", "Latn, Brai", ancestors = "gmw-cfr", sort_key = { Latn = { from = {"ä", "ë", "é"}, to = {"z" .. p[1], "z" .. p[2], "z" .. p[3]} }, }, } m["lg"] = { "Luganda", 33368, "bnt-nyg", "Latn", strip_diacritics = {remove_diacritics = c.acute .. c.circ}, sort_key = { from = {"ŋ"}, to = {"n" .. p[1]} }, } m["li"] = { "Limburgish", 102172, "gmw-frk", "Latn", ancestors = "dum", } m["ln"] = { "Lingala", 36217, "bnt-bmo", "Latn", sort_key = { remove_diacritics = c.acute .. c.circ .. c.caron, from = {"ɛ", "gb", "mb", "mp", "nd", "ng", "nk", "ns", "nt", "ny", "nz", "ɔ"}, to = {"e" .. p[1], "g" .. p[1], "m" .. p[1], "m" .. p[2], "n" .. p[1], "n" .. p[2], "n" .. p[3], "n" .. p[4], "n" .. p[5], "n" .. p[6], "n" .. p[7], "o" .. p[1]} }, } m["lo"] = { "Lao", 9211, "tai-swe", "Laoo", -- also Tai Noi/Lao Buhan script translit = "lo-translit", sort_key = "Laoo-sortkey", standard_chars = "0-9ກຂຄງຈຊຍດຕຖທນບປຜຝພຟມຢຣລວສຫອຮຯ-ໝ" .. c.punc, } m["lt"] = { "Lithuanian", 9083, "bat-eas", "Latn", ancestors = "olt", display_text = "lt-common", strip_diacritics = "lt-common", sort_key = "lt-common", standard_chars = "AaĄąBbCcČčDdEeĘęĖėFfGgHhIiĮįYyJjKkLlMmNnOoPpRrSsŠšTtUuŲųŪūVvZzŽž" .. c.punc, } m["lu"] = { "Luba-Katanga", 36157, "bnt-lub", "Latn", } m["lv"] = { "Latvian", 9078, "bat-eas", "Latn", strip_diacritics = { -- This attempts to convert vowels with tone marks to vowels either with or without macrons. Specifically, there should be no macrons if the vowel is part of a diphthong (including resonant diphthongs such pìrksts -> pirksts not #pīrksts). What we do is first convert the vowel + tone mark to a vowel + tilde in a decomposed fashion, then remove the tilde in diphthongs, then convert the remaining vowel + tilde sequences to macroned vowels, then delete any other tilde. We leave already-macroned vowels alone: Both e.g. ar and ār occur before consonants. FIXME: This still might not be sufficient. from = {"([Ee])" .. c.cedilla, "[" .. c.grave .. c.circ .. c.tilde .."]", "([aAeEiIoOuU])" .. c.tilde .."?([lrnmuiLRNMUI])" .. c.tilde .. "?([^aAeEiIoOuU])", "([aAeEiIoOuU])" .. c.tilde .."?([lrnmuiLRNMUI])" .. c.tilde .."?$", "([iI])" .. c.tilde .. "?([eE])" .. c.tilde .. "?", "([aAeEiIuU])" .. c.tilde, c.tilde}, to = {"%1", c.tilde, "%1%2%3", "%1%2", "%1%2", "%1" .. c.macron} }, sort_key = { from = {"ā", "č", "ē", "ģ", "ī", "ķ", "ļ", "ņ", "š", "ū", "ž"}, to = {"a" .. p[1], "c" .. p[1], "e" .. p[1], "g" .. p[1], "i" .. p[1], "k" .. p[1], "l" .. p[1], "n" .. p[1], "s" .. p[1], "u" .. p[1], "z" .. p[1]} }, standard_chars = "AaĀāBbCcČčDdEeĒēFfGgĢģHhIiĪīJjKkĶķLlĻļMmNnŅņOoPpRrSsŠšTtUuŪūVvZzŽž" .. c.punc, } m["mg"] = { "Malagasy", 7930, "poz-bre", "Latn, Arab", } m["mh"] = { "Marshallese", 36280, "poz-mic", "Latn", sort_key = { from = {"ā", "ļ", "m̧", "ņ", "n̄", "o̧", "ō", "ū"}, to = {"a" .. p[1], "l" .. p[1], "m" .. p[1], "n" .. p[1], "n" .. p[2], "o" .. p[1], "o" .. p[2], "u" .. p[1]} }, } m["mi"] = { "Māori", 36451, "poz-pep", "Latn", sort_key = { remove_diacritics = c.macron, from = {"ng", "wh"}, to = {"n" .. p[1], "w" .. p[1]} }, } m["mk"] = { "Macedonian", 9296, "zls", "Cyrl, Polyt", ancestors = "cu", translit = { Cyrl = "mk-translit", -- FIXME: formerly no translit specified for Polyt; unclear if the default [[Module:grc-translit]] is -- acceptable, so we disable it for now Polyt = false, }, strip_diacritics = { Cyrl = { remove_diacritics = c.acute, remove_exceptions = {"Ѓ", "ѓ", "Ќ", "ќ"} }, }, sort_key = { Cyrl = { remove_diacritics = c.grave, remove_exceptions = {"ѓ", "ќ"}, from = {"ѓ", "ѕ", "ј", "љ", "њ", "ќ", "џ"}, to = {"д" .. p[1], "з" .. p[1], "и" .. p[1], "л" .. p[1], "н" .. p[1], "т" .. p[1], "ч" .. p[1]} }, }, -- Polyt display_text, strip_diacritics, sort_key in [[Module:scripts/data]] standard_chars = { Cyrl = "АаБбВвГгДдЃѓЕеЖжЗзЅѕИиЈјКкЛлЉљМмНнЊњОоПпРрСсТтЌќУуФфХхЦцЧчЏџШш", c.punc }, } m["ml"] = { "Malayalam", 36236, "dra-mal", "Mlym", override_translit = true, -- Mlym translit in [[Module:scripts/data]] } m["mn"] = { "Mongolian", 9246, "xgn-cen", "Cyrl, Mong, Latn, Brai", ancestors = "cmg", translit = { Cyrl = "mn-translit", -- Mong translit in [[Module:scripts/data]] }, override_translit = true, -- Mong display_text and strip_diacritics in [[Module:scripts/data]] strip_diacritics = { Cyrl = {remove_diacritics = c.grave .. c.acute}, }, sort_key = { Cyrl = { remove_diacritics = c.grave, from = {"ё", "ө", "ү"}, to = {"е" .. p[1], "о" .. p[1], "у" .. p[1]} }, }, standard_chars = { Cyrl = "АаБбВвГгДдЕеЁёЖжЗзИиЙйЛлМмНнОоӨөРрСсТтУуҮүХхЦцЧчШшЫыЬьЭэЮюЯя—", Brai = c.braille, c.punc }, } -- "mo" is treated as "ro", see [[WT:LT]] m["mr"] = { "मराठी", 1571, "inc-sou", "Deva, Modi", ancestors = "omr", translit = { Deva = "mr-translit", Modi = "mr-Modi-translit", }, strip_diacritics = { Deva = { from = {"च़", "ज़", "झ़"}, to = {"च", "ज", "झ"} }, }, } m["ms"] = { "Malay", 9237, "poz-mly", "Latn, Arab", ancestors = "ms-cla", standard_chars = { Latn = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz", c.punc }, } m["mt"] = { "Maltese", 9166, "sem-arb", "Latn", display_text = { from = {"'"}, to = {"’"} }, strip_diacritics = { from = {"’"}, to = {"'"}, }, ancestors = "sqr", sort_key = { from = { "ċ", "ġ", "ż", -- Convert into PUA so that decomposed form does not get caught by the next step. "([cgz])", -- Ensure "c" comes after "ċ", "g" comes after "ġ" and "z" comes after "ż". "g" .. p[1] .. "ħ", -- "għ" after initial conversion of "g". p[3], p[4], "ħ", "ie", p[5] -- Convert "ċ", "ġ", "ħ", "ie", "ż" into final output. }, to = { p[3], p[4], p[5], "%1" .. p[1], "g" .. p[2], "c", "g", "h" .. p[1], "i" .. p[1], "z" } }, } m["my"] = { "बर्मी", 9228, "tbq-brm", "Mymr", ancestors = "obr", translit = "my-translit", override_translit = true, sort_key = { from = {"ျ", "ြ", "ွ", "ှ", "ဿ"}, to = {"္ယ", "္ရ", "္ဝ", "္ဟ", "သ္သ"} }, } m["na"] = { "Nauruan", 13307, "poz-mic", "Latn", } m["nb"] = { "Norwegian Bokmål", 25167, "gmq", "Latn", wikimedia_codes = "no", ancestors = "gmq-mno, da", -- da as an (but not the) ancestor of nb was agreed on - do not change without discussion sort_key = s["no-sortkey"], standard_chars = s["no-standardchars"], } m["nd"] = { "Northern Ndebele", 35613, "bnt-ngu", "Latn", strip_diacritics = {remove_diacritics = c.grave .. c.acute .. c.circ .. c.macron .. c.caron}, } m["ne"] = { "नेपाली", 33823, "inc-pae", "Deva, Newa", translit = { Deva = "ne-translit" }, } m["ng"] = { "Ndonga", 33900, "bnt-ova", "Latn", } m["nl"] = { "डच", 7411, "gmw-frk", "Latn, Brai", ancestors = "dum", sort_key = { Latn = {remove_diacritics = c.grave .. c.acute .. c.circ .. c.tilde .. c.diaer .. c.ringabove .. c.cedilla .. "'"}, }, standard_chars = { Latn = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzÄäËëÏïÖöÜü", Brai = c.braille, c.punc }, } m["nn"] = { "Norwegian Nynorsk", 25164, "gmq-wes", "Latn", ancestors = "gmq-mno", strip_diacritics = { remove_diacritics = c.grave .. c.acute, }, sort_key = s["no-sortkey"], standard_chars = s["no-standardchars"], } m["no"] = { "नॉर्वेजियन", 9043, "gmq-wes", "Latn", ancestors = "gmq-mno", sort_key = s["no-sortkey"], standard_chars = s["no-standardchars"], } m["nr"] = { "Southern Ndebele", 36785, "bnt-ngu", "Latn", strip_diacritics = {remove_diacritics = c.grave .. c.acute .. c.circ .. c.macron .. c.caron}, } m["nv"] = { "Navajo", 13310, "apa", "Latn, Brai", sort_key = { remove_diacritics = c.acute .. c.ogonek, from = { "chʼ", "tłʼ", "tsʼ", -- 3 chars "ch", "dl", "dz", "gh", "hw", "kʼ", "kw", "sh", "tł", "ts", "zh", -- 2 chars "ł", "ʼ" -- 1 char }, to = { "c" .. p[2], "t" .. p[2], "t" .. p[4], "c" .. p[1], "d" .. p[1], "d" .. p[2], "g" .. p[1], "h" .. p[1], "k" .. p[1], "k" .. p[2], "s" .. p[1], "t" .. p[1], "t" .. p[3], "z" .. p[1], "l" .. p[1], "z" .. p[2] } }, } m["ny"] = { "Chichewa", 33273, "bnt-nys", "Latn", strip_diacritics = {remove_diacritics = c.acute .. c.circ}, sort_key = { from = {"ng'"}, to = {"ng"} }, } m["oc"] = { "Occitan", 14185, "roa-ocr", "Latn, Hebr", ancestors = "pro", sort_key = { Latn = { remove_diacritics = c.grave .. c.acute .. c.diaer .. c.cedilla, from = {"([lns])·h"}, to = {"%1h"} }, }, -- Hebr display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["oj"] = { "Ojibwe", 33875, "alg", "Cans, Latn", sort_key = { Latn = { from = {"aa", "ʼ", "ii", "oo", "sh", "zh"}, to = {"a" .. p[1], "h" .. p[1], "i" .. p[1], "o" .. p[1], "s" .. p[1], "z" .. p[1]} }, }, } m["om"] = { "Oromo", 33864, "cus-eas", "Latn, Ethi", } m["or"] = { "Odia", 33810, "inc-eas", "Orya", ancestors = "inc-mor", translit = "or-translit", } m["os"] = { "Ossetian", 33968, "xsc-sar", "Cyrl, Geor, Latn", ancestors = "oos", translit = { Cyrl = "os-translit", -- Geor translit in [[Module:scripts/data]] }, override_translit = true, display_text = { Cyrl = { from = {"æ"}, to = {"ӕ"} }, Latn = { from = {"ӕ"}, to = {"æ"} }, }, strip_diacritics = { Cyrl = { remove_diacritics = c.grave .. c.acute, from = {"æ"}, to = {"ӕ"} }, Latn = { from = {"ӕ"}, to = {"æ"} }, }, sort_key = { Cyrl = { from = {"ӕ", "гъ", "дж", "дз", "ё", "къ", "пъ", "тъ", "хъ", "цъ", "чъ"}, to = {"а" .. p[1], "г" .. p[1], "д" .. p[1], "д" .. p[2], "е" .. p[1], "к" .. p[1], "п" .. p[1], "т" .. p[1], "х" .. p[1], "ц" .. p[1], "ч" .. p[1]} }, }, } m["pa"] = { "पंजाबी", 58635, "inc-pan", "Guru, Aran", translit = { Guru = "Guru-translit", Aran = "pa-Aran-translit", }, strip_diacritics = { Aran = { remove_diacritics = c.fathatan .. c.dammatan .. c.kasratan .. c.fatha .. c.damma .. c.kasra .. c.shadda .. c.sukun .. c.nunghunna, from = {"ݨ", "ࣇ"}, to = {"ن", "ل"} }, }, } m["pi"] = { "पालि", 36727, "inc-mid", "Latn, Brah, Deva, Beng, Sinh, Mymr, Thai, Lana, Laoo, Khmr, Cakm", --and also Khom ancestors = "sa", translit = { -- Brah translit in [[Module:scripts/data]] Deva = "sa-translit", Beng = "pi-translit", Sinh = "si-translit", Mymr = "pi-translit", Thai = "pi-translit", Lana = "pi-translit", Laoo = "pi-translit", Khmr = "pi-translit", Cakm = "Cakm-translit", }, strip_diacritics = { Thai = { from = {"ึ", u(0xF700), u(0xF70F)}, -- FIXME: Not clear what's going on with the PUA characters here. to = {"ิํ", "ฐ", "ญ"} }, Mymr = { remove_diacritics = c.VS01, }, }, sort_key = { -- FIXME: This needs to be converted into the current standardized format. from = {"ā", "ī", "ū", "ḍ", "ḷ", "m[" .. c.dotabove .. c.dotbelow .. "]", "ṅ", "ñ", "ṇ", "ṭ", "ॐ", "([เโ])([ก-ฮ])", "([ເໂ])([ກ-ຮ])", "ᩔ", "ᩕ", "ᩖ", "ᩘ", "([ᨭ-ᨱ])ᩛ", "([ᨷ-ᨾ])ᩛ", "ᩤ", u(0xFE00), u(0x200D)}, to = {"a~", "i~", "u~", "d~", "l~", "m~", "n~", "n~~", "n~~~", "t~", "ओँ", "%2%1", "%2%1", "ᩈ᩠ᩈ", "᩠ᩁ", "᩠ᩃ", "ᨦ᩠", "%1᩠ᨮ", "%1᩠ᨻ", "ᩣ"} }, } m["pl"] = { "Polish", 809, "zlw-lch", "Latn", ancestors = "zlw-mpl", sort_key = { from = {"ą", "ć", "ę", "ł", "ń", "ó", "ś", "ź", "ż"}, to = {"a" .. p[1], "c" .. p[1], "e" .. p[1], "l" .. p[1], "n" .. p[1], "o" .. p[1], "s" .. p[1], "z" .. p[1], "z" .. p[2]} }, standard_chars = "AaĄąBbCcĆćDdEeĘęFfGgHhIiJjKkLlŁłMmNnŃńOoÓóPpRrSsŚśTtUuWwYyZzŹźŻż" .. c.punc, } m["ps"] = { "पश्तो", 58680, "ira-pat", "Arab", strip_diacritics = {remove_diacritics = c.fathatan .. c.dammatan .. c.kasratan .. c.fatha .. c.damma .. c.kasra .. c.shadda .. c.sukun .. c.zwarakay .. c.superalef}, } m["pt"] = { "पुर्तगाली", 5146, "roa-gap", "Latn, Brai", sort_key = { Latn = { remove_diacritics = c.grave .. c.acute .. c.circ .. c.tilde .. c.macron .. c.diaer .. c.cedilla, from = {"ª", "æ", "º", "œ"}, to = {"a", "ae", "o", "oe"} }, }, standard_chars = { Latn = "AaÁáÂâÃãBbCcÇçDdEeÉéÊêFfGgHhIiÍíJjLlMmNnOoÓóÔôÕõPpQqRrSsTtUuÚúVvXxZz", Brai = c.braille, c.punc }, } m["qu"] = { "Quechua", 5218, "qwe", "Latn", } m["rm"] = { "Romansh", 13199, "roa-rhe", ancestors = "rm-old", "Latn", sort_key = {remove_diacritics = c.grave .. c.acute .. c.circ .. c.diaer .. c.small_e}, } m["ro"] = { "रोमानियाई", 7913, "roa-eas", "Latn, Cyrl, Cyrs", translit = { Cyrl = "ro-translit" }, sort_key = { Latn = { remove_diacritics = c.grave .. c.acute, from = {"ă", "â", "î", "ș", "ț"}, to = {"a" .. p[1], "a" .. p[2], "i" .. p[1], "s" .. p[1], "t" .. p[1]} }, Cyrl = { from = {"ӂ"}, to = {"ж" .. p[1]} }, }, -- Cyrs strip_diacritics, sort_key in [[Module:scripts/data]]; presumably not present standard_chars = { Latn = "AaĂăÂâBbCcDdEeFfGgHhIiÎîJjLlMmNnOoPpRrSsȘșTtȚțUuVvXxZz", Cyrl = "АаБбВвГгДдЕеЖжӁӂЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЫыЬьЭэЮюЯя", c.punc }, } m["ru"] = { "रूसी", 7737, "zle", "Cyrl, Brai", ancestors = "zle-mru", translit = { Cyrl = "ru-translit" }, display_text = { Cyrl = { from = {"'"}, to = {"’"} }, }, strip_diacritics = { Cyrl = { remove_diacritics = c.grave .. c.acute .. c.diaer, remove_exceptions = {"Ё", "ё", "Ѣ̈", "ѣ̈", "Я̈", "я̈"}, from = {"’"}, to = {"'"}, }, }, sort_key = { Cyrl = { remove_diacritics = c.grave .. c.acute .. c.diaer, from = { "і", "ѣ", "ѳ", "ѵ" }, to = { "и" .. p[1], "ь" .. p[1], "я" .. p[2], "я" .. p[3] } }, }, standard_chars = { Cyrl = "АаБбВвГгДдЕеЁёЖжЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЪъЫыЬьЭэЮюЯя—", Brai = c.braille, (c.punc:gsub("'", "")) -- Exclude apostrophe. }, } m["rw"] = { "Rwanda-Rundi", 3217514, "bnt-glb", "Latn", strip_diacritics = {remove_diacritics = c.acute .. c.circ .. c.macron .. c.caron}, } m["sa"] = { "संस्कृत", 11059, "inc", "as-Beng, Bali, Beng, Bhks, Brah, Mymr, xwo-Mong, Deva, Gujr, Guru, Gran, Hani, Java, Kthi, Knda, Kawi, Khar, Khmr, Laoo, Mlym, mnc-Mong, Marc, Modi, Mong, Nand, Newa, Orya, Phag, Ranj, Saur, Shrd, Sidd, Sinh, Soyo, Lana, Takr, Taml, Tang, Telu, Thai, Tibt, Tutg, Tirh, Zanb", --and also Khom; script codes sorted by canonical name rather than code for [[MOD:sa-convert]] translit = { Beng = "sa-Beng-translit", ["as-Beng"] = "sa-Beng-translit", -- Brah translit in [[Module:scripts/data]] Deva = "sa-translit", Gujr = "sa-Gujr-translit", Guru = "sa-Guru-translit", Java = "sa-Java-translit", Kthi = "sa-Kthi-translit", Khmr = "pi-translit", Knda = "sa-Knda-translit", Lana = "pi-translit", Laoo = "pi-translit", Mlym = "sa-Mlym-translit", Modi = "sa-Modi-translit", -- Mong, mnc-Mong, xwo-Mong translit in [[Module:scripts/data]] -- NOTE: Formerly used xal-translit for transliterating xwo-Mong but that only handles Cyrillic; it has -- code to transliterate xwo-Mong but it's broken so I've replaced it with the default xwo-translit. Mymr = "pi-translit", Orya = "sa-Orya-translit", -- Shrd translit in [[Module:scripts/data]] -- Sidd translit in [[Module:scripts/data]] Sinh = "si-translit", Taml = "sa-Taml-translit", Telu = "sa-Telu-translit", Thai = "pi-translit", -- Tibt translit in [[Module:scripts/data]] }, -- Mong display_text and strip_diacritics in [[Module:scripts/data]] -- Tibt display_text, strip_diacritics, sort_key in [[Module:scripts/data]] strip_diacritics = { Deva = s["sa-Deva-stripdiacritics"], Mymr = { remove_diacritics = c.VS01, }, Thai = { from = {"ึ", u(0xF700), u(0xF70F)}, -- FIXME: Not clear what's going on with the PUA characters here. to = {"ิํ", "ฐ", "ญ"} }, }, sort_key = { Deva = s["sa-Deva-stripdiacritics"], -- until we have a proper Sanskrit sorting algorithm. Lana = { -- Tai Tham from = {"ᩔ", "ᩕ", "ᩖ", "ᩘ", "([ᨭ-ᨱ])ᩛ", "([ᨷ-ᨾ])ᩛ", "ᩤ"}, to = {"ᩈ᩠ᩈ", "᩠ᩁ", "᩠ᩃ", "ᨦ᩠", "%1᩠ᨮ", "%1᩠ᨻ", "ᩣ"}, }, Laoo = "Laoo-sortkey", Latn = { from = {"ā", "ī", "ū", "ḍ", "ḷ", "ḹ", "m[" .. c.dotabove .. c.dotbelow .. "]", "ṅ", "ñ", "ṇ", "ṛ", "ṝ", "ś", "ṣ", "ṭ"}, to = {"a~", "i~", "u~", "d~", "l~", "l~~", "m~", "n~", "n~~", "n~~~", "r~", "r~~", "s~", "s~~", "t~"}, }, Mymr = { remove_diacritics = c.VS01, }, Thai = "Thai-sortkey", -- FIXME: The previous sort key which mixed all scripts removed ZWJ; I don't know which script(s) this was -- intended for and there are no other languages which remove it in the sort key AFAIK. If it needs to be -- removed, specify the script(s) it needs to be removed under or add handling for the "all" script that applies -- regardless of script. --all = { -- remove_diacritics = c.ZWJ, --}, }, } m["sc"] = { "Sardinian", 33976, "roa-sou", "Latn", ancestors = "sc-old", } m["sd"] = { "सिंधी", 33997, "inc-snd", "Arab, Deva, Sind, Khoj", translit = { Sind = "Sind-translit", Arab = "sd-Arab-translit" }, strip_diacritics = { Arab = { remove_diacritics = c.kashida .. c.fathatan .. c.dammatan .. c.kasratan .. c.fatha .. c.damma .. c.kasra .. c.shadda .. c.sukun .. c.superalef, from = {"ٱ"}, to = {"ا"} }, }, } m["se"] = { "Northern Sami", 33947, "smi", "Latn", display_text = { from = {"'"}, to = {"ˈ"} }, strip_diacritics = {remove_diacritics = c.macron .. c.dotbelow .. "'ˈ"}, sort_key = { from = {"á", "č", "đ", "ŋ", "š", "ŧ", "ž"}, to = {"a" .. p[1], "c" .. p[1], "d" .. p[1], "n" .. p[1], "s" .. p[1], "t" .. p[1], "z" .. p[1]} }, standard_chars = "AaÁáBbCcČčDdĐđEeFfGgHhIiJjKkLlMmNnŊŋOoPpRrSsŠšTtŦŧUuVvZzŽž" .. c.punc, } m["sg"] = { "Sango", 33954, "crp", "Latn", ancestors = "ngb", } m["sh"] = { "Serbo-Croatian", 9301, "zls", "Latn, Cyrl, Glag, Arab", ietf_subtag = "hbs", -- ISO 639-3 code, since "sh" is deprecated from ISO 639-1 wikimedia_codes = "sh, bs, hr, sr", strip_diacritics = { Latn = { remove_diacritics = c.grave .. c.acute .. c.tilde .. c.macron .. c.dgrave .. c.invbreve, remove_exceptions = {"Ć", "ć", "Ś", "ś", "Ź", "ź"} }, Cyrl = { remove_diacritics = c.grave .. c.acute .. c.tilde .. c.macron .. c.dgrave .. c.invbreve, remove_exceptions = {"З́", "з́", "С́", "с́"} }, }, sort_key = { Latn = { remove_diacritics = c.grave .. c.acute .. c.tilde .. c.macron .. c.dgrave .. c.invbreve, remove_exceptions = {"ć", "ś", "ź"}, from = {"č", "ć", "dž", "đ", "lj", "nj", "š", "ś", "ž", "ź"}, to = {"c" .. p[1], "c" .. p[2], "d" .. p[1], "d" .. p[2], "l" .. p[1], "n" .. p[1], "s" .. p[1], "s" .. p[2], "z" .. p[1], "z" .. p[2]} }, Cyrl = { remove_diacritics = c.grave .. c.acute .. c.tilde .. c.macron .. c.dgrave .. c.invbreve, remove_exceptions = {"з́", "с́"}, from = {"ђ", "з́", "ј", "љ", "њ", "с́", "ћ", "џ"}, to = {"д" .. p[1], "з" .. p[1], "и" .. p[1], "л" .. p[1], "н" .. p[1], "с" .. p[1], "т" .. p[1], "ч" .. p[1]} }, }, standard_chars = { Latn = "AaBbCcČčĆćDdĐđEeFfGgHhIiJjKkLlMmNnOoPpRrSsŠšTtUuVvZzŽž", Cyrl = "АаБбВвГгДдЂђЕеЖжЗзИиЈјКкЛлЉљМмНнЊњОоПпРрСсТтЋћУуФфХхЦцЧчЏџШш", c.punc }, } m["si"] = { "सिंहली", 13267, "inc-ins", "Sinh", translit = "si-translit", override_translit = true, } m["sk"] = { "स्लोवाक", 9058, "zlw", "Latn", ancestors = "zlw-osk", sort_key = {remove_diacritics = c.acute .. c.circ .. c.diaer .. c.caron}, standard_chars = "AaÁáÄäBbCcČčDdĎďEeÉéFfGgHhIiÍíJjKkLlĹ弾MmNnŇňOoÓóÔôPpRrŔŕSsŠšTtŤťUuÚúVvYyÝýZzŽž" .. c.punc, } m["sl"] = { "स्लोवेन", 9063, "zls", "Latn", strip_diacritics = { remove_diacritics = c.grave .. c.acute .. c.circ .. c.macron .. c.dgrave .. c.invbreve .. c.dotbelow, remove_exceptions = {"Ć", "ć", "Ǵ", "ǵ", "Ś", "ś", "Ź", "ź"}, from = {"Ə", "ə", "Ł", "ł"}, to = {"E", "e", "L", "l"}, }, sort_key = { remove_diacritics = c.grave .. c.acute .. c.circ .. c.tilde .. c.macron .. c.dotabove .. c.ringabove .. c.dgrave .. c.invbreve .. c.dotbelow .. c.ringbelow .. c.ogonek, remove_exceptions = {"ć", "ǵ", "ś", "ź"}, from = {"ä", "č", "ć", "đ", "ə", "ë", "ǧ", "ǵ", "ï", "ł", "ö", "š", "ś", "ü", "ž", "ź"}, to = {"a" .. p[1], "c" .. p[1], "c" .. p[2], "d" .. p[1], "e", "e" .. p[1], "g" .. p[1], "g" .. p[2], "i" .. p[1], "l", "o" .. p[1], "s" .. p[1], "s" .. p[2], "u" .. p[1], "z" .. p[1], "z" .. p[2]}, }, standard_chars = "AaBbCcČčDdEeFfGgHhIiJjKkLlMmNnOoPpRrSsŠšTtUuVvZzŽž" .. c.punc, } m["sm"] = { "Samoan", 34011, "poz-pnp", "Latn", } m["sn"] = { "Shona", 34004, "bnt-sho", "Latn", strip_diacritics = {remove_diacritics = c.acute}, } m["so"] = { "Somali", 13275, "cus-som", "Latn, Arab, Osma", strip_diacritics = { Latn = {remove_diacritics = c.grave .. c.acute .. c.circ} }, } m["sq"] = { "Albanian", 8748, "sqj", "Latn, Grek, Arab, Elba, Todr, Vith", translit = { Elba = "Elba-translit", Vith = "Vith-translit", }, -- Grek display_text, strip_diacritics, sort_key in [[Module:scripts/data]] strip_diacritics = { Latn = { remove_diacritics = c.acute .. c.circ .. c.macron, from = {'^[ie] (%w)', '^të (%w)'}, to = {'%1', '%1'}, }, }, sort_key = { Latn = { remove_diacritics = c.acute .. c.circ .. c.macron .. c.tilde .. c.breve .. c.caron, from = {'^[ie] (%w)', '^të (%w)', 'ç', 'dh', 'ë', 'gj', 'll', 'nj', 'rr', 'sh', 'th', 'xh', 'zh'}, to = {'%1', '%1', 'c'..p[1], 'd'..p[1], 'e'..p[1], 'g'..p[1], 'l'..p[1], 'n'..p[1], 'r'..p[1], 's'..p[1], 't'..p[1], 'x'..p[1], 'z'..p[1]}, } -- TODO: Grek if the default sort key is unsuitable }, standard_chars = { Latn = "AaBbCcÇçDdEeËëFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvXxYyZz", c.punc }, } m["ss"] = { "Swazi", 34014, "bnt-ngu", "Latn", strip_diacritics = {remove_diacritics = c.grave .. c.acute .. c.circ .. c.macron .. c.caron}, } m["st"] = { "Sotho", 34340, "bnt-sts", "Latn", strip_diacritics = {remove_diacritics = c.grave .. c.acute .. c.circ .. c.macron .. c.caron}, } m["su"] = { "Sundanese", 34002, "poz-msa", "Latn, Sund, Arab", ancestors = "osn", translit = { Sund = "Sund-translit" }, } m["sv"] = { "स्वीडिश", 9027, "gmq-eas", "Latn", ancestors = "gmq-osw-lat", sort_key = { remove_diacritics = c.grave .. c.acute .. c.circ .. c.tilde .. c.macron .. c.dacute .. c.caron .. c.cedilla .. "':", remove_exceptions = {"å"}, from = {"ø", "æ", "œ", "ß", "ꜩ", "å", "aͤ", "oͤ"}, to = {"ö", "ae", "oe", "ss", "tz", "z" .. p[1], "ä", "ö"} }, standard_chars = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpRrSsTtUuVvXxYyÅåÄäÖö" .. c.punc, } m["sw"] = { "Swahili", 7838, "bnt-swh", "Latn, Arab", sort_key = { Latn = { from = {"ng'"}, to = {"ng" .. p[1]} }, }, } m["ta"] = { "तमिल", 5885, "dra-tam", "Taml", ancestors = "ta-mid", translit = "ta-translit", override_translit = true, } m["te"] = { "तेलुगु", 8097, "dra-tel", "Telu", translit = "te-translit", override_translit = true, } m["tg"] = { "Tajik", 9260, "ira-swi", "Cyrl, Arab, Latn", ancestors = "fa-cls", translit = { Cyrl = "tg-translit" }, override_translit = true, strip_diacritics = { Cyrl = s["tg-stripdiacritics"], Latn = s["tg-stripdiacritics"], }, sort_key = { Cyrl = { from = {"ғ", "ё", "ӣ", "қ", "ӯ", "ҳ", "ҷ"}, to = {"г" .. p[1], "е" .. p[1], "и" .. p[1], "к" .. p[1], "у" .. p[1], "х" .. p[1], "ч" .. p[1]} }, }, } m["th"] = { "Thai", 9217, "tai-swe", "Thai, Khomt, Brai", translit = { Thai = "th-translit" }, sort_key = { Thai = "Thai-sortkey" }, } m["ti"] = { "Tigrinya", 34124, "sem-eth", "Ethi", translit = "Ethi-translit", } m["tk"] = { "Turkmen", 9267, "trk-ogz", "Latn, Cyrl, Arab", strip_diacritics = { Latn = s["tk-stripdiacritics"], Cyrl = s["tk-stripdiacritics"], }, sort_key = { Latn = { from = {"ç", "ä", "ž", "ň", "ö", "ş", "ü", "ý"}, to = {"c" .. p[1], "e" .. p[1], "j" .. p[1], "n" .. p[1], "o" .. p[1], "s" .. p[1], "u" .. p[1], "y" .. p[1]} }, Cyrl = { from = {"ё", "җ", "ң", "ө", "ү", "ә"}, to = {"е" .. p[1], "ж" .. p[1], "н" .. p[1], "о" .. p[1], "у" .. p[1], "э" .. p[1]} }, }, ancestors = "trk-eog", } m["tl"] = { "Tagalog", 34057, "phi", "Latn, Tglg", translit = { Tglg = "tl-translit" }, override_translit = true, strip_diacritics = { Latn = {remove_diacritics = c.grave .. c.acute .. c.circ} }, standard_chars = { Latn = "AaBbKkDdEeGgHhIiLlMmNnOoPpRrSsTtUuWwYy", c.punc }, sort_key = { Latn = "tl-sortkey", }, } m["tn"] = { "Tswana", 34137, "bnt-sts", "Latn", } m["to"] = { "Tongan", 34094, "poz-ton", "Latn", strip_diacritics = {remove_diacritics = c.acute}, sort_key = {remove_diacritics = c.macron}, } m["tr"] = { "तुर्की", 256, "trk-ogz", "Latn", ancestors = "ota", dotted_dotless_i = true, sort_key = { from = { -- Ignore circumflex, but account for capital Î wrongly becoming ı + circ due to dotted dotless I logic. "ı" .. c.circ, c.circ, "i", -- Ensure "i" comes after "ı". "ç", "ğ", "ı", "ö", "ş", "ü" }, to = { "i", "", "i" .. p[1], "c" .. p[1], "g" .. p[1], "i", "o" .. p[1], "s" .. p[1], "u" .. p[1] } }, standard_chars = "AaÂâBbCcÇçDdEeFfGgĞğHhIıİiÎîJjKkLlMmNnOoÖöPpRrSsŞşTtUuÛûÜüVvYyZz" .. c.punc, } m["ts"] = { "Tsonga", 34327, "bnt-tsr", "Latn", } m["tt"] = { "Tatar", 25285, "trk-kbu", "Cyrl, Latn, Arab", translit = { Cyrl = "tt-translit", Arab = "tt-translit" }, --override_translit = true, -- enable override until Module code can detect Russian loans such as [[аэропорт]] dotted_dotless_i = true, sort_key = { Cyrl = { from = {"ә", "ў", "ғ", "ё", "җ", "қ", "ң", "ө", "ү", "һ"}, to = {"а" .. p[1], "в" .. p[1], "г" .. p[1], "е" .. p[1], "ж" .. p[1], "к" .. p[1], "н" .. p[1], "о" .. p[1], "у" .. p[1], "х" .. p[1]} }, Latn = { from = { "i", -- Ensure "i" comes after "ı". "ä", "ə", "ç", "ğ", "ı", "ñ", "ŋ", "ö", "ɵ", "ş", "ü" }, to = { "i" .. p[1], "a" .. p[1], "a" .. p[2], "c" .. p[1], "g" .. p[1], "i", "n" .. p[1], "n" .. p[2], "o" .. p[1], "o" .. p[2], "s" .. p[1], "u" .. p[1] } }, }, } -- "tw" is treated as "ak", see [[WT:LT]] m["ty"] = { "Tahitian", 34128, "poz-pep", "Latn", } m["ug"] = { "Uyghur", 13263, "trk-kar", "Arab, Latn, Cyrl", ancestors = "chg", translit = { Arab = "ug-translit", Cyrl = "ug-translit", }, override_translit = true, } m["uk"] = { "युक्रेनियाई", 8798, "zle", "Cyrl", ancestors = "zle-muk", translit = "uk-translit", strip_diacritics = {remove_diacritics = c.grave .. c.acute}, sort_key = { remove_diacritics = c.grave .. c.acute, from = { "ї", -- 2 chars "ґ", "є", "і" -- 1 char }, to = { "и" .. p[2], "г" .. p[1], "е" .. p[1], "и" .. p[1] } }, standard_chars = "АаБбВвГгДдЕеЄєЖжЗзИиІіЇїЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЬьЮюЯя" .. c.punc:gsub("'", ""), -- Exclude apostrophe. } m["ur"] = { "उर्दू", 1617, "inc-hnd", "Aran, Hebr", translit = { Aran = "ur-translit" }, strip_diacritics = { Aran = { -- character "ۂ" code U+06C2 to "ه" and "هٔ" (U+0647 + U+0654) to "ه"; hamzatu l-waṣli to a regular alif from = {"هٔ", "ۂ", "ٱ"}, to = {"ہ", "ہ", "ا"}, remove_diacritics = c.fathatan .. c.dammatan .. c.kasratan .. c.fatha .. c.damma .. c.kasra .. c.shadda .. c.sukun .. c.nunghunna .. c.superalef }, }, -- Hebr display_text, strip_diacritics, sort_key in [[Module:scripts/data]] standard_chars = { Aran = "ایببپتثجچحخدذرزژسشصضطظعغفقکگلࣇڷمنݨوؤہھئٹڈڑآے", c.punc, }, } m["uz"] = { "Uzbek", 9264, "trk-kar", "Latn, Cyrl, Arab", ancestors = "chg", translit = { Cyrl = "uz-translit" }, sort_key = { Latn = { from = {"oʻ", "gʻ", "sh", "ch", "ng"}, to = {"z" .. p[1], "z" .. p[2], "z" .. p[3], "z" .. p[4], "z" .. p[5]} }, Cyrl = { from = {"ё", "ў", "қ", "ғ", "ҳ"}, to = {"е" .. p[1], "я" .. p[1], "я" .. p[2], "я" .. p[3], "я" .. p[4]} }, }, strip_diacritics = { Arab = "ar-stripdiacritics", }, } m["ve"] = { "Venda", 32704, "bnt-bso", "Latn", } m["vi"] = { "Vietnamese", 9199, "mkh-vie", "Latn, Hani", ancestors = "mkh-mvi", sort_key = { Latn = "vi-sortkey", Hani = "Hani-sortkey", }, } m["vo"] = { "Volapük", 36986, "art", "Latn", } m["wa"] = { "Walloon", 34219, "roa-oil", "Latn", sort_key = s["roa-oil-sortkey"], } m["wo"] = { "Wolof", 34257, "alv-fwo", "Latn, Arab, Gara", } m["xh"] = { "Xhosa", 13218, "bnt-ngu", "Latn", strip_diacritics = {remove_diacritics = c.grave .. c.acute .. c.circ .. c.macron .. c.caron}, } m["yi"] = { "Yiddish", 8641, "gmw-hgm", "Hebr, Latn", ancestors = "gmh", translit = { Hebr = "yi-translit", }, -- Hebr display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["yo"] = { "Yoruba", 34311, "alv-yor", "Latn, Arab", strip_diacritics = { Latn = {remove_diacritics = c.grave .. c.acute .. c.macron} }, sort_key = { Latn = { from = {"ẹ", "ɛ", "gb", "ị", "kp", "ọ", "ɔ", "ṣ", "sh", "ụ"}, to = {"e" .. p[1], "e" .. p[1], "g" .. p[1], "i" .. p[1], "k" .. p[1], "o" .. p[1], "o" .. p[1], "s" .. p[1], "s" .. p[1], "u" .. p[1]} }, }, } m["za"] = { "झुआंग", 13216, "tai", "Latn, Hani", sort_key = { Latn = "za-sortkey", Hani = "Hani-sortkey", }, } m["zh"] = { "चीनी", 7850, "zhx", "Hants, Latn, Bopo, Nshu, Brai", ancestors = "ltc", generate_forms = "zh-generateforms", translit = { Hani = "zh-translit", Bopo = "zh-translit", }, sort_key = { Hani = "Hani-sortkey" }, } m["zu"] = { "Zulu", 10179, "bnt-ngu", "Latn", strip_diacritics = {remove_diacritics = c.grave .. c.acute .. c.circ .. c.macron .. c.caron}, } return require("Module:languages").finalizeData(m, "language") 81tda2cearo3te3yr451kqtlqy5sial सदस्य:SM7/Utilities 2 304608 487905 480016 2026-09-03T14:12:31Z SM7 6218 /* गैजेट */ +1 पूरा हुआ 487905 wikitext text/x-wiki {{side box | text = '''Quiklinks:''' :'''हिंदी''': * [[विक्षनरी:भाषाविज्ञान की शब्दावली|शब्दावली]] }} <!-- ++++++++++++++ ड्राफ़्ट एरिया +++++++++++++++++ --> {{trans-top|absorbing all light}} * Amharic: {{t|am|ጥቁር}} * Arabic: {{t+|ar|أَسْوَد|m}}, {{tt|ar|سَوْدَاء|f}}, {{tt|ar|سُود|p}} {{trans-bottom}} <!-- ++++++++++++++++++ ++++++++++++++ लिंक एरिया +++++++++++++++++ +++++++++++++++++ --> ==[[विक्षनरी:भाषा दिशानिर्देश:भोजपुरी]]== == विक्षनरी नामस्थान == * [[विक्षनरी:भाषाएँ]] * [[विक्षनरी:नीतियाँ और दिशानिर्देश]] * [[विक्षनरी:स्वागत]] === सहायता, जानकारी, या कैसे करें! === * [[विक्षनरी:श्रेणियाँ]] और [[विक्षनरी:श्रेणीकरण]] === उपकरण और औज़ार === * [[विक्षनरी:HotCat]] == श्रेणियाँ == === [[विक्षनरी:श्रेणीकरण]] === * [[:श्रेणी:मूलभूत श्रेणी]] :* {{tl|auto cat}} → <small>([[विशेष:कड़ियाँ/साँचा:auto cat|कड़ियाँ]])</small> :: <em>दुष्प्रयोग</em>: [[:श्रेणी:अवैध लेबल वाली श्रेणियाँ]] ({{convert num en|{{PAGESINCATEGORY:अवैध लेबल वाली श्रेणियाँ}}}}) === रखरखाव हेतु === * [[:श्रेणी:श्रेणी पुनर्निर्देशन]]: [[:श्रेणी:ख़ाली श्रेणी पुनर्निर्देशन]] और [[:श्रेणी:ग़ैर-ख़ाली श्रेणी पुनर्निर्देशन]] * नाम संपादन: ** [[Module:category tree/poscatboiler/data/modules|मॉड्यूल नाम सूची एवं संपादन]] ** [[Module:category tree/poscatboiler/data/templates|साँचा नाम सूची एवं संपादन]] == साँचे == '''[[विक्षनरी:साँचे]]''' और '''[[:श्रेणी:साँचे]]''' === साँचे-0 === * {{tl|Pp-template}} * {{tl|pp-template}} * {{tl|ombox/core}} * {{tl|Fasthelp}} * {{tl|Welcome}} * {{tl|Fonthelp}} * {{tl|Fastfonthelp}} === साँचे-1 === * {{tl|lb}} का प्रयोग [[जर्मनी]] पर भाषा कोड के रूप में। == विशेष == * [[Special:ProtectedPages]] ==गैजेट== * [[MediaWiki:Gadget-VisibilityToggles.js]] इंस्टाल करना है {{done}} ==मीडियाविकि== * [[मीडियाविकि:Scribunto-doc-page-show]] सुधार योग्य == हटाने योग्य == * [[सदस्य वार्ता:Yeshrajbc]] ==TODO== * {{tl|-}} <small>([[विशेष:कड़ियाँ/साँचा:-|कड़ियाँ]])</small> का प्रयोग हटाना है। bx0h0e1rcc96hly1lxvpjr8x1tadde3 श्रेणी:खाली श्रेणियाँ 14 304696 488004 477695 2026-09-04T07:42:53Z SM7 6218 SM7 ने अनुप्रेषण छोड़े बिना पृष्ठ [[श्रेणी:ख़ाली श्रेणियाँ]] को [[श्रेणी:खाली श्रेणियाँ]] पर स्थानांतरित किया 477695 wikitext text/x-wiki Categories are placed here by [[Module:category tree]] when they contain no pages or subcategories. Empty categories are not necessarily a problem. After all, categories that are empty can always be filled with something appropriate. However, occasionally the structure of the category tree itself is changed, which can leave categories stranded with nothing in them. This list helps track down such cases and allows them to be cleaned up. Because of the way the wiki software works, categories will appear here for a while afterwards if they were empty at first but had entries added to them later. This can be fixed by simply performing a "null edit" on the category page: edit the page, and save without making any changes. (Alternatively, use the "null edit" option provided by the "purge tab" [[Special:Preferences#mw-prefsection-gadgets|gadget]].) This can be avoided by adding entries to categories before creating them. It also helps to create categories from the "bottom up": start at the lowest level that has entries, then create its parent categories, then the parent categories of that, and so on. __HIDDENCAT__ [[श्रेणी:श्रेणियाँ जिनपर ध्यान देने की आवश्यकता है]] 7x4ka1bfymtxa2lzhvnih8c60cm0snq 488005 488004 2026-09-04T07:43:31Z SM7 6218 implementing "auto cat" 488005 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx मॉड्यूल:languages/data/3/l 828 304723 487918 477748 2026-09-03T16:05:40Z SM7 6218 updating... 487918 Scribunto text/plain local m_langdata = require("Module:languages/data") -- Loaded on demand, as it may not be needed (depending on the data). local function u(...) u = require("Module:string utilities").char return u(...) end local c = m_langdata.chars local p = m_langdata.puaChars local s = m_langdata.shared local m = {} m["laa"] = { "Lapuyan Subanun", 12635302, "phi", } m["lab"] = { "Linear A", nil, "qfa-unc", -- undeciphered "Lina", } m["lac"] = { "Lacandon", 35766, "myn", "Latn", } m["lad"] = { "Ladino", 36196, "roa-cas", "Hebr, Latn, Cyrl", -- Hebr display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["lae"] = { "Pattani", 7148323, "sit-whm", } m["laf"] = { "Lafofa", 35711, "alv", } m["lag"] = { "Langi", 584983, "bnt-mra", } m["lah"] = { "Lahnda", 1334774, "inc-pan", "Aran", } m["lai"] = { "Lambya", 6481626, "bnt-mby", "Latn", } m["laj"] = { "Lango (Uganda)", 35670, "sdv-los", "Latn", } m["lak"] = { "Laka", 6474529, -- also Q55616620 "csu-sar", -- formerly classified as "alv-mbm"; see [[w:Lau Laka language]] } m["lam"] = { "Lamba", 36098, "bnt-sbi", "Latn", } m["lan"] = { "Laru", 3913987, "nic-knj", "Latn", } m["lap"] = { "Kabba-Laka", 6474528, "csu-sar", "Latn", } m["laq"] = { "Qabiao", 3436700, "qfa-kra", } m["lar"] = { "Larteh", 35639, "alv-gng", "Latn", } m["las"] = { "Gur Lama", 35652, "nic-gne", "Latn", } m["lau"] = { "Laba", 12952694, "paa-lla", "Latn", } m["law"] = { "Lauje", 6498258, "poz", "Latn", } m["lax"] = { "Tiwa", 7810466, "tbq-bdg", "Latn, as-Beng", } m["lay"] = { "Lama Bai", 6480756, "sit-nba", "Hani, Latn", sort_key = {Hani = "Hani-sortkey"}, } m["laz"] = { "Aribwatsa", 3502104, "poz-ocw", "Latn", } m["lbb"] = { "Label", 3214296, "poz-ocw", "Latn", } m["lbc"] = { "Lakkia", 3027879, "qfa-tak", } m["lbe"] = { "Lak", 36206, "cau-nec", "Cyrl, Latn, Arab, Geor", translit = { Cyrl = "lbe-translit", -- Geor translit in [[Module:scripts/data]] }, override_translit = true, display_text = {Cyrl = s["cau-Cyrl-displaytext"]}, strip_diacritics = { Cyrl = s["cau-Cyrl-stripdiacritics"], Latn = s["cau-Latn-stripdiacritics"], }, sort_key = "lbe-sortkey", } m["lbf"] = { "Tinani", 784502, "sit-whm", } m["lbg"] = { "Laopang", 12952711, "tbq-bis", } m["lbi"] = { "La'bi", 6460637, "alv-mbm", } m["lbj"] = { "Ladakhi", 35833, "sit-lab", "Tibt", override_translit = true, -- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["lbk"] = { "Central Bontoc", 63257803, "phi", "Latn", } m["lbl"] = { "Libon Bikol", 18664462, "phi", "Latn", } m["lbm"] = { "Lodhi", 6666374, "mun", } m["lbn"] = { "Lamet", 3216723, "mkh-pal", "Laoo, Latn", } m["lbo"] = { "Laven", 6298648, "mkh-ban", "Latn", } m["lbq"] = { "Wampar", 7966946, "poz-ocw", "Latn", } m["lbr"] = { "Northern Lorung", 6668040, "sit-kie", "Deva", } m["lbs"] = { "Libyan Sign Language", 11775688, "sgn", } m["lbt"] = { "Lachi", 6583606, "qfa-kra", } m["lbu"] = { "Labu", 6467660, "poz-ocw", "Latn", } m["lbv"] = { "Lavatbura-Lamusong", 2405981, "poz-ocw", "Latn", } m["lbw"] = { "Tolaki", 3033597, "poz-btk", "Latn", } m["lbx"] = { "Lawangan", 3120345, "poz-bre", "Latn", } m["lby"] = { "Lamu-Lamu", 6482727, nil, "Latn", } m["lbz"] = { "Lardil", 3915688, "aus-tnk", "Latn", } m["lcc"] = { "Legenyem", 12952713, "poz-hce", "Latn", } m["lcd"] = { "Lola", 6668867, "poz-cet", "Latn", } m["lce"] = { "Loncong", 3058192, } m["lcf"] = { "Lubu", 3264685, } m["lch"] = { "Luchazi", 3265143, "bnt-clu", } m["lcl"] = { "Lisela", 6558753, "poz-cma", "Latn", } m["lcm"] = { "Tungag", 3542085, "poz-ocw", "Latn", } m["lcp"] = { "Western Lawa", 18644465, "mkh-pal", "Thai", sort_key = "Thai-sortkey", } m["lcq"] = { "Luhu", 6699890, "poz-cma", "Latn", } m["lcs"] = { "Lisabata-Nuniali", 6558534, "poz-cet", "Latn", } m["lda"] = { "Kla", 63257856, "dmn-mda", "Latn", } m["ldb"] = { "Idun", 3914441, "nic-plc", "Latn", } m["ldd"] = { "Luri (Nigeria)", 4701277, "cdc-wst", } m["ldg"] = { "Lenyima", 3914423, "nic-uce", "Latn", } m["ldh"] = { "Lamja-Dengsa-Tola", 11001739, "nic-dak", } m["ldj"] = { "Lemoro", 3912761, "nic-jer", } m["ldk"] = { "Leelau", 3914465, "alv-bwj", } m["ldl"] = { "Kaan", 3914501, "alv-yun", } m["ldm"] = { "Landoma", 35568, "alv-mel", } m["ldn"] = { "Láadan", 35757, "art", "Latn", type = "appendix-constructed", } m["ldo"] = { "Loo", 3915378, "alv-bwj", } m["ldp"] = { "Tso", 3913953, "alv-wjk", } m["ldq"] = { "Lufu", 35796, "nic-ykb", "Latn", } m["lea"] = { "Lega-Shabunda", 12952719, "bnt-lgb", } m["leb"] = { "Lala-Bisa", 6480112, "bnt-sbi", } m["lec"] = { "Leco", 2625398, "qfa-iso", } m["led"] = { "Lendu", 523823, "csu-lnd", "Latn", } m["lee"] = { "Lyélé", 3089032, "nic-gnn", } m["lef"] = { "Lelemi", 35585, "alv-ntg", } m["leh"] = { "Lenje", 6522666, "bnt-bot", } m["lei"] = { "Lemio", 6521165, "ngf-rai", "Latn", } m["lej"] = { "Lengola", 6522474, "bnt-leb", } m["lek"] = { "Leipon", 3229216, "poz-aay", "Latn", } m["lel"] = { "Lele (Congo)", 56733, "bnt-bsh", } m["lem"] = { "Nomaande", 13479983, "nic-mbw", "Latn", } m["len"] = { "Honduran Lenca", 36189, "nai-len", "Latn", } m["leo"] = { "Mengisa", 1345684, "nic-mba", ancestors = "bag", } m["lep"] = { "Lepcha", 35990, "sit", "Lepc", translit = "lep-translit", } m["leq"] = { "Lembena", 6521067, "ngf-enc", "Latn", } m["ler"] = { "Lenkau", 3229472, "poz-aay", "Latn", } m["les"] = { "Lese", 11033939, "csu-mle", } m["let"] = { "Lesing-Gelimi", 12635445, "poz-ocw", "Latn", } m["leu"] = { "Kara (New Guinea)", 3192889, "poz-ocw", "Latn", } m["lev"] = { "Lamma", 6583582, "paa-alp", "Latn", } m["lew"] = { -- this code was basically assigned as a catch-all for things that aren't brs, kzf or unz "Ledo Kaili", 35877, "poz-kal", "Latn", } m["lex"] = { "Luang", 6695015, "poz-tim", "Latn", } m["ley"] = { "Lemolang", 3033560, "poz-ssw", } m["lez"] = { "Lezgi", 31746, "cau-esm", "Cyrl, Latn, Arab", translit = "lez-translit", override_translit = true, display_text = {Cyrl = s["cau-Cyrl-displaytext"]}, strip_diacritics = { Cyrl = s["cau-Cyrl-stripdiacritics"], Latn = s["cau-Latn-stripdiacritics"], }, } m["lfa"] = { "Lefa", 35643, "bnt-baf", } m["lfn"] = { "Lingua Franca Nova", 146803, "art", "Latn, Cyrl", type = "appendix-constructed", } m["lga"] = { "Lungga", 3267590, "poz-ocw", "Latn", } m["lgb"] = { "Laghu", 3216169, "poz-ocw", "Latn", } m["lgg"] = { "Lugbara", 3272737, "csu-mma", "Latn", strip_diacritics = { remove_diacritics = c.acute .. c.grave, from = { "ä", "ɛ", "ë", "ï", "ɔ", "ö" }, to = { "a", "e", "i", "i", "o", "u" }, }, } m["lgh"] = { "Laghuu", 6472114, "tbq-muj", } m["lgi"] = { "Lengilu", 6522465, "poz-swa", "Latn", } m["lgk"] = { "Neverver", 3241515, "poz-vnc", "Latn", } m["lgl"] = { "Wala", 3565284, "poz-sls", } m["lgm"] = { "Lega-Mwenga", 14916883, "bnt-lgb", } m["lgn"] = { "Opuuo", 3354339, "ssa-kom", } m["lgq"] = { "Logba", 35813, "alv-ntg", "Latn", } m["lgr"] = { "Lengo", 3229454, "poz-sls", "Latn", } m["lgs"] = { "Guinea-Bissau Sign Language", 5616441, "sgn", } m["lgt"] = { "Pahi", 7124545, "paa-sep", "Latn", } m["lgu"] = { "Longgu", 3259105, "poz-sls", } m["lgz"] = { "Ligenza", 5531038, "bnt-bun", } m["lha"] = { "Laha (Vietnam)", 3112363, "qfa-kra", } m["lhh"] = { "Laha (Indonesia)", 6473107, "poz-cma", "Latn", } m["lhi"] = { "Lahu Shi", 25559457, "tbq-lho", } m["lhl"] = { "Lahul Lohar", 12953672, } m["lhn"] = { "Lahanan", 12953660, "poz-bnn", "Latn", } m["lhp"] = { "Lhokpu", 3436603, "sit-dhi", } m["lhs"] = { "Mlahsö", 3393063, "sem-cna", "Syrc", } m["lht"] = { "Lo-Toga", 3257566, "poz-vnn", "Latn", } m["lhu"] = { "Lahu", 35780, "tbq-lho", "Latn", } m["lia"] = { "West-Central Limba", 32867815, "alv-lim", } m["lib"] = { "Likum", 3240737, "poz-aay", "Latn", } m["lic"] = { "Hlai", 934738, "qfa-lic", "Latn", } m["lid"] = { "Nyindrou", 3346666, "poz-aay", "Latn", } m["lie"] = { "Likila", 11011614, "bnt-ngn", } m["lif"] = { "Limbu", 56477, "sit-kir", "Limb, Latn, Deva", translit = "lif-translit", } m["lig"] = { "Ligbi", 33594, "dmn-jje", } m["lih"] = { "Lihir", 6546938, "poz-ocw", "Latn", } m["lii"] = { "Lingkhim", 12635536, } m["lij"] = { "Ligurian", 36106, "roa-git", ancestors = "lij-old", "Latn", } m["lik"] = { "Lika", 1530394, "bnt-boa", } m["lil"] = { "Lillooet", 34154, "sal", "Latn", } m["lio"] = { "Liki", 4261493, "poz-ocw", "Latn", } m["lip"] = { "Sekpele", 36257, "alv-ntg", } m["liq"] = { "Libido", 35691, "cus-hec", } m["lir"] = { "Liberian Kreyol", 6541128, "crp", "Latn", ancestors = "en", } m["lis"] = { "Lisu", 56480, "tbq-lso", "Lisu, Latn", override_translit = true, -- Lisu translit, sort_key in [[Module:scripts/data]] } m["liu"] = { "Logorik", 6667811, "sdv-daj", } m["liv"] = { "Livonian", 33698, "urj-fin", "Latn", display_text = { from = {"'"}, to = {"’"} }, strip_diacritics = { remove_diacritics = "'’" .. u(0x2019), from = {"Ǭ", "ǭ"}, to = {"Ō", "ō"} }, sort_key = { from = { "ā", "ä", "ǟ", "ḑ", "ē", "ī", "ļ", "ņ", "ō", "ȯ", "ȱ", "õ", "ȭ", "ö", "ȫ", "ŗ", "š", "ț", "ū", "ü", "ṻ", "ȳ", "ž", }, to = { "a" .. p[1], "a" .. p[2], "a" .. p[3], "d" .. p[1], "e" .. p[1], "i" .. p[1], "l" .. p[1], "n" .. p[1], "o" .. p[1], "o" .. p[2], "o" .. p[3], "o" .. p[4], "o" .. p[5], "o" .. p[6], "o" .. p[7], "r" .. p[1], "s" .. p[1], "t" .. p[1], "u" .. p[1], "u" .. p[2], "u" .. p[3], "y" .. p[1], "z" .. p[1], } } } m["liw"] = { "Col", 2981948, } m["lix"] = { "Liabuku", 13580912, } m["liy"] = { "Banda-Bambari", 11051591, "bad-cnt", "Latn", } m["liz"] = { "Libinza", 4914576, "bnt-zbi", } m["lja"] = { "Golpa", 50934920, "aus-yol", "Latn", } m["lje"] = { "Rampi", 7290041, "poz", } m["lji"] = { "Laiyolo", 6474218, "poz-wot", "Latn", } m["ljl"] = { "Li'o", 2697010, "poz", "Latn", } m["ljp"] = { "Lampung Api", 49215, "poz-lgx", "Latn", } m["ljw"] = { "Yirandali", 17059380, } m["ljx"] = { "Yuru", 63257867, } m["lka"] = { "Lakalei", 12952700, "poz-tim", "Latn", } m["lkb"] = { "Kabras", 63257894, "bnt-msl", "Latn", ancestors = "luy", } m["lkc"] = { "Kucong", 6441572, "tbq-lho", } m["lkd"] = { "Lakondê", 20527166, "sai-nmk", "Latn", } m["lke"] = { "Kenyi", 12952628, "bnt-nyg", } m["lkh"] = { "Lakha", 56606, "sit-tib", } m["lki"] = { "Laki", 56483, "ku", "Arab", translit = "lki-translit", strip_diacritics = {remove_diacritics = c.kasra .. c.sukun}, } m["lkj"] = { "Remun", 7312239, "poz-mly", "Latn", } m["lkl"] = { "Laeko-Libuat", 3504331, "paa-trr", "Latn", } m["lkm"] = { "Kalaamaya", 6349988, "aus-pam", "Latn", } m["lkn"] = { "Lakon", 3216494, "poz-vnn", "Latn", } m["lko"] = { "Khayo", 6401095, "bnt-msl", "Latn", } m["lkr"] = { "Päri", 36487, "sdv-lon", } m["lks"] = { "Kisa", 63259208, "bnt-msl", ancestors = "luy", } m["lkt"] = { "Lakota", 33537, "sio-dkt", "Latn", } m["lku"] = { "Kungkari", 6444526, } m["lky"] = { "Lokoya", 56687, "sdv-lma", } m["lla"] = { "Lala-Roba", 3914878, "alv-yun", } m["llb"] = { "Lolo", 11006056, "bnt-mak", ancestors = "vmw", } m["llc"] = { "Lele (Guinea)", 6520837, "dmn-mok", "Latn", } m["lld"] = { "Ladin", 36202, "roa-rhe", "Latn", } m["lle"] = { "Lele (New Guinea)", 3229269, "poz-aay", "Latn", } m["llf"] = { "Hermit", 3134240, "poz-aay", "Latn", } m["llg"] = { "Lole", 6668883, "poz-tim", } m["llh"] = { "Lamu", 6482736, "tbq-lso", } m["lli"] = { "Teke-Laali", 36543, "bnt-nze", } m["llj"] = { "Ladji-Ladji", 6512694, "aus-pam", "Latn", } m["llk"] = { "Lelak", 3229263, "poz-swa", "Latn", } m["lll"] = { "Lilau", 6547570, "paa-mon", "Latn", } m["llm"] = { "Lasalimu", 6492774, "poz-mun", "Latn", } m["lln"] = { "Lele (Chad)", 1641493, "cdc-est", } -- llo: retired by ISO in 2019 as duplicate of ngt (Kriang); removed from Wiktionary 2026-02-01 m["llp"] = { "North Efate", 3580152, "poz-vnc", "Latn", } m["llq"] = { "Lolak", 12953679, "phi", } m["lls"] = { "Lithuanian Sign Language", 3915480, "sgn", } m["llu"] = { "Lau", 3218574, "poz-sls", "Latn", } m["llx"] = { "Lauan", 35682, "poz-pcc", "Latn", } m["lma"] = { "East Limba", 11034212, "alv-lim", } m["lmb"] = { "Merei", 12952843, "poz-vnn", "Latn", } m["lmc"] = { "Limilngan", 6549414, nil, "Latn", } m["lmd"] = { "Lumun", 35777, "alv-tal", } m["lme"] = { "Pévé", 56249, "cdc-mas", "Latn", } m["lmf"] = { "South Lembata", 7567815, } m["lmg"] = { "Lamogai", 278365, "poz-ocw", "Latn", } m["lmh"] = { "Lambichhong", 6481472, "sit-kie", ancestors = "ybh", } m["lmi"] = { "Lombi", 11259563, "csu-maa", } m["lmj"] = { "West Lembata", 6864697, } m["lmk"] = { "Lamkang", 12952703, "tbq-kuk", } m["lml"] = { "Raga", 3063193, "poz-vnn", "Latn", } m["lmn"] = { "Lambadi", 33474, "raj", "Latn", } m["lmo"] = { "Lombard", 33754, "roa-git", ancestors = "lmo-old", "Latn", } m["lmp"] = { "Limbum", 35801, "nic-nka", "Latn", } m["lmq"] = { "Lamatuka", 6480982, "poz-cet", "Latn", } m["lmr"] = { "Lamalera", 6480787, "poz-cet", } m["lmu"] = { "Lamenu", 740604, "poz-vnc", "Latn", } m["lmv"] = { "Lomaiviti", 3130221, "poz-pcc", "Latn", } m["lmw"] = { "Lake Miwok", 3216471, "nai-utn", "Latn", } m["lmx"] = { "Laimbue", 6473933, "nic-rnw", } m["lmy"] = { "Laboya", 6481538, "poz-cet", "Latn", sort_key = "lmy-sortkey", } -- Lumbee [lmz] is spurious m["lna"] = { "Langbashe", 11137550, "bad", } m["lnb"] = { "Mbalanhu", 12952830, "bnt-ova", } m["lnd"] = { "Lun Bawang", 13479839, "poz-swa", "Latn", } m["lnh"] = { "Lanoh", 6487291, "mkh-asl", } m["lni"] = { "Daantanai'", 5207384, "paa-sbo", "Latn", } m["lnj"] = { "Linngithigh", 3915694, "aus-pmn", "Latn", } m["lnl"] = { "South Central Banda", 41354532, "bad", } m["lnm"] = { "Pondi", 6485678, "paa-wke", "Latn", } m["lnn"] = { "Lorediakarkar", 6680287, "poz-vnn", "Latn", } m["lno"] = { "Lango (Sudan)", 223306, "sdv-lma", } m["lns"] = { "Lamnso'", 35788, "nic-rng", } m["lnu"] = { "Longuda", 35797, "alv-bam", "Latn", } m["lnw"] = { "Lanima", 56825017, "aus-pam", "Latn", } m["loa"] = { "Loloda", 6669025, "paa-lla", "Latn", } m["lob"] = { "Lobi", 35807, } m["loc"] = { "Inonhan", 2400870, "phi", "Latn", } m["lod"] = { "Berawan", 4891018, "poz-swa", "Latn", } m["loe"] = { "Saluan", 12953867, "poz", "Latn", } m["lof"] = { "Logol", 35779, "alv-hei", } m["log"] = { "Logo", 2613477, "csu-mma", } m["loh"] = { "Narim", 56353, "sdv", } m["loi"] = { "Lomakka", 3913961, "alv-kul", } m["loj"] = { "Lou", 3260104, "poz-aay", "Latn", } m["lok"] = { "Loko", 3914912, "dmn-msw", "Latn", } m["lol"] = { "Mongo", 112893, "bnt-mon", "Latn", } m["lom"] = { "Loma", 35885, "dmn-msw", "Latn, Loma" } m["lon"] = { "Malawi Lomwe", 10975286, "bnt-mak", "Latn", } m["loo"] = { "Lombo", 11167192, "bnt-ske", } m["lop"] = { "Lopa", 3914875, } m["loq"] = { "Lobala", 4849710, "bnt-ngn", } m["lor"] = { "Téén", 36467, "alv-kul", } m["los"] = { "Loniu", 3259202, "poz-aay", "Latn", } m["lot"] = { "Lotuko", 56672, "sdv-lma", } m["lou"] = { "Louisiana Creole", 1185127, "crp", "Latn", ancestors = "fr", sort_key = s["roa-oil-sortkey"], } m["lov"] = { "Lopi", 12952740, "tbq-tal", } m["low"] = { "Tampias Lobu", 12953674, } m["lox"] = { "Loun", 6689636, "poz-cet", "Latn", } m["loz"] = { "Lozi", 33628, "bnt-sts", "Latn", } m["lpa"] = { "Lelepa", 3229273, "poz-vnc", "Latn", } m["lpe"] = { "Lepki", 4259152, "paa-lmu", "Latn", } m["lpn"] = { "Long Phuri Naga", 6673049, "sit-aao", } m["lpo"] = { "Lipo", 56921, "tbq-llo", "Plrd", } m["lpx"] = { "Lopit", 56684, "sdv-lma", "Latn", } m["lra"] = { "Rara Bakati'", 3419746, "day", } m["lrc"] = { "Northern Luri", 19933293, "ira-lur", "Arab", ancestors = "pal", } m["lre"] = { "Laurentian", 1790301, "iro-nor", "Latn", } m["lrg"] = { "Laragia", 2591193, } m["lri"] = { "Marachi", 6754565, "bnt-msl", } m["lrk"] = { "Loarki", 6663513, } m["lrl"] = { "Larestani", 33468, "ira-swi", "Arab", } m["lrm"] = { "Marama", 6325931, "bnt-msl", ancestors = "luy", } m["lrn"] = { "Lorang", 6678781, } m["lro"] = { "Laro", 35687, "alv-hei", } m["lrr"] = { "Southern Lorung", 12952742, "sit-kie", } m["lrt"] = { "Larantuka Malay", 6488691, "poz-mly", "Latn", } m["lrv"] = { "Larevat", 3217892, "poz-vnc", "Latn", } m["lrz"] = { "Lemerig", 2028448, "poz-vnn", "Latn", } m["lsa"] = { "Lasgerdi", 3218296, "ira-kms", "Arab", } m["lsb"] = { "Burundian Sign Language", 105196488, "sgn-asl", } m["lsd"] = { "Lishana Deni", 3436461, "sem-nna", "Hebr", -- Hebr display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["lse"] = { "Lusengo", 6683546, "bnt-zbi", } m["lsh"] = { "Lish", 6558822, "sit-khc", } m["lsi"] = { "Lashi", 6493203, "tbq-brm", "Latn", } m["lsl"] = { "Latvian Sign Language", 6497414, "sgn", } m["lsm"] = { "Saamia", 3739441, "bnt-msl", } m["lsn"] = { "Tibetan Sign Language", 15936110, "sgn", } m["lso"] = { "Laos Sign Language", 6488022, "sgn", } m["lsp"] = { "Panamanian Sign Language", 7129968, "sgn-asl", } m["lsr"] = { "Aruop", 3450566, "paa-pal", "Latn", } m["lss"] = { "Lasi", 12953669, "inc-snd", "Arab", ancestors = "sd", } m["lst"] = { "Trinidad and Tobago Sign Language", 7842495, "sgn", } m["lsv"] = { "Sivia Sign Language", 55558911, "sgn", } m["lsw"] = { "Seychelles Sign Language", 110721423, "sgn", } m["lsy"] = { "Mauritian Sign Language", 6793754, "sgn", } m["ltc"] = { "Middle Chinese", 2016252, "zhx", "Hant, Phag, Tang", translit = {Hant = "zh-translit"}, -- Tang translit in [[Module:scripts/data]]; NOTE: Previously not present, presumably an accidental omission. sort_key = {Hant = "Hani-sortkey"}, } m["ltg"] = { "Latgalian", 36212, "bat-eas", "Latn", } m["lti"] = { "Leti", 3236912, "poz-tim", "Latn", } m["ltn"] = { "Latundê", 63259736, "sai-nmk", "Latn", } m["lto"] = { "Olutsotso", 63259915, "bnt-msl", ancestors = "luy", } m["lts"] = { "Lutachoni", 63283459, "bnt-msl", "Latn", } m["ltu"] = { "Latu", 6497181, "poz-cma", "Latn", } m["lua"] = { "Luba-Kasai", 34173, "bnt-lub", "Latn", } m["luc"] = { "Aringa", 56556, "csu-mma", "Latn", } m["lud"] = { "Ludian", 33918, "urj-fin", "Latn", display_text = { from = {"'"}, to = {"ʹ"} }, strip_diacritics = { from = {"'"}, to = {"ʹ"} }, sort_key = { from = { "č", "š", "ž", "ü", "ä", "ö", -- 2 chars "z", "ʹ" -- 1 char }, to = { "c" .. p[1], "s" .. p[1], "s" .. p[3], "y" .. p[1], "y" .. p[2], "y" .. p[3], "s" .. p[2], "y" .. p[4], } }, } m["lue"] = { "Luvale", 33597, "bnt-clu", "Latn", } m["luf"] = { "Laua", 6497673, "paa-mal", "Latn", } m["luh"] = { "Leizhou Min", 1988433, "zhx-nan", "Hants", generate_forms = "zh-generateforms", sort_key = "Hani-sortkey", } m["lui"] = { "Luiseño", 56236, "azc-cup", "Latn", strip_diacritics = {remove_diacritics = c.acute .. c.circ}, } m["luj"] = { "Luna", 11003832, "bnt-lbn", } m["luk"] = { "Lunanakha", 56446, "sit-tib", "Tibt", ancestors = "dz", override_translit = true, -- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["lul"] = { "Olu'bo", 6589401, "csu-mma", } m["lum"] = { "Luimbi", 10963134, "bnt-clu", } m["lun"] = { "Lunda", 33607, "bnt-lun", "Latn", } m["luo"] = { "Luo", 5414796, "sdv-los", "Latn", } m["lup"] = { "Lumbu", 35793, "bnt-sir", } m["luq"] = { "Lucumí", 1768321, "alv-yor", "Latn", ancestors = "yo", sort_key = { remove_diacritics = c.acute, }, } m["lur"] = { "Laura", 2984540, } m["lus"] = { "Mizo", 36147, "tbq-kuk", "Latn", } m["lut"] = { "Lushootseed", 33658, "sal", "Latn", } m["luu"] = { "Lumba-Yakkha", 6703050, "sit-kie", ancestors = "ybh", } m["luv"] = { "Luwati", 33402, "inc-snd", "Khoj", } m["luy"] = { "Luhya", 35893, "bnt-msl", "Latn", } m["luz"] = { "Southern Luri", 12952748, "ira-lur", "Arab", ancestors = "pal", } m["lva"] = { "Maku'a", 35790, "poz-tim", } m["lvi"] = { "Lawi", 6502657, "mkh-ban", "Latn", } m["lvk"] = { "Lavukaleve", 770547, "qfa-dis", -- Papuan; isolate in Glottolog; in the tentative Central Solomons family by Ross (2005) and Pedrós -- (2015) "Latn", } m["lvl"] = { "Lwel", 93936908, "bnt-bdz", "Latn", } m["lvu"] = { "Levuka", 6535860, } m["lwa"] = { "Lwalu", 6706953, "bnt-lbn", } m["lwe"] = { "Lewo Eleng", 6537465, } m["lwg"] = { "Wanga", nil, "bnt-msl", ancestors = "luy", } m["lwh"] = { "White Lachi", 8842956, "qfa-kra", } m["lwl"] = { "Eastern Lawa", 18644464, "mkh-pal", "Thai", sort_key = "Thai-sortkey", } m["lwm"] = { "Laomian", 19597674, "tbq-bis", } m["lwo"] = { "Luwo", 56362, "sdv-lon", "Latn", } m["lws"] = { "Malawian Sign Language", 47522462, "sgn", } m["lwt"] = { "Lewotobi", 14916885, "poz-cet", } m["lwu"] = { "Lawu", 6505073, "tbq-lwo", } m["lww"] = { "Lewo", 3237321, "poz-vnc", "Latn", } m["lxm"] = { "Lakurumau", 31031407, "poz-ocw", "Latn", } m["lya"] = { "Layakha", 56602, "sit-tib", "Tibt", ancestors = "dz", override_translit = true, -- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]] } m["lyg"] = { "Lyngngam", 12635902, "aav-pkl", } m["lyn"] = { "Luyana", 3268098, } m["lzh"] = { "Classical Chinese", 37041, "zhx", "Hant", wikimedia_codes = "zh-classical", translit = "zh-translit", sort_key = "Hani-sortkey", } m["lzl"] = { "Litzlitz", 6653424, "poz-vnc", "Latn", } m["lzn"] = { "Leinong Naga", 5924455, "sit-kch", } m["lzz"] = { "Laz", 1160372, "ccs-zan", "Geor, Latn", translit = {Geor = "lzz-translit"}, override_translit = true, strip_diacritics = {remove_diacritics = c.grave .. c.acute .. c.circ}, } return require("Module:languages").finalizeData(m, "language") qdo0gct42ag5go39v0xja3vwi5qgx39 श्रेणी:पुनर्प्रेषण 14 304822 488016 478805 2026-09-04T08:08:04Z SM7 6218 implementing "auto cat" 488016 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx मॉड्यूल:affix/templates 828 304980 487939 479698 2026-09-03T17:28:44Z SM7 6218 updating...BIG 487939 Scribunto text/plain local export = {} local m_affix = require("Module:affix") local m_utilities = require("Module:utilities") local en_utilities_module = "Module:en-utilities" local parameter_utilities_module = "Module:parameter utilities" local pseudo_loan_module = "Module:affix/pseudo-loan" local insert = table.insert local boolean_param = {type = "boolean"} local function is_property_key(k) return require(parameter_utilities_module).item_key_is_property(k) end local recognized_affix_types = { prefix = "prefix", pre = "prefix", suffix = "suffix", suf = "suffix", interfix = "interfix", inter = "interfix", infix = "infix", ["in"] = "infix", circumfix = "circumfix", circum = "circumfix", ["non-affix"] = "non-affix", naf = "non-affix", root = "non-affix", } local function pre_normalize_affix_type(data) local modtext = data.modtext modtext = modtext:match("^<(.*)>$") if not modtext then error(("Internal error: Passed-in modifier isn't surrounded by angle brackets: %s"):format(data.modtext)) end if recognized_affix_types[modtext] then modtext = "type:" .. modtext end return "<" .. modtext .. ">" end -- Parse raw arguments. A single parameter `data` is passed in, with the following fields: -- * `raw_args`: The raw arguments to parse, normally taken from `frame:getParent().args`. -- * `extra_params`: An optional function of one argument that is called on the `params` structure before parsing; its -- purpose is to specify additional allowed parameters or possibly disable parameters. -- * `has_source`: There is a source-language parameter following 1= (which becomes the "destination" language -- parameter) and preceding the terms. This is currently used for {{pseudo-loan}}. -- * `ilang`: If given, it is a language object that serves as the default for the language. If specified, there is no -- language code specified in 1=; instead the term parameters start directly at 1= (or at 2= if `has_source` is -- given). -- * `require_index_for_pos`: There is no separate |pos= parameter distinct from |pos1=, |pos2=, etc. Instead, -- specifying |pos= results in an error. -- * `dont_require_index`: Allow |foo= to be specified as a synonym for |foo1= (except for |lit=, which remains -- distinct). -- * `allow_type`: Allow |type1=, |type2=, etc. or inline <type:...> for the affix type, and allow a separate |type= -- parameter for the etymology type (FIXME: this may be confusing; consider changing the etymology type to |etype=). -- * `allow_semicolon_separator`: Allow semicolon as a separator, displaying as " or ". This requires changes in the -- display of the output, to not always put a + between the items. -- -- Note that all language parameters are allowed to be etymology-only languages. -- -- Return five values ARGS, ITEMS, LANG_OBJ, SCRIPT_OBJ, SOURCE_LANG_OBJ where ARGS is a table of the parsed arguments; -- ITEMS is the list of parsed items; LANG_OBJ is the language object corresponding to the language code specified in 1= -- (or taken from `ilang` if given); SCRIPT_OBJ is the script object corresponding to sc= (if given, otherwise nil); and -- SOURCE_LANG_OBJ is the language object corresponding to the source-language code specified in 2= (or 1= if `ilang` is -- given) if `has_source` is specified (otherwise nil). local function parse_args(data) local raw_args = data.raw_args local has_source = data.has_source local ilang = data.ilang if raw_args.lang then error("The |lang= parameter is not used by this template. Place the language code in parameter 1 instead.") end local term_index = (ilang and 1 or 2) + (has_source and 1 or 0) local params = { [term_index] = {list = true, allow_holes = true}, ["sort"] = {}, ["nocap"] = boolean_param, -- always allow this even if not used, for use with {{surf}}, which adds it } if not ilang then params[1] = {required = true, type = "language", default = "und"} end local source_index if has_source then source_index = term_index - 1 params[source_index] = {required = true, type = "language", default = "und"} end local m_param_utils = require(parameter_utilities_module) local param_mod_source = {} if not data.dont_require_index then insert(param_mod_source, -- We want to require an index for all params (or use separate_no_index, which also requires an index for the -- param corresponding to the first item). {default = true, require_index = true} ) end insert(param_mod_source, {group = {"link", "ref", "lang", "q", "l", "infl"}}) -- Override lit= to be separate from lit1=. insert(param_mod_source, {param = "lit", separate_no_index = true}) if not data.dont_require_index and not data.require_index_for_pos then -- Override pos= to be separate from pos1=. insert(param_mod_source, {param = "pos", separate_no_index = true}) end if data.allow_type then insert(param_mod_source, {param = "type", separate_no_index = true}) end local param_mods = m_param_utils.construct_param_mods(param_mod_source) if data.extra_params then data.extra_params(params) end local items, args = m_param_utils.parse_list_with_inline_modifiers_and_separate_params { params = params, param_mods = param_mods, raw_args = raw_args, termarg = term_index, parse_lang_prefix = true, track_module = "homophones", -- the inclusion of &lrm; is what [[Module:affix]] has always done default_separator = data.allow_semicolon_separator and " +&lrm; " or nil, special_separators = data.allow_semicolon_separator and {[";"] = " or "} or nil, disallow_custom_separators = not data.allow_semicolon_separator, -- For compatibility, we need to not skip completely unspecified items. It is common, for example, to do -- {{suffix|lang||foo}} to generate "+ -foo". dont_skip_items = true, -- Allow e.g. <infix> to be specified in place of <type:infix>. pre_normalize_modifiers = pre_normalize_affix_type, -- Don't pass in `lang` or `sc`, as they will be used as defaults to initialize the items, which we don't want -- (particularly for `lang`), as the code in [[Module:affix]] uses the presence of `lang` as an indicator that -- a part-specific language was explicitly given. } local lang = ilang or args[1] local source if has_source then source = args[source_index] end -- For compatibility with the prior code, we need to convert items without term or properties to nil. for i = 1, #items do local item = items[i] local saw_item_property = item.term if not saw_item_property then for k, v in pairs(item) do if is_property_key(k) then saw_item_property = true break end end end if not saw_item_property then items[i] = nil elseif item.type then -- Validate and canonicalize affix types. if not recognized_affix_types[item.type] then local valid_types = {} for k in pairs(recognized_affix_types) do insert(valid_types, ("'%s'"):format(k)) end table.sort(recognized_affix_types) error(("Unrecognized affix type '%s' in item %s; valid values are %s"):format( item.type, item.itemno, table.concat(valid_types, ", "))) else item.type = recognized_affix_types[item.type] end end end if args.type and args.type.default and not m_affix.etymology_types[args.type.default] then error("Unrecognized etymology type: '" .. args.type.default .. "'") end return args, items, lang, args.sc.default, source end local function augment_affix_data(data, args, lang, sc) data.lang = lang data.sc = sc data.pos = args.pos and args.pos.default data.lit = args.lit and args.lit.default data.sort_key = args.sort data.type = args.type and args.type.default data.nocap = args.nocap data.notext = args.notext data.nocat = args.nocat data.force_cat = args.force_cat data.l = args.l.default data.ll = args.ll.default data.q = args.q.default data.qq = args.qq.default data.infl = args.infl.default return data end function export.affix(frame) local function extra_params(params) params.notext = boolean_param params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc = parse_args { raw_args = frame:getParent().args, extra_params = extra_params, allow_type = true, allow_semicolon_separator = true, } -- There must be at least one part to display. If there are gaps, a term -- request will be shown. if not next(parts) and not args.type.default then if mw.title.getCurrentTitle().nsText == "Template" then parts = { {term = "prefix-"}, {term = "base"}, {term = "-suffix"} } else error("You must provide at least one part.") end end return m_affix.show_affix(augment_affix_data({ parts = parts }, args, lang, sc)) end function export.compound(frame) local function extra_params(params) params.notext = boolean_param params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc = parse_args { raw_args = frame:getParent().args, extra_params = extra_params, allow_type = true, allow_semicolon_separator = true, } -- There must be at least one part to display. If there are gaps, a term -- request will be shown. if not next(parts) and not args.type.default then if mw.title.getCurrentTitle().nsText == "Template" then parts = { {term = "first"}, {separator = " +&lrm; ", term = "second"} } else error("You must provide at least one part of a compound.") end end return m_affix.show_compound(augment_affix_data({ parts = parts }, args, lang, sc)) end -- FIXME: Temporary for check in compound_like() below for old-style {{contraction}} parameters. Remove eventually. local function ine(arg) if arg == "" then return nil else return arg end end function export.compound_like(frame) local iparams = { ["lang"] = {type = "language"}, ["template"] = {}, ["text"] = {}, ["oftext"] = {}, ["cat"] = {}, ["noaffixcat"] = boolean_param, ["dont_require_index"] = boolean_param, } local iargs = require("Module:parameters").process(frame.args, iparams) local parent_args = frame:getParent().args -- Error to catch most uses of old-style parameters for {{contraction}}. (FIXME: Remove eventually.) local term_param = iargs.lang and 1 or 2 if ine(parent_args[term_param + 2]) and not ine(parent_args[term_param + 1]) and not ine(parent_args.tr2) and not ine(parent_args.ts2) and not ine(parent_args.t2) and not ine(parent_args.gloss2) and not ine(parent_args.g2) and not ine(parent_args.alt2) then error(("You specified a term in %s= and not one in %s=. You probably meant to use t= to specify a gloss instead. " .. "If you intended to specify two terms, put the second term in %s=."):format(term_param + 2, term_param + 1, term_param + 1)) end if not ine(parent_args[term_param + 1]) and not ine(parent_args.alt2) and not ine(parent_args.tr2) and not ine(parent_args.ts2) and ine(parent_args.g2) then error(("You specified a gender in g2= but no term in %s=. You were probably trying to specify two genders for " .. "a single term. To do that, put both genders in g=, comma-separated."):format(term_param + 1)) end local function extra_params(params) params.notext = boolean_param params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc = parse_args { raw_args = parent_args, extra_params = extra_params, ilang = iargs.lang, dont_require_index = iargs.dont_require_index, -- FIXME, why are we doing this? Formerly we had 'params.pos = nil' whose intention was to disable the overall -- pos= while preserving posN=, which is equivalent to the following using the new syntax. But why is this -- necessary? require_index_for_pos = not iargs.dont_require_index, allow_semicolon_separator = true, } local template = iargs.template local nocat = args.nocat local notext = args.notext local text = not notext and iargs.text local oftext = not notext and (iargs.oftext or text and "of") local cat = not nocat and iargs.cat local noaffixcat = nocat or iargs.noaffixcat if not next(parts) then if mw.title.getCurrentTitle().nsText == "Template" then parts = { {term = "first"}, {separator = " +&lrm; ", term = "second"} } end end return m_affix.show_compound_like(augment_affix_data({ parts = parts, text = text, oftext = oftext, cat = cat, noaffixcat = noaffixcat }, args, lang, sc)) end function export.surface_analysis(frame) local function ine(arg) -- Since we're operating before calling [[Module:parameters]], we need to imitate how that module processes -- arguments, including trimming since numbered arguments don't have automatic whitespace trimming. if not arg then return arg end arg = mw.text.trim(arg) if arg == "" then arg = nil end return arg end local parent_args = frame:getParent().args local etymtext local arg1 = ine(parent_args[1]) if not arg1 then -- Allow omitted first argument to just display "By surface analysis". etymtext = "" elseif arg1:find("^%+") then -- If the first argument (normally a language code) is prefixed with a +, it's a template name. local template_name = arg1:sub(2) local new_args = {} for i, v in pairs(parent_args) do if type(i) == "number" then if i > 1 then new_args[i - 1] = v end else new_args[i] = v end end new_args.nocap = true etymtext = ", " .. frame:expandTemplate { title = template_name, args = new_args } end if etymtext then return (ine(parent_args.nocap) and "b" or "B") .. "y [[Appendix:Glossary#surface analysis|surface analysis]]" .. etymtext end local function extra_params(params) params.notext = boolean_param params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc = parse_args { raw_args = parent_args, extra_params = extra_params, allow_type = true, allow_semicolon_separator = true, } -- There must be at least one part to display. If there are gaps, a term -- request will be shown. if not next(parts) then if mw.title.getCurrentTitle().nsText == "Template" then parts = { {term = "first"}, {separator = " +&lrm; ", term = "second"} } else error("You must provide at least one part.") end end return m_affix.show_surface_analysis(augment_affix_data({ parts = parts }, args, lang, sc)) end local function check_max_items(items, max_allowed) if #items > max_allowed then local bad_item = items[max_allowed + 1] if bad_item.term then error(("At most %s terms can be specified but saw a term specified for term #%s") :format(max_allowed, max_allowed + 1)) else for k, v in pairs(bad_item) do if is_property_key(k) then error(("At most %s terms can be specified but saw a value for property '%s' of term #%s") :format(max_allowed, k, max_allowed + 1)) end end end error(("Internal error: Something wrong, %s items generated when there should be at most %s, but item #%s doesn't have a term or any properties") :format(#items, max_allowed, max_allowed + 1)) end end function export.circumfix(frame) local function extra_params(params) params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc = parse_args { raw_args = frame:getParent().args, extra_params = extra_params, } check_max_items(parts, 3) local prefix = parts[1] local base = parts[2] local suffix = parts[3] -- Just to make sure someone didn't use the template in a silly way if not (prefix and base and suffix) then if mw.title.getCurrentTitle().nsText == "Template" then prefix = {term = "circumfix", alt = "prefix"} base = {term = "base"} suffix = {term = "circumfix", alt = "suffix"} else error("You must specify a prefix part, a base term and a suffix part.") end end return m_affix.show_circumfix(augment_affix_data({ prefix = prefix, base = base, suffix = suffix }, args, lang, sc)) end function export.confix(frame) local function extra_params(params) params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc = parse_args { raw_args = frame:getParent().args, extra_params = extra_params, } check_max_items(parts, 3) local prefix = parts[1] local base = parts[3] and parts[2] or nil local suffix = parts[3] or parts[2] -- Just to make sure someone didn't use the template in a silly way if not (prefix and suffix) then if mw.title.getCurrentTitle().nsText == "Template" then prefix = {term = "prefix"} suffix = {term = "suffix"} else error("You must specify a prefix part, an optional base term and a suffix part.") end end return m_affix.show_confix(augment_affix_data({ prefix = prefix, base = base, suffix = suffix }, args, lang, sc)) end function export.pseudo_loan(frame) local function extra_params(params) params.notext = boolean_param params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc, source = parse_args { raw_args = frame:getParent().args, extra_params = extra_params, has_source = true, -- FIXME, why are we doing this? Formerly we had 'params.pos = nil' whose intention was to disable the overall -- pos= while preserving posN=, which is equivalent to the following using the new syntax. But why is this -- necessary? require_index_for_pos = true, allow_semicolon_separator = true, } return require(pseudo_loan_module).show_pseudo_loan( augment_affix_data({ source = source, parts = parts }, args, lang, sc)) end function export.infix(frame) local function extra_params(params) params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc = parse_args { raw_args = frame:getParent().args, extra_params = extra_params, } check_max_items(parts, 3) local base = parts[1] local infix = parts[2] -- Just to make sure someone didn't use the template in a silly way if not (base and infix) then if mw.title.getCurrentTitle().nsText == "Template" then base = {term = "base"} infix = {term = "infix"} else error("You must provide a base term and an infix.") end end return m_affix.show_infix(augment_affix_data({ base = base, infix = infix }, args, lang, sc)) end function export.prefix(frame) local function extra_params(params) params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc = parse_args { raw_args = frame:getParent().args, extra_params = extra_params, } local prefixes = parts local base = nil local max_prefix = 0 for k, v in pairs(prefixes) do max_prefix = math.max(k, max_prefix) end if max_prefix >= 2 then base = prefixes[max_prefix] prefixes[max_prefix] = nil end -- Just to make sure someone didn't use the template in a silly way if not next(prefixes) then if mw.title.getCurrentTitle().nsText == "Template" then base = {term = "base"} prefixes = { {term = "prefix"} } else error("You must provide at least one prefix.") end end return m_affix.show_prefix(augment_affix_data({ prefixes = prefixes, base = base }, args, lang, sc)) end function export.suffix(frame) local function extra_params(params) params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc = parse_args { raw_args = frame:getParent().args, extra_params = extra_params, } local base = parts[1] local suffixes = {} for k, v in pairs(parts) do suffixes[k - 1] = v end -- Just to make sure someone didn't use the template in a silly way if not next(suffixes) then if mw.title.getCurrentTitle().nsText == "Template" then base = {term = "base"} suffixes = { {term = "suffix"} } else error("You must provide at least one suffix.") end end return m_affix.show_suffix(augment_affix_data({ base = base, suffixes = suffixes }, args, lang, sc)) end function export.derivsee(frame) local iargs = frame.args local iparams = { ["derivtype"] = {}, } local iargs = require("Module:parameters").process(frame.args, iparams) local params = { ["head"] = {}, ["id"] = {}, ["sc"] = {type = "script"}, ["pos"] = {}, } local derivtype = iargs.derivtype params[1] = {required = "true", type = "language", default = "und"} params[2] = {} local args = require("Module:parameters").process(frame:getParent().args, params) local lang = args[1] local term = args[2] or args.head local id = args.id local sc = args.sc local pos = require(en_utilities_module).pluralize(args.pos or "term") if not term then local SUBPAGE = mw.loadData("Module:headword/data").pagename if lang:hasType("reconstructed") or mw.title.getCurrentTitle().nsText == "Reconstruction" then term = "*" .. SUBPAGE elseif lang:hasType("appendix-constructed") then term = SUBPAGE else term = SUBPAGE end end local category = nil local langname = lang:getFullName() if (derivtype == "compound" and pos == nil) then category = langname .. " compounds with " .. term elseif derivtype == "compound" and pos == "verbs" then category = langname .. " compound " .. pos .. " formed with " .. term elseif derivtype == "compound" then category = langname .. " compound " .. pos .. " with " .. term else category = langname .. " " .. pos .. " " .. derivtype .. "ed with " .. term .. (id and " (" .. id .. ")" or "") end return require('Module:collapsible category tree').make{ lang = lang, sc = sc, category = category, } end return export 701ci4kau9yagdq4na1uqxca6idigvq 487940 487939 2026-09-03T17:31:54Z SM7 6218 localization...still 487940 Scribunto text/plain local export = {} local m_affix = require("Module:affix") local m_utilities = require("Module:utilities") local en_utilities_module = "Module:en-utilities" local parameter_utilities_module = "Module:parameter utilities" local pseudo_loan_module = "Module:affix/pseudo-loan" local insert = table.insert local boolean_param = {type = "boolean"} local function is_property_key(k) return require(parameter_utilities_module).item_key_is_property(k) end local recognized_affix_types = { prefix = "prefix", pre = "prefix", suffix = "suffix", suf = "suffix", interfix = "interfix", inter = "interfix", infix = "infix", ["in"] = "infix", circumfix = "circumfix", circum = "circumfix", ["non-affix"] = "non-affix", naf = "non-affix", root = "non-affix", } local function pre_normalize_affix_type(data) local modtext = data.modtext modtext = modtext:match("^<(.*)>$") if not modtext then error(("Internal error: Passed-in modifier isn't surrounded by angle brackets: %s"):format(data.modtext)) end if recognized_affix_types[modtext] then modtext = "type:" .. modtext end return "<" .. modtext .. ">" end -- Parse raw arguments. A single parameter `data` is passed in, with the following fields: -- * `raw_args`: The raw arguments to parse, normally taken from `frame:getParent().args`. -- * `extra_params`: An optional function of one argument that is called on the `params` structure before parsing; its -- purpose is to specify additional allowed parameters or possibly disable parameters. -- * `has_source`: There is a source-language parameter following 1= (which becomes the "destination" language -- parameter) and preceding the terms. This is currently used for {{pseudo-loan}}. -- * `ilang`: If given, it is a language object that serves as the default for the language. If specified, there is no -- language code specified in 1=; instead the term parameters start directly at 1= (or at 2= if `has_source` is -- given). -- * `require_index_for_pos`: There is no separate |pos= parameter distinct from |pos1=, |pos2=, etc. Instead, -- specifying |pos= results in an error. -- * `dont_require_index`: Allow |foo= to be specified as a synonym for |foo1= (except for |lit=, which remains -- distinct). -- * `allow_type`: Allow |type1=, |type2=, etc. or inline <type:...> for the affix type, and allow a separate |type= -- parameter for the etymology type (FIXME: this may be confusing; consider changing the etymology type to |etype=). -- * `allow_semicolon_separator`: Allow semicolon as a separator, displaying as " or ". This requires changes in the -- display of the output, to not always put a + between the items. -- -- Note that all language parameters are allowed to be etymology-only languages. -- -- Return five values ARGS, ITEMS, LANG_OBJ, SCRIPT_OBJ, SOURCE_LANG_OBJ where ARGS is a table of the parsed arguments; -- ITEMS is the list of parsed items; LANG_OBJ is the language object corresponding to the language code specified in 1= -- (or taken from `ilang` if given); SCRIPT_OBJ is the script object corresponding to sc= (if given, otherwise nil); and -- SOURCE_LANG_OBJ is the language object corresponding to the source-language code specified in 2= (or 1= if `ilang` is -- given) if `has_source` is specified (otherwise nil). local function parse_args(data) local raw_args = data.raw_args local has_source = data.has_source local ilang = data.ilang if raw_args.lang then error("The |lang= parameter is not used by this template. Place the language code in parameter 1 instead.") end local term_index = (ilang and 1 or 2) + (has_source and 1 or 0) local params = { [term_index] = {list = true, allow_holes = true}, ["sort"] = {}, ["nocap"] = boolean_param, -- always allow this even if not used, for use with {{surf}}, which adds it } if not ilang then params[1] = {required = true, type = "language", default = "und"} end local source_index if has_source then source_index = term_index - 1 params[source_index] = {required = true, type = "language", default = "und"} end local m_param_utils = require(parameter_utilities_module) local param_mod_source = {} if not data.dont_require_index then insert(param_mod_source, -- We want to require an index for all params (or use separate_no_index, which also requires an index for the -- param corresponding to the first item). {default = true, require_index = true} ) end insert(param_mod_source, {group = {"link", "ref", "lang", "q", "l", "infl"}}) -- Override lit= to be separate from lit1=. insert(param_mod_source, {param = "lit", separate_no_index = true}) if not data.dont_require_index and not data.require_index_for_pos then -- Override pos= to be separate from pos1=. insert(param_mod_source, {param = "pos", separate_no_index = true}) end if data.allow_type then insert(param_mod_source, {param = "type", separate_no_index = true}) end local param_mods = m_param_utils.construct_param_mods(param_mod_source) if data.extra_params then data.extra_params(params) end local items, args = m_param_utils.parse_list_with_inline_modifiers_and_separate_params { params = params, param_mods = param_mods, raw_args = raw_args, termarg = term_index, parse_lang_prefix = true, track_module = "homophones", -- the inclusion of &lrm; is what [[Module:affix]] has always done default_separator = data.allow_semicolon_separator and " +&lrm; " or nil, special_separators = data.allow_semicolon_separator and {[";"] = " or "} or nil, disallow_custom_separators = not data.allow_semicolon_separator, -- For compatibility, we need to not skip completely unspecified items. It is common, for example, to do -- {{suffix|lang||foo}} to generate "+ -foo". dont_skip_items = true, -- Allow e.g. <infix> to be specified in place of <type:infix>. pre_normalize_modifiers = pre_normalize_affix_type, -- Don't pass in `lang` or `sc`, as they will be used as defaults to initialize the items, which we don't want -- (particularly for `lang`), as the code in [[Module:affix]] uses the presence of `lang` as an indicator that -- a part-specific language was explicitly given. } local lang = ilang or args[1] local source if has_source then source = args[source_index] end -- For compatibility with the prior code, we need to convert items without term or properties to nil. for i = 1, #items do local item = items[i] local saw_item_property = item.term if not saw_item_property then for k, v in pairs(item) do if is_property_key(k) then saw_item_property = true break end end end if not saw_item_property then items[i] = nil elseif item.type then -- Validate and canonicalize affix types. if not recognized_affix_types[item.type] then local valid_types = {} for k in pairs(recognized_affix_types) do insert(valid_types, ("'%s'"):format(k)) end table.sort(recognized_affix_types) error(("Unrecognized affix type '%s' in item %s; valid values are %s"):format( item.type, item.itemno, table.concat(valid_types, ", "))) else item.type = recognized_affix_types[item.type] end end end if args.type and args.type.default and not m_affix.etymology_types[args.type.default] then error("Unrecognized etymology type: '" .. args.type.default .. "'") end return args, items, lang, args.sc.default, source end local function augment_affix_data(data, args, lang, sc) data.lang = lang data.sc = sc data.pos = args.pos and args.pos.default data.lit = args.lit and args.lit.default data.sort_key = args.sort data.type = args.type and args.type.default data.nocap = args.nocap data.notext = args.notext data.nocat = args.nocat data.force_cat = args.force_cat data.l = args.l.default data.ll = args.ll.default data.q = args.q.default data.qq = args.qq.default data.infl = args.infl.default return data end function export.affix(frame) local function extra_params(params) params.notext = boolean_param params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc = parse_args { raw_args = frame:getParent().args, extra_params = extra_params, allow_type = true, allow_semicolon_separator = true, } -- There must be at least one part to display. If there are gaps, a term -- request will be shown. if not next(parts) and not args.type.default then if mw.title.getCurrentTitle().nsText == "साँचा" then parts = { {term = "prefix-"}, {term = "base"}, {term = "-suffix"} } else error("आपको कम-से-कम कोई एक हिस्सा देना होगा") end end return m_affix.show_affix(augment_affix_data({ parts = parts }, args, lang, sc)) end function export.compound(frame) local function extra_params(params) params.notext = boolean_param params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc = parse_args { raw_args = frame:getParent().args, extra_params = extra_params, allow_type = true, allow_semicolon_separator = true, } -- There must be at least one part to display. If there are gaps, a term -- request will be shown. if not next(parts) and not args.type.default then if mw.title.getCurrentTitle().nsText == "साँचा" then parts = { {term = "first"}, {separator = " +&lrm; ", term = "second"} } else error("You must provide at least one part of a compound.") end end return m_affix.show_compound(augment_affix_data({ parts = parts }, args, lang, sc)) end -- FIXME: Temporary for check in compound_like() below for old-style {{contraction}} parameters. Remove eventually. local function ine(arg) if arg == "" then return nil else return arg end end function export.compound_like(frame) local iparams = { ["lang"] = {type = "language"}, ["template"] = {}, ["text"] = {}, ["oftext"] = {}, ["cat"] = {}, ["noaffixcat"] = boolean_param, ["dont_require_index"] = boolean_param, } local iargs = require("Module:parameters").process(frame.args, iparams) local parent_args = frame:getParent().args -- Error to catch most uses of old-style parameters for {{contraction}}. (FIXME: Remove eventually.) local term_param = iargs.lang and 1 or 2 if ine(parent_args[term_param + 2]) and not ine(parent_args[term_param + 1]) and not ine(parent_args.tr2) and not ine(parent_args.ts2) and not ine(parent_args.t2) and not ine(parent_args.gloss2) and not ine(parent_args.g2) and not ine(parent_args.alt2) then error(("You specified a term in %s= and not one in %s=. You probably meant to use t= to specify a gloss instead. " .. "If you intended to specify two terms, put the second term in %s=."):format(term_param + 2, term_param + 1, term_param + 1)) end if not ine(parent_args[term_param + 1]) and not ine(parent_args.alt2) and not ine(parent_args.tr2) and not ine(parent_args.ts2) and ine(parent_args.g2) then error(("You specified a gender in g2= but no term in %s=. You were probably trying to specify two genders for " .. "a single term. To do that, put both genders in g=, comma-separated."):format(term_param + 1)) end local function extra_params(params) params.notext = boolean_param params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc = parse_args { raw_args = parent_args, extra_params = extra_params, ilang = iargs.lang, dont_require_index = iargs.dont_require_index, -- FIXME, why are we doing this? Formerly we had 'params.pos = nil' whose intention was to disable the overall -- pos= while preserving posN=, which is equivalent to the following using the new syntax. But why is this -- necessary? require_index_for_pos = not iargs.dont_require_index, allow_semicolon_separator = true, } local template = iargs.template local nocat = args.nocat local notext = args.notext local text = not notext and iargs.text local oftext = not notext and (iargs.oftext or text and "of") local cat = not nocat and iargs.cat local noaffixcat = nocat or iargs.noaffixcat if not next(parts) then if mw.title.getCurrentTitle().nsText == "साँचा" then parts = { {term = "first"}, {separator = " +&lrm; ", term = "second"} } end end return m_affix.show_compound_like(augment_affix_data({ parts = parts, text = text, oftext = oftext, cat = cat, noaffixcat = noaffixcat }, args, lang, sc)) end function export.surface_analysis(frame) local function ine(arg) -- Since we're operating before calling [[Module:parameters]], we need to imitate how that module processes -- arguments, including trimming since numbered arguments don't have automatic whitespace trimming. if not arg then return arg end arg = mw.text.trim(arg) if arg == "" then arg = nil end return arg end local parent_args = frame:getParent().args local etymtext local arg1 = ine(parent_args[1]) if not arg1 then -- Allow omitted first argument to just display "By surface analysis". etymtext = "" elseif arg1:find("^%+") then -- If the first argument (normally a language code) is prefixed with a +, it's a template name. local template_name = arg1:sub(2) local new_args = {} for i, v in pairs(parent_args) do if type(i) == "number" then if i > 1 then new_args[i - 1] = v end else new_args[i] = v end end new_args.nocap = true etymtext = ", " .. frame:expandTemplate { title = template_name, args = new_args } end if etymtext then return (ine(parent_args.nocap) and "b" or "B") .. "y [[Appendix:Glossary#surface analysis|surface analysis]]" .. etymtext end local function extra_params(params) params.notext = boolean_param params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc = parse_args { raw_args = parent_args, extra_params = extra_params, allow_type = true, allow_semicolon_separator = true, } -- There must be at least one part to display. If there are gaps, a term -- request will be shown. if not next(parts) then if mw.title.getCurrentTitle().nsText == "साँचा" then parts = { {term = "first"}, {separator = " +&lrm; ", term = "second"} } else error("You must provide at least one part.") end end return m_affix.show_surface_analysis(augment_affix_data({ parts = parts }, args, lang, sc)) end local function check_max_items(items, max_allowed) if #items > max_allowed then local bad_item = items[max_allowed + 1] if bad_item.term then error(("At most %s terms can be specified but saw a term specified for term #%s") :format(max_allowed, max_allowed + 1)) else for k, v in pairs(bad_item) do if is_property_key(k) then error(("At most %s terms can be specified but saw a value for property '%s' of term #%s") :format(max_allowed, k, max_allowed + 1)) end end end error(("Internal error: Something wrong, %s items generated when there should be at most %s, but item #%s doesn't have a term or any properties") :format(#items, max_allowed, max_allowed + 1)) end end function export.circumfix(frame) local function extra_params(params) params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc = parse_args { raw_args = frame:getParent().args, extra_params = extra_params, } check_max_items(parts, 3) local prefix = parts[1] local base = parts[2] local suffix = parts[3] -- Just to make sure someone didn't use the template in a silly way if not (prefix and base and suffix) then if mw.title.getCurrentTitle().nsText == "साँचा" then prefix = {term = "circumfix", alt = "prefix"} base = {term = "base"} suffix = {term = "circumfix", alt = "suffix"} else error("You must specify a prefix part, a base term and a suffix part.") end end return m_affix.show_circumfix(augment_affix_data({ prefix = prefix, base = base, suffix = suffix }, args, lang, sc)) end function export.confix(frame) local function extra_params(params) params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc = parse_args { raw_args = frame:getParent().args, extra_params = extra_params, } check_max_items(parts, 3) local prefix = parts[1] local base = parts[3] and parts[2] or nil local suffix = parts[3] or parts[2] -- Just to make sure someone didn't use the template in a silly way if not (prefix and suffix) then if mw.title.getCurrentTitle().nsText == "साँचा" then prefix = {term = "prefix"} suffix = {term = "suffix"} else error("You must specify a prefix part, an optional base term and a suffix part.") end end return m_affix.show_confix(augment_affix_data({ prefix = prefix, base = base, suffix = suffix }, args, lang, sc)) end function export.pseudo_loan(frame) local function extra_params(params) params.notext = boolean_param params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc, source = parse_args { raw_args = frame:getParent().args, extra_params = extra_params, has_source = true, -- FIXME, why are we doing this? Formerly we had 'params.pos = nil' whose intention was to disable the overall -- pos= while preserving posN=, which is equivalent to the following using the new syntax. But why is this -- necessary? require_index_for_pos = true, allow_semicolon_separator = true, } return require(pseudo_loan_module).show_pseudo_loan( augment_affix_data({ source = source, parts = parts }, args, lang, sc)) end function export.infix(frame) local function extra_params(params) params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc = parse_args { raw_args = frame:getParent().args, extra_params = extra_params, } check_max_items(parts, 3) local base = parts[1] local infix = parts[2] -- Just to make sure someone didn't use the template in a silly way if not (base and infix) then if mw.title.getCurrentTitle().nsText == "साँचा" then base = {term = "base"} infix = {term = "infix"} else error("You must provide a base term and an infix.") end end return m_affix.show_infix(augment_affix_data({ base = base, infix = infix }, args, lang, sc)) end function export.prefix(frame) local function extra_params(params) params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc = parse_args { raw_args = frame:getParent().args, extra_params = extra_params, } local prefixes = parts local base = nil local max_prefix = 0 for k, v in pairs(prefixes) do max_prefix = math.max(k, max_prefix) end if max_prefix >= 2 then base = prefixes[max_prefix] prefixes[max_prefix] = nil end -- Just to make sure someone didn't use the template in a silly way if not next(prefixes) then if mw.title.getCurrentTitle().nsText == "साँचा" then base = {term = "base"} prefixes = { {term = "prefix"} } else error("You must provide at least one prefix.") end end return m_affix.show_prefix(augment_affix_data({ prefixes = prefixes, base = base }, args, lang, sc)) end function export.suffix(frame) local function extra_params(params) params.nocat = boolean_param params.force_cat = boolean_param end local args, parts, lang, sc = parse_args { raw_args = frame:getParent().args, extra_params = extra_params, } local base = parts[1] local suffixes = {} for k, v in pairs(parts) do suffixes[k - 1] = v end -- Just to make sure someone didn't use the template in a silly way if not next(suffixes) then if mw.title.getCurrentTitle().nsText == "साँचा" then base = {term = "base"} suffixes = { {term = "suffix"} } else error("You must provide at least one suffix.") end end return m_affix.show_suffix(augment_affix_data({ base = base, suffixes = suffixes }, args, lang, sc)) end function export.derivsee(frame) local iargs = frame.args local iparams = { ["derivtype"] = {}, } local iargs = require("Module:parameters").process(frame.args, iparams) local params = { ["head"] = {}, ["id"] = {}, ["sc"] = {type = "script"}, ["pos"] = {}, } local derivtype = iargs.derivtype params[1] = {required = "true", type = "language", default = "und"} params[2] = {} local args = require("Module:parameters").process(frame:getParent().args, params) local lang = args[1] local term = args[2] or args.head local id = args.id local sc = args.sc local pos = require(en_utilities_module).pluralize(args.pos or "term") if not term then local SUBPAGE = mw.loadData("Module:headword/data").pagename if lang:hasType("reconstructed") or mw.title.getCurrentTitle().nsText == "Reconstruction" then term = "*" .. SUBPAGE elseif lang:hasType("appendix-constructed") then term = SUBPAGE else term = SUBPAGE end end local category = nil local langname = lang:getFullName() if (derivtype == "compound" and pos == nil) then category = langname .. " compounds with " .. term elseif derivtype == "compound" and pos == "verbs" then category = langname .. " compound " .. pos .. " formed with " .. term elseif derivtype == "compound" then category = langname .. " compound " .. pos .. " with " .. term else category = langname .. " " .. pos .. " " .. derivtype .. "ed with " .. term .. (id and " (" .. id .. ")" or "") end return require('Module:collapsible category tree').make{ lang = lang, sc = sc, category = category, } end return export 2pamffrw3udg5tr4ktfoxr2a0sgi94t साँचा:blend 10 305072 487941 480047 2026-09-03T17:37:21Z SM7 6218 सुधार 487941 wikitext text/x-wiki {{#invoke:affix/templates|compound_like|text=[[विक्षनरी:शब्दावली#blend|{{yesno|{{{nocap|}}}|b|B}}lend]]|cat=blends|template=blend|noaffixcat=1}}<noinclude>{{documentation}}</noinclude> k90rga3wwjxx3jxfolrz8hhs85dp0r7 साँचा:bn-IPA 10 306648 487891 486880 2026-09-03T13:27:02Z SM7 6218 localization 487891 wikitext text/x-wiki <includeonly>{{#switch:{{{style|{{{type|}}}}}} |#default={{#invoke:bn-IPA|make}} {{#switch:{{{audio|}}}|no=|yes|#default={{#ifexist: Media:LL-Q9610_(ben)-Titodutta-{{PAGENAME}}.wav|*: {{audio|bn|LL-Q9610 (ben)-Titodutta-{{PAGENAME}}.wav|ऑडियो}}}}}} * {{#invoke:bn-IPA|make_dhaka}} {{#switch:{{{audio|}}}|no=|yes|#default={{#ifexist: Media:LL-Q9610_(ben)-Yahya-{{PAGENAME}}.wav|*: {{audio|bn|LL-Q9610 (ben)-Yahya-{{PAGENAME}}.wav|ऑडियो}}}} {{#ifexist: Media:LL-Q9610_(ben)-Titodutta-{{PAGENAME}}.wav||{{#ifexist: Media:LL-Q9610_(ben)-Yahya-{{PAGENAME}}.wav||{{#ifexist: Media:bn-{{PAGENAME}}.ogg|* {{audio|bn|bn-{{PAGENAME}}.ogg|ऑडियो}}}}}}}} }} |full={{#invoke:bn-IPA|make}} {{#switch:{{{audio|}}}|no=|yes|#default={{#ifexist: Media:LL-Q9610_(ben)-Titodutta-{{PAGENAME}}.wav|*: {{audio|bn|LL-Q9610 (ben)-Titodutta-{{PAGENAME}}.wav|ऑडियो}}}}}} * {{#invoke:bn-IPA|make_dhaka}} {{#switch:{{{audio|}}}|no=|yes|#default={{#ifexist: Media:LL-Q9610_(ben)-Yahya-{{PAGENAME}}.wav|*: {{audio|bn|LL-Q9610 (ben)-Yahya-{{PAGENAME}}.wav|ऑडियो}}}}}} * {{#invoke:bn-IPA|make_vanga}} * {{#invoke:bn-IPA|make_varendra}} {{#switch:{{{audio|}}}|no=|yes|#default={{#ifexist: Media:LL-Q9610_(ben)-Titodutta-{{PAGENAME}}.wav||{{#ifexist: Media:LL-Q9610_(ben)-Yahya-{{PAGENAME}}.wav||{{#ifexist: Media:bn-{{PAGENAME}}.ogg|* {{audio|bn|bn-{{PAGENAME}}.ogg|ऑडियो}}}}}}}} }} |kolkata|rarh={{#invoke:bn-IPA|make}} {{#switch:{{{audio|}}}|no=|yes|#default={{#ifexist: Media:LL-Q9610_(ben)-Titodutta-{{PAGENAME}}.wav|*: {{audio|bn|LL-Q9610 (ben)-Titodutta-{{PAGENAME}}.wav|ऑडियो}}}} {{#ifexist: Media:LL-Q9610_(ben)-Titodutta-{{PAGENAME}}.wav||{{#ifexist: Media:LL-Q9610_(ben)-Yahya-{{PAGENAME}}.wav||{{#ifexist: Media:bn-{{PAGENAME}}.ogg|* {{audio|bn|bn-{{PAGENAME}}.ogg|ऑडियो}}}}}}}} }} |dhaka={{#invoke:bn-IPA|make_dhaka}} {{#switch:{{{audio|}}}|no=|yes|#default={{#ifexist: Media:LL-Q9610_(ben)-Yahya-{{PAGENAME}}.wav|*: {{audio|bn|LL-Q9610 (ben)-Yahya-{{PAGENAME}}.wav|ऑडियो}}}} {{#ifexist: Media:LL-Q9610_(ben)-Aishik Rehman-{{PAGENAME}}.wav||{{#ifexist: Media:LL-Q9610_(ben)-Yahya-{{PAGENAME}}.wav||{{#ifexist: Media:bn-{{PAGENAME}}.ogg|* {{audio|bn|bn-{{PAGENAME}}.ogg|ऑडियो}}}}}}}} }} |vanga={{#invoke:bn-IPA|make_vanga}} |eastern_vanga={{#invoke:bn-IPA|make_eastern_vanga}} |varendra={{#invoke:bn-IPA|make_varendra}} }}</includeonly><noinclude>{{documentation}}</noinclude> rawmscshi9txbyso1ee7zapdcbzerov मॉड्यूल:category tree/परिवार 828 306935 488022 487814 2026-09-04T09:38:29Z SM7 6218 localization... 488022 Scribunto text/plain local raw_categories = {} local raw_handlers = {} local concat = table.concat local insert = table.insert ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["सभी भाषा परिवार"] = { topright = "{{commonscat|Languages by family}}\n{{wp|Language family,List of language families}}", description = "This category lists all [[language family|language families]].", parents = {"मूलभूत श्रेणी"}, } raw_categories["भाषाएँ परिवार अनुसार"] = { topright = "{{commonscat|Languages by family}}\n{{wp|Language family,List of language families}}", description = "This category contains all languages categorized hierarchically according to the [[language family]] they belong to.", additional = "Only top-level language families are shown here. For a full list of all language families, see [[:Category:All language families]] or [[Wiktionary:List of families]].", parents = { {name = "सभी भाषाएँ", sort = " "}, {name = "सभी भाषा परिवार", sort = " "}, }, } raw_categories["Unassigned languages"] = { description = "Languages that have not yet been assigned to any family by Wiktionary editors, usually due to oversight.", additional = [=[This should be distinguished from: * [[:Category:Unclassifiable languages]] (languages that cannot be confidently assigned to any family, typically because the language is extinct or unresearched and has little available data on it); * [[:Category:Language isolates]] (where there is general agreement that the language has no relatives); and * [[:Category:Languages of disputed affiliation]] (languages where there is no consensus concerning which family, if any, they belong to).]=], parents = { {name = "भाषा परिवार अनुसार", sort = "*"}, "सभी भाषा परिवार", }, } ----------------------------------------------------------------------------- -- -- -- RAW HANDLERS -- -- -- ----------------------------------------------------------------------------- local function family_is_not_a_family(fam) if not fam then return false elseif fam:getCode() == "qfa-not" then return true else local family_parent = fam:getFamily() local parent_code = family_parent and family_parent:getCode() or nil -- Some families have no parent, some are in the pseudo-family sgn (sign languages), some are given as -- qfa-dis (disputed) or potentially qfa-unc (unclassifiable), but are not themselves pseudo-families. if not parent_code or parent_code == "sgn" or parent_code == "qfa-dis" or parent_code == "qfa-unc" then return false end return family_is_not_a_family(family_parent) end end local function family_has_no_category(fam) local famcode = fam:getCode() if famcode == "paa" then return false -- Papuan languages are not a family but have a category elseif famcode == "qfa-iso" or famcode == "qfa-not" then return true else local parfam = fam:getFamily() if parfam and parfam:getCode() == "qfa-not" then -- Constructed languages, sign languages, etc.; no category for them return true end end return false end -- Currently all Papuan families begin with "paa" or "ngf", local function family_is_papuan(fam) local famcode = fam:getCode() return famcode ~= "paa" and (famcode:find("^paa") or famcode:find("^ngf")) end local function infobox(fam) local ret = {} insert(ret, "<table class=\"wikitable\">\n") insert(ret, "<tr>\n<th colspan=\"2\" class=\"plainlinks\">[//en.wiktionary.org/w/index.php?title=Module:families/data&action=edit Edit family data]</th>\n</tr>\n") insert(ret, "<tr>\n<th>Canonical name</th><td>" .. fam:getCanonicalName() .. "</td>\n</tr>\n") local otherNames = fam:getOtherNames() if otherNames then local names = {} for _, name in ipairs(otherNames) do insert(names, "<li>" .. name .. "</li>") end if #names > 0 then insert(ret, "<tr>\n<th>अन्य नाम</th><td><ul>" .. concat(names, "\n") .. "</ul></td>\n</tr>\n") end end local aliases = fam:getAliases() if aliases then local names = {} for _, name in ipairs(aliases) do insert(names, "<li>" .. name .. "</li>") end if #names > 0 then insert(ret, "<tr>\n<th>उपनाम</th><td><ul>" .. concat(names, "\n") .. "</ul></td>\n</tr>\n") end end local varieties = fam:getVarieties() if varieties then local names = {} for _, name in ipairs(varieties) do if type(name) == "string" then insert(names, "<li>" .. name .. "</li>") else assert(type(name) == "table") local first_var local subvars = {} for i, var in ipairs(name) do if i == 1 then first_var = var else insert(subvars, "<li>" .. var .. "</li>") end end if #subvars > 0 then insert(names, "<li><dl><dt>" .. first_var .. "</dt>\n<dd><ul>" .. concat(subvars, "\n") .. "</ul></dd></dl></li>") elseif first_var then insert(names, "<li>" .. first_var .. "</li>") end end end if #names > 0 then insert(ret, "<tr>\n<th>Varieties</th><td><ul>" .. concat(names, "\n") .. "</ul></td>\n</tr>\n") end end insert(ret, "<tr>\n<th>[[Wiktionary:Families|Family code]]</th><td><code>" .. fam:getCode() .. "</code></td>\n</tr>\n") insert(ret, "<tr>\n<th>[[w:Proto-language|Common ancestor]]</th><td>") local protoLanguage = fam:getProtoLanguage() if protoLanguage then insert(ret, "[[:श्रेणी:" .. protoLanguage:getCategoryName() .. "|" .. protoLanguage:getCanonicalName() .. "]]") else insert(ret, "none") end insert(ret, "</td>\n") insert(ret, "\n</tr>\n") local parent = fam:getFamily() if not parent then insert(ret, "<tr>\n<th>[[Wiktionary:Families|Parent family]]</th>\n<td>") insert(ret, "unassigned") elseif parent:getCode() == "qfa-not" then insert(ret, "<tr>\n<th>[[Wiktionary:Families|Parent family]]</th>\n<td>") insert(ret, "not a family") else local chain = {} while parent do if family_has_no_category(parent) then break end insert(chain, "[[:श्रेणी:" .. parent:getCategoryName() .. "|" .. parent:getCanonicalName() .. "]]") parent = parent:getFamily() end if #chain == 0 then insert(ret, "<tr>\n<th>[[Wiktionary:परिवार|पूर्वज परिवार]]</th>\n<td>") insert(ret, "no parents") else insert(ret, "<tr>\n<th>[[Wiktionary:परिवार|Parent famil" .. (#chain == 1 and "y" or "ies") .. "]]</th>\n<td>") for i = #chain, 1, -1 do insert(ret, "<ul><li>" .. chain[i]) end insert(ret, string.rep("</li></ul>", #chain)) end end insert(ret, "</td>\n</tr>\n") if fam:getWikidataItem() and mw.wikibase then local link = '[' .. mw.wikibase.getEntityUrl(fam:getWikidataItem()) .. ' ' .. fam:getWikidataItem() .. ']' insert(ret, "<tr><th>Wikidata</th><td>" .. link .. "</td></tr>") end insert(ret, "</table>") return concat(ret) end local function NavFrame_for_family_tree(content, title) return '<div class="NavFrame"><div class="NavHead">' .. (title or '{{{title}}}') .. '</div>' .. '<div class="NavContent" style="text-align: left; font-size: calc(1em / 0.95); padding: 0.3em">' .. content .. '</div></div>' end local additional_information = { ["qfa-dis"] = "These are languages where there is no consensus concerning which family, if any, they belong to.", ["qfa-iso"] = "These are languages where there is general agreement that the language has no known relatives.", ["qfa-mix"] = "A [[mixed language]] is a language which is composed of two different languages.", ["qfa-unc"] = "These are languages that cannot be confidently assigned to a family due to lack of sufficient linguistic data. " .. "They are also commonly called {{w|unclassified language|unclassified languages}}, but this is ambiguous between " .. "languages that cannot be classified (due to insufficient data) and those that merely have not been classified " .. "(due to insufficient research).", } local preceding_information = { ["qfa-dis"] = "{{also|Category:Unclassifiable languages|Category:Unassigned languages|Category:Language isolates}}", ["qfa-iso"] = "{{also|Category:Languages of disputed affiliation|Category:Unclassifiable languages|Category:Unassigned languages}}", ["qfa-unc"] = "{{also|Category:Languages of disputed affiliation|Category:Unassigned languages|Category:Language isolates}}", ["qfa-mix"] = "{{also|Category:Creole or pidgin languages}}", ["crp"] = "{{also|Category:Mixed languages}}", } local specially_named_families = { ["Languages of disputed affiliation"] = "qfa-dis", ["Language isolates"] = "qfa-iso", } local specially_named_family_sort_keys = { ["Languages of disputed affiliation"] = "Disputed affiliation", ["Language isolates"] = "Isolate", } insert(raw_handlers, function(data) local family = require("Module:families").getByCategoryName(data.category) if not family then local special_code = specially_named_families[data.category] if special_code then family = require("Module:families").getByCode(special_code) if not family then error(("Internal error: Family code '%s' is an invalid family code."):format(special_code)) end end end if not family then return nil end local parent_fam = family:getFamily() local first_parent, parent_sort_key, first_parent_sort_key if not parent_fam or family_has_no_category(parent_fam) then first_parent = "भाषाएँ परिवार अनुसार" parent_sort_key = specially_named_family_sort_keys[data.category] first_parent_sort_key = "*" .. (parent_sort_key or "") else first_parent = parent_fam:getCategoryName() end local description, additional = "", "" local topright local preceding = preceding_information[family:getCode()] local additional_preface = additional_information[family:getCode()] if additional_preface then additional_preface = additional_preface .. "\n\n" else additional_preface = "" end if family_is_not_a_family(family) then additional_preface = additional_preface .. "This is a pseudo-family, used for grouping purposes but not forming a linguistically valid [[clade]] " .. "(i.e. a set of linguistically related languages descending from a common parent).\n\n" .. "Information about this family:\n\n" else additional_preface = "Information about " .. family:getCanonicalName() .. ":\n\n" end if not data.called_from_inside then topright = {} local wikipedia_art = family:getWikipediaArticle("noCategoryFallback") if wikipedia_art then insert(topright, "{{wp|" .. wikipedia_art .. "}}") end local commons_cat = family:getCommonsCategory() if commons_cat then insert(topright, "{{commonscat|" .. commons_cat:gsub("^Category:", "") .. "}}") end topright = #topright > 0 and concat(topright, "\n") or nil description = "This is the main category of the '''" .. family:getDisplayForm() .. "'''." additional = additional_preface .. infobox(family) end local ok, tree_of_descendants = pcall( require("Module:family tree").print_children, family:getCode(), { protolanguage_under_family = true, must_have_descendants = true }) if ok then if tree_of_descendants then additional = additional .. NavFrame_for_family_tree( tree_of_descendants, "परिवार वृक्ष") else additional = additional .. "\n\n" .. ucfirst(family:getCanonicalName()) .. " has no descendants or varieties listed in Wiktionary's language data modules." end else mw.log("error while generating tree: " .. tostring(tree_of_descendants)) end local parents = { {name = first_parent, sort = first_parent_sort_key}, {name = "सभी भाषा परिवार", sort = parent_sort_key}, } if parent_fam and parent_fam:getCode() == "sgn" then insert(parents, "All sign languages") end if family_is_papuan(family) then insert(parents, "Papuan languages") end return { preceding = preceding, topright = topright, description = description, additional = additional, parents = parents, breadcrumb = family:getCanonicalName(), can_be_empty = true, } end) return {RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers} m086hy6bawpv2jv43hj7uek621j47t9 मॉड्यूल:category tree/entry maintenance 828 306957 487956 487851 2026-09-03T19:53:18Z SM7 6218 localization... 487956 Scribunto text/plain local labels = {} local raw_categories = {} local raw_handlers = {} local functions_module = "Module:fun" local languages_module = "Module:languages" local scripts_module = "Module:scripts" local string_pattern_escape_module = "Module:string/patternEscape" local string_replacement_escape_module = "Module:string/replacementEscape" local table_module = "Module:table" local extend = require(table_module).extend local is_callable = require(functions_module).is_callable local pattern_escape = require(string_pattern_escape_module) local replacement_escape = require(string_replacement_escape_module) local unpack = unpack or table.unpack -- Lua 5.2 compatibility ----------------------------------------------------------------------------- -- -- -- LABELS -- -- -- ----------------------------------------------------------------------------- labels["प्रविष्टि रखरखाव"] = { description = "{{{langname}}} entries, or entries in other languages containing {{{langname}}} terms, that are being tracked for attention and improvement by editors.", parents = {{name = "{{{langcat}}}", raw = true}}, umbrella_parents = "मूलभूत श्रेणी", } labels["entries with incorrect language header"] = { description = "{{{langname}}} entries that have been placed under the wrong language header.", additional = "This can happen for several reasons:\n" .. "* Typos.\n" .. "* Vandalism.\n" .. "* Using the wrong language code.\n" .. "* Using an alternative name for the language.\n" .. "* Using special characters which haven't been used in the name given in the language data modules.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries without References header"] = { description = "{{{langname}}} entries without a References header.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries without References or Further reading header"] = { description = "{{{langname}}} entries without a References or Further reading header.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries that don't exist"] = { description = "{{{langname}}} terms that do not meet the [[Wiktionary:Criteria for inclusion|criteria for inclusion]] (CFI). They are added to the category with the template {{tl|no entry|{{{langcode}}}}}.", parents = {"प्रविष्टि रखरखाव"}, umbrella_parents = "मूलभूत श्रेणी", } labels["entries with etymology trees"] = { description = "{{{langname}}} entries that display an etymology tree generated by the template {{tl|etymon}}.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries with etymology texts"] = { description = "{{{langname}}} entries that display an etymology generated by the template {{tl|etymon}}.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries with etymon"] = { description = "{{{langname}}} entries that use the template {{tl|etymon}}.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries with etymology text stop language not in chain"] = { description = "{{{langname}}} entries where {{tl|etymon}} is used with {{para|text}} set to stop at a language but that language never appears in the rendered etymology chain.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing missing etymons"] = { description = "Entries which use the {{tl|etymon}} template to reference an etymon that cannot be found, either because the target page does not exist (redlink) or because it has no {{tl|etymon}} template.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing ambiguous etymons"] = { description = "Entries which use the {{tl|etymon}} template to reference an etymon without the ID, when the target page contains multiple {{tl|etymon}} templates, and an ID is therefore required to select the correct {{tl|etymon}}.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing etymons with mismatched IDs"] = { description = "Entries which use the {{tl|etymon}} template with a mismatched ID. For example, {{code|lang:entry<id:mismatched ID>}}", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing pages with multiple etymons missing IDs"] = { description = "Entries which use the {{tl|etymon}} template to link to a page that has more than one {{tl|etymon}} template for the same language, where at least one of those templates has no {{para|id}}. When several {{tl|etymon}} templates share a language section, each must have a distinct {{para|id}} so that links and descendants logic can tell them apart.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing pages with etymology sections missing etymons"] = { description = "Entries which use the {{tl|etymon}} template to link to a page that has more than one etymology section for the same language, where at least one section contains a {{tl|etymon}} template for that language and at least one other etymology section does not.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing etymons without Descendants sections"] = { description = "Entries which use the {{tl|etymon}} template to reference an etymon whose source entry has no Descendants section.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing etymons without this term in Descendants sections"] = { description = "Entries which use the {{tl|etymon}} template to reference an etymon whose source entry has a Descendants section, but does not list the current term there.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries with language name categories using raw markup"] = { description = "{{{langname}}} entries that have been placed in a language name category using raw wiki markup (i.e. {{code|[[<nowiki/>Category:{{{langname}}} ...]]}}). They should be added using {{tl|cln|{{{langcode}}}|...}} instead.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries with topic categories using raw markup"] = { description = "{{{langname}}} entries that have been placed in a topic category using raw wiki markup (i.e. {{code|[[<nowiki/>Category:{{{langcode}}}:...]]}}). They should be added using {{tl|C|{{{langcode}}}|...}} instead.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries with outdated source"] = { description = "{{{langname}}} entries that have been partly or fully imported from an outdated source.", parents = {"प्रविष्टि रखरखाव"}, } labels["entries with inflection not matching pagename"] = { description = "{{{langname}}} entries which have an inflection table whose lemma form does not match the page name.", additional = "This is usually the result of incorrect or missing parameters.", breadcrumb_and_first_sort_key = "inflection not matching pagename", parents = {"प्रविष्टि रखरखाव"}, hidden = true, can_be_empty = true, } labels["undefined derivations"] = { description = "{{{langname}}} etymologies using {{tl|undefined derivation}}, where a more specific template such as {{tl|borrowed}} or {{tl|inherited}} should be used instead.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["descendants to be fixed in desctree"] = { description = "Entries that use {{tl|desctree}} to link to {{{langname}}} entries with no Descendants section.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["term requests"] = { description = "Entries with [[Template:der]], [[Template:inh]], [[Template:m]] and similar templates lacking the parameter for linking to {{{langname}}} terms.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["redlinks"] = { description = "Links to {{{langname}}} entries that have not been created yet.", parents = {"प्रविष्टि रखरखाव"}, catfix = false, can_be_empty = true, hidden = true, } labels["terms with IPA pronunciation"] = { description = "{{{langname}}} terms that include the pronunciation in the form of IPA.", additional = "For requests related to this category, see [[:Category:Requests for pronunciation in {{{langname}}} entries]].", parents = {"प्रविष्टि रखरखाव"}, } labels["terms with enPR pronunciation"] = { description = "{{{langname}}} terms that include the pronunciation in the form of enPR.", additional = "For requests related to this category, see [[:Category:Requests for pronunciation in {{{langname}}} entries]].", parents = {"प्रविष्टि रखरखाव"}, } labels["terms with Indic pronunciation"] = { description = "{{langname}} terms that include the pronunciation in the form of ISO 15919.", additional = "For requests related to this category, see [[:Category:Requests for pronunciation in {{{langname}}} entries]].", parents = {"प्रविष्टि रखरखाव"}, } labels["IPA pronunciations with invalid separators"] = { description = "{{{langname}}} terms with IPA using invalid separators such as /.ˈ/, /.ˌ/, a dot followed by primary or secondary stress; or /ˈ / or /ˌ /, primary or secondary stress followed by a space.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["terms with hyphenation"] = { description = "{{{langname}}} terms that include hyphenation.", parents = {"प्रविष्टि रखरखाव"}, } labels["terms with audio pronunciation"] = { description = "{{{langname}}} terms that include the pronunciation in the form of an audio file.", additional = "For requests related to this category, see [[:Category:Requests for audio pronunciation in {{{langname}}} entries]].", parents = {"प्रविष्टि रखरखाव"}, } labels["terms with nonstandard or incorrect audio pronunciations"] = { description = "{{{langname}}} terms which have been tagged as having pronunciations which are nonstandard or incorrect.", parents = {"terms with audio pronunciation"}, can_be_empty = true, hidden = true, } labels["entries missing Template:reconstructed"] = { description = "Reconstructed {{{langname}}} entries which do not have the {{tl|reconstructed}} template.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } local function add_manual_param_category(label, desc, addl_intro, include_addl_continuation) labels[label] = { description = desc or "Pages containing {{{langname}}} " .. label .. ".", additional = addl_intro .. (not include_addl_continuation and "" or "\n\n" .. "Note that the pages in this category are not necessarily the same as the actual term in question. This " .. "frequently happens, for example, with English pages with translation sections, where the term that " .. "triggers the addition of the category is one of the translations."), parents = {"प्रविष्टि रखरखाव"}, -- Set catfix = false because the page will have a mixture of native-language and -- non-native-language pages, but include the normal native-language table of contents headers -- because most pages are in the native language. catfix = false, toc_template = "{{{langcode}}}-categoryTOC", toc_template_full = "{{{langcode}}}-categoryTOC/full", can_be_empty = true, hidden = true, } end add_manual_param_category("terms in nonstandard scripts", nil, "Pages are placed here if they contain terms written in a script that isn't in the language's " .. "list of scripts in the language data. This may mean the script should be added to the list, or that the wrong language code has been used.", true) add_manual_param_category("terms with non-redundant manual transliterations", nil, "Pages are placed here if they contain terms whose transliteration has been specified manually using " .. "{{para|tr}} or a similar parameter and is different from the transliteration which is automatically generated.", true) add_manual_param_category("terms with redundant transliterations", nil, "Pages are placed here if they contain terms whose transliteration has been specified manually using " .. "{{para|tr}} or a similar parameter and is the same as the transliteration which is automatically generated.", true) add_manual_param_category("terms with non-redundant manual script codes", nil, "Pages are placed here if they contain terms whose script code has been specified manually using " .. "{{para|sc}} or a similar parameter and is different from the script code which is automatically generated.", true) add_manual_param_category("terms with redundant script codes", nil, "Pages are placed here if they contain terms whose script code has been specified manually using " .. "{{para|sc}} or a similar parameter and is the same as the script code which is automatically generated.", true) add_manual_param_category("terms with non-redundant non-automated sortkeys", "{{{langname}}} terms with non-redundant non-automated sortkeys.", "Terms are placed here if they have been sorted using a sortkey other than the one which is automatically " .. "generated. This can happen for two reasons:\n# A different sortkey has been specified using the {{para|sort}} " .. "parameter.\n# One or more categories have been added using raw wikitext, which means the page's default " .. "sortkey is used for that category. If that default sortkey is different from the automatic sortkey, then the " .. "page will also be added here.") add_manual_param_category("terms with redundant sortkeys", "{{{langname}}} terms with redundant sortkeys.", "Terms are placed here if their sortkey has been specified using the {{para|sort}} parameter, and it the same " .. "as the one which is automatically generated.") add_manual_param_category("links with redundant target parameters", "Pages containing {{{langname}}} links where the alt text could replace the link target, instead of being given " .. "separately.", "This occurs when the only difference between the link target and the alt text is that the alt text contains " .. "diacritics (or other characters) which would have been ignored anyway had they been included in the link " .. "target. For example, {{tl|l|la|amo|amō}} ({{l|la|amo|amō}}) is exactly the same as {{tl|l|la|amō}} " .. "({{l|la|amō}}), because macrons are automatically stripped from Latin link targets, even though they're still " .. "displayed.") add_manual_param_category("links with ignored alt parameters", "Pages containing {{{langname}}} links where the {{para|alt}} parameter has been ignored.", "This occurs when the main linked text includes a wikilink.") add_manual_param_category("links with redundant alt parameters", "Pages containing {{{langname}}} links where the {{para|alt}} parameter is redundant.", "This occurs when the alt text makes no difference to the output. For example, {{tl|l|en|foo|foo}} " .. "({{l|en|foo|foo}}) is exactly the same as {{tl|l|en|foo}} ({{l|en|foo}}).") add_manual_param_category("links with ignored id parameters", "Pages containing {{{langname}}} links where the {{para|id}} parameter has been ignored.", "This occurs when the main linked text includes a wikilink.") add_manual_param_category("links with redundant wikilinks", "Pages containing {{{langname}}} links which contain a redundant wikilink.", "This occurs if link target consists of a single wikilink, which should instead be entered in the " .. "conventional manner without link brackets. For example, {{tl|l|en|<nowiki>[[foo]]</nowiki>}} " .. "is the same as {{tl|l|en|foo}}, and {{tl|l|en|<nowiki>[[foo|bar]]</nowiki>}} is the same as " .. "{{tl|l|en|foo|bar}}.\n\nThis also occurs when link templates are nested inside each other " .. "unnecessarily: e.g. {{tl|l|en|{{tl|l|en|foo}}}}") add_manual_param_category("links with manual fragments", "Pages containing {{{langname}}} links where a manual link fragment has been given.", "This occurs when the link fragment has been specified using {{code|#}} after the term, " .. "which overrides the normal fragment generated by link templates that points to the relevant " .. "language section.\n\nLink fragments are used to point to a specific section on a target page, and " .. "it is preferable to use the {{para|id}} parameter to do this, since it is less likely to break if " .. "additional content is added to the target page: for example, the fragment {{code|#Adjective}} " .. "will start pointing to the wrong section if another language with an adjective section is added above " .. "the intended language.") labels["descendant hubs"] = { description = "{{{langname}}} terms that do not mean more than the sum of their parts but exist for listing two or more inclusion-worthy descendants.", parents = {"प्रविष्टि रखरखाव"}, } labels["terms needing to be assigned to a sense"] = { description = "{{{langname}}} entries that have terms under headers such as \"Synonyms\" or \"Antonyms\" not assigned to a specific sense of the entry in which they appear. Use [[Template:syn]] or [[Template:ant]] to fix these.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } --[=[ labels["terms with inflection tables"] = { description = "{{{langname}}} entries that contain inflection tables.". additional = "For requests related to this category," see [[:Category:Requests for inflections in {{{langname}}} entries]].", parents = {"प्रविष्टि रखरखाव"}, } ]=] labels["terms with collocations"] = { description = "{{{langname}}} entries that contain [[collocation]]s that were added using templates such as {{tl|co}}.", additional = "For requests related to this category, see [[:Category:Requests for collocations in {{{langname}}}]]. See also [[:Category:Requests for quotations in {{{langname}}}]] and [[:Category:Requests for example sentences in {{{langname}}}]].", parents = {"प्रविष्टि रखरखाव"}, umbrella_parents = "Collocation maintenance", } labels["terms with usage examples"] = { description = "{{{langname}}} entries that contain usage examples that were added using templates such as {{tl|ux}}.", additional = "For requests related to this category, see [[:Category:Requests for example sentences in {{{langname}}}]]. See also [[:Category:Requests for collocations in {{{langname}}}]] and [[:Category:Requests for quotations in {{{langname}}}]].", parents = {"प्रविष्टि रखरखाव"}, umbrella_parents = "Usage example maintenance", } labels["terms with quotations"] = { description = "{{{langname}}} entries that contain quotes that were added using templates such as {{tl|quote}}, {{tl|quote-book}}, {{tl|quote-journal}}, etc.", additional = "For requests related to this category, see [[:Category:Requests for quotations in {{{langname}}}]]. See also [[:Category:Requests for example sentences in {{{langname}}}]].", parents = {"प्रविष्टि रखरखाव"}, umbrella_parents = "Quotation maintenance", } labels["terms with interlinear glossed text"] = { description = "{{{langname}}} entries that contain interlinear glossed text added using {{tl|interlinear}}.", parents = {"प्रविष्टि रखरखाव"}, } labels["terms with redundant head parameter"] = { description = "{{{langname}}} terms that contain a redundant head= parameter in their headword (called using {{tl|head}} or a language-specific equivalent).", additional = "Individual languages can prevent terms from being added to this category by setting `data.no_redundant_head_cat`.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["terms with red links in their headword lines"] = { description = "{{{langname}}} terms that contain red links (i.e. uncreated forms) in their headword lines.", parents = {"redlinks"}, can_be_empty = true, hidden = true, } labels["terms with red links in their inflection tables"] = { description = "{{{langname}}} terms that contain red links (i.e. uncreated forms) in their inflection tables.", parents = {"redlinks"}, can_be_empty = true, hidden = true, } labels["requests for English equivalent term"] = { description = "{{{langname}}} entries with definitions that have been tagged with {{tl|rfeq}}. Read the documentation of the template for more information.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } for _, quot_type in ipairs { "quotations", "usage examples" } do local umbrella_parent = quot_type == "quotations" and "Quotation maintenance" or "Usage example maintenance" labels[quot_type .. " with omitted translation"] = { description = "{{{langname}}} " .. quot_type .. " where a translation would normally be required but the translation has explicitly been omitted by specifying {{code|-}}. The translation should be supplied instead.", parents = {"प्रविष्टि रखरखाव"}, umbrella = { parents = {name = umbrella_parent, sort = "omitted translation"}, breadcrumb = "with omitted translation", }, can_be_empty = true, hidden = true, } end for _, pos in ipairs({"nouns", "proper nouns", "verbs", "adjectives", "adverbs", "participles", "determiners", "pronouns", "numerals", "suffixes", "contractions"}) do labels[pos .. " with red links in their headword lines"] = { description = "{{{langname}}} " .. pos .. " that contain red links (i.e. uncreated forms) in their headword lines.", parents = {"terms with red links in their headword lines"}, breadcrumb = pos, can_be_empty = true, hidden = true, } labels[pos .. " with red links in their inflection tables"] = { description = "{{{langname}}} " .. pos .. " that contain red links (i.e. uncreated forms) in their inflection tables.", parents = {"terms with red links in their inflection tables"}, breadcrumb = pos, can_be_empty = true, hidden = true, } end for _, pos in ipairs { "nouns", "proper nouns", "pronouns" } do local label = pos .. " with unknown or uncertain plurals" labels[label] = { description = "{{{langname}}} " .. label .. ".", additional = "Terms are usually added to this category by specifying {{code|?}} as the plural. As much " .. "is possible, a plural should be added or, if the noun is uncountable, indicated appropriately (usually " .. "using {{code|-}} in place of the plural). Some languages support the value {{code|!}} to indicate " .. "that a plural cannot be attested but the noun is theoretically countable.", breadcrumb = "with unknown or uncertain plurals", parents = { {name = pos, sort = "unknown or uncertain plurals"}, "प्रविष्टि रखरखाव", }, } end -- Add 'umbrella_parents' key if not already present. for _, data in pairs(labels) do if data.umbrella == nil and data.umbrella_parents == nil then data.umbrella_parents = "Entry maintenance subcategories by language" end end ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["Entry maintenance subcategories by language"] = { description = "Umbrella categories covering topics related to entry maintenance.", additional = "{{{umbrella_meta_msg}}}", parents = { "Umbrella metacategories", {name = "प्रविष्टि रखरखाव", is_label = true, sort = " "}, }, } raw_categories["Citation maintenance"] = { description = "Categories for maintaining citations specified using {{tl|cite-*}}.", parents = {"Wiktionary maintenance"}, breadcrumb = "citations", } raw_categories["Collocation maintenance"] = { description = "Categories for maintaining collocations specified using {{tl|co}}, {{tl|coi}} or {{tl|coa}}.", parents = {"Wiktionary maintenance"}, breadcrumb = "collocations", } raw_categories["Quotation maintenance"] = { description = "Categories for maintaining quotations specified using {{tl|quote-*}}.", parents = {"Wiktionary maintenance"}, breadcrumb = "quotations", } raw_categories["Usage example maintenance"] = { description = "Categories for maintaining usage examples specified using {{tl|ux}}, {{tl|uxi}} or {{tl|uxa}}.", parents = {"Wiktionary maintenance"}, breadcrumb = "usage examples", } raw_categories["Citations using nocat parameter"] = { description = "Instances of {{tl|cite-*}} templates using the {{para|nocat}} parameter, which should be eliminated (?).", parents = {{name = "Citation maintenance", sort = "nocat"}}, breadcrumb = "using nocat parameter", can_be_empty = true, hidden = true, } raw_categories["Quotation templates to be cleaned"] = { description = "Instances of quotations using {{tl|quote-text}}.", additional = "They should be converted to other '''[[:Category:Citation templates|quotation templates]]''' if relevant.", parents = {"Quotation maintenance"}, breadcrumb_base = "to be cleaned", can_be_empty = true, hidden = true, } raw_categories["Quotations using nocat parameter"] = { description = "Instances of {{tl|quote-*}} templates using the {{para|nocat}} parameter, which should be eliminated (?).", parents = {{name = "Quotation maintenance", sort = "nocat"}}, breadcrumb = "using nocat parameter", can_be_empty = true, hidden = true, } raw_categories["Quotations using quoted-in parameter"] = { description = "Instances of {{tl|quote-*}} templates using the {{para|quoted_in}} parameter.", additional = "It is recommended to restructure these template calls using the {{para|newversion}} parameter along with associated parameters {{para|2ndauthor}}, {{para|title2}}, {{para|year2}}, {{para|publisher2}} and the like, as described in the documentation for {{tl|quote-book}}.", parents = {{name = "Quotation maintenance", sort = "quoted-in"}}, breadcrumb = "using quoted-in parameter", can_be_empty = true, hidden = true, } raw_categories["Requests"] = { topright = "{{shortcut|WT:CR|WT:RQ}}", description = "A parent category for the various request categories.", parents = {"Category:Wiktionary"}, } raw_categories["Requests by language"] = { description = "Categories with requests in various specific languages.", additional = "{{{umbrella_msg}}}", parents = { {name = "Request subcategories by language", sort = " "}, {name = "Requests", sort = " "}, }, breadcrumb = "By language", } raw_categories["Request subcategories by language"] = { description = "Umbrella categories covering topics related to requests.", additional = "{{{umbrella_meta_msg}}}", parents = { "Umbrella metacategories", {name = "Requests", sort = " "}, }, } raw_categories["Requests for quotations by source"] = { description = "Categories with requests for quotation, broken out by the source of the quotation.", additional = "Some abbreviated names of sources are explained at [[Wiktionary:Abbreviated Authorities in Webster]].", parents = {{name = "Requests for quotations", sort = "source"}}, breadcrumb = "By source", } raw_categories["Requests for quotations"] = { -- FIXME description = "Words are added to this category by the inclusion in their entries of {{tl|rfv-quote}}.", parents = {{name = "Requests", sort = "quotations"}, "Quotation maintenance"}, breadcrumb = "Quotations", } raw_categories["Requests for date"] = { description = "Requests for a date to be added to a quotation.", additional = "To add an article to this category, use {{tl|rfdate}} or {{tl|rfdatek}} to include the author. " .. "Please remove the template from the article once the date has been provided.", parents = {{name = "Requests", sort = "date"}, "Quotation maintenance"}, breadcrumb = "Date", } raw_categories["Requests for translations in user-competency categories by number of users"] = { description = "Requests for translations to be added to user-competency categories, sorted by number of users with that competency.", parents = {{name = "Requests", sort = "translations in user-competency categories by number of users"}}, breadcrumb = "Translations in user-competency categories by number of users", } raw_categories["Requests for translations in user-competency categories by language"] = { description = "Requests for translations to be added to user-competency categories, sorted by language.", parents = {{name = "Requests", sort = "translations in user-competency categories by language"}}, breadcrumb = "Translations in user-competency categories by language", hidden = true, } raw_categories["Terms with translations by language"] = { description = "Terms with translations, sorted by language.", parents = {{name = "Entry maintenance subcategories by language", sort = "translations by language"}}, breadcrumb = "Translations", } raw_categories["Entries using missing taxonomic names"] = { description = "Entries that link to wikispecies because there is no corresponding Wiktionary entry for the taxonomic name in the template {{tl|taxlink}}.", additional = "The missing name is one or more of those enclosed in {{tl|taxlink}}. The entries are sorted by the missing taxonomic name." .. "\n\nSee [[:Category:mul:Taxonomic names]].", parents = {{name = "प्रविष्टि रखरखाव", is_label = true, lang = "mul", sort = "missing taxonomic names"}}, breadcrumb = "Missing taxonomic names", hidden = true, } ----------------------------------------------------------------------------- -- -- -- RAW HANDLERS -- -- -- ----------------------------------------------------------------------------- local function script_name_to_code(name) local sc = require(scripts_module).getByCanonicalName(name) if not sc then error("Unrecognized script name '" .. name .. "'") end return sc:getCode() end --[=[ This array consists of category match specs. Each spec contains one or more properties, whose values are (a) strings that may contain references to other properties using the {{{PROPERTY}}} syntax; (b) functions of one argument, an `items` table of the same properties that are accessible using the {{{PROPERTY}} syntax. Each such spec should have at least a `regex` property that matches the name of the category. Capturing groups in this regex can be referenced in other properties using {{{1}}} for the first group, {{{2}}} for the second group, etc. (or using keys "1", "2", etc. in functions). Property expansion happens recursively if needed (i.e. a property can reference another property, which in turn references a third property). If there is a `language_name` propery, it specifies the language name (and will typically be a reference to a capturing group from the `regex` property); if not specified, it defaults to "{{{1}}}" unless the `nolang` property is set, in which case there is no language name associated with the category name. The language name must be the canonical name of a recognized full language, or an error is thrown; however, if the `allow_etym_lang` property is set, the language name may also be the canonical name of an etymology-only language. Based on the language name, the `language_code` and `language_object` properties are automatically filled in. If `language_name` is an etymology-only language, additional properties `parent_language_name`, `parent_language_code` and `parent_language_object` are set for the parent full language of the etymology-only language. If the `regex` values of multiple category specs match, the first one takes precedence. Recognized or predefined properties: `pagename`: Current pagename. `regex`: See above. `1`, `2`, `3`, ...: See above. `language_name`, `language_code`, `language_object`: See above. `parent_language_name`, `parent_language_code`, `parent_language_object`: See above. `nolang`: See above. `allow_etym_lang`: Language names may be etymology-only languages. See above. `description`: Override the description (normally taken directly from the pagename). `template_name`: Name of template which generates this category. `template_sample_call`: Syntax for calling the template. Defaults to "{{{template_name}}}|{{{language_code}}}". Used to display an example template call and the output of this call. `template_actual_sample_call`: Syntax for calling the template. Takes precedence over `template_sample_call` when generating example template output (but not when displaying an example template call) and is intended for a template call that uses the |nocat=1 parameter. `template_example_output`: Override the text that displays example template output (see `template_sample_call`). `additional_template_description`: Extra text to be displayed after the example template output. `parents`: Parent categories. Should be a list of elements, each of which is an object containing at least a name= and sort= field (same format as parents= for regular raw categories, except that the name= and sort= field will have {{{PROPERTY}}} references expanded). If no parents are specified, and the pagename is of the form "Requests for FOO by language", the parents will be "Request subcategories by language" with FOO as the sort key, along with any parents specified in `additional_umbrella_parents`. Otherwise, the `language_name` property must exist, and the parent will be "Requests concerning LANGNAME", with the pagename minus any initial "Requests for " as the sort key. Note that this does *NOT* apply if an etymology-only language is associated with the category, in which case `etym_parents` is used instead. `etym_parents`: Parent categories for categories with associated etymology-only languages. The format is the same as `parents`. If omitted, there are two parents by default: (1) The pagename (i.e. category name) with the language name replaced by the corresponding parent language name, with the value of `language_name` as the sort key; (2) "Requests concerning LANGNAME", with the pagename minus any initial "Requests for " as the sort key. `umbrella`: Parent all-language category. Sort key is based on the language name. This applies *ONLY* if a full language is associated with the category name (i.e. not if `nolang` is set or if `allow_etym_lang` is set and the associated language is an etymology-only language); otherwise there will be no umbrella category. `additional_umbrella_parents`: Additional parents to add to the umbrella (all-language) category along with "Request subcategories by language". `breadcrumb`: Specify the breadcrumb. If `parents` is given, there is no default (i.e. it will end up being the pagename). Otherwise, if the pagename is of the form "Requests for FOO by language", the default breadcrumb will be "FOO". Otherwise it is computed by removing the language name from the pagename and chopping out "Requests for" from the beginning and "in entries" and "for terms" from the end. Note that this does *NOT* apply if an etymology-only language is associated with the category, in which case `etym_breadcrumb` is used instead. `etym_breadcrumb`: Specify the breadcrumb for categories with associated etymology-only languages. Defaults to the value of `language_name`. `not_hidden_category`: Don't hide the category. `catfix`: Same as `catfix` in regular labels and raw categories, except that request-specific {{{PROPERTY}}} syntax is expanded. `toc_template`, `toc_template_full`: Same as the corresponding fields in regular labels and raw categories, except that request-specific {{{PROPERTY}}} syntax is expanded. In general, properties can contain references to templates (e.g. {{tl}} and {{para}}), which will be appropriately expanded (this expansion happens in the poscatboiler code, not in this module). The major exception is in the `template_sample_call` and `template_actual_sample_call` properties, which are surrounded by <pre>...</pre> when inserted, so template references are not expanded. Triple-brace property references are still expanded in these properties; but beware that if any of those property references contain template references, they won't be expanded. (This actually happens in the handlers for 'Request for SCRIPT script for LANG terms'; the sample call references {{{script_code}}}, whose definition therefore cannot contain template references. The solution is to define this property using a function.) ]=] local requests_categories = { { regex = "^Requests concerning (.+)$", allow_etym_lang = true, description = "Categories with {{{1}}} entries that need the attention of experienced editors.", parents = {{name = "प्रविष्टि रखरखाव", is_label = true, sort = "requests"}}, etym_parents = {{name = "Requests concerning {{{parent_language_name}}}", sort = "{{{1}}}"}, {name = "{{{1}}}", sort = "Requests"}}, umbrella = "Requests by language", breadcrumb = "Requests", not_hidden_category = true, }, { regex = "^Requests for etymologies in (.+) entries$", allow_etym_lang = true, umbrella = "Requests for etymologies by language", template_name = "rfe", }, { regex = "^Requests for expansion of etymologies in (.+) entries$", umbrella = "Requests for expansion of etymologies by language", template_name = "etystub", }, { regex = "^Requests for pronunciation in (.+) entries$", umbrella = "Requests for pronunciation by language", template_name = "rfp", }, { regex = "^Requests for audio pronunciation in (.+) entries$", umbrella = "Requests for audio pronunciation by language", template_name = "rfap", }, { regex = "^Requests for definitions in (.+) entries$", umbrella = "Requests for definitions by language", template_name = "rfdef", }, { regex = "^Requests for clarification of definitions in (.+) entries$", umbrella = "Requests for clarification of definitions by language", template_name = "rfclarify", }, } for _, spec_with_pos in ipairs { {"inflections", "rfinfl"}, {"plural forms"}, {"tone", "rftone"}, {"accents"}, {"aspect", "rfaspect"}, {"animacy"}, {"gender", "rfgender"}, {"noun class"}, } do local property, rftemplate = unpack(spec_with_pos) table.insert(requests_categories, { -- This is for part-of-speech-specific categories such as -- "Requests for inflections in Northern Ndebele noun entries" or -- "Requests for accents in Ukrainian proper noun entries". -- Here and below, we assume that the part of speech is begins with -- a lowercase letter, while the preceding language name ends in a -- capitalized word. Note that this entry comes before the -- following one and takes precedence over it. regex = ("^Requests for %s in (.-) ([a-z]+[a-z ]*) entries$"):format(property), parents = {{name = ("Requests for %s in {{{language_name}}} entries"):format(property), sort = "{{{2}}}"}}, umbrella = ("Requests for %s of {{pluralize|{{{2}}}}} by language"):format(property), breadcrumb = "{{{2}}}", template_name = rftemplate, template_sample_call = rftemplate and ("{{%s|{{{language_code}}}|{{{2}}}}}"):format(rftemplate) or nil, } ) table.insert(requests_categories, { regex = ("^Requests for %s in (.+) entries$"):format(property), umbrella = ("Requests for %s by language"):format(property), template_name = rftemplate, } ) table.insert(requests_categories, { regex = ("^Requests for %s of (.+) by language$"):format(property), nolang = true, } ) end extend(requests_categories, { { regex = "^Requests for example sentences in (.+)$", umbrella = "Requests for example sentences by language", template_name = "rfex", }, { regex = "^Requests for quotations in (.+)$", umbrella = "Requests for quotations by language", additional_umbrella_parents = {"Quotation maintenance"}, template_name = "rfquote", }, { regex = "^Requests for translations into (.+)$", allow_etym_lang = true, umbrella = "Requests for translations by language", template_name = "t-needed", catfix = "en", }, { regex = "^Requests for translations of (.+) usage examples$", allow_etym_lang = true, umbrella = "Requests for translations of usage examples by language", additional_umbrella_parents = {"Usage example maintenance"}, template_name = "t-needed", template_sample_call = "{{t-needed|{{{language_code}}}|usex}}", template_actual_sample_call = "{{t-needed|{{{language_code}}}|usex|nocat=1}}", additional_template_description = "The {{tl|ux}}, {{tl|uxi}}, {{tl|ja-usex}} and {{tl|zh-x}} templates automatically add the page to this category if the example is in a foreign language and the translation is missing." }, { regex = "^Requests for translations of (.+) quotations$", allow_etym_lang = true, umbrella = "Requests for translations of quotations by language", additional_umbrella_parents = {"Quotation maintenance"}, template_name = "t-needed", template_sample_call = "{{t-needed|{{{language_code}}}|quote}}", template_actual_sample_call = "{{t-needed|{{{language_code}}}|quote|nocat=1}}", additional_template_description = "The {{tl|quote}}, and {{tl|Q}} templates automatically add the page to this category if the example is in a foreign language and the translation is missing." }, { regex = "^Requests for review of (.+) translations$", allow_etym_lang = true, umbrella = "Requests for review of translations by language", template_name = "t-check", template_sample_call = "{{t-check|{{{language_code}}}|example}}", template_example_output = "", catfix = "en", }, { regex = "^Requests for transliteration of (.+) terms$", umbrella = "Requests for transliteration by language", template_name = "rftranslit", additional_template_description = "The {{tl|head}} template, and the large number of language-specific variants of it, automatically add " .. "the page to this category if the example is in a foreign language and no transliteration can be generated (particularly in languages without " .. "automated transliteration, such as Hebrew and Persian).", }, { regex = "^Requests for transliteration of (.+) usage examples$", umbrella = "Requests for transliteration of usage examples by language", additional_umbrella_parents = {"Usage example maintenance"}, template_name = "rftranslit", template_sample_call = "{{rftranslit|{{{language_code}}}}}", template_actual_sample_call = "{{rftranslit|{{{language_code}}}|nocat=1}}", catfix = false, additional_template_description = "The {{tl|ux}} and {{tl|uxi}} templates automatically add the page to this category if the example " .. "is in a foreign language and no transliteration can be generated (particularly in languages without automated transliteration, such as " .. "Hebrew and Persian).", }, { regex = "^Requests for transliteration of (.+) quotations$", umbrella = "Requests for transliteration of quotations by language", additional_umbrella_parents = {"Quotation maintenance"}, catfix = false, additional_template_description = "The {{tl|quote}} and {{code|<nowiki>{{quote-*}}</nowiki>}} templates automatically add the page to this category if the quotation " .. "is in a foreign language and no transliteration can be generated (particularly in languages without automated transliteration, such as " .. "Hebrew and Persian).", }, { regex = "^Requests for native script for (.+) terms$", allow_etym_lang = true, etym_parents = { {name = "Requests for native script for {{{parent_language_name}}} terms", sort = "{{{1}}}"}, {name = "Requests concerning {{{language_name}}}", sort = "native script"}, }, umbrella = "Requests for native script by language", template_name = "rfscript", template_actual_sample_call = "{{rfscript|{{{language_code}}}|nocat=1}}", catfix = false, additional_template_description = "Many templates such as {{tl|l}}, {{tl|m}} and {{tl|t}} automatically place the page in this category when they are missing the term but have been provided with a transliteration." }, { regex = "^Requests for native script in (.+) usage examples$", umbrella = "Requests for native script in usage examples by language", additional_umbrella_parents = {"Usage example maintenance"}, template_name = "rfscript", template_sample_call = "{{rfscript|{{{language_code}}}|usex=1}}", template_actual_sample_call = "{{rfscript|{{{language_code}}}|usex=1|nocat=1}}", catfix = false, additional_template_description = "The {{tl|ux}} and {{tl|uxi}} templates automatically add the page to this category if the example itself is missing but the translation is supplied." }, { regex = "^Requests for native script in (.+) quotations$", umbrella = "Requests for native script in quotations by language", additional_umbrella_parents = {"Quotation maintenance"}, template_name = "rfscript", template_sample_call = "{{rfscript|{{{language_code}}}|quote=1}}", template_actual_sample_call = "{{rfscript|{{{language_code}}}|quote=1|nocat=1}}", catfix = false, additional_template_description = "The {{tl|quote}} and {{code|<nowiki>{{quote-*}}</nowiki>}} templates automatically add the page to this category if the quotation itself is missing but the translation is supplied." }, { regex = "^Requests for (.+) script for (.+) terms$", language_name = "{{{2}}}", allow_etym_lang = true, parents = {{name = "Requests for native script for {{{language_name}}} terms", sort = "{{{1}}}"}}, etym_parents = { {name = "Requests for native script for {{{language_name}}} terms", sort = "{{{1}}}"}, {name = "Requests for {{{1}}} script for {{{parent_language_name}}} terms", sort = "{{{language_name}}}"}, {name = "Requests concerning {{{language_name}}}", sort = "{{{1}}} script"}, }, umbrella = "Requests for {{{1}}} script by language", breadcrumb = "{{{1}}}", etym_breadcrumb = "{{{1}}}", template_name = "rfscript", -- NOTE: The following is used in `template_sample_call` and `template_actual_sample_call`, meaning the -- conversion of script name to script code needs to be done using an inline function like this, instead of -- a {{#invoke:...}} template call. script_code = function(items) return script_name_to_code(items["1"]) end, template_sample_call = "{{rfscript|{{{language_code}}}|sc={{{script_code}}}}}", template_actual_sample_call = "{{rfscript|{{{language_code}}}|sc={{{script_code}}}|nocat=1}}", catfix = false, additional_template_description = "Many templates such as {{tl|l}}, {{tl|m}} and {{tl|t}} automatically place the page in this category when they are missing the term but have been provided with a transliteration." }, { regex = "^Requests for (.+) script by language$", parents = {{name = "Requests for script by language", sort = "{{{1}}}"}}, breadcrumb = "{{{1}}}", nolang = true, }, { regex = "^Requests for script by language$", nolang = true, }, { regex = "^Requests for images in (.+) entries$", umbrella = "Requests for images by language", template_name = "rfi", }, { regex = "^Requests for references for (.+) terms$", umbrella = "Requests for references by language", template_name = "rfref", }, { regex = "^Requests for references for etymologies in (.+) entries$", parents = {{name = "Requests for references for {{{language_name}}} terms", sort = "etymologies"}}, umbrella = "Requests for references for etymologies by language", breadcrumb = "Etymologies", template_name = "rfv-etym", }, { regex = "^Requests for references for pronunciations in (.+) entries$", parents = {{name = "Requests for references for {{{language_name}}} terms", sort = "pronunciations"}}, umbrella = "Requests for references for pronunciations by language", breadcrumb = "Pronunciations", template_name = "rfv-pron", }, { regex = "^Requests for attention concerning (.+)$", umbrella = "Requests for attention by language", breadcrumb = "Attention", template_name = "attention", template_sample_call = "{{attention|{{{language_code}}}|insert a brief description of the request here}}", template_example_output = "This template does not generate any text in entries, but can be visualised by enabling the Catch My Attention gadget. See {{section link|Template:attention#Visibility}}.", -- These pages typically contain a mixture of English and native-language entries, so disable catfix. catfix = false, -- Setting catfix = false will normally trigger the English table of contents template. -- We still want the native-language table of contents template, though. toc_template = "{{{language_code}}}-categoryTOC", toc_template_full = "{{{language_code}}}-categoryTOC/full", }, { regex = "^Requests for cleanup in (.+) entries$", umbrella = "Requests for cleanup by language", template_name = "rfc", template_actual_sample_call = "{{rfc|{{{language_code}}}|nocat=1}}", }, { regex = "^Requests for cleanup of Pronunciation N headers in (.+) entries$", umbrella = "Requests for cleanup of Pronunciation N headers by language", template_name = "rfc-pron-n", template_actual_sample_call = "{{rfc-pron-n|{{{language_code}}}|nocat=1}}", template_example_output = "This template does not generate any text in entries.", additional_template_description = [=[ The purpose of this category is to tag entries that use headers with "Pronunciation" and a number. While these headers and structure are sometimes used, they are not specifically prescribed by [[WT:ELE]]. No complete proposal has yet been made on how they should work, what the semantics are, or how they interact with multiple etymologies. As a result they should generally be avoided. Instead, merge the entries (possibly under multiple Etymology sections, if appropriate), and list all pronunciations, appropriately tagged, under a Pronunciation header. [[User:KassadBot|KassadBot]] tags these entries (or used to tag these entries, when the bot was operational). At some point if a proposal is made and adopted as policy, these entries should be reviewed. This category is hidden.]=], }, { regex = "^Requests for deletion in (.+) entries$", umbrella = "Requests for deletion by language", template_name = "rfd", template_actual_sample_call = "{{rfd|{{{language_code}}}|nocat=1}}", }, { regex = "^Requests for verification in (.+) entries$", umbrella = "Requests for verification by language", template_name = "rfv", }, { regex = "^Requests for attention in (.+) etymologies$", umbrella = "Requests for attention by language" }, { regex = "^Requests for quotations/(.+)$", description = "Requests for a quotation or for quotations from {{{1}}}.", parents = {{name = "Requests for quotations by source", sort = "{{{1}}}"}}, breadcrumb = "{{{1}}}", nolang = true, template_name = "rfquotek", template_sample_call = "{{rfquotek|LANGCODE|{{{1}}}}}", template_example_output = "\n(where LANGCODE is the language code of the entry)\n\nIt results in the message below:\n\n{{rfquotek|und|{{{1}}}}}", }, { regex = "^Requests for date in (.+) entries$", umbrella = "Requests for date by language", additional_umbrella_parents = {"Quotation maintenance"}, template_name = "rfdate", additional_template_description = "The quotation templates, such as {{tl|quote-book}} and {{tl|quote-journal}}, " .. "automatically add the page to this category if neither {{para|date}} nor {{para|year}} is provided. Providing the " .. "parameter in each case on the page automatically removes the article from this category. See " .. "[[Wiktionary:Quotations]] for information about formatting dates and quotations.", }, { regex = "^Requests for date/(.+)$", description = "{{rfd|section=Category:Requests for date by source}}Requests for a date for a quotation or quotations from {{{1}}}.", parents = {{name = "Requests for date by source", sort = "{{{1}}}"}}, breadcrumb = "{{{1}}}", nolang = true, template_name = "rfdatek", template_sample_call = "{{rfdatek|LANGCODE|{{{1}}}}}", template_example_output = "\n(where LANGCODE is the language code of the entry)\n\nIt results in the message below:\n\n{{rfdatek|und|{{{1}}}}}", }, { regex = "^Requests for attestation of (.+) terms$", umbrella = "Requests for attestation of terms by language", breadcrumb = "Attestation", additional_template_description = "The {{tl|LDL}} template adds this category when a language code is supplied in {{para|1}} (as it should be)." }, }) local user_competency_additional_template_description = "This is added by user-competency categories such as " .. "[[:Category:User fr-4]], which groups users who speak French at level 4 (near-native proficiency), when " .. "the native-language text indicating this fact is missing. The appropriate translation should mirror the " .. "English text also displayed (e.g. in this case \"These users speak French at a '''near native''' " .. "level.\"), and should be supplied to {{tl|auto cat}} using the {{para|text}} parameter. The mention of the " .. "language in the text should be surrounded by double angle brackets, e.g. \"&lt;&lt;français>>\", which " .. "causes it to be automatically linked to the appropriate parent category." local user_competency_parents = {{name = "Requests for translations in user-competency categories by number of users", sort = function(items) return " " .. ("%010d"):format(items["1"]) end, }} extend(requests_categories, { { regex = "^Requests for translations in user%-competency categories with ([0-9]+)%-([0-9]+) users$", description = "Requests for translation of phrases indicating user competencies for specific languages and specific competency levels, for categories with {{{1}}}-{{{2}}} users.", additional_template_description = user_competency_additional_template_description, parents = user_competency_parents, breadcrumb = "{{{1}}}-{{{2}}}", nolang = true, }, { regex = "^Requests for translations in user%-competency categories with ([0-9]+) (users?)$", description = "Requests for translation of phrases indicating user competencies for specific languages and specific competency levels, for categories with {{{1}}} {{{2}}}.", additional_template_description = user_competency_additional_template_description, parents = user_competency_parents, breadcrumb = "{{{1}}}", nolang = true, } }) table.insert(raw_handlers, function(data) local items local function init_items() items = {pagename = data.category} end local function expand_value(item, val) if not val then return val elseif is_callable(val) then return expand_value(item .. " ⇒ function", val(items)) elseif type(val) == "table" then for k, v in pairs(val) do val[k] = expand_value(item .. " ⇒ " .. k, v) end return val elseif type(val) == "number" then val = tostring(val) end if type(val) ~= "string" then error(("The item '%s' on page %s is of type %s and can't be concatenated"):format( item, items.pagename, type(val))) end -- Replaces pseudo-template code {{{ }}} with the corresponding member of the "items" table. Has to be done -- recursively, since some of the items are nested: -- {{{template_sample_call_with_temp}}} -- ⇓ -- {{{{{template_name}}}|{{{language_code}}}}} -- ⇓ -- {{attention|en}} if val:find("{{{") then val = mw.ustring.gsub(val, "{{{([^%}%{]+)}}}", function(prop) local propval = items[prop] if not propval then error(("The item '%s' (expanded from property '%s' on page %s) was not found in the 'items' table"): format(prop, item, items.pagename)) end return expand_value(item .. " ⇒ " .. prop, propval) end ) end return val end local function expand_items_value(item) return expand_value(item, items[item]) end local function convert_items_to_category_data(items) if not items.nolang then items.language_name = items.language_name or "{{{1}}}" items.language_name = expand_items_value("language_name") items.language_object = require(languages_module).getByCanonicalName(items.language_name, true, items.allow_etym_lang) items.language_code = items.language_object:getCode() items.is_etym_lang = items.language_object:hasType("etymology-only") if items.is_etym_lang then items.parent_language_object = items.language_object:getFull() -- Reject weird cases where etymology language has no parent. if not items.parent_language_object then return nil end items.parent_language_code = items.parent_language_object:getCode() items.parent_language_name = items.parent_language_object:getCanonicalName() -- Reject weird cases where the parent language has the same name as the child etymology language. In -- that case, we'll get an infinite parent-category loop. This actually happens, e.g. with Rudbari and -- Bashkardi. if items.parent_language_name == items.language_name then return nil end else end end if items.template_name then items.template_sample_call = items.template_sample_call or "{{{{{template_name}}}|{{{language_code}}}}}" items.full_text_about_the_template = "To make this request, in this specific language, use this code in the entry (see also the documentation at [[Template:{{{template_name}}}]]):\n\n<pre>{{{template_sample_call}}}</pre>" if items.template_example_output then items.full_text_about_the_template = items.full_text_about_the_template .. " " .. items.template_example_output else items.template_actual_sample_call = items.template_actual_sample_call or items.template_sample_call items.full_text_about_the_template = items.full_text_about_the_template .. "\nIt results in the message below:\n\n{{{template_actual_sample_call}}}" end if items.additional_template_description then items.full_text_about_the_template = items.full_text_about_the_template .. "\n\n" .. items.additional_template_description end else items.full_text_about_the_template = items.additional_template_description end local parents, breadcrumb if items.is_etym_lang then parents = items.etym_parents breadcrumb = expand_items_value("etym_breadcrumb") or items.language_name else parents = items.parents breadcrumb = expand_items_value("breadcrumb") end if parents then for _, parent in ipairs(parents) do parent.name = expand_value("parent.name", parent.name) parent.sort = {sort_base = expand_value("parent.sort", parent.sort), lang = "en"} end else local umbrella_type = items.pagename:match("^Requests for (.+) by language$") if umbrella_type then breadcrumb = breadcrumb or umbrella_type parents = {{name = "Request subcategories by language", sort = umbrella_type}} if items.additional_umbrella_parents then extend(parents, items.additional_umbrella_parents) end elseif not items.language_name then error("Internal error: Don't know how to compute parents for non-language-specific category '" .. items.pagename .. "'") else local requests_concerning_breadcrumb = items.pagename:gsub(" " .. pattern_escape(items.language_name), "") requests_concerning_breadcrumb = requests_concerning_breadcrumb:gsub("^Requests for ", ""):gsub(" in entries$", ""):gsub(" for terms$", "") local requests_concerning_parent = { name = "Requests concerning " .. items.language_name, sort = {sort_base = requests_concerning_breadcrumb, lang = "en"} } if items.is_etym_lang then local parent_lang_cat = items.pagename:gsub(pattern_escape(items.language_name), replacement_escape(items.parent_language_name)) parents = { {name = parent_lang_cat, sort = {sort_base = items.language_name, lang = "en"}}, requests_concerning_parent } else breadcrumb = breadcrumb or requests_concerning_breadcrumb parents = {requests_concerning_parent} end end end if not items.nolang and not items.is_etym_lang and items.umbrella ~= false then table.insert(parents, { name = expand_items_value("umbrella"), sort = {sort_base = items.language_name, lang = "en"} }) end local additional = expand_items_value("full_text_about_the_template") if items.pagename:find(" by language$") then additional = "{{{umbrella_msg}}}" .. (additional and "\n\n" .. additional or "") end return { description = expand_items_value("description") or items.pagename .. ".", lang = items.parent_language_code or items.language_code, additional = additional, parents = parents, -- If no breadcrumb= and not an etym-only language, it will default to the category name breadcrumb = breadcrumb, catfix = expand_items_value("catfix"), toc_template = expand_items_value("toc_template"), toc_template_full = expand_items_value("toc_template_full"), hidden = not items.nolang and not items.not_hidden_category, can_be_empty = true, } end -- First look for a regular (usually language or script-specific) category. for _, category in ipairs(requests_categories) do local matchvals = {mw.ustring.match(data.category, category.regex)} if #matchvals > 0 then init_items() for key, value in pairs(category) do items[key] = value end for key, value in ipairs(matchvals) do items["" .. key] = value end local catdata = convert_items_to_category_data(items) if catdata then return catdata end end end -- Now look for umbrella categories. for _, category in ipairs(requests_categories) do if data.category == category.umbrella then init_items() items.nolang = true items.additional_umbrella_parents = category.additional_umbrella_parents local catdata = convert_items_to_category_data(items) if catdata then return catdata end end end return nil end) table.insert(raw_handlers, function(data) local langname = data.category:match("^Terms with (.+) translations$") local lang = langname and require(languages_module).getByCanonicalName(langname, true, true) if lang then local langcode = lang:getCode() local parents, breadcrumb_and_first_sort_key if lang:hasType("etymology-only") then parents = { "Terms with " .. lang:getFullName() .. " translations", {name = langname, sort = "Translations"}, } breadcrumb_and_first_sort_key = lang:getCanonicalName() else parents = { {name = "प्रविष्टि रखरखाव", is_label = true, lang = langcode}, { name = "Terms with translations by language", sort = {sort_base = langname, lang = "en"} }, } breadcrumb_and_first_sort_key = "Translations" end return { description = "Entries that contain translations into " .. langname .. " which were added using one of the translation templates, such as {{tl|t|" .. langcode .. "|...}}, {{tl|t+|" .. langcode .. "|...}}, etc.", parents = parents, breadcrumb_and_first_sort_key = breadcrumb_and_first_sort_key, catfix = false, can_be_empty = true, hidden = true, } end end) local recognized_taxtypes = require(table_module).listToSet { "ambiguous", "binomial", "branch", "clade", "cladus", "class", "cohort", "convariety", "cultivar group", "cultivar", "division", "empire", "epifamily", "epithet", "family", "form taxon", "form", "genus", "grade", "grandorder", "group", "hybrid", "informal group", "infraclass", "infracohort", "infrakingdom", "infraorder", "infraphylum", "infraspecies", "kingdom", "magnorder", "megacohort", "mirorder", "morph", "nothogenus", "nothospecies", "nothosubspecies", "nothovariety", "obsolete", "oofamily", "order", "parvclass", "parvorder", "phylum", "section", "series", "serovar", "species group", "species", "stem", "stirps", "strain", "subclass", "subcohort", "subdivision", "subfamily", "subgenus", "subgroup", "subinfraorder", "subkingdom", "suborder", "subphylum", "subsection", "subspecies", "subterclass", "subtribe", "superclass", "supercohort", "superfamily", "supergroup", "superorder", "superphylum", "supertribe", "taxon", "tribe", "trinomial", "undescribed species", "unknown", "unranked group", "variety", "virus complex", } table.insert(raw_handlers, function(data) local taxtype = data.category:match("^Entries using missing taxonomic name %((.*)%)$") if taxtype and recognized_taxtypes[taxtype] then return { description = "Entries that link to wikispecies because there is no corresponding Wiktionary entry for the taxonomic name in the template {{tl|taxlink}}.", additional = "The missing name is one or more of those enclosed in {{tl|taxlink}}. The entries are sorted by the missing taxonomic name.", parents = {{name = "Entries using missing taxonomic names", sort = {sort_base = taxtype, lang = "en"}}}, breadcrumb = taxtype, hidden = true, } end end) return {LABELS = labels, RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers} bu2qykrkqiymf69er0pjs9iplmemtyr मॉड्यूल:category tree/प्रविष्टि रखरखाव 828 306958 487957 487808 2026-09-03T19:55:22Z SM7 6218 [[मॉड्यूल:category tree/entry maintenance]] तक का अनुप्रेषण हटाया 487957 Scribunto text/plain local labels = {} local raw_categories = {} local raw_handlers = {} local functions_module = "Module:fun" local languages_module = "Module:languages" local scripts_module = "Module:scripts" local string_pattern_escape_module = "Module:string/patternEscape" local string_replacement_escape_module = "Module:string/replacementEscape" local table_module = "Module:table" local extend = require(table_module).extend local is_callable = require(functions_module).is_callable local pattern_escape = require(string_pattern_escape_module) local replacement_escape = require(string_replacement_escape_module) local unpack = unpack or table.unpack -- Lua 5.2 compatibility ----------------------------------------------------------------------------- -- -- -- LABELS -- -- -- ----------------------------------------------------------------------------- labels["प्रविष्टि रखरखाव"] = { description = "{{{langname}}} entries, or entries in other languages containing {{{langname}}} terms, that are being tracked for attention and improvement by editors.", parents = {{name = "{{{langcat}}}", raw = true}}, umbrella_parents = "मूलभूत श्रेणी", } labels["entries with incorrect language header"] = { description = "{{{langname}}} entries that have been placed under the wrong language header.", additional = "This can happen for several reasons:\n" .. "* Typos.\n" .. "* Vandalism.\n" .. "* Using the wrong language code.\n" .. "* Using an alternative name for the language.\n" .. "* Using special characters which haven't been used in the name given in the language data modules.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries without References header"] = { description = "{{{langname}}} entries without a References header.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries without References or Further reading header"] = { description = "{{{langname}}} entries without a References or Further reading header.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries that don't exist"] = { description = "{{{langname}}} terms that do not meet the [[Wiktionary:Criteria for inclusion|criteria for inclusion]] (CFI). They are added to the category with the template {{tl|no entry|{{{langcode}}}}}.", parents = {"प्रविष्टि रखरखाव"}, umbrella_parents = "मूलभूत श्रेणी", } labels["entries with etymology trees"] = { description = "{{{langname}}} entries that display an etymology tree generated by the template {{tl|etymon}}.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries with etymology texts"] = { description = "{{{langname}}} entries that display an etymology generated by the template {{tl|etymon}}.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries with etymon"] = { description = "{{{langname}}} entries that use the template {{tl|etymon}}.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries with etymology text stop language not in chain"] = { description = "{{{langname}}} entries where {{tl|etymon}} is used with {{para|text}} set to stop at a language but that language never appears in the rendered etymology chain.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing missing etymons"] = { description = "Entries which use the {{tl|etymon}} template to reference an etymon that cannot be found, either because the target page does not exist (redlink) or because it has no {{tl|etymon}} template.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing ambiguous etymons"] = { description = "Entries which use the {{tl|etymon}} template to reference an etymon without the ID, when the target page contains multiple {{tl|etymon}} templates, and an ID is therefore required to select the correct {{tl|etymon}}.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing etymons with mismatched IDs"] = { description = "Entries which use the {{tl|etymon}} template with a mismatched ID. For example, {{code|lang:entry<id:mismatched ID>}}", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing pages with multiple etymons missing IDs"] = { description = "Entries which use the {{tl|etymon}} template to link to a page that has more than one {{tl|etymon}} template for the same language, where at least one of those templates has no {{para|id}}. When several {{tl|etymon}} templates share a language section, each must have a distinct {{para|id}} so that links and descendants logic can tell them apart.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing pages with etymology sections missing etymons"] = { description = "Entries which use the {{tl|etymon}} template to link to a page that has more than one etymology section for the same language, where at least one section contains a {{tl|etymon}} template for that language and at least one other etymology section does not.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing etymons without Descendants sections"] = { description = "Entries which use the {{tl|etymon}} template to reference an etymon whose source entry has no Descendants section.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing etymons without this term in Descendants sections"] = { description = "Entries which use the {{tl|etymon}} template to reference an etymon whose source entry has a Descendants section, but does not list the current term there.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries with language name categories using raw markup"] = { description = "{{{langname}}} entries that have been placed in a language name category using raw wiki markup (i.e. {{code|[[<nowiki/>Category:{{{langname}}} ...]]}}). They should be added using {{tl|cln|{{{langcode}}}|...}} instead.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries with topic categories using raw markup"] = { description = "{{{langname}}} entries that have been placed in a topic category using raw wiki markup (i.e. {{code|[[<nowiki/>Category:{{{langcode}}}:...]]}}). They should be added using {{tl|C|{{{langcode}}}|...}} instead.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries with outdated source"] = { description = "{{{langname}}} entries that have been partly or fully imported from an outdated source.", parents = {"प्रविष्टि रखरखाव"}, } labels["entries with inflection not matching pagename"] = { description = "{{{langname}}} entries which have an inflection table whose lemma form does not match the page name.", additional = "This is usually the result of incorrect or missing parameters.", breadcrumb_and_first_sort_key = "inflection not matching pagename", parents = {"प्रविष्टि रखरखाव"}, hidden = true, can_be_empty = true, } labels["undefined derivations"] = { description = "{{{langname}}} etymologies using {{tl|undefined derivation}}, where a more specific template such as {{tl|borrowed}} or {{tl|inherited}} should be used instead.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["descendants to be fixed in desctree"] = { description = "Entries that use {{tl|desctree}} to link to {{{langname}}} entries with no Descendants section.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["term requests"] = { description = "Entries with [[Template:der]], [[Template:inh]], [[Template:m]] and similar templates lacking the parameter for linking to {{{langname}}} terms.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["redlinks"] = { description = "Links to {{{langname}}} entries that have not been created yet.", parents = {"प्रविष्टि रखरखाव"}, catfix = false, can_be_empty = true, hidden = true, } labels["terms with IPA pronunciation"] = { description = "{{{langname}}} terms that include the pronunciation in the form of IPA.", additional = "For requests related to this category, see [[:Category:Requests for pronunciation in {{{langname}}} entries]].", parents = {"प्रविष्टि रखरखाव"}, } labels["terms with enPR pronunciation"] = { description = "{{{langname}}} terms that include the pronunciation in the form of enPR.", additional = "For requests related to this category, see [[:Category:Requests for pronunciation in {{{langname}}} entries]].", parents = {"प्रविष्टि रखरखाव"}, } labels["terms with Indic pronunciation"] = { description = "{{langname}} terms that include the pronunciation in the form of ISO 15919.", additional = "For requests related to this category, see [[:Category:Requests for pronunciation in {{{langname}}} entries]].", parents = {"प्रविष्टि रखरखाव"}, } labels["IPA pronunciations with invalid separators"] = { description = "{{{langname}}} terms with IPA using invalid separators such as /.ˈ/, /.ˌ/, a dot followed by primary or secondary stress; or /ˈ / or /ˌ /, primary or secondary stress followed by a space.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["terms with hyphenation"] = { description = "{{{langname}}} terms that include hyphenation.", parents = {"प्रविष्टि रखरखाव"}, } labels["terms with audio pronunciation"] = { description = "{{{langname}}} terms that include the pronunciation in the form of an audio file.", additional = "For requests related to this category, see [[:Category:Requests for audio pronunciation in {{{langname}}} entries]].", parents = {"प्रविष्टि रखरखाव"}, } labels["terms with nonstandard or incorrect audio pronunciations"] = { description = "{{{langname}}} terms which have been tagged as having pronunciations which are nonstandard or incorrect.", parents = {"terms with audio pronunciation"}, can_be_empty = true, hidden = true, } labels["entries missing Template:reconstructed"] = { description = "Reconstructed {{{langname}}} entries which do not have the {{tl|reconstructed}} template.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } local function add_manual_param_category(label, desc, addl_intro, include_addl_continuation) labels[label] = { description = desc or "Pages containing {{{langname}}} " .. label .. ".", additional = addl_intro .. (not include_addl_continuation and "" or "\n\n" .. "Note that the pages in this category are not necessarily the same as the actual term in question. This " .. "frequently happens, for example, with English pages with translation sections, where the term that " .. "triggers the addition of the category is one of the translations."), parents = {"प्रविष्टि रखरखाव"}, -- Set catfix = false because the page will have a mixture of native-language and -- non-native-language pages, but include the normal native-language table of contents headers -- because most pages are in the native language. catfix = false, toc_template = "{{{langcode}}}-categoryTOC", toc_template_full = "{{{langcode}}}-categoryTOC/full", can_be_empty = true, hidden = true, } end add_manual_param_category("terms in nonstandard scripts", nil, "Pages are placed here if they contain terms written in a script that isn't in the language's " .. "list of scripts in the language data. This may mean the script should be added to the list, or that the wrong language code has been used.", true) add_manual_param_category("terms with non-redundant manual transliterations", nil, "Pages are placed here if they contain terms whose transliteration has been specified manually using " .. "{{para|tr}} or a similar parameter and is different from the transliteration which is automatically generated.", true) add_manual_param_category("terms with redundant transliterations", nil, "Pages are placed here if they contain terms whose transliteration has been specified manually using " .. "{{para|tr}} or a similar parameter and is the same as the transliteration which is automatically generated.", true) add_manual_param_category("terms with non-redundant manual script codes", nil, "Pages are placed here if they contain terms whose script code has been specified manually using " .. "{{para|sc}} or a similar parameter and is different from the script code which is automatically generated.", true) add_manual_param_category("terms with redundant script codes", nil, "Pages are placed here if they contain terms whose script code has been specified manually using " .. "{{para|sc}} or a similar parameter and is the same as the script code which is automatically generated.", true) add_manual_param_category("terms with non-redundant non-automated sortkeys", "{{{langname}}} terms with non-redundant non-automated sortkeys.", "Terms are placed here if they have been sorted using a sortkey other than the one which is automatically " .. "generated. This can happen for two reasons:\n# A different sortkey has been specified using the {{para|sort}} " .. "parameter.\n# One or more categories have been added using raw wikitext, which means the page's default " .. "sortkey is used for that category. If that default sortkey is different from the automatic sortkey, then the " .. "page will also be added here.") add_manual_param_category("terms with redundant sortkeys", "{{{langname}}} terms with redundant sortkeys.", "Terms are placed here if their sortkey has been specified using the {{para|sort}} parameter, and it the same " .. "as the one which is automatically generated.") add_manual_param_category("links with redundant target parameters", "Pages containing {{{langname}}} links where the alt text could replace the link target, instead of being given " .. "separately.", "This occurs when the only difference between the link target and the alt text is that the alt text contains " .. "diacritics (or other characters) which would have been ignored anyway had they been included in the link " .. "target. For example, {{tl|l|la|amo|amō}} ({{l|la|amo|amō}}) is exactly the same as {{tl|l|la|amō}} " .. "({{l|la|amō}}), because macrons are automatically stripped from Latin link targets, even though they're still " .. "displayed.") add_manual_param_category("links with ignored alt parameters", "Pages containing {{{langname}}} links where the {{para|alt}} parameter has been ignored.", "This occurs when the main linked text includes a wikilink.") add_manual_param_category("links with redundant alt parameters", "Pages containing {{{langname}}} links where the {{para|alt}} parameter is redundant.", "This occurs when the alt text makes no difference to the output. For example, {{tl|l|en|foo|foo}} " .. "({{l|en|foo|foo}}) is exactly the same as {{tl|l|en|foo}} ({{l|en|foo}}).") add_manual_param_category("links with ignored id parameters", "Pages containing {{{langname}}} links where the {{para|id}} parameter has been ignored.", "This occurs when the main linked text includes a wikilink.") add_manual_param_category("links with redundant wikilinks", "Pages containing {{{langname}}} links which contain a redundant wikilink.", "This occurs if link target consists of a single wikilink, which should instead be entered in the " .. "conventional manner without link brackets. For example, {{tl|l|en|<nowiki>[[foo]]</nowiki>}} " .. "is the same as {{tl|l|en|foo}}, and {{tl|l|en|<nowiki>[[foo|bar]]</nowiki>}} is the same as " .. "{{tl|l|en|foo|bar}}.\n\nThis also occurs when link templates are nested inside each other " .. "unnecessarily: e.g. {{tl|l|en|{{tl|l|en|foo}}}}") add_manual_param_category("links with manual fragments", "Pages containing {{{langname}}} links where a manual link fragment has been given.", "This occurs when the link fragment has been specified using {{code|#}} after the term, " .. "which overrides the normal fragment generated by link templates that points to the relevant " .. "language section.\n\nLink fragments are used to point to a specific section on a target page, and " .. "it is preferable to use the {{para|id}} parameter to do this, since it is less likely to break if " .. "additional content is added to the target page: for example, the fragment {{code|#Adjective}} " .. "will start pointing to the wrong section if another language with an adjective section is added above " .. "the intended language.") labels["descendant hubs"] = { description = "{{{langname}}} terms that do not mean more than the sum of their parts but exist for listing two or more inclusion-worthy descendants.", parents = {"प्रविष्टि रखरखाव"}, } labels["terms needing to be assigned to a sense"] = { description = "{{{langname}}} entries that have terms under headers such as \"Synonyms\" or \"Antonyms\" not assigned to a specific sense of the entry in which they appear. Use [[Template:syn]] or [[Template:ant]] to fix these.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } --[=[ labels["terms with inflection tables"] = { description = "{{{langname}}} entries that contain inflection tables.". additional = "For requests related to this category," see [[:Category:Requests for inflections in {{{langname}}} entries]].", parents = {"प्रविष्टि रखरखाव"}, } ]=] labels["terms with collocations"] = { description = "{{{langname}}} entries that contain [[collocation]]s that were added using templates such as {{tl|co}}.", additional = "For requests related to this category, see [[:Category:Requests for collocations in {{{langname}}}]]. See also [[:Category:Requests for quotations in {{{langname}}}]] and [[:Category:Requests for example sentences in {{{langname}}}]].", parents = {"प्रविष्टि रखरखाव"}, umbrella_parents = "Collocation maintenance", } labels["terms with usage examples"] = { description = "{{{langname}}} entries that contain usage examples that were added using templates such as {{tl|ux}}.", additional = "For requests related to this category, see [[:Category:Requests for example sentences in {{{langname}}}]]. See also [[:Category:Requests for collocations in {{{langname}}}]] and [[:Category:Requests for quotations in {{{langname}}}]].", parents = {"प्रविष्टि रखरखाव"}, umbrella_parents = "Usage example maintenance", } labels["terms with quotations"] = { description = "{{{langname}}} entries that contain quotes that were added using templates such as {{tl|quote}}, {{tl|quote-book}}, {{tl|quote-journal}}, etc.", additional = "For requests related to this category, see [[:Category:Requests for quotations in {{{langname}}}]]. See also [[:Category:Requests for example sentences in {{{langname}}}]].", parents = {"प्रविष्टि रखरखाव"}, umbrella_parents = "Quotation maintenance", } labels["terms with interlinear glossed text"] = { description = "{{{langname}}} entries that contain interlinear glossed text added using {{tl|interlinear}}.", parents = {"प्रविष्टि रखरखाव"}, } labels["terms with redundant head parameter"] = { description = "{{{langname}}} terms that contain a redundant head= parameter in their headword (called using {{tl|head}} or a language-specific equivalent).", additional = "Individual languages can prevent terms from being added to this category by setting `data.no_redundant_head_cat`.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["terms with red links in their headword lines"] = { description = "{{{langname}}} terms that contain red links (i.e. uncreated forms) in their headword lines.", parents = {"redlinks"}, can_be_empty = true, hidden = true, } labels["terms with red links in their inflection tables"] = { description = "{{{langname}}} terms that contain red links (i.e. uncreated forms) in their inflection tables.", parents = {"redlinks"}, can_be_empty = true, hidden = true, } labels["requests for English equivalent term"] = { description = "{{{langname}}} entries with definitions that have been tagged with {{tl|rfeq}}. Read the documentation of the template for more information.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } for _, quot_type in ipairs { "quotations", "usage examples" } do local umbrella_parent = quot_type == "quotations" and "Quotation maintenance" or "Usage example maintenance" labels[quot_type .. " with omitted translation"] = { description = "{{{langname}}} " .. quot_type .. " where a translation would normally be required but the translation has explicitly been omitted by specifying {{code|-}}. The translation should be supplied instead.", parents = {"प्रविष्टि रखरखाव"}, umbrella = { parents = {name = umbrella_parent, sort = "omitted translation"}, breadcrumb = "with omitted translation", }, can_be_empty = true, hidden = true, } end for _, pos in ipairs({"nouns", "proper nouns", "verbs", "adjectives", "adverbs", "participles", "determiners", "pronouns", "numerals", "suffixes", "contractions"}) do labels[pos .. " with red links in their headword lines"] = { description = "{{{langname}}} " .. pos .. " that contain red links (i.e. uncreated forms) in their headword lines.", parents = {"terms with red links in their headword lines"}, breadcrumb = pos, can_be_empty = true, hidden = true, } labels[pos .. " with red links in their inflection tables"] = { description = "{{{langname}}} " .. pos .. " that contain red links (i.e. uncreated forms) in their inflection tables.", parents = {"terms with red links in their inflection tables"}, breadcrumb = pos, can_be_empty = true, hidden = true, } end for _, pos in ipairs { "nouns", "proper nouns", "pronouns" } do local label = pos .. " with unknown or uncertain plurals" labels[label] = { description = "{{{langname}}} " .. label .. ".", additional = "Terms are usually added to this category by specifying {{code|?}} as the plural. As much " .. "is possible, a plural should be added or, if the noun is uncountable, indicated appropriately (usually " .. "using {{code|-}} in place of the plural). Some languages support the value {{code|!}} to indicate " .. "that a plural cannot be attested but the noun is theoretically countable.", breadcrumb = "with unknown or uncertain plurals", parents = { {name = pos, sort = "unknown or uncertain plurals"}, "प्रविष्टि रखरखाव", }, } end -- Add 'umbrella_parents' key if not already present. for _, data in pairs(labels) do if data.umbrella == nil and data.umbrella_parents == nil then data.umbrella_parents = "Entry maintenance subcategories by language" end end ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["Entry maintenance subcategories by language"] = { description = "Umbrella categories covering topics related to entry maintenance.", additional = "{{{umbrella_meta_msg}}}", parents = { "Umbrella metacategories", {name = "प्रविष्टि रखरखाव", is_label = true, sort = " "}, }, } raw_categories["Citation maintenance"] = { description = "Categories for maintaining citations specified using {{tl|cite-*}}.", parents = {"Wiktionary maintenance"}, breadcrumb = "citations", } raw_categories["Collocation maintenance"] = { description = "Categories for maintaining collocations specified using {{tl|co}}, {{tl|coi}} or {{tl|coa}}.", parents = {"Wiktionary maintenance"}, breadcrumb = "collocations", } raw_categories["Quotation maintenance"] = { description = "Categories for maintaining quotations specified using {{tl|quote-*}}.", parents = {"Wiktionary maintenance"}, breadcrumb = "quotations", } raw_categories["Usage example maintenance"] = { description = "Categories for maintaining usage examples specified using {{tl|ux}}, {{tl|uxi}} or {{tl|uxa}}.", parents = {"Wiktionary maintenance"}, breadcrumb = "usage examples", } raw_categories["Citations using nocat parameter"] = { description = "Instances of {{tl|cite-*}} templates using the {{para|nocat}} parameter, which should be eliminated (?).", parents = {{name = "Citation maintenance", sort = "nocat"}}, breadcrumb = "using nocat parameter", can_be_empty = true, hidden = true, } raw_categories["Quotation templates to be cleaned"] = { description = "Instances of quotations using {{tl|quote-text}}.", additional = "They should be converted to other '''[[:Category:Citation templates|quotation templates]]''' if relevant.", parents = {"Quotation maintenance"}, breadcrumb_base = "to be cleaned", can_be_empty = true, hidden = true, } raw_categories["Quotations using nocat parameter"] = { description = "Instances of {{tl|quote-*}} templates using the {{para|nocat}} parameter, which should be eliminated (?).", parents = {{name = "Quotation maintenance", sort = "nocat"}}, breadcrumb = "using nocat parameter", can_be_empty = true, hidden = true, } raw_categories["Quotations using quoted-in parameter"] = { description = "Instances of {{tl|quote-*}} templates using the {{para|quoted_in}} parameter.", additional = "It is recommended to restructure these template calls using the {{para|newversion}} parameter along with associated parameters {{para|2ndauthor}}, {{para|title2}}, {{para|year2}}, {{para|publisher2}} and the like, as described in the documentation for {{tl|quote-book}}.", parents = {{name = "Quotation maintenance", sort = "quoted-in"}}, breadcrumb = "using quoted-in parameter", can_be_empty = true, hidden = true, } raw_categories["Requests"] = { topright = "{{shortcut|WT:CR|WT:RQ}}", description = "A parent category for the various request categories.", parents = {"Category:Wiktionary"}, } raw_categories["Requests by language"] = { description = "Categories with requests in various specific languages.", additional = "{{{umbrella_msg}}}", parents = { {name = "Request subcategories by language", sort = " "}, {name = "Requests", sort = " "}, }, breadcrumb = "By language", } raw_categories["Request subcategories by language"] = { description = "Umbrella categories covering topics related to requests.", additional = "{{{umbrella_meta_msg}}}", parents = { "Umbrella metacategories", {name = "Requests", sort = " "}, }, } raw_categories["Requests for quotations by source"] = { description = "Categories with requests for quotation, broken out by the source of the quotation.", additional = "Some abbreviated names of sources are explained at [[Wiktionary:Abbreviated Authorities in Webster]].", parents = {{name = "Requests for quotations", sort = "source"}}, breadcrumb = "By source", } raw_categories["Requests for quotations"] = { -- FIXME description = "Words are added to this category by the inclusion in their entries of {{tl|rfv-quote}}.", parents = {{name = "Requests", sort = "quotations"}, "Quotation maintenance"}, breadcrumb = "Quotations", } raw_categories["Requests for date"] = { description = "Requests for a date to be added to a quotation.", additional = "To add an article to this category, use {{tl|rfdate}} or {{tl|rfdatek}} to include the author. " .. "Please remove the template from the article once the date has been provided.", parents = {{name = "Requests", sort = "date"}, "Quotation maintenance"}, breadcrumb = "Date", } raw_categories["Requests for translations in user-competency categories by number of users"] = { description = "Requests for translations to be added to user-competency categories, sorted by number of users with that competency.", parents = {{name = "Requests", sort = "translations in user-competency categories by number of users"}}, breadcrumb = "Translations in user-competency categories by number of users", } raw_categories["Requests for translations in user-competency categories by language"] = { description = "Requests for translations to be added to user-competency categories, sorted by language.", parents = {{name = "Requests", sort = "translations in user-competency categories by language"}}, breadcrumb = "Translations in user-competency categories by language", hidden = true, } raw_categories["Terms with translations by language"] = { description = "Terms with translations, sorted by language.", parents = {{name = "Entry maintenance subcategories by language", sort = "translations by language"}}, breadcrumb = "Translations", } raw_categories["Entries using missing taxonomic names"] = { description = "Entries that link to wikispecies because there is no corresponding Wiktionary entry for the taxonomic name in the template {{tl|taxlink}}.", additional = "The missing name is one or more of those enclosed in {{tl|taxlink}}. The entries are sorted by the missing taxonomic name." .. "\n\nSee [[:Category:mul:Taxonomic names]].", parents = {{name = "प्रविष्टि रखरखाव", is_label = true, lang = "mul", sort = "missing taxonomic names"}}, breadcrumb = "Missing taxonomic names", hidden = true, } ----------------------------------------------------------------------------- -- -- -- RAW HANDLERS -- -- -- ----------------------------------------------------------------------------- local function script_name_to_code(name) local sc = require(scripts_module).getByCanonicalName(name) if not sc then error("Unrecognized script name '" .. name .. "'") end return sc:getCode() end --[=[ This array consists of category match specs. Each spec contains one or more properties, whose values are (a) strings that may contain references to other properties using the {{{PROPERTY}}} syntax; (b) functions of one argument, an `items` table of the same properties that are accessible using the {{{PROPERTY}} syntax. Each such spec should have at least a `regex` property that matches the name of the category. Capturing groups in this regex can be referenced in other properties using {{{1}}} for the first group, {{{2}}} for the second group, etc. (or using keys "1", "2", etc. in functions). Property expansion happens recursively if needed (i.e. a property can reference another property, which in turn references a third property). If there is a `language_name` propery, it specifies the language name (and will typically be a reference to a capturing group from the `regex` property); if not specified, it defaults to "{{{1}}}" unless the `nolang` property is set, in which case there is no language name associated with the category name. The language name must be the canonical name of a recognized full language, or an error is thrown; however, if the `allow_etym_lang` property is set, the language name may also be the canonical name of an etymology-only language. Based on the language name, the `language_code` and `language_object` properties are automatically filled in. If `language_name` is an etymology-only language, additional properties `parent_language_name`, `parent_language_code` and `parent_language_object` are set for the parent full language of the etymology-only language. If the `regex` values of multiple category specs match, the first one takes precedence. Recognized or predefined properties: `pagename`: Current pagename. `regex`: See above. `1`, `2`, `3`, ...: See above. `language_name`, `language_code`, `language_object`: See above. `parent_language_name`, `parent_language_code`, `parent_language_object`: See above. `nolang`: See above. `allow_etym_lang`: Language names may be etymology-only languages. See above. `description`: Override the description (normally taken directly from the pagename). `template_name`: Name of template which generates this category. `template_sample_call`: Syntax for calling the template. Defaults to "{{{template_name}}}|{{{language_code}}}". Used to display an example template call and the output of this call. `template_actual_sample_call`: Syntax for calling the template. Takes precedence over `template_sample_call` when generating example template output (but not when displaying an example template call) and is intended for a template call that uses the |nocat=1 parameter. `template_example_output`: Override the text that displays example template output (see `template_sample_call`). `additional_template_description`: Extra text to be displayed after the example template output. `parents`: Parent categories. Should be a list of elements, each of which is an object containing at least a name= and sort= field (same format as parents= for regular raw categories, except that the name= and sort= field will have {{{PROPERTY}}} references expanded). If no parents are specified, and the pagename is of the form "Requests for FOO by language", the parents will be "Request subcategories by language" with FOO as the sort key, along with any parents specified in `additional_umbrella_parents`. Otherwise, the `language_name` property must exist, and the parent will be "Requests concerning LANGNAME", with the pagename minus any initial "Requests for " as the sort key. Note that this does *NOT* apply if an etymology-only language is associated with the category, in which case `etym_parents` is used instead. `etym_parents`: Parent categories for categories with associated etymology-only languages. The format is the same as `parents`. If omitted, there are two parents by default: (1) The pagename (i.e. category name) with the language name replaced by the corresponding parent language name, with the value of `language_name` as the sort key; (2) "Requests concerning LANGNAME", with the pagename minus any initial "Requests for " as the sort key. `umbrella`: Parent all-language category. Sort key is based on the language name. This applies *ONLY* if a full language is associated with the category name (i.e. not if `nolang` is set or if `allow_etym_lang` is set and the associated language is an etymology-only language); otherwise there will be no umbrella category. `additional_umbrella_parents`: Additional parents to add to the umbrella (all-language) category along with "Request subcategories by language". `breadcrumb`: Specify the breadcrumb. If `parents` is given, there is no default (i.e. it will end up being the pagename). Otherwise, if the pagename is of the form "Requests for FOO by language", the default breadcrumb will be "FOO". Otherwise it is computed by removing the language name from the pagename and chopping out "Requests for" from the beginning and "in entries" and "for terms" from the end. Note that this does *NOT* apply if an etymology-only language is associated with the category, in which case `etym_breadcrumb` is used instead. `etym_breadcrumb`: Specify the breadcrumb for categories with associated etymology-only languages. Defaults to the value of `language_name`. `not_hidden_category`: Don't hide the category. `catfix`: Same as `catfix` in regular labels and raw categories, except that request-specific {{{PROPERTY}}} syntax is expanded. `toc_template`, `toc_template_full`: Same as the corresponding fields in regular labels and raw categories, except that request-specific {{{PROPERTY}}} syntax is expanded. In general, properties can contain references to templates (e.g. {{tl}} and {{para}}), which will be appropriately expanded (this expansion happens in the poscatboiler code, not in this module). The major exception is in the `template_sample_call` and `template_actual_sample_call` properties, which are surrounded by <pre>...</pre> when inserted, so template references are not expanded. Triple-brace property references are still expanded in these properties; but beware that if any of those property references contain template references, they won't be expanded. (This actually happens in the handlers for 'Request for SCRIPT script for LANG terms'; the sample call references {{{script_code}}}, whose definition therefore cannot contain template references. The solution is to define this property using a function.) ]=] local requests_categories = { { regex = "^Requests concerning (.+)$", allow_etym_lang = true, description = "Categories with {{{1}}} entries that need the attention of experienced editors.", parents = {{name = "प्रविष्टि रखरखाव", is_label = true, sort = "requests"}}, etym_parents = {{name = "Requests concerning {{{parent_language_name}}}", sort = "{{{1}}}"}, {name = "{{{1}}}", sort = "Requests"}}, umbrella = "Requests by language", breadcrumb = "Requests", not_hidden_category = true, }, { regex = "^Requests for etymologies in (.+) entries$", allow_etym_lang = true, umbrella = "Requests for etymologies by language", template_name = "rfe", }, { regex = "^Requests for expansion of etymologies in (.+) entries$", umbrella = "Requests for expansion of etymologies by language", template_name = "etystub", }, { regex = "^Requests for pronunciation in (.+) entries$", umbrella = "Requests for pronunciation by language", template_name = "rfp", }, { regex = "^Requests for audio pronunciation in (.+) entries$", umbrella = "Requests for audio pronunciation by language", template_name = "rfap", }, { regex = "^Requests for definitions in (.+) entries$", umbrella = "Requests for definitions by language", template_name = "rfdef", }, { regex = "^Requests for clarification of definitions in (.+) entries$", umbrella = "Requests for clarification of definitions by language", template_name = "rfclarify", }, } for _, spec_with_pos in ipairs { {"inflections", "rfinfl"}, {"plural forms"}, {"tone", "rftone"}, {"accents"}, {"aspect", "rfaspect"}, {"animacy"}, {"gender", "rfgender"}, {"noun class"}, } do local property, rftemplate = unpack(spec_with_pos) table.insert(requests_categories, { -- This is for part-of-speech-specific categories such as -- "Requests for inflections in Northern Ndebele noun entries" or -- "Requests for accents in Ukrainian proper noun entries". -- Here and below, we assume that the part of speech is begins with -- a lowercase letter, while the preceding language name ends in a -- capitalized word. Note that this entry comes before the -- following one and takes precedence over it. regex = ("^Requests for %s in (.-) ([a-z]+[a-z ]*) entries$"):format(property), parents = {{name = ("Requests for %s in {{{language_name}}} entries"):format(property), sort = "{{{2}}}"}}, umbrella = ("Requests for %s of {{pluralize|{{{2}}}}} by language"):format(property), breadcrumb = "{{{2}}}", template_name = rftemplate, template_sample_call = rftemplate and ("{{%s|{{{language_code}}}|{{{2}}}}}"):format(rftemplate) or nil, } ) table.insert(requests_categories, { regex = ("^Requests for %s in (.+) entries$"):format(property), umbrella = ("Requests for %s by language"):format(property), template_name = rftemplate, } ) table.insert(requests_categories, { regex = ("^Requests for %s of (.+) by language$"):format(property), nolang = true, } ) end extend(requests_categories, { { regex = "^Requests for example sentences in (.+)$", umbrella = "Requests for example sentences by language", template_name = "rfex", }, { regex = "^Requests for quotations in (.+)$", umbrella = "Requests for quotations by language", additional_umbrella_parents = {"Quotation maintenance"}, template_name = "rfquote", }, { regex = "^Requests for translations into (.+)$", allow_etym_lang = true, umbrella = "Requests for translations by language", template_name = "t-needed", catfix = "en", }, { regex = "^Requests for translations of (.+) usage examples$", allow_etym_lang = true, umbrella = "Requests for translations of usage examples by language", additional_umbrella_parents = {"Usage example maintenance"}, template_name = "t-needed", template_sample_call = "{{t-needed|{{{language_code}}}|usex}}", template_actual_sample_call = "{{t-needed|{{{language_code}}}|usex|nocat=1}}", additional_template_description = "The {{tl|ux}}, {{tl|uxi}}, {{tl|ja-usex}} and {{tl|zh-x}} templates automatically add the page to this category if the example is in a foreign language and the translation is missing." }, { regex = "^Requests for translations of (.+) quotations$", allow_etym_lang = true, umbrella = "Requests for translations of quotations by language", additional_umbrella_parents = {"Quotation maintenance"}, template_name = "t-needed", template_sample_call = "{{t-needed|{{{language_code}}}|quote}}", template_actual_sample_call = "{{t-needed|{{{language_code}}}|quote|nocat=1}}", additional_template_description = "The {{tl|quote}}, and {{tl|Q}} templates automatically add the page to this category if the example is in a foreign language and the translation is missing." }, { regex = "^Requests for review of (.+) translations$", allow_etym_lang = true, umbrella = "Requests for review of translations by language", template_name = "t-check", template_sample_call = "{{t-check|{{{language_code}}}|example}}", template_example_output = "", catfix = "en", }, { regex = "^Requests for transliteration of (.+) terms$", umbrella = "Requests for transliteration by language", template_name = "rftranslit", additional_template_description = "The {{tl|head}} template, and the large number of language-specific variants of it, automatically add " .. "the page to this category if the example is in a foreign language and no transliteration can be generated (particularly in languages without " .. "automated transliteration, such as Hebrew and Persian).", }, { regex = "^Requests for transliteration of (.+) usage examples$", umbrella = "Requests for transliteration of usage examples by language", additional_umbrella_parents = {"Usage example maintenance"}, template_name = "rftranslit", template_sample_call = "{{rftranslit|{{{language_code}}}}}", template_actual_sample_call = "{{rftranslit|{{{language_code}}}|nocat=1}}", catfix = false, additional_template_description = "The {{tl|ux}} and {{tl|uxi}} templates automatically add the page to this category if the example " .. "is in a foreign language and no transliteration can be generated (particularly in languages without automated transliteration, such as " .. "Hebrew and Persian).", }, { regex = "^Requests for transliteration of (.+) quotations$", umbrella = "Requests for transliteration of quotations by language", additional_umbrella_parents = {"Quotation maintenance"}, catfix = false, additional_template_description = "The {{tl|quote}} and {{code|<nowiki>{{quote-*}}</nowiki>}} templates automatically add the page to this category if the quotation " .. "is in a foreign language and no transliteration can be generated (particularly in languages without automated transliteration, such as " .. "Hebrew and Persian).", }, { regex = "^Requests for native script for (.+) terms$", allow_etym_lang = true, etym_parents = { {name = "Requests for native script for {{{parent_language_name}}} terms", sort = "{{{1}}}"}, {name = "Requests concerning {{{language_name}}}", sort = "native script"}, }, umbrella = "Requests for native script by language", template_name = "rfscript", template_actual_sample_call = "{{rfscript|{{{language_code}}}|nocat=1}}", catfix = false, additional_template_description = "Many templates such as {{tl|l}}, {{tl|m}} and {{tl|t}} automatically place the page in this category when they are missing the term but have been provided with a transliteration." }, { regex = "^Requests for native script in (.+) usage examples$", umbrella = "Requests for native script in usage examples by language", additional_umbrella_parents = {"Usage example maintenance"}, template_name = "rfscript", template_sample_call = "{{rfscript|{{{language_code}}}|usex=1}}", template_actual_sample_call = "{{rfscript|{{{language_code}}}|usex=1|nocat=1}}", catfix = false, additional_template_description = "The {{tl|ux}} and {{tl|uxi}} templates automatically add the page to this category if the example itself is missing but the translation is supplied." }, { regex = "^Requests for native script in (.+) quotations$", umbrella = "Requests for native script in quotations by language", additional_umbrella_parents = {"Quotation maintenance"}, template_name = "rfscript", template_sample_call = "{{rfscript|{{{language_code}}}|quote=1}}", template_actual_sample_call = "{{rfscript|{{{language_code}}}|quote=1|nocat=1}}", catfix = false, additional_template_description = "The {{tl|quote}} and {{code|<nowiki>{{quote-*}}</nowiki>}} templates automatically add the page to this category if the quotation itself is missing but the translation is supplied." }, { regex = "^Requests for (.+) script for (.+) terms$", language_name = "{{{2}}}", allow_etym_lang = true, parents = {{name = "Requests for native script for {{{language_name}}} terms", sort = "{{{1}}}"}}, etym_parents = { {name = "Requests for native script for {{{language_name}}} terms", sort = "{{{1}}}"}, {name = "Requests for {{{1}}} script for {{{parent_language_name}}} terms", sort = "{{{language_name}}}"}, {name = "Requests concerning {{{language_name}}}", sort = "{{{1}}} script"}, }, umbrella = "Requests for {{{1}}} script by language", breadcrumb = "{{{1}}}", etym_breadcrumb = "{{{1}}}", template_name = "rfscript", -- NOTE: The following is used in `template_sample_call` and `template_actual_sample_call`, meaning the -- conversion of script name to script code needs to be done using an inline function like this, instead of -- a {{#invoke:...}} template call. script_code = function(items) return script_name_to_code(items["1"]) end, template_sample_call = "{{rfscript|{{{language_code}}}|sc={{{script_code}}}}}", template_actual_sample_call = "{{rfscript|{{{language_code}}}|sc={{{script_code}}}|nocat=1}}", catfix = false, additional_template_description = "Many templates such as {{tl|l}}, {{tl|m}} and {{tl|t}} automatically place the page in this category when they are missing the term but have been provided with a transliteration." }, { regex = "^Requests for (.+) script by language$", parents = {{name = "Requests for script by language", sort = "{{{1}}}"}}, breadcrumb = "{{{1}}}", nolang = true, }, { regex = "^Requests for script by language$", nolang = true, }, { regex = "^Requests for images in (.+) entries$", umbrella = "Requests for images by language", template_name = "rfi", }, { regex = "^Requests for references for (.+) terms$", umbrella = "Requests for references by language", template_name = "rfref", }, { regex = "^Requests for references for etymologies in (.+) entries$", parents = {{name = "Requests for references for {{{language_name}}} terms", sort = "etymologies"}}, umbrella = "Requests for references for etymologies by language", breadcrumb = "Etymologies", template_name = "rfv-etym", }, { regex = "^Requests for references for pronunciations in (.+) entries$", parents = {{name = "Requests for references for {{{language_name}}} terms", sort = "pronunciations"}}, umbrella = "Requests for references for pronunciations by language", breadcrumb = "Pronunciations", template_name = "rfv-pron", }, { regex = "^Requests for attention concerning (.+)$", umbrella = "Requests for attention by language", breadcrumb = "Attention", template_name = "attention", template_sample_call = "{{attention|{{{language_code}}}|insert a brief description of the request here}}", template_example_output = "This template does not generate any text in entries, but can be visualised by enabling the Catch My Attention gadget. See {{section link|Template:attention#Visibility}}.", -- These pages typically contain a mixture of English and native-language entries, so disable catfix. catfix = false, -- Setting catfix = false will normally trigger the English table of contents template. -- We still want the native-language table of contents template, though. toc_template = "{{{language_code}}}-categoryTOC", toc_template_full = "{{{language_code}}}-categoryTOC/full", }, { regex = "^Requests for cleanup in (.+) entries$", umbrella = "Requests for cleanup by language", template_name = "rfc", template_actual_sample_call = "{{rfc|{{{language_code}}}|nocat=1}}", }, { regex = "^Requests for cleanup of Pronunciation N headers in (.+) entries$", umbrella = "Requests for cleanup of Pronunciation N headers by language", template_name = "rfc-pron-n", template_actual_sample_call = "{{rfc-pron-n|{{{language_code}}}|nocat=1}}", template_example_output = "This template does not generate any text in entries.", additional_template_description = [=[ The purpose of this category is to tag entries that use headers with "Pronunciation" and a number. While these headers and structure are sometimes used, they are not specifically prescribed by [[WT:ELE]]. No complete proposal has yet been made on how they should work, what the semantics are, or how they interact with multiple etymologies. As a result they should generally be avoided. Instead, merge the entries (possibly under multiple Etymology sections, if appropriate), and list all pronunciations, appropriately tagged, under a Pronunciation header. [[User:KassadBot|KassadBot]] tags these entries (or used to tag these entries, when the bot was operational). At some point if a proposal is made and adopted as policy, these entries should be reviewed. This category is hidden.]=], }, { regex = "^Requests for deletion in (.+) entries$", umbrella = "Requests for deletion by language", template_name = "rfd", template_actual_sample_call = "{{rfd|{{{language_code}}}|nocat=1}}", }, { regex = "^Requests for verification in (.+) entries$", umbrella = "Requests for verification by language", template_name = "rfv", }, { regex = "^Requests for attention in (.+) etymologies$", umbrella = "Requests for attention by language" }, { regex = "^Requests for quotations/(.+)$", description = "Requests for a quotation or for quotations from {{{1}}}.", parents = {{name = "Requests for quotations by source", sort = "{{{1}}}"}}, breadcrumb = "{{{1}}}", nolang = true, template_name = "rfquotek", template_sample_call = "{{rfquotek|LANGCODE|{{{1}}}}}", template_example_output = "\n(where LANGCODE is the language code of the entry)\n\nIt results in the message below:\n\n{{rfquotek|und|{{{1}}}}}", }, { regex = "^Requests for date in (.+) entries$", umbrella = "Requests for date by language", additional_umbrella_parents = {"Quotation maintenance"}, template_name = "rfdate", additional_template_description = "The quotation templates, such as {{tl|quote-book}} and {{tl|quote-journal}}, " .. "automatically add the page to this category if neither {{para|date}} nor {{para|year}} is provided. Providing the " .. "parameter in each case on the page automatically removes the article from this category. See " .. "[[Wiktionary:Quotations]] for information about formatting dates and quotations.", }, { regex = "^Requests for date/(.+)$", description = "{{rfd|section=Category:Requests for date by source}}Requests for a date for a quotation or quotations from {{{1}}}.", parents = {{name = "Requests for date by source", sort = "{{{1}}}"}}, breadcrumb = "{{{1}}}", nolang = true, template_name = "rfdatek", template_sample_call = "{{rfdatek|LANGCODE|{{{1}}}}}", template_example_output = "\n(where LANGCODE is the language code of the entry)\n\nIt results in the message below:\n\n{{rfdatek|und|{{{1}}}}}", }, { regex = "^Requests for attestation of (.+) terms$", umbrella = "Requests for attestation of terms by language", breadcrumb = "Attestation", additional_template_description = "The {{tl|LDL}} template adds this category when a language code is supplied in {{para|1}} (as it should be)." }, }) local user_competency_additional_template_description = "This is added by user-competency categories such as " .. "[[:Category:User fr-4]], which groups users who speak French at level 4 (near-native proficiency), when " .. "the native-language text indicating this fact is missing. The appropriate translation should mirror the " .. "English text also displayed (e.g. in this case \"These users speak French at a '''near native''' " .. "level.\"), and should be supplied to {{tl|auto cat}} using the {{para|text}} parameter. The mention of the " .. "language in the text should be surrounded by double angle brackets, e.g. \"&lt;&lt;français>>\", which " .. "causes it to be automatically linked to the appropriate parent category." local user_competency_parents = {{name = "Requests for translations in user-competency categories by number of users", sort = function(items) return " " .. ("%010d"):format(items["1"]) end, }} extend(requests_categories, { { regex = "^Requests for translations in user%-competency categories with ([0-9]+)%-([0-9]+) users$", description = "Requests for translation of phrases indicating user competencies for specific languages and specific competency levels, for categories with {{{1}}}-{{{2}}} users.", additional_template_description = user_competency_additional_template_description, parents = user_competency_parents, breadcrumb = "{{{1}}}-{{{2}}}", nolang = true, }, { regex = "^Requests for translations in user%-competency categories with ([0-9]+) (users?)$", description = "Requests for translation of phrases indicating user competencies for specific languages and specific competency levels, for categories with {{{1}}} {{{2}}}.", additional_template_description = user_competency_additional_template_description, parents = user_competency_parents, breadcrumb = "{{{1}}}", nolang = true, } }) table.insert(raw_handlers, function(data) local items local function init_items() items = {pagename = data.category} end local function expand_value(item, val) if not val then return val elseif is_callable(val) then return expand_value(item .. " ⇒ function", val(items)) elseif type(val) == "table" then for k, v in pairs(val) do val[k] = expand_value(item .. " ⇒ " .. k, v) end return val elseif type(val) == "number" then val = tostring(val) end if type(val) ~= "string" then error(("The item '%s' on page %s is of type %s and can't be concatenated"):format( item, items.pagename, type(val))) end -- Replaces pseudo-template code {{{ }}} with the corresponding member of the "items" table. Has to be done -- recursively, since some of the items are nested: -- {{{template_sample_call_with_temp}}} -- ⇓ -- {{{{{template_name}}}|{{{language_code}}}}} -- ⇓ -- {{attention|en}} if val:find("{{{") then val = mw.ustring.gsub(val, "{{{([^%}%{]+)}}}", function(prop) local propval = items[prop] if not propval then error(("The item '%s' (expanded from property '%s' on page %s) was not found in the 'items' table"): format(prop, item, items.pagename)) end return expand_value(item .. " ⇒ " .. prop, propval) end ) end return val end local function expand_items_value(item) return expand_value(item, items[item]) end local function convert_items_to_category_data(items) if not items.nolang then items.language_name = items.language_name or "{{{1}}}" items.language_name = expand_items_value("language_name") items.language_object = require(languages_module).getByCanonicalName(items.language_name, true, items.allow_etym_lang) items.language_code = items.language_object:getCode() items.is_etym_lang = items.language_object:hasType("etymology-only") if items.is_etym_lang then items.parent_language_object = items.language_object:getFull() -- Reject weird cases where etymology language has no parent. if not items.parent_language_object then return nil end items.parent_language_code = items.parent_language_object:getCode() items.parent_language_name = items.parent_language_object:getCanonicalName() -- Reject weird cases where the parent language has the same name as the child etymology language. In -- that case, we'll get an infinite parent-category loop. This actually happens, e.g. with Rudbari and -- Bashkardi. if items.parent_language_name == items.language_name then return nil end else end end if items.template_name then items.template_sample_call = items.template_sample_call or "{{{{{template_name}}}|{{{language_code}}}}}" items.full_text_about_the_template = "To make this request, in this specific language, use this code in the entry (see also the documentation at [[Template:{{{template_name}}}]]):\n\n<pre>{{{template_sample_call}}}</pre>" if items.template_example_output then items.full_text_about_the_template = items.full_text_about_the_template .. " " .. items.template_example_output else items.template_actual_sample_call = items.template_actual_sample_call or items.template_sample_call items.full_text_about_the_template = items.full_text_about_the_template .. "\nIt results in the message below:\n\n{{{template_actual_sample_call}}}" end if items.additional_template_description then items.full_text_about_the_template = items.full_text_about_the_template .. "\n\n" .. items.additional_template_description end else items.full_text_about_the_template = items.additional_template_description end local parents, breadcrumb if items.is_etym_lang then parents = items.etym_parents breadcrumb = expand_items_value("etym_breadcrumb") or items.language_name else parents = items.parents breadcrumb = expand_items_value("breadcrumb") end if parents then for _, parent in ipairs(parents) do parent.name = expand_value("parent.name", parent.name) parent.sort = {sort_base = expand_value("parent.sort", parent.sort), lang = "en"} end else local umbrella_type = items.pagename:match("^Requests for (.+) by language$") if umbrella_type then breadcrumb = breadcrumb or umbrella_type parents = {{name = "Request subcategories by language", sort = umbrella_type}} if items.additional_umbrella_parents then extend(parents, items.additional_umbrella_parents) end elseif not items.language_name then error("Internal error: Don't know how to compute parents for non-language-specific category '" .. items.pagename .. "'") else local requests_concerning_breadcrumb = items.pagename:gsub(" " .. pattern_escape(items.language_name), "") requests_concerning_breadcrumb = requests_concerning_breadcrumb:gsub("^Requests for ", ""):gsub(" in entries$", ""):gsub(" for terms$", "") local requests_concerning_parent = { name = "Requests concerning " .. items.language_name, sort = {sort_base = requests_concerning_breadcrumb, lang = "en"} } if items.is_etym_lang then local parent_lang_cat = items.pagename:gsub(pattern_escape(items.language_name), replacement_escape(items.parent_language_name)) parents = { {name = parent_lang_cat, sort = {sort_base = items.language_name, lang = "en"}}, requests_concerning_parent } else breadcrumb = breadcrumb or requests_concerning_breadcrumb parents = {requests_concerning_parent} end end end if not items.nolang and not items.is_etym_lang and items.umbrella ~= false then table.insert(parents, { name = expand_items_value("umbrella"), sort = {sort_base = items.language_name, lang = "en"} }) end local additional = expand_items_value("full_text_about_the_template") if items.pagename:find(" by language$") then additional = "{{{umbrella_msg}}}" .. (additional and "\n\n" .. additional or "") end return { description = expand_items_value("description") or items.pagename .. ".", lang = items.parent_language_code or items.language_code, additional = additional, parents = parents, -- If no breadcrumb= and not an etym-only language, it will default to the category name breadcrumb = breadcrumb, catfix = expand_items_value("catfix"), toc_template = expand_items_value("toc_template"), toc_template_full = expand_items_value("toc_template_full"), hidden = not items.nolang and not items.not_hidden_category, can_be_empty = true, } end -- First look for a regular (usually language or script-specific) category. for _, category in ipairs(requests_categories) do local matchvals = {mw.ustring.match(data.category, category.regex)} if #matchvals > 0 then init_items() for key, value in pairs(category) do items[key] = value end for key, value in ipairs(matchvals) do items["" .. key] = value end local catdata = convert_items_to_category_data(items) if catdata then return catdata end end end -- Now look for umbrella categories. for _, category in ipairs(requests_categories) do if data.category == category.umbrella then init_items() items.nolang = true items.additional_umbrella_parents = category.additional_umbrella_parents local catdata = convert_items_to_category_data(items) if catdata then return catdata end end end return nil end) table.insert(raw_handlers, function(data) local langname = data.category:match("^Terms with (.+) translations$") local lang = langname and require(languages_module).getByCanonicalName(langname, true, true) if lang then local langcode = lang:getCode() local parents, breadcrumb_and_first_sort_key if lang:hasType("etymology-only") then parents = { "Terms with " .. lang:getFullName() .. " translations", {name = langname, sort = "Translations"}, } breadcrumb_and_first_sort_key = lang:getCanonicalName() else parents = { {name = "प्रविष्टि रखरखाव", is_label = true, lang = langcode}, { name = "Terms with translations by language", sort = {sort_base = langname, lang = "en"} }, } breadcrumb_and_first_sort_key = "Translations" end return { description = "Entries that contain translations into " .. langname .. " which were added using one of the translation templates, such as {{tl|t|" .. langcode .. "|...}}, {{tl|t+|" .. langcode .. "|...}}, etc.", parents = parents, breadcrumb_and_first_sort_key = breadcrumb_and_first_sort_key, catfix = false, can_be_empty = true, hidden = true, } end end) local recognized_taxtypes = require(table_module).listToSet { "ambiguous", "binomial", "branch", "clade", "cladus", "class", "cohort", "convariety", "cultivar group", "cultivar", "division", "empire", "epifamily", "epithet", "family", "form taxon", "form", "genus", "grade", "grandorder", "group", "hybrid", "informal group", "infraclass", "infracohort", "infrakingdom", "infraorder", "infraphylum", "infraspecies", "kingdom", "magnorder", "megacohort", "mirorder", "morph", "nothogenus", "nothospecies", "nothosubspecies", "nothovariety", "obsolete", "oofamily", "order", "parvclass", "parvorder", "phylum", "section", "series", "serovar", "species group", "species", "stem", "stirps", "strain", "subclass", "subcohort", "subdivision", "subfamily", "subgenus", "subgroup", "subinfraorder", "subkingdom", "suborder", "subphylum", "subsection", "subspecies", "subterclass", "subtribe", "superclass", "supercohort", "superfamily", "supergroup", "superorder", "superphylum", "supertribe", "taxon", "tribe", "trinomial", "undescribed species", "unknown", "unranked group", "variety", "virus complex", } table.insert(raw_handlers, function(data) local taxtype = data.category:match("^Entries using missing taxonomic name %((.*)%)$") if taxtype and recognized_taxtypes[taxtype] then return { description = "Entries that link to wikispecies because there is no corresponding Wiktionary entry for the taxonomic name in the template {{tl|taxlink}}.", additional = "The missing name is one or more of those enclosed in {{tl|taxlink}}. The entries are sorted by the missing taxonomic name.", parents = {{name = "Entries using missing taxonomic names", sort = {sort_base = taxtype, lang = "en"}}}, breadcrumb = taxtype, hidden = true, } end end) return {LABELS = labels, RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers} bu2qykrkqiymf69er0pjs9iplmemtyr 488019 487957 2026-09-04T09:17:45Z SM7 6218 trying भाषा अनुसार in cat name 488019 Scribunto text/plain local labels = {} local raw_categories = {} local raw_handlers = {} local functions_module = "Module:fun" local languages_module = "Module:languages" local scripts_module = "Module:scripts" local string_pattern_escape_module = "Module:string/patternEscape" local string_replacement_escape_module = "Module:string/replacementEscape" local table_module = "Module:table" local extend = require(table_module).extend local is_callable = require(functions_module).is_callable local pattern_escape = require(string_pattern_escape_module) local replacement_escape = require(string_replacement_escape_module) local unpack = unpack or table.unpack -- Lua 5.2 compatibility ----------------------------------------------------------------------------- -- -- -- LABELS -- -- -- ----------------------------------------------------------------------------- labels["प्रविष्टि रखरखाव"] = { description = "{{{langname}}} entries, or entries in other languages containing {{{langname}}} terms, that are being tracked for attention and improvement by editors.", parents = {{name = "{{{langcat}}}", raw = true}}, umbrella_parents = "मूलभूत श्रेणी", } labels["entries with incorrect language header"] = { description = "{{{langname}}} entries that have been placed under the wrong language header.", additional = "This can happen for several reasons:\n" .. "* Typos.\n" .. "* Vandalism.\n" .. "* Using the wrong language code.\n" .. "* Using an alternative name for the language.\n" .. "* Using special characters which haven't been used in the name given in the language data modules.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries without References header"] = { description = "{{{langname}}} entries without a References header.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries without References or Further reading header"] = { description = "{{{langname}}} entries without a References or Further reading header.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries that don't exist"] = { description = "{{{langname}}} terms that do not meet the [[Wiktionary:Criteria for inclusion|criteria for inclusion]] (CFI). They are added to the category with the template {{tl|no entry|{{{langcode}}}}}.", parents = {"प्रविष्टि रखरखाव"}, umbrella_parents = "मूलभूत श्रेणी", } labels["entries with etymology trees"] = { description = "{{{langname}}} entries that display an etymology tree generated by the template {{tl|etymon}}.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries with etymology texts"] = { description = "{{{langname}}} entries that display an etymology generated by the template {{tl|etymon}}.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries with etymon"] = { description = "{{{langname}}} entries that use the template {{tl|etymon}}.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries with etymology text stop language not in chain"] = { description = "{{{langname}}} entries where {{tl|etymon}} is used with {{para|text}} set to stop at a language but that language never appears in the rendered etymology chain.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing missing etymons"] = { description = "Entries which use the {{tl|etymon}} template to reference an etymon that cannot be found, either because the target page does not exist (redlink) or because it has no {{tl|etymon}} template.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing ambiguous etymons"] = { description = "Entries which use the {{tl|etymon}} template to reference an etymon without the ID, when the target page contains multiple {{tl|etymon}} templates, and an ID is therefore required to select the correct {{tl|etymon}}.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing etymons with mismatched IDs"] = { description = "Entries which use the {{tl|etymon}} template with a mismatched ID. For example, {{code|lang:entry<id:mismatched ID>}}", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing pages with multiple etymons missing IDs"] = { description = "Entries which use the {{tl|etymon}} template to link to a page that has more than one {{tl|etymon}} template for the same language, where at least one of those templates has no {{para|id}}. When several {{tl|etymon}} templates share a language section, each must have a distinct {{para|id}} so that links and descendants logic can tell them apart.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing pages with etymology sections missing etymons"] = { description = "Entries which use the {{tl|etymon}} template to link to a page that has more than one etymology section for the same language, where at least one section contains a {{tl|etymon}} template for that language and at least one other etymology section does not.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing etymons without Descendants sections"] = { description = "Entries which use the {{tl|etymon}} template to reference an etymon whose source entry has no Descendants section.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries referencing etymons without this term in Descendants sections"] = { description = "Entries which use the {{tl|etymon}} template to reference an etymon whose source entry has a Descendants section, but does not list the current term there.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries with language name categories using raw markup"] = { description = "{{{langname}}} entries that have been placed in a language name category using raw wiki markup (i.e. {{code|[[<nowiki/>Category:{{{langname}}} ...]]}}). They should be added using {{tl|cln|{{{langcode}}}|...}} instead.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries with topic categories using raw markup"] = { description = "{{{langname}}} entries that have been placed in a topic category using raw wiki markup (i.e. {{code|[[<nowiki/>Category:{{{langcode}}}:...]]}}). They should be added using {{tl|C|{{{langcode}}}|...}} instead.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["entries with outdated source"] = { description = "{{{langname}}} entries that have been partly or fully imported from an outdated source.", parents = {"प्रविष्टि रखरखाव"}, } labels["entries with inflection not matching pagename"] = { description = "{{{langname}}} entries which have an inflection table whose lemma form does not match the page name.", additional = "This is usually the result of incorrect or missing parameters.", breadcrumb_and_first_sort_key = "inflection not matching pagename", parents = {"प्रविष्टि रखरखाव"}, hidden = true, can_be_empty = true, } labels["undefined derivations"] = { description = "{{{langname}}} etymologies using {{tl|undefined derivation}}, where a more specific template such as {{tl|borrowed}} or {{tl|inherited}} should be used instead.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["descendants to be fixed in desctree"] = { description = "Entries that use {{tl|desctree}} to link to {{{langname}}} entries with no Descendants section.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["term requests"] = { description = "Entries with [[Template:der]], [[Template:inh]], [[Template:m]] and similar templates lacking the parameter for linking to {{{langname}}} terms.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["redlinks"] = { description = "Links to {{{langname}}} entries that have not been created yet.", parents = {"प्रविष्टि रखरखाव"}, catfix = false, can_be_empty = true, hidden = true, } labels["terms with IPA pronunciation"] = { description = "{{{langname}}} terms that include the pronunciation in the form of IPA.", additional = "For requests related to this category, see [[:Category:Requests for pronunciation in {{{langname}}} entries]].", parents = {"प्रविष्टि रखरखाव"}, } labels["terms with enPR pronunciation"] = { description = "{{{langname}}} terms that include the pronunciation in the form of enPR.", additional = "For requests related to this category, see [[:Category:Requests for pronunciation in {{{langname}}} entries]].", parents = {"प्रविष्टि रखरखाव"}, } labels["terms with Indic pronunciation"] = { description = "{{langname}} terms that include the pronunciation in the form of ISO 15919.", additional = "For requests related to this category, see [[:Category:Requests for pronunciation in {{{langname}}} entries]].", parents = {"प्रविष्टि रखरखाव"}, } labels["IPA pronunciations with invalid separators"] = { description = "{{{langname}}} terms with IPA using invalid separators such as /.ˈ/, /.ˌ/, a dot followed by primary or secondary stress; or /ˈ / or /ˌ /, primary or secondary stress followed by a space.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["terms with hyphenation"] = { description = "{{{langname}}} terms that include hyphenation.", parents = {"प्रविष्टि रखरखाव"}, } labels["terms with audio pronunciation"] = { description = "{{{langname}}} terms that include the pronunciation in the form of an audio file.", additional = "For requests related to this category, see [[:Category:Requests for audio pronunciation in {{{langname}}} entries]].", parents = {"प्रविष्टि रखरखाव"}, } labels["terms with nonstandard or incorrect audio pronunciations"] = { description = "{{{langname}}} terms which have been tagged as having pronunciations which are nonstandard or incorrect.", parents = {"terms with audio pronunciation"}, can_be_empty = true, hidden = true, } labels["entries missing Template:reconstructed"] = { description = "Reconstructed {{{langname}}} entries which do not have the {{tl|reconstructed}} template.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } local function add_manual_param_category(label, desc, addl_intro, include_addl_continuation) labels[label] = { description = desc or "Pages containing {{{langname}}} " .. label .. ".", additional = addl_intro .. (not include_addl_continuation and "" or "\n\n" .. "Note that the pages in this category are not necessarily the same as the actual term in question. This " .. "frequently happens, for example, with English pages with translation sections, where the term that " .. "triggers the addition of the category is one of the translations."), parents = {"प्रविष्टि रखरखाव"}, -- Set catfix = false because the page will have a mixture of native-language and -- non-native-language pages, but include the normal native-language table of contents headers -- because most pages are in the native language. catfix = false, toc_template = "{{{langcode}}}-categoryTOC", toc_template_full = "{{{langcode}}}-categoryTOC/full", can_be_empty = true, hidden = true, } end add_manual_param_category("terms in nonstandard scripts", nil, "Pages are placed here if they contain terms written in a script that isn't in the language's " .. "list of scripts in the language data. This may mean the script should be added to the list, or that the wrong language code has been used.", true) add_manual_param_category("terms with non-redundant manual transliterations", nil, "Pages are placed here if they contain terms whose transliteration has been specified manually using " .. "{{para|tr}} or a similar parameter and is different from the transliteration which is automatically generated.", true) add_manual_param_category("terms with redundant transliterations", nil, "Pages are placed here if they contain terms whose transliteration has been specified manually using " .. "{{para|tr}} or a similar parameter and is the same as the transliteration which is automatically generated.", true) add_manual_param_category("terms with non-redundant manual script codes", nil, "Pages are placed here if they contain terms whose script code has been specified manually using " .. "{{para|sc}} or a similar parameter and is different from the script code which is automatically generated.", true) add_manual_param_category("terms with redundant script codes", nil, "Pages are placed here if they contain terms whose script code has been specified manually using " .. "{{para|sc}} or a similar parameter and is the same as the script code which is automatically generated.", true) add_manual_param_category("terms with non-redundant non-automated sortkeys", "{{{langname}}} terms with non-redundant non-automated sortkeys.", "Terms are placed here if they have been sorted using a sortkey other than the one which is automatically " .. "generated. This can happen for two reasons:\n# A different sortkey has been specified using the {{para|sort}} " .. "parameter.\n# One or more categories have been added using raw wikitext, which means the page's default " .. "sortkey is used for that category. If that default sortkey is different from the automatic sortkey, then the " .. "page will also be added here.") add_manual_param_category("terms with redundant sortkeys", "{{{langname}}} terms with redundant sortkeys.", "Terms are placed here if their sortkey has been specified using the {{para|sort}} parameter, and it the same " .. "as the one which is automatically generated.") add_manual_param_category("links with redundant target parameters", "Pages containing {{{langname}}} links where the alt text could replace the link target, instead of being given " .. "separately.", "This occurs when the only difference between the link target and the alt text is that the alt text contains " .. "diacritics (or other characters) which would have been ignored anyway had they been included in the link " .. "target. For example, {{tl|l|la|amo|amō}} ({{l|la|amo|amō}}) is exactly the same as {{tl|l|la|amō}} " .. "({{l|la|amō}}), because macrons are automatically stripped from Latin link targets, even though they're still " .. "displayed.") add_manual_param_category("links with ignored alt parameters", "Pages containing {{{langname}}} links where the {{para|alt}} parameter has been ignored.", "This occurs when the main linked text includes a wikilink.") add_manual_param_category("links with redundant alt parameters", "Pages containing {{{langname}}} links where the {{para|alt}} parameter is redundant.", "This occurs when the alt text makes no difference to the output. For example, {{tl|l|en|foo|foo}} " .. "({{l|en|foo|foo}}) is exactly the same as {{tl|l|en|foo}} ({{l|en|foo}}).") add_manual_param_category("links with ignored id parameters", "Pages containing {{{langname}}} links where the {{para|id}} parameter has been ignored.", "This occurs when the main linked text includes a wikilink.") add_manual_param_category("links with redundant wikilinks", "Pages containing {{{langname}}} links which contain a redundant wikilink.", "This occurs if link target consists of a single wikilink, which should instead be entered in the " .. "conventional manner without link brackets. For example, {{tl|l|en|<nowiki>[[foo]]</nowiki>}} " .. "is the same as {{tl|l|en|foo}}, and {{tl|l|en|<nowiki>[[foo|bar]]</nowiki>}} is the same as " .. "{{tl|l|en|foo|bar}}.\n\nThis also occurs when link templates are nested inside each other " .. "unnecessarily: e.g. {{tl|l|en|{{tl|l|en|foo}}}}") add_manual_param_category("links with manual fragments", "Pages containing {{{langname}}} links where a manual link fragment has been given.", "This occurs when the link fragment has been specified using {{code|#}} after the term, " .. "which overrides the normal fragment generated by link templates that points to the relevant " .. "language section.\n\nLink fragments are used to point to a specific section on a target page, and " .. "it is preferable to use the {{para|id}} parameter to do this, since it is less likely to break if " .. "additional content is added to the target page: for example, the fragment {{code|#Adjective}} " .. "will start pointing to the wrong section if another language with an adjective section is added above " .. "the intended language.") labels["descendant hubs"] = { description = "{{{langname}}} terms that do not mean more than the sum of their parts but exist for listing two or more inclusion-worthy descendants.", parents = {"प्रविष्टि रखरखाव"}, } labels["terms needing to be assigned to a sense"] = { description = "{{{langname}}} entries that have terms under headers such as \"Synonyms\" or \"Antonyms\" not assigned to a specific sense of the entry in which they appear. Use [[Template:syn]] or [[Template:ant]] to fix these.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } --[=[ labels["terms with inflection tables"] = { description = "{{{langname}}} entries that contain inflection tables.". additional = "For requests related to this category," see [[:Category:Requests for inflections in {{{langname}}} entries]].", parents = {"प्रविष्टि रखरखाव"}, } ]=] labels["terms with collocations"] = { description = "{{{langname}}} entries that contain [[collocation]]s that were added using templates such as {{tl|co}}.", additional = "For requests related to this category, see [[:Category:Requests for collocations in {{{langname}}}]]. See also [[:Category:Requests for quotations in {{{langname}}}]] and [[:Category:Requests for example sentences in {{{langname}}}]].", parents = {"प्रविष्टि रखरखाव"}, umbrella_parents = "Collocation maintenance", } labels["terms with usage examples"] = { description = "{{{langname}}} entries that contain usage examples that were added using templates such as {{tl|ux}}.", additional = "For requests related to this category, see [[:Category:Requests for example sentences in {{{langname}}}]]. See also [[:Category:Requests for collocations in {{{langname}}}]] and [[:Category:Requests for quotations in {{{langname}}}]].", parents = {"प्रविष्टि रखरखाव"}, umbrella_parents = "Usage example maintenance", } labels["terms with quotations"] = { description = "{{{langname}}} entries that contain quotes that were added using templates such as {{tl|quote}}, {{tl|quote-book}}, {{tl|quote-journal}}, etc.", additional = "For requests related to this category, see [[:Category:Requests for quotations in {{{langname}}}]]. See also [[:Category:Requests for example sentences in {{{langname}}}]].", parents = {"प्रविष्टि रखरखाव"}, umbrella_parents = "Quotation maintenance", } labels["terms with interlinear glossed text"] = { description = "{{{langname}}} entries that contain interlinear glossed text added using {{tl|interlinear}}.", parents = {"प्रविष्टि रखरखाव"}, } labels["terms with redundant head parameter"] = { description = "{{{langname}}} terms that contain a redundant head= parameter in their headword (called using {{tl|head}} or a language-specific equivalent).", additional = "Individual languages can prevent terms from being added to this category by setting `data.no_redundant_head_cat`.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } labels["terms with red links in their headword lines"] = { description = "{{{langname}}} terms that contain red links (i.e. uncreated forms) in their headword lines.", parents = {"redlinks"}, can_be_empty = true, hidden = true, } labels["terms with red links in their inflection tables"] = { description = "{{{langname}}} terms that contain red links (i.e. uncreated forms) in their inflection tables.", parents = {"redlinks"}, can_be_empty = true, hidden = true, } labels["requests for English equivalent term"] = { description = "{{{langname}}} entries with definitions that have been tagged with {{tl|rfeq}}. Read the documentation of the template for more information.", parents = {"प्रविष्टि रखरखाव"}, can_be_empty = true, hidden = true, } for _, quot_type in ipairs { "quotations", "usage examples" } do local umbrella_parent = quot_type == "quotations" and "Quotation maintenance" or "Usage example maintenance" labels[quot_type .. " with omitted translation"] = { description = "{{{langname}}} " .. quot_type .. " where a translation would normally be required but the translation has explicitly been omitted by specifying {{code|-}}. The translation should be supplied instead.", parents = {"प्रविष्टि रखरखाव"}, umbrella = { parents = {name = umbrella_parent, sort = "omitted translation"}, breadcrumb = "with omitted translation", }, can_be_empty = true, hidden = true, } end for _, pos in ipairs({"nouns", "proper nouns", "verbs", "adjectives", "adverbs", "participles", "determiners", "pronouns", "numerals", "suffixes", "contractions"}) do labels[pos .. " with red links in their headword lines"] = { description = "{{{langname}}} " .. pos .. " that contain red links (i.e. uncreated forms) in their headword lines.", parents = {"terms with red links in their headword lines"}, breadcrumb = pos, can_be_empty = true, hidden = true, } labels[pos .. " with red links in their inflection tables"] = { description = "{{{langname}}} " .. pos .. " that contain red links (i.e. uncreated forms) in their inflection tables.", parents = {"terms with red links in their inflection tables"}, breadcrumb = pos, can_be_empty = true, hidden = true, } end for _, pos in ipairs { "nouns", "proper nouns", "pronouns" } do local label = pos .. " with unknown or uncertain plurals" labels[label] = { description = "{{{langname}}} " .. label .. ".", additional = "Terms are usually added to this category by specifying {{code|?}} as the plural. As much " .. "is possible, a plural should be added or, if the noun is uncountable, indicated appropriately (usually " .. "using {{code|-}} in place of the plural). Some languages support the value {{code|!}} to indicate " .. "that a plural cannot be attested but the noun is theoretically countable.", breadcrumb = "with unknown or uncertain plurals", parents = { {name = pos, sort = "unknown or uncertain plurals"}, "प्रविष्टि रखरखाव", }, } end -- Add 'umbrella_parents' key if not already present. for _, data in pairs(labels) do if data.umbrella == nil and data.umbrella_parents == nil then data.umbrella_parents = "प्रविष्टि रखरखाव उपश्रेणियाँ भाषा अनुसार" end end ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["प्रविष्टि रखरखाव उपश्रेणियाँ भाषा अनुसार"] = { description = "Umbrella categories covering topics related to entry maintenance.", additional = "{{{umbrella_meta_msg}}}", parents = { "छतरी मेटाश्रेणियाँ", {name = "प्रविष्टि रखरखाव", is_label = true, sort = " "}, }, } raw_categories["Citation maintenance"] = { description = "Categories for maintaining citations specified using {{tl|cite-*}}.", parents = {"Wiktionary maintenance"}, breadcrumb = "citations", } raw_categories["Collocation maintenance"] = { description = "Categories for maintaining collocations specified using {{tl|co}}, {{tl|coi}} or {{tl|coa}}.", parents = {"Wiktionary maintenance"}, breadcrumb = "collocations", } raw_categories["Quotation maintenance"] = { description = "Categories for maintaining quotations specified using {{tl|quote-*}}.", parents = {"Wiktionary maintenance"}, breadcrumb = "quotations", } raw_categories["Usage example maintenance"] = { description = "Categories for maintaining usage examples specified using {{tl|ux}}, {{tl|uxi}} or {{tl|uxa}}.", parents = {"Wiktionary maintenance"}, breadcrumb = "usage examples", } raw_categories["Citations using nocat parameter"] = { description = "Instances of {{tl|cite-*}} templates using the {{para|nocat}} parameter, which should be eliminated (?).", parents = {{name = "Citation maintenance", sort = "nocat"}}, breadcrumb = "using nocat parameter", can_be_empty = true, hidden = true, } raw_categories["Quotation templates to be cleaned"] = { description = "Instances of quotations using {{tl|quote-text}}.", additional = "They should be converted to other '''[[:Category:Citation templates|quotation templates]]''' if relevant.", parents = {"Quotation maintenance"}, breadcrumb_base = "to be cleaned", can_be_empty = true, hidden = true, } raw_categories["Quotations using nocat parameter"] = { description = "Instances of {{tl|quote-*}} templates using the {{para|nocat}} parameter, which should be eliminated (?).", parents = {{name = "Quotation maintenance", sort = "nocat"}}, breadcrumb = "using nocat parameter", can_be_empty = true, hidden = true, } raw_categories["Quotations using quoted-in parameter"] = { description = "Instances of {{tl|quote-*}} templates using the {{para|quoted_in}} parameter.", additional = "It is recommended to restructure these template calls using the {{para|newversion}} parameter along with associated parameters {{para|2ndauthor}}, {{para|title2}}, {{para|year2}}, {{para|publisher2}} and the like, as described in the documentation for {{tl|quote-book}}.", parents = {{name = "Quotation maintenance", sort = "quoted-in"}}, breadcrumb = "using quoted-in parameter", can_be_empty = true, hidden = true, } raw_categories["अनुरोध"] = { topright = "{{shortcut|WT:CR|WT:RQ}}", description = "A parent category for the various request categories.", parents = {"श्रेणी:विक्षनरी"}, } raw_categories["अनुरोध भाषा अनुसार"] = { description = "Categories with requests in various specific languages.", additional = "{{{umbrella_msg}}}", parents = { {name = "अनुरोध उपश्रेणियाँ भाषा अनुसार", sort = " "}, {name = "अनुरोध", sort = " "}, }, breadcrumb = "भाषा अनुसार", } raw_categories["अनुरोध उपश्रेणियाँ भाषा अनुसार"] = { description = "Umbrella categories covering topics related to requests.", additional = "{{{umbrella_meta_msg}}}", parents = { "छतरी मेटाश्रेणियाँ", {name = "अनुरोध", sort = " "}, }, } raw_categories["Requests for quotations by source"] = { description = "Categories with requests for quotation, broken out by the source of the quotation.", additional = "Some abbreviated names of sources are explained at [[Wiktionary:Abbreviated Authorities in Webster]].", parents = {{name = "Requests for quotations", sort = "source"}}, breadcrumb = "By source", } raw_categories["Requests for quotations"] = { -- FIXME description = "Words are added to this category by the inclusion in their entries of {{tl|rfv-quote}}.", parents = {{name = "अनुरोध", sort = "quotations"}, "Quotation maintenance"}, breadcrumb = "Quotations", } raw_categories["Requests for date"] = { description = "Requests for a date to be added to a quotation.", additional = "To add an article to this category, use {{tl|rfdate}} or {{tl|rfdatek}} to include the author. " .. "Please remove the template from the article once the date has been provided.", parents = {{name = "अनुरोध", sort = "date"}, "Quotation maintenance"}, breadcrumb = "Date", } raw_categories["Requests for translations in user-competency categories by number of users"] = { description = "Requests for translations to be added to user-competency categories, sorted by number of users with that competency.", parents = {{name = "अनुरोध", sort = "translations in user-competency categories by number of users"}}, breadcrumb = "Translations in user-competency categories by number of users", } raw_categories["Requests for translations in user-competency categories by language"] = { description = "Requests for translations to be added to user-competency categories, sorted by language.", parents = {{name = "अनुरोध", sort = "translations in user-competency categories by language"}}, breadcrumb = "Translations in user-competency categories by language", hidden = true, } raw_categories["Terms with translations by language"] = { description = "Terms with translations, sorted by language.", parents = {{name = "प्रविष्टि रखरखाव उपश्रेणियाँ भाषा अनुसार", sort = "translations by language"}}, breadcrumb = "Translations", } raw_categories["Entries using missing taxonomic names"] = { description = "Entries that link to wikispecies because there is no corresponding Wiktionary entry for the taxonomic name in the template {{tl|taxlink}}.", additional = "The missing name is one or more of those enclosed in {{tl|taxlink}}. The entries are sorted by the missing taxonomic name." .. "\n\nSee [[:Category:mul:Taxonomic names]].", parents = {{name = "प्रविष्टि रखरखाव", is_label = true, lang = "mul", sort = "missing taxonomic names"}}, breadcrumb = "Missing taxonomic names", hidden = true, } ----------------------------------------------------------------------------- -- -- -- RAW HANDLERS -- -- -- ----------------------------------------------------------------------------- local function script_name_to_code(name) local sc = require(scripts_module).getByCanonicalName(name) if not sc then error("Unrecognized script name '" .. name .. "'") end return sc:getCode() end --[=[ This array consists of category match specs. Each spec contains one or more properties, whose values are (a) strings that may contain references to other properties using the {{{PROPERTY}}} syntax; (b) functions of one argument, an `items` table of the same properties that are accessible using the {{{PROPERTY}} syntax. Each such spec should have at least a `regex` property that matches the name of the category. Capturing groups in this regex can be referenced in other properties using {{{1}}} for the first group, {{{2}}} for the second group, etc. (or using keys "1", "2", etc. in functions). Property expansion happens recursively if needed (i.e. a property can reference another property, which in turn references a third property). If there is a `language_name` propery, it specifies the language name (and will typically be a reference to a capturing group from the `regex` property); if not specified, it defaults to "{{{1}}}" unless the `nolang` property is set, in which case there is no language name associated with the category name. The language name must be the canonical name of a recognized full language, or an error is thrown; however, if the `allow_etym_lang` property is set, the language name may also be the canonical name of an etymology-only language. Based on the language name, the `language_code` and `language_object` properties are automatically filled in. If `language_name` is an etymology-only language, additional properties `parent_language_name`, `parent_language_code` and `parent_language_object` are set for the parent full language of the etymology-only language. If the `regex` values of multiple category specs match, the first one takes precedence. Recognized or predefined properties: `pagename`: Current pagename. `regex`: See above. `1`, `2`, `3`, ...: See above. `language_name`, `language_code`, `language_object`: See above. `parent_language_name`, `parent_language_code`, `parent_language_object`: See above. `nolang`: See above. `allow_etym_lang`: Language names may be etymology-only languages. See above. `description`: Override the description (normally taken directly from the pagename). `template_name`: Name of template which generates this category. `template_sample_call`: Syntax for calling the template. Defaults to "{{{template_name}}}|{{{language_code}}}". Used to display an example template call and the output of this call. `template_actual_sample_call`: Syntax for calling the template. Takes precedence over `template_sample_call` when generating example template output (but not when displaying an example template call) and is intended for a template call that uses the |nocat=1 parameter. `template_example_output`: Override the text that displays example template output (see `template_sample_call`). `additional_template_description`: Extra text to be displayed after the example template output. `parents`: Parent categories. Should be a list of elements, each of which is an object containing at least a name= and sort= field (same format as parents= for regular raw categories, except that the name= and sort= field will have {{{PROPERTY}}} references expanded). If no parents are specified, and the pagename is of the form "Requests for FOO by language", the parents will be "अनुरोध उपश्रेणियाँ भाषा अनुसार" with FOO as the sort key, along with any parents specified in `additional_umbrella_parents`. Otherwise, the `language_name` property must exist, and the parent will be "Requests concerning LANGNAME", with the pagename minus any initial "Requests for " as the sort key. Note that this does *NOT* apply if an etymology-only language is associated with the category, in which case `etym_parents` is used instead. `etym_parents`: Parent categories for categories with associated etymology-only languages. The format is the same as `parents`. If omitted, there are two parents by default: (1) The pagename (i.e. category name) with the language name replaced by the corresponding parent language name, with the value of `language_name` as the sort key; (2) "Requests concerning LANGNAME", with the pagename minus any initial "Requests for " as the sort key. `umbrella`: Parent all-language category. Sort key is based on the language name. This applies *ONLY* if a full language is associated with the category name (i.e. not if `nolang` is set or if `allow_etym_lang` is set and the associated language is an etymology-only language); otherwise there will be no umbrella category. `additional_umbrella_parents`: Additional parents to add to the umbrella (all-language) category along with "अनुरोध उपश्रेणियाँ भाषा अनुसार". `breadcrumb`: Specify the breadcrumb. If `parents` is given, there is no default (i.e. it will end up being the pagename). Otherwise, if the pagename is of the form "Requests for FOO by language", the default breadcrumb will be "FOO". Otherwise it is computed by removing the language name from the pagename and chopping out "Requests for" from the beginning and "in entries" and "for terms" from the end. Note that this does *NOT* apply if an etymology-only language is associated with the category, in which case `etym_breadcrumb` is used instead. `etym_breadcrumb`: Specify the breadcrumb for categories with associated etymology-only languages. Defaults to the value of `language_name`. `not_hidden_category`: Don't hide the category. `catfix`: Same as `catfix` in regular labels and raw categories, except that request-specific {{{PROPERTY}}} syntax is expanded. `toc_template`, `toc_template_full`: Same as the corresponding fields in regular labels and raw categories, except that request-specific {{{PROPERTY}}} syntax is expanded. In general, properties can contain references to templates (e.g. {{tl}} and {{para}}), which will be appropriately expanded (this expansion happens in the poscatboiler code, not in this module). The major exception is in the `template_sample_call` and `template_actual_sample_call` properties, which are surrounded by <pre>...</pre> when inserted, so template references are not expanded. Triple-brace property references are still expanded in these properties; but beware that if any of those property references contain template references, they won't be expanded. (This actually happens in the handlers for 'Request for SCRIPT script for LANG terms'; the sample call references {{{script_code}}}, whose definition therefore cannot contain template references. The solution is to define this property using a function.) ]=] local requests_categories = { { regex = "^Requests concerning (.+)$", allow_etym_lang = true, description = "Categories with {{{1}}} entries that need the attention of experienced editors.", parents = {{name = "प्रविष्टि रखरखाव", is_label = true, sort = "अनुरोध"}}, etym_parents = {{name = "Requests concerning {{{parent_language_name}}}", sort = "{{{1}}}"}, {name = "{{{1}}}", sort = "अनुरोध"}}, umbrella = "अनुरोध भाषा अनुसार", breadcrumb = "अनुरोध", not_hidden_category = true, }, { regex = "^Requests for etymologies in (.+) entries$", allow_etym_lang = true, umbrella = "Requests for etymologies by language", template_name = "rfe", }, { regex = "^Requests for expansion of etymologies in (.+) entries$", umbrella = "Requests for expansion of etymologies by language", template_name = "etystub", }, { regex = "^Requests for pronunciation in (.+) entries$", umbrella = "Requests for pronunciation by language", template_name = "rfp", }, { regex = "^Requests for audio pronunciation in (.+) entries$", umbrella = "Requests for audio pronunciation by language", template_name = "rfap", }, { regex = "^Requests for definitions in (.+) entries$", umbrella = "Requests for definitions by language", template_name = "rfdef", }, { regex = "^Requests for clarification of definitions in (.+) entries$", umbrella = "Requests for clarification of definitions by language", template_name = "rfclarify", }, } for _, spec_with_pos in ipairs { {"inflections", "rfinfl"}, {"plural forms"}, {"tone", "rftone"}, {"accents"}, {"aspect", "rfaspect"}, {"animacy"}, {"gender", "rfgender"}, {"noun class"}, } do local property, rftemplate = unpack(spec_with_pos) table.insert(requests_categories, { -- This is for part-of-speech-specific categories such as -- "Requests for inflections in Northern Ndebele noun entries" or -- "Requests for accents in Ukrainian proper noun entries". -- Here and below, we assume that the part of speech is begins with -- a lowercase letter, while the preceding language name ends in a -- capitalized word. Note that this entry comes before the -- following one and takes precedence over it. regex = ("^Requests for %s in (.-) ([a-z]+[a-z ]*) entries$"):format(property), parents = {{name = ("Requests for %s in {{{language_name}}} entries"):format(property), sort = "{{{2}}}"}}, umbrella = ("Requests for %s of {{pluralize|{{{2}}}}} by language"):format(property), breadcrumb = "{{{2}}}", template_name = rftemplate, template_sample_call = rftemplate and ("{{%s|{{{language_code}}}|{{{2}}}}}"):format(rftemplate) or nil, } ) table.insert(requests_categories, { regex = ("^Requests for %s in (.+) entries$"):format(property), umbrella = ("Requests for %s by language"):format(property), template_name = rftemplate, } ) table.insert(requests_categories, { regex = ("^Requests for %s of (.+) by language$"):format(property), nolang = true, } ) end extend(requests_categories, { { regex = "^Requests for example sentences in (.+)$", umbrella = "Requests for example sentences by language", template_name = "rfex", }, { regex = "^Requests for quotations in (.+)$", umbrella = "Requests for quotations by language", additional_umbrella_parents = {"Quotation maintenance"}, template_name = "rfquote", }, { regex = "^Requests for translations into (.+)$", allow_etym_lang = true, umbrella = "Requests for translations by language", template_name = "t-needed", catfix = "en", }, { regex = "^Requests for translations of (.+) usage examples$", allow_etym_lang = true, umbrella = "Requests for translations of usage examples by language", additional_umbrella_parents = {"Usage example maintenance"}, template_name = "t-needed", template_sample_call = "{{t-needed|{{{language_code}}}|usex}}", template_actual_sample_call = "{{t-needed|{{{language_code}}}|usex|nocat=1}}", additional_template_description = "The {{tl|ux}}, {{tl|uxi}}, {{tl|ja-usex}} and {{tl|zh-x}} templates automatically add the page to this category if the example is in a foreign language and the translation is missing." }, { regex = "^Requests for translations of (.+) quotations$", allow_etym_lang = true, umbrella = "Requests for translations of quotations by language", additional_umbrella_parents = {"Quotation maintenance"}, template_name = "t-needed", template_sample_call = "{{t-needed|{{{language_code}}}|quote}}", template_actual_sample_call = "{{t-needed|{{{language_code}}}|quote|nocat=1}}", additional_template_description = "The {{tl|quote}}, and {{tl|Q}} templates automatically add the page to this category if the example is in a foreign language and the translation is missing." }, { regex = "^Requests for review of (.+) translations$", allow_etym_lang = true, umbrella = "Requests for review of translations by language", template_name = "t-check", template_sample_call = "{{t-check|{{{language_code}}}|example}}", template_example_output = "", catfix = "en", }, { regex = "^Requests for transliteration of (.+) terms$", umbrella = "Requests for transliteration by language", template_name = "rftranslit", additional_template_description = "The {{tl|head}} template, and the large number of language-specific variants of it, automatically add " .. "the page to this category if the example is in a foreign language and no transliteration can be generated (particularly in languages without " .. "automated transliteration, such as Hebrew and Persian).", }, { regex = "^Requests for transliteration of (.+) usage examples$", umbrella = "Requests for transliteration of usage examples by language", additional_umbrella_parents = {"Usage example maintenance"}, template_name = "rftranslit", template_sample_call = "{{rftranslit|{{{language_code}}}}}", template_actual_sample_call = "{{rftranslit|{{{language_code}}}|nocat=1}}", catfix = false, additional_template_description = "The {{tl|ux}} and {{tl|uxi}} templates automatically add the page to this category if the example " .. "is in a foreign language and no transliteration can be generated (particularly in languages without automated transliteration, such as " .. "Hebrew and Persian).", }, { regex = "^Requests for transliteration of (.+) quotations$", umbrella = "Requests for transliteration of quotations by language", additional_umbrella_parents = {"Quotation maintenance"}, catfix = false, additional_template_description = "The {{tl|quote}} and {{code|<nowiki>{{quote-*}}</nowiki>}} templates automatically add the page to this category if the quotation " .. "is in a foreign language and no transliteration can be generated (particularly in languages without automated transliteration, such as " .. "Hebrew and Persian).", }, { regex = "^Requests for native script for (.+) terms$", allow_etym_lang = true, etym_parents = { {name = "Requests for native script for {{{parent_language_name}}} terms", sort = "{{{1}}}"}, {name = "Requests concerning {{{language_name}}}", sort = "native script"}, }, umbrella = "Requests for native script by language", template_name = "rfscript", template_actual_sample_call = "{{rfscript|{{{language_code}}}|nocat=1}}", catfix = false, additional_template_description = "Many templates such as {{tl|l}}, {{tl|m}} and {{tl|t}} automatically place the page in this category when they are missing the term but have been provided with a transliteration." }, { regex = "^Requests for native script in (.+) usage examples$", umbrella = "Requests for native script in usage examples by language", additional_umbrella_parents = {"Usage example maintenance"}, template_name = "rfscript", template_sample_call = "{{rfscript|{{{language_code}}}|usex=1}}", template_actual_sample_call = "{{rfscript|{{{language_code}}}|usex=1|nocat=1}}", catfix = false, additional_template_description = "The {{tl|ux}} and {{tl|uxi}} templates automatically add the page to this category if the example itself is missing but the translation is supplied." }, { regex = "^Requests for native script in (.+) quotations$", umbrella = "Requests for native script in quotations by language", additional_umbrella_parents = {"Quotation maintenance"}, template_name = "rfscript", template_sample_call = "{{rfscript|{{{language_code}}}|quote=1}}", template_actual_sample_call = "{{rfscript|{{{language_code}}}|quote=1|nocat=1}}", catfix = false, additional_template_description = "The {{tl|quote}} and {{code|<nowiki>{{quote-*}}</nowiki>}} templates automatically add the page to this category if the quotation itself is missing but the translation is supplied." }, { regex = "^Requests for (.+) script for (.+) terms$", language_name = "{{{2}}}", allow_etym_lang = true, parents = {{name = "Requests for native script for {{{language_name}}} terms", sort = "{{{1}}}"}}, etym_parents = { {name = "Requests for native script for {{{language_name}}} terms", sort = "{{{1}}}"}, {name = "Requests for {{{1}}} script for {{{parent_language_name}}} terms", sort = "{{{language_name}}}"}, {name = "Requests concerning {{{language_name}}}", sort = "{{{1}}} script"}, }, umbrella = "Requests for {{{1}}} script by language", breadcrumb = "{{{1}}}", etym_breadcrumb = "{{{1}}}", template_name = "rfscript", -- NOTE: The following is used in `template_sample_call` and `template_actual_sample_call`, meaning the -- conversion of script name to script code needs to be done using an inline function like this, instead of -- a {{#invoke:...}} template call. script_code = function(items) return script_name_to_code(items["1"]) end, template_sample_call = "{{rfscript|{{{language_code}}}|sc={{{script_code}}}}}", template_actual_sample_call = "{{rfscript|{{{language_code}}}|sc={{{script_code}}}|nocat=1}}", catfix = false, additional_template_description = "Many templates such as {{tl|l}}, {{tl|m}} and {{tl|t}} automatically place the page in this category when they are missing the term but have been provided with a transliteration." }, { regex = "^Requests for (.+) script by language$", parents = {{name = "Requests for script by language", sort = "{{{1}}}"}}, breadcrumb = "{{{1}}}", nolang = true, }, { regex = "^Requests for script by language$", nolang = true, }, { regex = "^Requests for images in (.+) entries$", umbrella = "Requests for images by language", template_name = "rfi", }, { regex = "^Requests for references for (.+) terms$", umbrella = "Requests for references by language", template_name = "rfref", }, { regex = "^Requests for references for etymologies in (.+) entries$", parents = {{name = "Requests for references for {{{language_name}}} terms", sort = "etymologies"}}, umbrella = "Requests for references for etymologies by language", breadcrumb = "Etymologies", template_name = "rfv-etym", }, { regex = "^Requests for references for pronunciations in (.+) entries$", parents = {{name = "Requests for references for {{{language_name}}} terms", sort = "pronunciations"}}, umbrella = "Requests for references for pronunciations by language", breadcrumb = "Pronunciations", template_name = "rfv-pron", }, { regex = "^Requests for attention concerning (.+)$", umbrella = "Requests for attention by language", breadcrumb = "Attention", template_name = "attention", template_sample_call = "{{attention|{{{language_code}}}|insert a brief description of the request here}}", template_example_output = "This template does not generate any text in entries, but can be visualised by enabling the Catch My Attention gadget. See {{section link|Template:attention#Visibility}}.", -- These pages typically contain a mixture of English and native-language entries, so disable catfix. catfix = false, -- Setting catfix = false will normally trigger the English table of contents template. -- We still want the native-language table of contents template, though. toc_template = "{{{language_code}}}-categoryTOC", toc_template_full = "{{{language_code}}}-categoryTOC/full", }, { regex = "^Requests for cleanup in (.+) entries$", umbrella = "Requests for cleanup by language", template_name = "rfc", template_actual_sample_call = "{{rfc|{{{language_code}}}|nocat=1}}", }, { regex = "^Requests for cleanup of Pronunciation N headers in (.+) entries$", umbrella = "Requests for cleanup of Pronunciation N headers by language", template_name = "rfc-pron-n", template_actual_sample_call = "{{rfc-pron-n|{{{language_code}}}|nocat=1}}", template_example_output = "This template does not generate any text in entries.", additional_template_description = [=[ The purpose of this category is to tag entries that use headers with "Pronunciation" and a number. While these headers and structure are sometimes used, they are not specifically prescribed by [[WT:ELE]]. No complete proposal has yet been made on how they should work, what the semantics are, or how they interact with multiple etymologies. As a result they should generally be avoided. Instead, merge the entries (possibly under multiple Etymology sections, if appropriate), and list all pronunciations, appropriately tagged, under a Pronunciation header. [[User:KassadBot|KassadBot]] tags these entries (or used to tag these entries, when the bot was operational). At some point if a proposal is made and adopted as policy, these entries should be reviewed. This category is hidden.]=], }, { regex = "^Requests for deletion in (.+) entries$", umbrella = "Requests for deletion by language", template_name = "rfd", template_actual_sample_call = "{{rfd|{{{language_code}}}|nocat=1}}", }, { regex = "^Requests for verification in (.+) entries$", umbrella = "Requests for verification by language", template_name = "rfv", }, { regex = "^Requests for attention in (.+) etymologies$", umbrella = "Requests for attention by language" }, { regex = "^Requests for quotations/(.+)$", description = "Requests for a quotation or for quotations from {{{1}}}.", parents = {{name = "Requests for quotations by source", sort = "{{{1}}}"}}, breadcrumb = "{{{1}}}", nolang = true, template_name = "rfquotek", template_sample_call = "{{rfquotek|LANGCODE|{{{1}}}}}", template_example_output = "\n(where LANGCODE is the language code of the entry)\n\nIt results in the message below:\n\n{{rfquotek|und|{{{1}}}}}", }, { regex = "^Requests for date in (.+) entries$", umbrella = "Requests for date by language", additional_umbrella_parents = {"Quotation maintenance"}, template_name = "rfdate", additional_template_description = "The quotation templates, such as {{tl|quote-book}} and {{tl|quote-journal}}, " .. "automatically add the page to this category if neither {{para|date}} nor {{para|year}} is provided. Providing the " .. "parameter in each case on the page automatically removes the article from this category. See " .. "[[Wiktionary:Quotations]] for information about formatting dates and quotations.", }, { regex = "^Requests for date/(.+)$", description = "{{rfd|section=Category:Requests for date by source}}Requests for a date for a quotation or quotations from {{{1}}}.", parents = {{name = "Requests for date by source", sort = "{{{1}}}"}}, breadcrumb = "{{{1}}}", nolang = true, template_name = "rfdatek", template_sample_call = "{{rfdatek|LANGCODE|{{{1}}}}}", template_example_output = "\n(where LANGCODE is the language code of the entry)\n\nIt results in the message below:\n\n{{rfdatek|und|{{{1}}}}}", }, { regex = "^Requests for attestation of (.+) terms$", umbrella = "Requests for attestation of terms by language", breadcrumb = "Attestation", additional_template_description = "The {{tl|LDL}} template adds this category when a language code is supplied in {{para|1}} (as it should be)." }, }) local user_competency_additional_template_description = "This is added by user-competency categories such as " .. "[[:Category:User fr-4]], which groups users who speak French at level 4 (near-native proficiency), when " .. "the native-language text indicating this fact is missing. The appropriate translation should mirror the " .. "English text also displayed (e.g. in this case \"These users speak French at a '''near native''' " .. "level.\"), and should be supplied to {{tl|auto cat}} using the {{para|text}} parameter. The mention of the " .. "language in the text should be surrounded by double angle brackets, e.g. \"&lt;&lt;français>>\", which " .. "causes it to be automatically linked to the appropriate parent category." local user_competency_parents = {{name = "Requests for translations in user-competency categories by number of users", sort = function(items) return " " .. ("%010d"):format(items["1"]) end, }} extend(requests_categories, { { regex = "^Requests for translations in user%-competency categories with ([0-9]+)%-([0-9]+) users$", description = "Requests for translation of phrases indicating user competencies for specific languages and specific competency levels, for categories with {{{1}}}-{{{2}}} users.", additional_template_description = user_competency_additional_template_description, parents = user_competency_parents, breadcrumb = "{{{1}}}-{{{2}}}", nolang = true, }, { regex = "^Requests for translations in user%-competency categories with ([0-9]+) (users?)$", description = "Requests for translation of phrases indicating user competencies for specific languages and specific competency levels, for categories with {{{1}}} {{{2}}}.", additional_template_description = user_competency_additional_template_description, parents = user_competency_parents, breadcrumb = "{{{1}}}", nolang = true, } }) table.insert(raw_handlers, function(data) local items local function init_items() items = {pagename = data.category} end local function expand_value(item, val) if not val then return val elseif is_callable(val) then return expand_value(item .. " ⇒ function", val(items)) elseif type(val) == "table" then for k, v in pairs(val) do val[k] = expand_value(item .. " ⇒ " .. k, v) end return val elseif type(val) == "number" then val = tostring(val) end if type(val) ~= "string" then error(("The item '%s' on page %s is of type %s and can't be concatenated"):format( item, items.pagename, type(val))) end -- Replaces pseudo-template code {{{ }}} with the corresponding member of the "items" table. Has to be done -- recursively, since some of the items are nested: -- {{{template_sample_call_with_temp}}} -- ⇓ -- {{{{{template_name}}}|{{{language_code}}}}} -- ⇓ -- {{attention|en}} if val:find("{{{") then val = mw.ustring.gsub(val, "{{{([^%}%{]+)}}}", function(prop) local propval = items[prop] if not propval then error(("The item '%s' (expanded from property '%s' on page %s) was not found in the 'items' table"): format(prop, item, items.pagename)) end return expand_value(item .. " ⇒ " .. prop, propval) end ) end return val end local function expand_items_value(item) return expand_value(item, items[item]) end local function convert_items_to_category_data(items) if not items.nolang then items.language_name = items.language_name or "{{{1}}}" items.language_name = expand_items_value("language_name") items.language_object = require(languages_module).getByCanonicalName(items.language_name, true, items.allow_etym_lang) items.language_code = items.language_object:getCode() items.is_etym_lang = items.language_object:hasType("etymology-only") if items.is_etym_lang then items.parent_language_object = items.language_object:getFull() -- Reject weird cases where etymology language has no parent. if not items.parent_language_object then return nil end items.parent_language_code = items.parent_language_object:getCode() items.parent_language_name = items.parent_language_object:getCanonicalName() -- Reject weird cases where the parent language has the same name as the child etymology language. In -- that case, we'll get an infinite parent-category loop. This actually happens, e.g. with Rudbari and -- Bashkardi. if items.parent_language_name == items.language_name then return nil end else end end if items.template_name then items.template_sample_call = items.template_sample_call or "{{{{{template_name}}}|{{{language_code}}}}}" items.full_text_about_the_template = "To make this request, in this specific language, use this code in the entry (see also the documentation at [[Template:{{{template_name}}}]]):\n\n<pre>{{{template_sample_call}}}</pre>" if items.template_example_output then items.full_text_about_the_template = items.full_text_about_the_template .. " " .. items.template_example_output else items.template_actual_sample_call = items.template_actual_sample_call or items.template_sample_call items.full_text_about_the_template = items.full_text_about_the_template .. "\nIt results in the message below:\n\n{{{template_actual_sample_call}}}" end if items.additional_template_description then items.full_text_about_the_template = items.full_text_about_the_template .. "\n\n" .. items.additional_template_description end else items.full_text_about_the_template = items.additional_template_description end local parents, breadcrumb if items.is_etym_lang then parents = items.etym_parents breadcrumb = expand_items_value("etym_breadcrumb") or items.language_name else parents = items.parents breadcrumb = expand_items_value("breadcrumb") end if parents then for _, parent in ipairs(parents) do parent.name = expand_value("parent.name", parent.name) parent.sort = {sort_base = expand_value("parent.sort", parent.sort), lang = "en"} end else local umbrella_type = items.pagename:match("^Requests for (.+) by language$") if umbrella_type then breadcrumb = breadcrumb or umbrella_type parents = {{name = "अनुरोध उपश्रेणियाँ भाषा अनुसार", sort = umbrella_type}} if items.additional_umbrella_parents then extend(parents, items.additional_umbrella_parents) end elseif not items.language_name then error("Internal error: Don't know how to compute parents for non-language-specific category '" .. items.pagename .. "'") else local requests_concerning_breadcrumb = items.pagename:gsub(" " .. pattern_escape(items.language_name), "") requests_concerning_breadcrumb = requests_concerning_breadcrumb:gsub("^Requests for ", ""):gsub(" in entries$", ""):gsub(" for terms$", "") local requests_concerning_parent = { name = "Requests concerning " .. items.language_name, sort = {sort_base = requests_concerning_breadcrumb, lang = "hi"} } if items.is_etym_lang then local parent_lang_cat = items.pagename:gsub(pattern_escape(items.language_name), replacement_escape(items.parent_language_name)) parents = { {name = parent_lang_cat, sort = {sort_base = items.language_name, lang = "hi"}}, requests_concerning_parent } else breadcrumb = breadcrumb or requests_concerning_breadcrumb parents = {requests_concerning_parent} end end end if not items.nolang and not items.is_etym_lang and items.umbrella ~= false then table.insert(parents, { name = expand_items_value("umbrella"), sort = {sort_base = items.language_name, lang = "hi"} }) end local additional = expand_items_value("full_text_about_the_template") if items.pagename:find(" भाषा अनुसार$") then additional = "{{{umbrella_msg}}}" .. (additional and "\n\n" .. additional or "") end return { description = expand_items_value("description") or items.pagename .. ".", lang = items.parent_language_code or items.language_code, additional = additional, parents = parents, -- If no breadcrumb= and not an etym-only language, it will default to the category name breadcrumb = breadcrumb, catfix = expand_items_value("catfix"), toc_template = expand_items_value("toc_template"), toc_template_full = expand_items_value("toc_template_full"), hidden = not items.nolang and not items.not_hidden_category, can_be_empty = true, } end -- First look for a regular (usually language or script-specific) category. for _, category in ipairs(requests_categories) do local matchvals = {mw.ustring.match(data.category, category.regex)} if #matchvals > 0 then init_items() for key, value in pairs(category) do items[key] = value end for key, value in ipairs(matchvals) do items["" .. key] = value end local catdata = convert_items_to_category_data(items) if catdata then return catdata end end end -- Now look for umbrella categories. for _, category in ipairs(requests_categories) do if data.category == category.umbrella then init_items() items.nolang = true items.additional_umbrella_parents = category.additional_umbrella_parents local catdata = convert_items_to_category_data(items) if catdata then return catdata end end end return nil end) table.insert(raw_handlers, function(data) local langname = data.category:match("^Terms with (.+) translations$") local lang = langname and require(languages_module).getByCanonicalName(langname, true, true) if lang then local langcode = lang:getCode() local parents, breadcrumb_and_first_sort_key if lang:hasType("etymology-only") then parents = { "Terms with " .. lang:getFullName() .. " अनुवाद", {name = langname, sort = "Translations"}, } breadcrumb_and_first_sort_key = lang:getCanonicalName() else parents = { {name = "प्रविष्टि रखरखाव", is_label = true, lang = langcode}, { name = "Terms with translations by language", sort = {sort_base = langname, lang = "hi"} }, } breadcrumb_and_first_sort_key = "Translations" end return { description = "Entries that contain translations into " .. langname .. " which were added using one of the translation templates, such as {{tl|t|" .. langcode .. "|...}}, {{tl|t+|" .. langcode .. "|...}}, etc.", parents = parents, breadcrumb_and_first_sort_key = breadcrumb_and_first_sort_key, catfix = false, can_be_empty = true, hidden = true, } end end) local recognized_taxtypes = require(table_module).listToSet { "ambiguous", "binomial", "branch", "clade", "cladus", "class", "cohort", "convariety", "cultivar group", "cultivar", "division", "empire", "epifamily", "epithet", "family", "form taxon", "form", "genus", "grade", "grandorder", "group", "hybrid", "informal group", "infraclass", "infracohort", "infrakingdom", "infraorder", "infraphylum", "infraspecies", "kingdom", "magnorder", "megacohort", "mirorder", "morph", "nothogenus", "nothospecies", "nothosubspecies", "nothovariety", "obsolete", "oofamily", "order", "parvclass", "parvorder", "phylum", "section", "series", "serovar", "species group", "species", "stem", "stirps", "strain", "subclass", "subcohort", "subdivision", "subfamily", "subgenus", "subgroup", "subinfraorder", "subkingdom", "suborder", "subphylum", "subsection", "subspecies", "subterclass", "subtribe", "superclass", "supercohort", "superfamily", "supergroup", "superorder", "superphylum", "supertribe", "taxon", "tribe", "trinomial", "undescribed species", "unknown", "unranked group", "variety", "virus complex", } table.insert(raw_handlers, function(data) local taxtype = data.category:match("^Entries using missing taxonomic name %((.*)%)$") if taxtype and recognized_taxtypes[taxtype] then return { description = "Entries that link to wikispecies because there is no corresponding Wiktionary entry for the taxonomic name in the template {{tl|taxlink}}.", additional = "The missing name is one or more of those enclosed in {{tl|taxlink}}. The entries are sorted by the missing taxonomic name.", parents = {{name = "Entries using missing taxonomic names", sort = {sort_base = taxtype, lang = "hi"}}}, breadcrumb = taxtype, hidden = true, } end end) return {LABELS = labels, RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers} 0cmxm1779bg7dj67xrg8l6zns24kjw1 मॉड्यूल:category tree/languages 828 306962 487968 487816 2026-09-04T04:57:26Z SM7 6218 localization... 487968 Scribunto text/plain local new_title = mw.title.new local ucfirst = require("Module:string utilities").ucfirst local split = require("Module:string utilities").split local raw_categories = {} local raw_handlers = {} local m_languages = require("Module:languages") local m_sc_getByCode = require("Module:scripts").getByCode local m_table = require("Module:table") local parse_utilities_module = "Module:parse utilities" local concat = table.concat local insert = table.insert local reverse_ipairs = m_table.reverseIpairs local serial_comma_join = m_table.serialCommaJoin local size = m_table.size local sorted_pairs = m_table.sortedPairs local to_json = require("Module:JSON").toJSON local Hang = m_sc_getByCode("Hang") local Hani = m_sc_getByCode("Hani") local Hira = m_sc_getByCode("Hira") local Hrkt = m_sc_getByCode("Hrkt") local Kana = m_sc_getByCode("Kana") local function track(page) -- [[Special:WhatLinksHere/Wiktionary:Tracking/category tree/languages/PAGE]] return require("Module:debug/track")("category tree/languages/" .. page) end -- This handles language categories of the form e.g. [[:Category:French language]] and -- [[:Category:British Sign Language]]; categories like [[:Category:Languages of Indonesia]]; categories like -- [[:Category:English-based creole or pidgin languages]]; and categories like -- [[:Category:English-based constructed languages]]. ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["सभी भाषाएँ"] = { topright = "{{commonscat|Languages}}\n[[File:Languages world map-transparent background.svg|thumb|right|250px|Rough world map of language families]]", description = "This category contains the categories for every language on Wiktionary.", additional = "Not all languages that Wiktionary recognises may have a category here yet. There are many that have " .. "not yet received any attention from editors, mainly because not all Wiktionary users know about every single " .. "language. See [[Wiktionary:List of languages]] for a full list.", parents = { "मूलभूत श्रेणी", }, } raw_categories["All extinct languages"] = { description = "Categories for every [[extinct language]] on Wiktionary.", additional = "Do not confuse this category with [[:Category:Extinct languages]], which is an umbrella category for the names of extinct languages in specific other languages (e.g. {{m+|de|Langobardisch}} for the ancient [[Lombardic]] language).", parents = { "सभी भाषाएँ", }, } raw_categories["Unwritten languages"] = { description = "Categories for every [[unwritten]] [[language]] on Wiktionary.", additional = "Do not confuse this category with [[:Category:Unspecified script languages]], which contains categories for languages that may be written but where the appropriate script has not yet been specified in the language data.", parents = { "सभी भाषाएँ", }, } raw_categories["Languages by country"] = { topright = "{{commonscat|Languages by continent}}", description = "Categories that group languages by country.", additional = "{{{umbrella_meta_msg}}}", parents = { "All languages", }, } raw_categories["Languages not sorted into a location category"] = { description = "Languages which do not specify (in their {{tl|auto cat}} call) the location(s) where they are spoken.", additional = "This excludes constructed and reconstructed languages; as a result, all languages in this category explicitly specify their location as {{cd|UNKNOWN}}.", parents = { {name = "Requests"}, }, hidden = true, } ----------------------------------------------------------------------------- -- -- -- RAW HANDLERS -- -- -- ----------------------------------------------------------------------------- -- Given a category (without the "Category:" prefix), look up the page -- defining the category, find the call to {{auto cat}} (if any), -- and return a table of its arguments. If the category page doesn't exist -- or doesn't have an {{auto cat}} invocation, return nil. -- FIXME: Duplicated in [[Module:category tree/lects]]. local function scrape_category_for_auto_cat_args(cat) local cat_page = mw.title.new("श्रेणी:" .. cat) if cat_page then local contents = cat_page:getContent() if contents then for template in require("Module:template parser").find_templates(contents) do -- The template parser automatically handles redirects and -- canonicalizes them. if template:get_name() == "auto cat" then return template:get_arguments() end end end end return nil end local function link_location(location) local location_no_the = location:match("^the (.*)$") local bare_location = location_no_the or location local bare_location_parts = split(bare_location, ", ") for i, part in ipairs(bare_location_parts) do bare_location_parts[i] = ("[[%s]]"):format(part) end local location_link = concat(bare_location_parts, ", ") if location_no_the then location_link = "the " .. location_link end return location_link end local function linkbox(lang, setwiki, setwikt, setsister, entryname) local wiktionarylinks = {} local canonicalName = lang:getCanonicalName() local wikimediaLanguages = lang:getWikimediaLanguages() local wikipediaArticle = setwiki or lang:getWikipediaArticle(true) setwiki = not wikipediaArticle and "-" setsister = setsister and ucfirst(setsister) or nil if setwikt then track("setwikt") if setwikt == "-" then track("setwikt/hyphen") end end if setwikt ~= "-" and wikimediaLanguages and wikimediaLanguages[1] then for _, wikimedialang in ipairs(wikimediaLanguages) do local check = new_title(wikimedialang:getCode() .. ":") if check and check.isExternal then insert(wiktionarylinks, ( wikimedialang:getCanonicalName() ~= canonicalName and "(''" .. wikimedialang:getCanonicalName() .. "'') " or "" ) .. ( "'''[[:" .. wikimedialang:getCode() .. ":|" .. wikimedialang:getCode() .. ".wiktionary.org]]'''" ) ) end end wiktionarylinks = concat(wiktionarylinks, "<br/>") end local wikt_plural = wikimediaLanguages[2] and "s" or "" if #wiktionarylinks == 0 then wiktionarylinks = "''None.''" end -- Avoid showing Wiktionary links section for reconstructed languages, -- as they are ineligible for Wiktionary editions local wiktionarylinks_chunk = concat{ [=[|- | style="vertical-align: top; height: 35px; width: 40px; border-bottom: 1px solid var(--wikt-palette-grey-4, lightgray);" | [[File:Wiktionary-logo-v2.svg|35px|none|Wiktionary]] |style="border-bottom: 1px solid var(--wikt-palette-grey-4, lightgray);" | '''Wiktionary edition''']=], wikt_plural, [=[ written in ]=], canonicalName, [=[: <div style="padding: 5px 10px">]=], wiktionarylinks, [=[</div> ]=]} if lang:hasType('reconstructed') then wiktionarylinks_chunk = '' end if setsister then track("setsister") if setsister == "-" then track("setsister/hyphen") else setsister = "Category:" .. setsister end else setsister = lang:getCommonsCategory() or "-" end return concat{ -- FIXME: Bare wikicode [=[<div class="wikitable" style="float: right; clear: right; margin: 0 0 0.5em 1em; width: 300px; padding: 5px;"> <div style="text-align: center; margin-bottom: 10px; margin-top: 5px">''']=], canonicalName, [=[ language links'''</div> {| style="font-size: 90%" |- | style="vertical-align: top; height: 35px; border-bottom: 1px solid var(--wikt-palette-grey-4, lightgray);" | [[File:Wikipedia-logo.png|35px|none|Wikipedia]] | style="border-bottom: 1px solid var(--wikt-palette-grey-4, lightgray);" | '''English Wikipedia''' has an article on: <div style="padding: 5px 10px">]=], (setwiki == "-" and "''None.''" or "'''[[w:" .. wikipediaArticle .. "|" .. wikipediaArticle .. "]]'''"), [=[</div> |- | style="vertical-align: top; height: 35px; border-bottom: 1px solid var(--wikt-palette-grey-4, lightgray);" | [[File:Commons-logo.svg|35px|none|Wikimedia Commons]] | style="border-bottom: 1px solid var(--wikt-palette-grey-4, lightgray);" | '''Wikimedia Commons''' has links to ]=], canonicalName, [=[-related content in sister projects: <div style="padding: 5px 10px">]=], (setsister == "-" and "''None.''" or "'''[[commons:" .. setsister .. "|" .. setsister .. "]]'''"), [=[</div> ]=], wiktionarylinks_chunk, [=[ |- | style="vertical-align: top; height: 35px; border-bottom: 1px solid var(--wikt-palette-grey-4, lightgray);" | [[File:Codex icon articles color-placeholder (v2.6).svg|35px|none|Entry]] | style="border-bottom: 1px solid var(--wikt-palette-grey-4, lightgray);" | '''Wiktionary entry''' for the language's English name: <div style="padding: 5px 10px">''']=], require("Module:links").full_link({lang = m_languages.getByCode("en"), term = entryname or canonicalName}), [=['''</div> |- | style="vertical-align: top; height: 35px;" | [[File:Codex icon book color-placeholder (v2.6).svg|35px|none|Resources]] || '''Wiktionary resources''' for editors contributing to ]=], canonicalName, [=[ entries: <div style="padding: 5px 0"> * '''[[Wiktionary:]=], canonicalName, [=[ entry guidelines]]''' * '''[[:Category:]=], canonicalName, [=[ reference templates|Reference templates]] ({{PAGESINCAT:]=], canonicalName, [=[ reference templates}})''' * '''[[Appendix:]=], canonicalName, [=[ bibliography|Bibliography]]''' </div> |} </div>]=] } end local function edit_link(title, text) return '<span class="plainlinks">[' .. tostring(mw.uri.fullUrl(title, { action = "edit" })) .. ' ' .. text .. ']</span>' end -- Should perhaps use wiki syntax. local function infobox(lang) local ret = {} insert(ret, '<table class="wikitable language-category-info"') local raw_data = lang:getData("extra") if raw_data then local replacements = { [1] = "canonical-name", [2] = "wikidata-item", [3] = "family", [4] = "scripts", } local function replacer(letter1, letter2) return letter1:lower() .. "-" .. letter2:lower() end -- For each key in the language data modules, returns a descriptive -- kebab-case version (containing ASCII lowercase words separated -- by hyphens). local function kebab_case(key) key = replacements[key] or key key = key:gsub("(%l)(%u)", replacer):gsub("(%l)_(%l)", replacer) return key end local compress = {compress = true} local function html_attribute_encode(str) str = to_json(str, compress) :gsub('"', "&quot;") -- & in attributes is automatically escaped. -- :gsub("&", "&amp;") :gsub("<", "&lt;") :gsub(">", "&gt;") return str end insert(ret, ' data-code="' .. lang:getCode() .. '"') for k, v in sorted_pairs(raw_data) do insert(ret, " data-" .. kebab_case(k) .. '="' .. html_attribute_encode(v) .. '"') end end insert(ret, '>\n') insert(ret, '<tr class="language-category-data">\n<th colspan="2">' .. edit_link(lang:getDataModuleName(), "Edit language data") .. "</th>\n</tr>\n") insert(ret, "<tr>\n<th>Canonical name</th><td>" .. lang:getCanonicalName() .. "</td>\n</tr>\n") local otherNames = lang:getOtherNames() if otherNames then local names = {} for _, name in ipairs(otherNames) do insert(names, "<li>" .. name .. "</li>") end if #names > 0 then insert(ret, ( "<tr>\n<th>Other names</th><td><ul>" .. concat(names, "\n") .. "</ul></td>\n</tr>\n" ) ) end end local aliases = lang:getAliases() if aliases then local names = {} for _, name in ipairs(aliases) do insert(names, "<li>" .. name .. "</li>") end if #names > 0 then insert(ret, ( "<tr>\n<th>Aliases</th><td><ul>" .. concat(names, "\n") .. "</ul></td>\n</tr>\n" ) ) end end local varieties = lang:getVarieties() if varieties then local names = {} for _, name in ipairs(varieties) do if type(name) == "string" then insert(names, "<li>" .. name .. "</li>") else assert(type(name) == "table") local first_var local subvars = {} for i, var in ipairs(name) do if i == 1 then first_var = var else insert(subvars, "<li>" .. var .. "</li>") end end if #subvars > 0 then insert(names, ( "<li><dl><dt>" .. first_var .. "</dt>\n<dd><ul>" .. concat(subvars, "\n") .. "</ul></dd></dl></li>" ) ) elseif first_var then insert(names, "<li>" .. first_var .. "</li>") end end end if #names > 0 then insert(ret, ( "<tr>\n<th>Varieties</th><td><ul>" .. concat(names, "\n") .. "</ul></td>\n</tr>\n" ) ) end end insert(ret, ( "<tr>\n<th>[[Wiktionary:Languages|Language code]]</th><td><code>" .. lang:getCode() .. "</code></td>\n</tr>\n" ) ) insert(ret, "<tr>\n<th>[[Wiktionary:Families|Language family]]</th>\n") local fam = lang:getFamily() local famCode = fam and fam:getCode() if not fam then insert(ret, "<td>[[:Category:Unassigned languages|unassigned]]</td>") elseif famCode == "qfa-dis" then insert(ret, "<td>[[:Category:Languages of disputed affiliation|disputed affiliation]]</td>") elseif famCode == "qfa-iso" then insert(ret, "<td>[[:Category:Language isolates|language isolate]]</td>") elseif famCode == "qfa-mix" then insert(ret, "<td>[[:Category:Mixed languages|mixed language]]</td>") elseif famCode == "qfa-unc" then insert(ret, "<td>[[:Category:Unclassifiable languages|unclassifiable language]]</td>") elseif famCode == "sgn" then insert(ret, "<td>[[:Category:Sign languages|sign language]]</td>") elseif famCode == "crp" then insert(ret, "<td>[[:Category:Creole or pidgin languages|creole or pidgin]]</td>") elseif famCode == "art" then insert(ret, "<td>[[:Category:Constructed languages|constructed language]]</td>") else insert(ret, "<td>" .. fam:makeCategoryLink() .. "</td>") end insert(ret, "\n</tr>\n<tr>\n<th>Ancestors</th>\n<td>") local ancestors = lang:getAncestors() if ancestors[2] then local ancestorList = {} for i, anc in ipairs(ancestors) do ancestorList[i] = "<li>" .. anc:makeCategoryLink() .. "</li>" end insert(ret, "<ul>\n" .. concat(ancestorList, "\n") .. "</ul>") else local ancestorChain = lang:getAncestorChainOld() if ancestorChain[1] then local chain = {} for _, anc in reverse_ipairs(ancestorChain) do insert(chain, "<li>" .. anc:makeCategoryLink() .. "</li>") end insert(ret, "<ul>\n" .. concat(chain, "\n<ul>\n") .. ("</ul>"):rep(#chain)) else insert(ret, "unknown") end end insert(ret, "</td>\n</tr>\n") local scripts = lang:getScripts() if scripts[1] then local script_text = {} local function makeScriptLine(sc) local code = sc:getCode() local url = tostring(mw.uri.fullUrl('Special:Search', { search = 'contentmodel:css insource:"' .. code .. '" insource:/\\.' .. code .. '/', ns8 = '1' })) local sc_catlink if code == "Zxxx" then sc_catlink = "[[:Category:Unwritten languages|unwritten]]" else sc_catlink = sc:makeCategoryLink(lang) end return sc_catlink .. ' (<span class="plainlinks" title="Search for stylesheets referencing this script">[' .. url .. ' <code>' .. code .. '</code>]</span>)' end local function add_Hrkt(text) insert(text, "<li>" .. makeScriptLine(Hrkt)) insert(text, "<ul>") insert(text, "<li>" .. makeScriptLine(Hira) .. "</li>") insert(text, "<li>" .. makeScriptLine(Kana) .. "</li>") insert(text, "</ul>") insert(text, "</li>") end for _, sc in ipairs(scripts) do local text = {} local code = sc:getCode() if code == "Hrkt" then add_Hrkt(text) else insert(text, "<li>" .. makeScriptLine(sc)) if code == "Jpan" then insert(text, "<ul>") insert(text, "<li>" .. makeScriptLine(Hani) .. "</li>") add_Hrkt(text) insert(text, "</ul>") elseif code == "Kore" then insert(text, "<ul>") insert(text, "<li>" .. makeScriptLine(Hang) .. "</li>") insert(text, "<li>" .. makeScriptLine(Hani) .. "</li>") insert(text, "</ul>") end insert(text, "</li>") end insert(script_text, concat(text, "\n")) end insert(ret, "<tr>\n<th>[[Wiktionary:Scripts|Scripts]]</th>\n<td><ul>\n" .. concat(script_text, "\n") .. "</ul></td>\n</tr>\n") else insert(ret, "<tr>\n<th>[[Wiktionary:Scripts|Scripts]]</th>\n<td>not specified</td>\n</tr>\n") end local function add_module_info(raw_data, heading) if raw_data then local scripts = lang:getScriptCodes() local module_info, add = {}, false if type(raw_data) == "string" then insert(module_info, ("[[Module:%s]]"):format(raw_data)) add = true else local raw_data_type = type(raw_data) if raw_data_type == "table" and size(scripts) == 1 and type(raw_data[scripts[1]]) == "string" then insert(module_info, ("[[Module:%s]]"):format(raw_data[scripts[1]])) add = true elseif raw_data_type == "table" then insert(module_info, "<ul>") for script, data in sorted_pairs(raw_data) do if type(data) == "string" and m_sc_getByCode(script) then insert(module_info, ("<li><code>%s</code>: [[Module:%s]]</li>"):format(script, data)) end end insert(module_info, "</ul>") add = size(module_info) > 2 end end if add then insert(ret, [=[ <tr> <th>]=] .. heading .. [=[</th> <td>]=] .. concat(module_info) .. [=[</td> </tr> ]=]) end end end add_module_info(raw_data.generate_forms, "Form-generating<br>module") add_module_info(raw_data.translit, "[[Wiktionary:Transliteration and romanization|Transliteration<br>module]]") add_module_info(raw_data.display_text, "Display text<br>module") add_module_info(raw_data.entry_name, "Entry name<br>module") add_module_info(raw_data.sort_key, "[[sortkey|Sortkey]]<br>module") local wikidataItem = lang:getWikidataItem() if lang:getWikidataItem() and mw.wikibase then local URL = mw.wikibase.getEntityUrl(wikidataItem) local link if URL then link = '[[d:' .. wikidataItem .. '|' .. wikidataItem .. ']]' else link = '<span class="error">Invalid Wikidata item: <code>' .. wikidataItem .. '</code></span>' end insert(ret, "<tr><th>Wikidata</th><td>" .. link .. "</td></tr>") end insert(ret, "</table>") return concat(ret) end local function NavFrame_for_family_tree(content, title) return '<div class="NavFrame"><div class="NavHead">' .. (title or '{{{title}}}') .. '</div>' .. '<div class="NavContent" style="text-align: left; font-size: calc(1em / 0.95); padding: 0.3em">' .. content .. '</div></div>' end local function get_description_topright_additional(lang, locations, extinct, setwiki, setwikt, setsister, entryname) local nameWithLanguage = lang:getCategoryName("nocap") if lang:getCode() == "und" then local description = "This is the main category of the '''" .. nameWithLanguage .. "''', represented in Wiktionary by the [[Wiktionary:Languages|code]] '''" .. lang:getCode() .. "'''. " .. "This language contains terms in historical writing, whose meaning has not yet been determined by scholars." return description, nil, nil end local canonicalName = lang:getCanonicalName() local topright = linkbox(lang, setwiki, setwikt, setsister, entryname) local the_prefix if canonicalName:find(" Language$") then the_prefix = "" else the_prefix = "the " end local description = "This is the main category of " .. the_prefix .. "'''" .. nameWithLanguage .. "'''." local location_links = {} local prep local saw_embedded_comma = false for _, location in ipairs(locations) do local this_prep if location == "the world" then this_prep = "across" insert(location_links, location) elseif location ~= "UNKNOWN" then this_prep = "in" if location:find(",") then saw_embedded_comma = true end insert(location_links, link_location(location)) end if this_prep then if prep and this_prep ~= prep then error("Can't handle location 'the world' along with another location (clashing prepositions)") end prep = this_prep end end local location_desc if #location_links > 0 then local location_link_text if saw_embedded_comma and #location_links >= 3 then location_link_text = mw.text.listToText(location_links, "; ", "; and ") else location_link_text = serial_comma_join(location_links) end location_desc = ("It is %s %s %s.\n\n"):format( extinct and "an [[extinct language]] that was formerly spoken" or "spoken", prep, location_link_text ) elseif extinct then location_desc = "It is an [[extinct language]].\n\n" else location_desc = "" end local add = location_desc .. "Information about " .. canonicalName .. ":\n\n" .. infobox(lang) if lang:hasType("reconstructed") then add = add .. "\n\n" .. ucfirst(canonicalName) .. " is a reconstructed language. Its words and roots are not directly attested in any written works, but have been reconstructed through the ''comparative method'', " .. "which finds regular similarities between languages that cannot be explained by coincidence or word-borrowing, and extrapolates ancient forms from these similarities.\n\n" .. "According to our [[Wiktionary:Criteria for inclusion|criteria for inclusion]], terms in " .. canonicalName .. " should '''not''' be present in entries in the main namespace, but may be added to the Reconstruction: namespace." elseif lang:hasType("appendix-constructed") then add = add .. "\n\n" .. ucfirst(canonicalName) .. " is a constructed language that is only in sporadic use. " .. "According to our [[Wiktionary:Criteria for inclusion|criteria for inclusion]], terms in " .. canonicalName .. " should '''not''' be present in entries in the main namespace, but may be added to the Appendix: namespace. " .. "All terms in this language may be available at [[Appendix:" .. ucfirst(canonicalName) .. "]]." end local entry_guidelines_page = "Wiktionary:" .. canonicalName .. " entry guidelines" local entry_guidelines = new_title(entry_guidelines_page) if entry_guidelines.exists then add = add .. "\n\n" .. "Please see '''[[" .. entry_guidelines_page .. "]]''' for information and special considerations for creating " .. nameWithLanguage .. " entries." end local ok, tree_of_descendants = pcall( require("Module:family tree").print_children, lang:getCode(), { protolanguage_under_family = true, must_have_descendants = true }) if ok then if tree_of_descendants then add = add .. NavFrame_for_family_tree( tree_of_descendants, "Family tree") else add = add .. "\n\n" .. ucfirst(lang:getCanonicalName()) .. " has no descendants or varieties listed in Wiktionary's language data modules." end else mw.log("error while generating tree: " .. tostring(tree_of_descendants)) end return description, topright, add end local function get_parents(lang, locations, extinct) local canonicalName = lang:getCanonicalName() local sortkey = {sort_base = canonicalName, lang = "hi"} local ret = {{name = "सभी भाषाएँ", sort = sortkey}} local fam = lang:getFamily() local famCode = fam and fam:getCode() -- FIXME: Some of the following categories should be added to this module. if not fam then insert(ret, {name = "Category:Unassigned languages", sort = sortkey}) elseif famCode == "qfa-dis" then insert(ret, {name = "Category:Languages of disputed affiliation", sort = sortkey}) elseif famCode == "qfa-iso" then insert(ret, {name = "Category:Language isolates", sort = sortkey}) elseif famCode == "qfa-mix" then insert(ret, {name = "Category:Mixed languages", sort = sortkey}) elseif famCode == "qfa-unc" then insert(ret, {name = "Category:Unclassifiable languages", sort = sortkey}) elseif famCode == "sgn" then insert(ret, {name = "Category:All sign languages", sort = sortkey}) elseif famCode == "crp" then insert(ret, {name = "Category:Creole or pidgin languages", sort = sortkey}) for _, anc in ipairs(lang:getAncestors()) do -- Avoid Haitian Creole being categorised in [[:Category:Haitian Creole-based creole or pidgin languages]], as one of its ancestors is an etymology-only variety of it. -- Use that ancestor's ancestors instead. if anc:getFullCode() == lang:getCode() then for _, anc_extra in ipairs(anc:getAncestors()) do insert(ret, {name = "श्रेणी:" .. ucfirst(anc_extra:getFullName()) .. "-based creole or pidgin languages", sort = sortkey}) end else insert(ret, {name = "श्रेणी:" .. ucfirst(anc:getFullName()) .. "-based creole or pidgin languages", sort = sortkey}) end end elseif famCode == "art" then if lang:hasType("appendix-constructed") then insert(ret, {name = "Category:Appendix-only constructed languages", sort = sortkey}) else insert(ret, {name = "Category:Constructed languages", sort = sortkey}) end for _, anc in ipairs(lang:getAncestors()) do if anc:getFullCode() == lang:getCode() then for _, anc_extra in ipairs(anc:getAncestors()) do insert(ret, {name = "Category:" .. ucfirst(anc_extra:getFullName()) .. "-based constructed languages", sort = sortkey}) end else insert(ret, {name = "Category:" .. ucfirst(anc:getFullName()) .. "-based constructed languages", sort = sortkey}) end end else insert(ret, {name = "श्रेणी:" .. fam:getCategoryName(), sort = sortkey}) if lang:hasType("reconstructed") then insert(ret, { name = "श्रेणी:Reconstructed languages", sort = {sort_base = canonicalName:gsub("^Proto%-", ""), lang = "en"} }) end end local function add_sc_cat(sc) local catname if sc:getCode() == "Zxxx" then catname = "Unwritten languages" else catname = sc:getCategoryName(false, lang) .. " भाषाएँ" end insert(ret, {name = "श्रेणी:" .. catname, sort = sortkey}) end local function add_Hrkt() add_sc_cat(Hrkt) add_sc_cat(Hira) add_sc_cat(Kana) end for _, sc in ipairs(lang:getScripts()) do if sc:getCode() == "Hrkt" then add_Hrkt() else add_sc_cat(sc) if sc:getCode() == "Jpan" then add_sc_cat(Hani) add_Hrkt() elseif sc:getCode() == "Kore" then add_sc_cat(Hang) add_sc_cat(Hani) end end end if lang:hasTranslit() then insert(ret, {name = "Category:Languages with automatic transliteration", sort = sortkey}) end local function insert_location_language_cat(location) local cat = "Languages of " .. location insert(ret, {name = "Category:" .. cat, sort = sortkey}) local auto_cat_args = scrape_category_for_auto_cat_args(cat) local location_parent = auto_cat_args and auto_cat_args.parent if location_parent then local split_parents = require(parse_utilities_module).split_on_comma(location_parent) for _, parent in ipairs(split_parents) do parent = parent:match("^(.-):.*$") or parent insert_location_language_cat(parent) end end end local saw_location = false for _, location in ipairs(locations) do if location ~= "UNKNOWN" then saw_location = true insert_location_language_cat(location) end end if extinct then insert(ret, {name = "Category:All extinct languages", sort = sortkey}) end if not saw_location and not (lang:hasType("reconstructed") or (fam and fam:getCode() == "art")) then -- Constructed and reconstructed languages don't need a location specified and often won't have one, -- so don't put them in this maintenance category. insert(ret, {name = "Category:Languages not sorted into a location category", sort = sortkey}) end return ret end local function get_children() local ret = {} -- FIXME: We should work on the children mechanism so it isn't necessary to manually specify these. for _, label in ipairs({"appendices", "entry maintenance", "lemmas", "names", "phrases", "rhymes", "symbols", "templates", "terms by etymology", "terms by usage"}) do insert(ret, {name = label, is_label = true}) end insert(ret, {name = "terms derived from {{{langname}}}", is_label = true, lang = false}) insert(ret, {name = "{{{langcode}}}:All topics", sort = "all topics"}) insert(ret, {name = "Varieties of {{{langname}}}"}) insert(ret, {name = "Requests concerning {{{langname}}}"}) insert(ret, {name = "Rhymes:{{{langname}}}", description = "Lists of {{{langname}}} words by their rhymes."}) insert(ret, {name = "User {{{langcode}}}", description = "Wiktionary users categorized by fluency levels in {{{langdisp}}}."}) return ret end -- Handle language categories of the form e.g. [[:Category:French language]] and -- [[:Category:British Sign Language]]. insert(raw_handlers, function(data) local category = data.category if not (category:find("[Ll]anguage$") or category:find("[Ll]ect$")) then return nil end local lang = m_languages.getByCanonicalName(category) if not lang then local langname = category:match("^(.*) भाषाएँ$") if langname then lang = m_languages.getByCanonicalName(langname) end if not lang then return nil end end local args = require("Module:parameters").process(data.args, { [1] = {list = true}, ["setwiki"] = true, ["setwikt"] = true, ["setsister"] = true, ["entryname"] = true, ["extinct"] = {type = "boolean"}, }) -- If called from inside, don't require any arguments, as they can't be known -- in general and aren't needed just to generate the first parent (used for -- breadcrumbs). if #args[1] == 0 and not data.called_from_inside then -- At least one location must be specified unless the language is constructed (e.g. Esperanto) or reconstructed (e.g. Proto-Indo-European). local fam = lang:getFamily() if not (lang:hasType("reconstructed") or (fam and fam:getCode() == "art")) then error("At least one location (param 1=) must be specified for language '" .. lang:getCanonicalName() .. "' (code '" .. lang:getCode() .. "'). " .. "Use the value UNKNOWN if the language's location is truly unknown.") end end local description, topright, additional = "", "", "" -- If called from inside the category tree system, it's called when generating -- parents or children, and we don't need to generate the description or additional -- text (which is very expensive in terms of memory because it calls [[Module:family tree]], -- which calls [[Module:languages/data/all]]). if not data.called_from_inside then description, topright, additional = get_description_topright_additional( lang, args[1], args.extinct, args.setwiki, args.setwikt, args.setsister, args.entryname ) end return { canonical_name = lang:getCategoryName(), description = description, lang = lang:getCode(), topright = topright, additional = additional, breadcrumb = lang:getCanonicalName(), parents = get_parents(lang, args[1], args.extinct), extra_children = get_children(lang), umbrella = false, can_be_empty = true, }, true end) -- Handle categories such as [[:Category:Languages of Indonesia]]. insert(raw_handlers, function(data) local location = data.category:match("^Languages of (.*)$") if location then local args = require("Module:parameters").process(data.args, { ["flagfile"] = true, ["commonscat"] = true, ["wp"] = true, ["basename"] = true, ["parent"] = true, ["locationcat"] = true, ["locationlink"] = true, }) local topright local basename = args.basename or location:gsub(", .*", "") if args.flagfile ~= "-" then local flagfile_arg = args.flagfile or ("Flag of %s.svg"):format(basename) local files = require(parse_utilities_module).split_on_comma(flagfile_arg) local topright_parts = {} for _, file in ipairs(files) do local flagfile = "File:" .. file local flagfile_page = new_title(flagfile) if flagfile_page and flagfile_page.file.exists then insert(topright_parts, ("[[%s|right|100px|border]]"):format(flagfile)) elseif args.flagfile then error(("Explicit flagfile '%s' doesn't exist"):format(flagfile)) end end topright = concat(topright_parts) end if args.wp then local wp = require("Module:yesno")(args.wp, "+") if wp == "+" or wp == true then wp = data.category end if wp then local wp_topright = ("{{wikipedia|%s}}"):format(wp) if topright then topright = topright .. wp_topright else topright = wp_topright end end end if args.commonscat then local commonscat = require("Module:yesno")(args.commonscat, "+") if commonscat == "+" or commonscat == true then commonscat = data.category end if commonscat then local commons_topright = ("{{commonscat|%s}}"):format(commonscat) if topright then topright = topright .. commons_topright else topright = commons_topright end end end local bare_location = location:match("^the (.*)$") or location local location_link = args.locationlink or link_location(location) local bare_basename = basename:match("^the (.*)$") or basename local parents = {} if args.parent then local explicit_parents = require(parse_utilities_module).split_on_comma(args.parent) for i, parent in ipairs(explicit_parents) do local actual_parent, sort_key = parent:match("^(.-):(.*)$") if actual_parent then parent = actual_parent sort_key = sort_key:gsub("%+", bare_location) else sort_key = " " .. bare_location end insert(parents, {name = "Languages of " .. parent, sort = sort_key}) end else insert(parents, {name = "Languages by country", sort = {sort_base = bare_location, lang = "en"}}) end if args.locationcat then local explicit_location_cats = require(parse_utilities_module).split_on_comma(args.locationcat) for i, locationcat in ipairs(explicit_location_cats) do insert(parents, {name = "श्रेणी:" .. locationcat, sort = " भाषाएँ"}) end else local location_cat = ("श्रेणी:%s"):format(bare_location) local location_page = new_title(location_cat) if location_page and location_page.exists then insert(parents, {name = location_cat, sort = "भाषाएँ"}) end end local description = ("Categories for languages of %s (including sublects)."):format(location_link) return { topright = topright, description = description, parents = parents, breadcrumb = bare_basename, additional = "{{{umbrella_msg}}}", }, true end end) -- Handle categories such as [[:Category:English-based creole or pidgin languages]]. insert(raw_handlers, function(data) local langname = data.category:match("(.*)%-based creole or pidgin languages$") if langname then local lang = m_languages.getByCanonicalName(langname) if lang then return { lang = lang:getCode(), description = "Languages which developed as a [[creole]] or [[pidgin]] from " .. lang:makeCategoryLink() .. ".", parents = {{name = "Creole or pidgin languages", sort = {sort_base = "*" .. langname, lang = "en"}}}, breadcrumb = lang:getCanonicalName() .. "-based", } end end end) -- Handle categories such as [[:Category:English-based constructed languages]]. insert(raw_handlers, function(data) local langname = data.category:match("(.*)%-based constructed languages$") if langname then local lang = m_languages.getByCanonicalName(langname) if lang then return { lang = lang:getCode(), description = "Constructed languages which are based on " .. lang:makeCategoryLink() .. ".", parents = {{name = "Constructed languages", sort = {sort_base = "*" .. langname, lang = "en"}}}, breadcrumb = lang:getCanonicalName() .. "-based", } end end end) return { RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers } rm4prj1lvd8ge3sqgm3qaneoqnennue मॉड्यूल:category tree/लेम्मा 828 306964 488023 487819 2026-09-04T09:44:47Z SM7 6218 localization... 488023 Scribunto text/plain local labels = {} local raw_categories = {} local handlers = {} local ucfirst = require("Module:string utilities").ucfirst ----------------------------------------------------------------------------- -- -- -- LABELS -- -- -- ----------------------------------------------------------------------------- local diminutive_augmentative_poses = { "विशेषण", "क्रियाविशेषण", "डेटरमाइनर", "विस्मयादिबोधक", "संज्ञाएँ", "अंक", "उपसर्ग", "नामवाचक संज्ञाएँ", "सर्वनाम", "परसर्ग", "क्रियाएँ" } labels["लेम्मा"] = { description = "{{{langname}}} [[Wiktionary:Lemmas|lemmas]], categorized by their part of speech.", umbrella_parents = "मूलभूत श्रेणी", parents = {{name = "{{{langcat}}}", raw = true, sort = " "}}, } labels["action nouns"] = { description = "{{{langname}}} nouns denoting action of a verb or verbal root that it is derived from.", parents = {"nouns"}, } labels["act-related adverbs"] = { description = "{{{langname}}} adverbs that indicate the motive or other background information for an action.", parents = {"adverbs"}, } labels["adjective concords"] = { description = "{{{langname}}} concords that are prefixed to adjective stems.", parents = {"concords"}, } labels["विशेषण"] = { description = "{{{langname}}} terms that give attributes to nouns, extending their definitions.", parents = {"लेम्मा"}, } labels["adjectivized participles"] = { description = "{{{langname}}} participles that are used as adjectives.", parents = {"participles", "adjectives"}, } labels["adjectivized past participles"] = { description = "{{{langname}}} past participles that are used as adjectives.", parents = {"past participles", "adjectivized participles", "adjectives"}, } labels["adjectivized present participles"] = { description = "{{{langname}}} present participles that are used as adjectives.", parents = {"present participles", "adjectivized participles", "adjectives"}, } labels["adverbial accusatives"] = { description = "Accusative case-forms in {{{langname}}} used as adverbs.", parents = {"adverbs"}, } labels["adverbs"] = { description = "{{{langname}}} terms that modify clauses, sentences and phrases directly.", parents = {"lemmas"}, } labels["affixes"] = { description = "Morphemes attached to existing {{{langname}}} words.", parents = {"morphemes"}, } labels["agent nouns"] = { description = "{{{langname}}} nouns that denote an agent that performs the action denoted by the verb from which the noun is derived.", parents = {"nouns"}, } labels["ambipositions"] = { description = "{{{langname}}} adpositions that can occur either before or after their objects.", parents = {"lemmas"}, } labels["ambitransitive verbs"] = { description = "{{{langname}}} verbs that may or may not direct actions, occurrences or states to grammatical objects.", parents = {"verbs", "transitive verbs", "intransitive verbs"}, } labels["animal commands"] = { description = "{{{langname}}} words used to communicate with animals.", parents = {"interjections"}, } labels["articles"] = { description = "{{{langname}}} terms that indicate and specify nouns.", parents = {"determiners"}, } labels["aspect adverbs"] = { description = "{{{langname}}} adverbs that express [[w:Grammatical aspect|grammatical aspect]], describing the flow of time in relation to a statement.", parents = {"adverbs"}, } for _, pos in ipairs(diminutive_augmentative_poses) do labels["augmentative " .. pos] = { description = "{{{langname}}} " .. pos .. " that are derived from a base word to convey big size or big intensity.", parents = {pos}, } end labels["attenuative verbs"] = { description = "{{{langname}}} verbs that indicate that an action or event is performed or takes place gently, lightly, partially, perfunctorily or to an otherwise reduced extent.", parents = {"verbs"}, } labels["autobenefactive verbs"] = { description = "{{{langname}}} verbs that indicate that the agent of an action is also its benefactor.", parents = {"verbs"}, } labels["automative verbs"] = { description = "{{{langname}}} verbs that indicate actions directed at or a change of state of the grammatical subject.", parents = {"verbs"}, } labels["auxiliary verbs"] = { description = "{{{langname}}} verbs that provide additional conjugations for other verbs.", parents = {"verbs"}, } labels["biaspectual verbs"] = { description = "{{{langname}}} verbs that can be both imperfective and perfective.", parents = {"verbs"}, } labels["causative verbs"] = { description = "{{{langname}}} verbs that express causing actions or states rather than performing or being them directly.", parents = {"verbs"}, } labels["circumfixes"] = { description = "Affixes attached to both the beginning and the end of {{{langname}}} words, functioning together as single units.", parents = {"morphemes"}, } labels["circumpositions"] = { description = "{{{langname}}} adpositions that appear on both sides of their objects.", parents = {"lemmas"}, } labels["classifiers"] = { description = "{{{langname}}} terms that classify nouns according to their meanings.", parents = {"lemmas"}, } labels["clitics"] = { description = "{{{langname}}} morphemes that function as independent words, but are always attached to another word.", parents = {"morphemes"}, } for _, pos in ipairs { "nouns", "suffixes" } do labels["collective " .. pos] = { description = "{{{langname}}} " .. pos .. " that indicate groups of related things or beings, without the need of grammatical pluralization.", parents = {pos}, } end labels["combining forms"] = { description = "Forms of {{{langname}}} words that do not occur independently, but are used when joined with other words.", parents = {"morphemes"}, } labels["comparable adjectives"] = { description = "{{{langname}}} adjectives that can be inflected to display different degrees of comparison.", parents = {"adjectives"}, } labels["comparable adverbs"] = { description = "{{{langname}}} adverbs that can be inflected to display different degrees of comparison.", parents = {"adverbs"}, } labels["completive verbs"] = { description = "{{{langname}}} verbs which refer to the completion of an action which has already commenced or which has already been performed upon a subset of the entities which it affects.", parents = {"verbs"}, } labels["concords"] = { description = "{{{langname}}} prefixes attached to words to show agreement with a noun or pronoun.", parents = {"prefixes"}, } labels["conjunctions"] = { description = "{{{langname}}} terms that connect words, phrases or clauses together.", parents = {"lemmas"}, } labels["conjunctive adverbs"] = { description = "{{{langname}}} adverbs that connect two independent clauses together.", parents = {"adverbs"}, } labels["continuative verbs"] = { description = "{{{langname}}} verbs that express continuing action.", parents = {"imperfective verbs", "verbs"}, } labels["control verbs"] = { description = "{{{langname}}} verbs that take multiple arguments, one of which is another verb. One of the control verb's arguments is syntactically both an argument of the control verb and an argument of the other verb.", parents = {"verbs"}, } labels["cooperative verbs"] = { description = "{{{langname}}} verbs that indicate cooperation", parents = {"verbs"}, } labels["coordinating conjunctions"] = { description = "{{{langname}}} conjunctions that indicate equal syntactic importance between connected items.", parents = {"conjunctions"}, } labels["copulative verbs"] = { description = "{{{langname}}} verbs that may take adjectives as their complement.", parents = {"verbs"}, } for _, pos in ipairs { "nouns", "proper nouns" } do labels["countable " .. pos] = { description = "{{{langname}}} " .. pos .. " that can be quantified directly by numerals.", parents = {pos}, } end labels["countable numerals"] = { description = "{{{langname}}} numerals that can be quantified directly by other numerals.", parents = {"numerals"}, } labels["countable suffixes"] = { description = "{{{langname}}} suffixes that can be used to form nouns that can be quantified directly by numerals.", parents = {"suffixes"}, } labels["counters"] = { description = "{{{langname}}} terms that combine with numerals to express quantity of nouns.", parents = {"lemmas"}, } labels["cumulative verbs"] = { description = "{{{langname}}} verbs which indicate that an action or event gradually yields a certain or significant quantity or effect.", parents = {"verbs"}, } labels["degree adverbs"] = { description = "{{{langname}}} adverbs that express a particular degree to which the word they modify applies.", parents = {"adverbs"}, } labels["delimitative verbs"] = { description = "{{{langname}}} verbs which indicate that an action or event is performed or takes place briefly or to an otherwise reduced extent.", parents = {"imperfective verbs", "verbs"}, } labels["demonstrative adjectives"] = { description = "{{{langname}}} adjectives that refer to nouns, comparing them to external references.", parents = {"adjectives", {name = "demonstrative pro-forms", sort = "adjectives"}}, } labels["demonstrative adverbs"] = { description = "{{{langname}}} adverbs that refer to other adverbs, comparing them to external references.", parents = {"adverbs", {name = "demonstrative pro-forms", sort = "adverbs"}}, } labels["denominal verbs"] = { -- in [[Appendix:Glossary]]; "denominative" more frequent? description = "{{{langname}}} verbs that derive from nouns.", parents = { "verbs" }, } labels["demonstrative determiners"] = { description = "{{{langname}}} determiners that refer to nouns, comparing them to external references.", parents = {"determiners", {name = "demonstrative pro-forms", sort = "determiners"}}, } labels["demonstrative pronouns"] = { description = "{{{langname}}} pronouns that refer to nouns, comparing them to external references.", parents = {"pronouns", {name = "demonstrative pro-forms", sort = "pronouns"}}, } labels["deponent verbs"] = { description = "{{{langname}}} verbs that have active meanings but are not conjugated in the {{w|active voice}}.", parents = {"verbs"}, } labels["derivational prefixes"] = { description = "{{{langname}}} prefixes that are used to create new words.", parents = {"prefixes"}, } labels["derivational suffixes"] = { description = "{{{langname}}} suffixes that are used to create new words.", parents = {"suffixes"}, } labels["derivative verbs"] = { description = "{{{langname}}} verbs that are derived from nouns and adjectives.", parents = {"verbs"}, } labels["desiderative verbs"] = { description = "{{{langname}}} verbs with the following morphology: verbal root xxx + [[desiderative]] affix, and the following semantics: to wish to do the action xxx.", parents = {"verbs"}, } labels["determinatives"] = { description = "{{{langname}}} terms that indicate the general class to which the following logogram belongs.", parents = {"lemmas"}, } labels["determiners"] = { description = "{{{langname}}} terms that narrow down, within the conversational context, the referent of the modified noun.", parents = {"lemmas"}, } labels["diminutiva tantum"] = { description = "{{{langname}}} nouns or noun senses that are mostly or exclusively used in the diminutive form.", parents = {"nouns"}, } for _, pos in ipairs(diminutive_augmentative_poses) do labels["diminutive " .. pos] = { description = "{{{langname}}} " .. pos .. " that are derived from a base word to convey endearment, small size or small intensity.", parents = {pos}, } end labels["discourse particles"] = { description = "{{{langname}}} particles that manage the flow and structure of discourse.", parents = {"particles"}, } labels["distributive verbs"] = { description = "{{{langname}}} verbs which indicate that an action or event involves multiple participants or a large quantity of an uncountable mass, usually as the grammatical subject in the case of intransitive verbs and as the grammatical object in the case of transitive verbs.", parents = {"imperfective verbs", "verbs"}, } labels["ditransitive verbs"] = { description = "{{{langname}}} verbs that indicate actions, occurrences or states of two grammatical objects simultaneously, one direct and one indirect.", parents = {"verbs", "transitive verbs"}, } labels["dualia tantum"] = { description = "{{{langname}}} nouns that are mostly or exclusively used in the dual form.", parents = {"nouns"}, } labels["duration adverbs"] = { description = "{{{langname}}} adverbs that express duration in time, such as (in English) [[always]], [[all night]] and [[ever since]].", parents = {"time adverbs"}, } labels["ergative verbs"] = { description = "{{{langname}}} [[Appendix:Glossary#ergative|ergative verb]]s: intransitive verbs that become causatives when used transitively.", parents = {"verbs", "intransitive verbs", "transitive verbs"}, } labels["excessive verbs"] = { description = "{{{langname}}} verbs that indicate that an action is performed to an excessive extent.", parents = {"verbs"}, } labels["enclitics"] = { description = "{{{langname}}} clitics that attach to the preceding word.", parents = {"clitics"}, } labels["nouns with other-gender equivalents"] = { description = "{{{langname}}} nouns that refer to gendered concepts (e.g. [[actor]] vs. [[actress]], [[king]] vs. [[queen]]) and have corresponding other-gender equivalent terms.", parents = {"nouns"}, } labels["female equivalent nouns"] = { description = "{{{langname}}} nouns that refer to female beings with the same characteristics as the base noun.", parents = {"nouns with other-gender equivalents"}, } labels["neuter equivalent nouns"] = { description = "{{{langname}}} nouns that refer to neuter beings with the same characteristics as the base noun.", parents = {"nouns with other-gender equivalents"}, } labels["female equivalent suffixes"] = { description = "{{{langname}}} suffixes that refer to female beings with the same characteristics as the base suffix.", parents = {"noun-forming suffixes"}, } labels["focus adverbs"] = { description = "{{{langname}}} adverbs that indicate [[w:Focus (linguistics)|focus]] within the sentence.", parents = {"adverbs"}, } labels["frequency adverbs"] = { description = "{{{langname}}} adverbs that express repetition with a certain frequency or interval, such as (in English) [[monthly]], [[continually]] and [[once in a while]].", parents = {"time adverbs"}, } labels["frequentative verbs"] = { description = "{{{langname}}} verbs that express repeated action.", parents = {"imperfective verbs", "verbs"}, } labels["general pronouns"] = { description = "{{{langname}}} pronouns that refer to all persons, things, abstract ideas and their characteristics.", parents = {"pronouns"}, } labels["generational moieties"] = { description = "{{{langname}}} moieties that alternate every generation.", parents = {"moieties"}, } labels["ideophones"] = { description = "{{{langname}}} terms that evoke an idea, especially a sensation or impression, with a sound.", parents = {"lemmas"}, } labels["imperfective verbs"] = { description = "{{{langname}}} verbs that express actions considered as ongoing or continuous, as opposed to completed events.", parents = {"verbs"}, } labels["impersonal verbs"] = { description = "{{{langname}}} verbs that do not indicate actions, occurrences or states of any specific grammatical subject.", parents = {"verbs"}, } labels["inchoative verbs"] = { description = "{{{langname}}} verbs that indicate the beginning of an action or event.", parents = {"verbs"}, } labels["indefinite adjectives"] = { description = "{{{langname}}} adjectives that refer to unspecified adjective meanings.", parents = {"adjectives", {name = "indefinite pro-forms", sort = "adjectives"}}, } labels["indefinite adverbs"] = { description = "{{{langname}}} adverbs that refer to unspecified adverbial meanings.", parents = {"adverbs", {name = "indefinite pro-forms", sort = "adverbs"}}, } labels["indefinite determiners"] = { description = "{{{langname}}} determiners that designate an unidentified noun.", parents = {"determiners", {name = "indefinite pro-forms", sort = "determiners"}}, } labels["indefinite pronouns"] = { description = "{{{langname}}} pronouns that refer to unspecified nouns.", parents = {"pronouns", {name = "indefinite pro-forms", sort = "pronouns"}}, } labels["infixes"] = { description = "Affixes inserted inside {{{langname}}} words.", parents = {"morphemes"}, } labels["inflectional prefixes"] = { description = "{{{langname}}} prefixes that are used as inflectional beginnings in noun, adjective or verb paradigms.", parents = {"prefixes"}, } labels["inflectional suffixes"] = { description = "{{{langname}}} suffixes that are used as inflectional endings in noun, adjective or verb paradigms.", parents = {"suffixes"}, } labels["intensive verbs"] = { description = "{{{langname}}} verbs which indicate that an action is performed vigorously, enthusiastically, forcefully or to an otherwise enlarged extent.", parents = {"verbs"}, } labels["interfixes"] = { description = "Affixes used to join two {{{langname}}} words or morphemes together.", parents = {"morphemes"}, } labels["interjections"] = { description = "{{{langname}}} terms that express emotions, sounds, etc. as exclamations.", parents = {"lemmas"}, } labels["interrogative adjectives"] = { description = "{{{langname}}} adjectives that indicate questions.", parents = {"adjectives", {name = "interrogative pro-forms", sort = "adjectives"}}, } labels["interrogative adverbs"] = { description = "{{{langname}}} adverbs that indicate questions.", parents = {"adverbs", {name = "interrogative pro-forms", sort = "adverbs"}}, } labels["interrogative determiners"] = { description = "{{{langname}}} determiners that indicate questions.", parents = {"determiners", {name = "interrogative pro-forms", sort = "determiners"}}, } labels["interrogative particles"] = { description = "{{{langname}}} particles that indicate questions.", parents = {"particles", {name = "interrogative pro-forms", sort = "particles"}}, } labels["interrogative pronouns"] = { description = "{{{langname}}} pronouns that indicate questions.", parents = {"pronouns", {name = "interrogative pro-forms", sort = "pronouns"}}, } labels["intransitive verbs"] = { description = "{{{langname}}} verbs that don't require any grammatical objects.", parents = {"verbs"}, } labels["iterative verbs"] = { description = "{{{langname}}} verbs that express the repetition of an event.", parents = {"imperfective verbs", "verbs"}, } labels["location adverbs"] = { description = "{{{langname}}} adverbs that indicate location.", parents = {"adverbs"}, } labels["male equivalent nouns"] = { description = "{{{langname}}} nouns that refer to male beings with the same characteristics as the base noun.", parents = {"nouns with other-gender equivalents"}, } labels["manner adverbs"] = { description = "{{{langname}}} adverbs that indicate the manner, way or style in which an action is performed.", parents = {"adverbs"}, } labels["modal adverbs"] = { description = "{{{langname}}} adverbs that express [[w:Linguistic modality|linguistic modality]], indicating the mood or attitude of the speaker with respect to what is being said.", parents = {"sentence adverbs"}, } labels["modal particles"] = { description = "{{{langname}}} particles that reflect the mood or attitude of the speaker, without changing the basic meaning of the sentence.", parents = {"particles"}, } labels["modal verbs"] = { description = "{{{langname}}} verbs that indicate [[grammatical mood]].", parents = {"auxiliary verbs"}, } labels["moieties"] = { description = "{{{langname}}} pairs of abstract categories separating people and the environment.", parents = {"lemmas"}, } labels["momentane verbs"] = { description = "{{{langname}}} verbs that express a sudden and brief action.", parents = {"perfective verbs", "verbs"}, } labels["morphemes"] = { description = "{{{langname}}} word-elements used to form full words.", parents = {"lemmas"}, } labels["movement adverbs"] = { description = "{{{langname}}} adverbs that express movement in space, such as (in English) [[hither]], [[that way]], [[down]] and [[eastwards]].", additional = "Compare [[:Category:{{{langname}}} position adverbs]].", parents = {"location adverbs"}, umbrella = { additional = "Compare [[:Category:Position adverbs by language]].", }, } labels["multiword terms"] = { description = "{{{langname}}} lemmas that are a combination of multiple words, including [[WT:CFI#Idiomaticity|idiomatic]] combinations.", parents = {"lemmas"}, } labels["negative verbs"] = { description = "{{{langname}}} verbs that indicate the lack of an action.", parents = {"verbs"}, } labels["negative particles"] = { description = "{{{langname}}} particles that indicate negation.", parents = {"particles"}, } labels["negative pronouns"] = { description = "{{{langname}}} pronouns that refer to negative or non-existent references.", parents = {"pronouns"}, } labels["nominalized adjectives"] = { description = "{{{langname}}} adjectives that are used as nouns.", parents = {"nouns", "adjectives"}, } labels["nominalized present participles"] = { description = "{{{langname}}} present participles that are used as nouns.", parents = {"nouns", "present participles"}, } labels["non-constituents"] = { description = "{{{langname}}} terms that are not grammatical [[constituent#Noun|constituents]], and therefore need to be combined with additional terms to form a complete phrase.", parents = {"phrases"}, } labels["noun prefixes"] = { description = "{{{langname}}} prefixes attached to a noun that display its noun class.", parents = {"prefixes"}, } labels["संज्ञाएँ"] = { description = "{{{langname}}} terms that indicate people, beings, things, places, phenomena, qualities or ideas.", parents = {"लेम्मा"}, } labels["nouns by classifier"] = { description = "{{{langname}}} nouns organized by the classifier they are used with.", parents = {{name = "nouns", sort = "classifier"}}, } labels["numerals"] = { description = "{{{langname}}} terms that quantify nouns.", parents = {"लेम्मा"}, } labels["object concords"] = { description = "{{{langname}}} concords used to show the grammatical object.", parents = {"concords"}, } labels["object pronouns"] = { description = "{{{langname}}} pronouns that refer to grammatical objects.", parents = {"pronouns"}, } labels["particles"] = { description = "{{{langname}}} terms that do not belong to any of the inflected grammatical word classes, often lacking their own grammatical functions and forming other parts of speech or expressing the relationship between clauses.", parents = {"lemmas"}, } labels["perfective verbs"] = { description = "{{{langname}}} verbs that express actions considered as completed events, as opposed to ongoing or continuous.", parents = {"verbs"}, } labels["personal pronouns"] = { description = "{{{langname}}} pronouns that are used as substitutes for known nouns.", parents = {"pronouns"}, } labels["phrasal verbs"] = { description = "{{{langname}}} verbs accompanied by particles, such as prepositions and adverbs.", parents = {"verbs", "phrases"}, } labels["phrasal prepositions"] = { description = "{{{langname}}} prepositions formed with combinations of other terms.", parents = {"prepositions", "phrases"}, } labels["pluralia tantum"] = { description = "{{{langname}}} nouns that are mostly or exclusively used in the plural form.", parents = {"nouns"}, } labels["point-in-time adverbs"] = { description = "{{{langname}}} adverbs that reference a specific point in time, e.g. {{m|en|yesterday}}, {{m+|es|anoche||last night}} or {{m+|hu|egykor||at one o'clock}}.", parents = {"time adverbs"}, } labels["position adverbs"] = { description = "{{{langname}}} adverbs that express position in space, such as (in English) [[here]], [[next door]], [[cater-corner]] and [[on deck]].", additional = "Compare [[:Category:{{{langname}}} movement adverbs]].", parents = {"location adverbs"}, umbrella = { additional = "Compare [[:Category:Movement adverbs by language]].", }, } labels["possessable nouns"] = { description = "{{{langname}}} nouns that can have their possession indicated directly by possessive pronouns.", parents = {"nouns"}, umbrella = { description = "Categories with nouns that can have their possession indicated directly by possessive pronouns and, in some languages, be transformed into adjectives.", }, } labels["possessional adjectives"] = { description = "{{{langname}}} adjectives that indicate that a noun is in possession of something.", parents = {"adjectives"}, } labels["possessive adjectives"] = { description = "{{{langname}}} adjectives that indicate ownership.", parents = {"adjectives"}, } labels["possessive concords"] = { description = "{{{langname}}} concords used to show possession.", parents = {"concords"}, } labels["possessive determiners"] = { description = "{{{langname}}} determiners that indicate ownership.", parents = {"determiners"}, } labels["possessive pronouns"] = { description = "{{{langname}}} pronouns that indicate ownership.", parents = {"pronouns"}, } labels["postpositional phrases"] = { description = "{{{langname}}} phrases headed by a postposition.", parents = {"phrases", "postpositions"}, } labels["postpositions"] = { description = "{{{langname}}} adpositions that are placed after their objects.", parents = {"lemmas"}, } labels["predicatives"] = { description = "{{{langname}}} elements of the predicate that supplement the subject or object of a sentence via the verb.", parents = {"lemmas"}, } labels["prefixes"] = { description = "Affixes attached to the beginning of {{{langname}}} words.", parents = {"morphemes"}, } labels["prepositional phrases"] = { description = "{{{langname}}} phrases headed by a preposition.", parents = {"phrases", "prepositions"}, } labels["prepositions"] = { description = "{{{langname}}} adpositions that are placed before their objects.", parents = {"lemmas"}, } labels["matrilineal moieties"] = { description = "{{{langname}}} moieties inherited from an individual's mother.", parents = {"moieties"}, } labels["patrilineal moieties"] = { description = "{{{langname}}} moieties inherited from an individual's father.", parents = {"moieties"}, } labels["pejorative suffixes"] = { description = "{{{langname}}} suffixes that [[belittle]] (lessen in value).", parents = {"suffixes"}, } labels["prenouns"] = { description = "{{{langname}}} prefixes of various kinds that are attached to nouns.", parents = {"prefixes"}, } labels["preverbs"] = { description = "{{{langname}}} prefixes of various kinds that are attached to verbs.", parents = {"prefixes"}, } labels["privative verbs"] = { description = "{{{langname}}} verbs that indicate that the grammatical object is deprived of something or that something is removed from the object.", parents = {"verbs"}, } labels["pronominal adverbs"] = { description = "{{{langname}}} adverbs that are formed by combining a pronoun with a preposition.", parents = {"adverbs", "prepositions", "pronouns"}, } labels["pronominal concords"] = { description = "{{{langname}}} concords that are prefixed to pronominal stems.", parents = {"concords"}, } labels["pronouns"] = { description = "{{{langname}}} terms that refer to and substitute nouns.", parents = {"lemmas"}, } labels["नामवाचक संज्ञाएँ"] = { description = "{{{langname}}} nouns that indicate individual entities, such as names of persons, places or organizations.", parents = {"संज्ञाएँ"}, } labels["raising verbs"] = { description = "{{{langname}}} verbs that, in a matrix or main clause, take an argument from an embedded or subordinate clause; in other words, a raising verb appears with a syntactic argument that is not its semantic argument, but is rather the semantic argument of an embedded predicate.", parents = {"verbs"}, } labels["reciprocal pronouns"] = { description = "{{{langname}}} pronouns that refer back to a plural subject and express an action done in two or more directions.", parents = {"pronouns", "personal pronouns"}, } labels["reciprocal verbs"] = { description = "{{{langname}}} verbs that indicate actions, occurrences or states directed from multiple subjects to each other.", parents = {"verbs"}, } labels["reflexive pronouns"] = { description = "{{{langname}}} pronouns that refer back to the subject.", parents = {"pronouns", "personal pronouns"}, } labels["reflexive verbs"] = { description = "{{{langname}}} verbs that indicate actions, occurrences or states directed from the grammatical subjects to themselves.", parents = {"verbs"}, } labels["relational adjectives"] = { description = "{{{langname}}} adjectives that stand in place of a noun when modifying another noun.", parents = {"adjectives"}, } labels["relational nouns"] = { description = "{{{langname}}} nouns used to indicate a relation between other two nouns by means of possession.", parents = {"nouns"}, } labels["relative adjectives"] = { description = "{{{langname}}} adjectives used to indicate [[relative clause]]s.", parents = {"adjectives", {name = "relative pro-forms", sort = "adjectives"}}, } labels["relative adverbs"] = { description = "{{{langname}}} adverbs used to indicate [[relative clause]]s.", parents = {"adverbs", {name = "relative pro-forms", sort = "adverbs"}}, } labels["relative determiners"] = { description = "{{{langname}}} determiners used to indicate [[relative clause]]s.", parents = {"determiners", {name = "relative pro-forms", sort = "determiners"}}, } labels["relative concords"] = { description = "{{{langname}}} concords that are prefixed to relative stems.", parents = {"concords"}, } labels["relative pronouns"] = { description = "{{{langname}}} pronouns used to indicate [[relative clause]]s.", parents = {"pronouns", {name = "relative pro-forms", sort = "pronouns"}}, } labels["relatives"] = { description = "{{{langname}}} terms that give attributes to nouns, acting grammatically as relative clauses.", parents = {"lemmas"}, } labels["repetitive verbs"] = { description = "{{{langname}}} verbs that indicate actions or events which are performed or occur again, anew or differently.", parents = {"verbs"}, } labels["resultative verbs"] = { description = "{{{langname}}} verbs that indicate a result of some action", parents = {"verbs"}, } labels["reversative verbs"] = { description = "{{{langname}}} verbs that indicate that the reversal or undoing of an action, event or state.", parents = {"verbs"}, } labels["saturative verbs"] = { description = "{{{langname}}} verbs which indicate that an action is performed to the point of saturation or satisfaction.", parents = {"verbs"}, } labels["semelfactive verbs"] = { description = "{{{langname}}} verbs that are punctual (instantaneous, momentive), perfective (treated as a unitary whole with no explicit internal temporal structure), and telic (having a boundary out of which the activity cannot be said to have taken place or continue).", parents = {"perfective verbs", "verbs"}, } labels["sentence adverbs"] = { description = "{{{langname}}} adverbs that modify an entire clause or sentence.", parents = {"adverbs"}, } labels["sequence adverbs"] = { description = "{{{langname}}} conjunctive adverbs that express sequence in space or time.", parents = {"conjunctive adverbs"}, } labels["simulfixes"] = { description = "Affixes replacing positions in {{{langname}}} words.", parents = {"morphemes"}, } labels["singulative nouns"] = { description = "{{{langname}}} nouns that indicate a single item of a group of related things or beings.", parents = {"nouns"}, } labels["singularia tantum"] = { description = "{{{langname}}} nouns that are mostly or exclusively used in the singular form.", parents = {"nouns"}, } labels["solitary pronouns"] = { description = "{{{langname}}} pronouns that refer to specific people in particular and sets them apart from anyone else.", parents = {"pronouns", "personal pronouns"}, } labels["stative verbs"] = { description = "{{{langname}}} verbs that define a state with no or insignificant internal dynamics.", parents = {"verbs"}, } labels["stems"] = { description = "Morphemes from which {{{langname}}} words are formed.", parents = {"morphemes"}, } labels["subordinating conjunctions"] = { description = "{{{langname}}} conjunctions that indicate relations of syntactic dependence between connected items.", parents = {"conjunctions"}, } labels["subject concords"] = { description = "{{{langname}}} concords used to show the grammatical subject.", parents = {"concords"}, } labels["subject pronouns"] = { description = "{{{langname}}} pronouns that refer to grammatical subjects.", parents = {"pronouns"}, } labels["suffixes"] = { description = "Affixes attached to the end of {{{langname}}} words.", parents = {"morphemes"}, } labels["splitting verbs"] = { description = "{{{langname}}} bisyllabic verbs that obligatorily split around a direct object or pronoun.", parents = {"verbs"}, } labels["terminative verbs"] = { description = "{{{langname}}} verbs that indicate that an action or event ceases.", parents = {"verbs"}, } labels["time adverbs"] = { description = "{{{langname}}} adverbs that indicate time, expressing either [[duration]], [[frequency]] or a [[point]] in [[time]].", parents = {"adverbs"}, } labels["transfixes"] = { description = "Discontinuous affixes inserted within a word root.", parents = {"morphemes"}, } labels["transformative verbs"] = { description = "{{{langname}}} verbs that indicate a change of state or nature, in the subject for intransitive verbs and in the object for transitive verbs.", parents = {"verbs"}, } labels["transitive verbs"] = { description = "{{{langname}}} verbs that indicate actions, occurrences or states directed to one or more grammatical objects.", parents = {"verbs"}, } labels["uncomparable adjectives"] = { description = "{{{langname}}} adjectives that are not inflected to display different degrees of comparison.", parents = {"adjectives"}, } labels["uncomparable adverbs"] = { description = "{{{langname}}} adverbs that are not inflected to display different degrees of comparison.", parents = {"adverbs"}, } labels["uncountable nouns"] = { description = "{{{langname}}} nouns that indicate qualities, ideas, unbounded mass or other abstract concepts that cannot be quantified directly by numerals.", parents = {"nouns"}, } labels["uncountable numerals"] = { description = "{{{langname}}} numerals that cannot be quantified directly by other numerals.", parents = {"numerals"}, } labels["uncountable proper nouns"] = { description = "{{{langname}}} proper nouns that cannot be quantified directly by numerals.", parents = {"proper nouns"}, } labels["uncountable suffixes"] = { description = "{{{langname}}} suffixes that can be used to form nouns that cannot be quantified directly by numerals.", parents = {"suffixes"}, } labels["unpossessable nouns"] = { description = "{{{langname}}} nouns that cannot have their possession indicated directly by possessive pronouns.", parents = {"nouns"}, umbrella = { description = "Categories with nouns that cannot have their possession indicated directly by possessive pronouns or, in some languages, be transformed into adjectives.", }, } labels["verbal nouns"] = { description = "{{{langname}}} nouns morphologically related to a verb and similar to it in meaning.", parents = {"nouns"}, } labels["verbal adjectives"] = { description = "{{{langname}}} adjectives describing the condition or state resulting from the action of the corresponding verb.", parents = {"adjectives"}, } ----------------------------------------------------------------------------- labels["क्रियाएँ"] = { description = "{{{langname}}} terms that indicate actions, occurrences or states.", parents = {"लेम्मा"}, } for _, voice in pairs{ "active", "middle", "passive", } do labels[voice .. " क्रियाएँ"] = { description = "{{{langname}}} verbs that are predominantly used in the {{w|" .. voice .. " voice}}.", parents = {"क्रियाएँ"}, } local voice_only = voice .. "-only" labels[voice_only .. " क्रियाएँ"] = { breadcrumb = voice_only, description = "{{{langname}}} verbs that can only be used in the {{w|" .. voice .. " voice}}.", parents = {voice .. " क्रियाएँ", "verbs"}, } end labels["verbs of movement"] = { description = "{{{langname}}} verbs that indicate physical movement of the grammatical subject across a trajectory, with a starting point and an endpoint.", parents = {"verbs"}, } ----------------------------------------------------------------------------- for pos, desc in pairs{ ["prepositions"] = "following", ["postpositions"] = "preceding" } do for _, case in ipairs{ "ablative", "accusative", "dative", "genitive", "instrumental", "locative", "nominative", "prepositional", "vocative", } do labels[pos .. " governing the " .. case] = { breadcrumb = ucfirst(case), description = ("{{{langname}}} %s that cause the %s noun to be in the %s case."):format(pos, desc, case), parents = {pos}, } end end -- Add "X-only categories for degrees. for _, pos in pairs{ "adjectives", "adverbs", "determiners", "pronouns", } do for _, degree in pairs{ "comparative", "superlative", "elative", "exaggerated", "excessive", "equative", } do local degree_only = degree .. "-only" labels[degree_only .. " " .. pos] = { breadcrumb = degree_only, description = "{{{langname}}} " .. pos .. " that are only used in the " .. degree .. " degree.", parents = {pos}, } end end -- Add "POS-forming suffixes". for _, pos in pairs{ "adjective", "adverb", "noun", "numeral", "participle", "pronoun", "proper noun", "verb", } do labels[pos .. "-forming suffixes"] = { description = "{{{langname}}} suffixes that are used to derive " .. pos .. "s from other words.", parents = {"derivational suffixes"}, } end -- Add 'umbrella_parents' key if not already present. for key, data in pairs(labels) do if not data.umbrella_parents then data.umbrella_parents = "लेम्मा उपश्रेणियाँ भाषा अनुसार" end end ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["लेम्मा उपश्रेणियाँ भाषा अनुसार"] = { description = "Umbrella categories covering topics related to lemmas.", additional = "{{{umbrella_meta_msg}}}", parents = { "छतरी मेटाश्रेणियाँ", {name = "लेम्मा", is_label = true, sort = " "}, }, } ----------------------------------------------------------------------------- -- -- -- HANDLERS -- -- -- ----------------------------------------------------------------------------- -- Handler for e.g. [[:Category:English phrasal verbs formed with "aback"]]. table.insert(handlers, function(data) local particle = data.label:match("^phrasal verbs formed with \"(.-)\"$") if particle then local tagged_text = require("Module:script utilities").tag_text(particle, data.lang, nil, "term") local link = require("Module:links").full_link({ term = particle, lang = data.lang }, "term") return { description = "{{{langname}}} {{w|phrasal verb}}s formed with the adverb or preposition " .. link .. ".", displaytitle = '{{{langname}}} phrasal verbs formed with "' .. particle .. '"', breadcrumb = tagged_text, parents = {{ name = "phrasal verbs", sort = particle }}, umbrella = false, } end end) return {LABELS = labels, RAW_CATEGORIES = raw_categories, HANDLERS = handlers} daamonnncz8hctck7zkhrxnxhs0hsnw मॉड्यूल:scripts/canonical names 828 306976 487953 487838 2026-09-03T19:40:27Z SM7 6218 असमिया 487953 Scribunto text/plain return { ["Adlam"] = "Adlm", ["Afaka"] = "Afak", ["Ahom"] = "Ahom", ["Anatolian hieroglyphic"] = "Hluw", ["Ancient North Arabian"] = "Narb", ["Ancient South Arabian"] = "Sarb", ["Arabic"] = "Arab", ["Armenian"] = "Armn", ["असमिया"] = "as-Beng", ["Avestan"] = "Avst", ["Balbodh"] = "Deva", ["Balinese"] = "Bali", ["Bamum"] = "Bamu", ["Bassa"] = "Bass", ["Batak"] = "Batk", ["Baybayin"] = "Tglg", ["Bengali"] = "Beng", ["Bhaiksuki"] = "Bhks", ["Blissymbolic"] = "Blis", ["Book Pahlavi"] = "Phlv", ["Brahmi"] = "Brah", ["Braille"] = "Brai", ["Buhid"] = "Buhd", ["Burmese"] = "Mymr", ["Canadian syllabic"] = "Cans", ["Carian"] = "Cari", ["Caucasian Albanian"] = "Aghb", ["Chakma"] = "Cakm", ["Cham"] = "Cham", ["Cherokee"] = "Cher", ["Chisoi"] = "Chis", ["Clear Script"] = "xwo-Mong", ["Coptic"] = "Copt", ["Cuneiform"] = "Xsux", ["Cypriot"] = "Cprt", ["Cypro-Minoan"] = "Cpmn", ["Cyrillic"] = "Cyrl", ["Demotic"] = "Egyd", ["Deseret"] = "Dsrt", ["Devanagari"] = "Deva", ["Dhives Akuru"] = "Diak", ["Dogra"] = "Dogr", ["Dongba"] = "Nkdb", ["Duployan"] = "Dupl", ["Egyptian hieroglyphic"] = "Egyp", ["Elbasan"] = "Elba", ["Elymaic"] = "Elym", ["Ethiopic"] = "Ethi", ["Fraktur"] = "Latf", ["Fraser"] = "Lisu", ["Gaelic"] = "Latg", ["Garay"] = "Gara", ["Geba"] = "Nkgb", ["Georgian"] = "Geor", ["Glagolitic"] = "Glag", ["Gothic"] = "Goth", ["Grantha"] = "Gran", ["Greek"] = "Grek", ["Gujarati"] = "Gujr", ["Gunjala Gondi"] = "Gong", ["Gurmukhi"] = "Guru", ["Han"] = "Hani", ["Hangul"] = "Hang", ["Hanifi Rohingya"] = "Rohg", ["Hanunoo"] = "Hano", ["Hatran"] = "Hatr", ["Hebrew"] = "Hebr", ["Hieratic"] = "Egyh", ["Hiragana"] = "Hira", ["Image-rendered"] = "Image", ["Imperial Aramaic"] = "Armi", ["Indus"] = "Inds", ["Inscriptional Pahlavi"] = "Phli", ["Inscriptional Parthian"] = "Prti", ["International Phonetic Alphabet"] = "Ipach", ["Japanese"] = "Jpan", ["Javanese"] = "Java", ["Jurchen"] = "Jurc", ["Kaithi"] = "Kthi", ["Kana"] = "Hrkt", ["Kannada"] = "Knda", ["Katakana"] = "Kana", ["Kawi"] = "Kawi", ["Kayah Li"] = "Kali", ["Kharoshthi"] = "Khar", ["Khema"] = "Gukh", ["Khitan large"] = "Kitl", ["Khitan small"] = "Kits", ["Khmer"] = "Khmr", ["Khojki"] = "Khoj", ["Khom Thai"] = "Khomt", ["Khudabadi"] = "Sind", ["Khutsuri"] = "Geok", ["Khwarezmian"] = "Chrs", ["Kirat Rai"] = "Krai", ["Korean"] = "Kore", ["Kpelle"] = "Kpel", ["Kulitan"] = "Kulit", ["Lai Tay"] = "Tayo", ["Lao"] = "Laoo", ["Latin"] = "Latn", ["Leke"] = "Leke", ["Lepcha"] = "Lepc", ["Limbu"] = "Limb", ["Linear A"] = "Lina", ["Linear B"] = "Linb", ["Loma"] = "Loma", ["Lontara"] = "Bugi", ["Lycian"] = "Lyci", ["Lydian"] = "Lydi", ["Mahajani"] = "Mahj", ["Makasar"] = "Maka", ["Malayalam"] = "Mlym", ["Manchu"] = "mnc-Mong", ["Mandaic"] = "Mand", ["Manichaean"] = "Mani", ["Marchen"] = "Marc", ["Masaram Gondi"] = "Gonm", ["Maya"] = "Maya", ["Medefaidrin"] = "Medf", ["Meitei Mayek"] = "Mtei", ["Mende"] = "Mend", ["Meroitic cursive"] = "Merc", ["Meroitic hieroglyphic"] = "Mero", ["Modi"] = "Modi", ["Mongolian"] = "Mong", ["Moon"] = "Moon", ["Morse code"] = "Morse", ["Mru"] = "Mroo", ["Multani"] = "Mult", ["Mundari Bani"] = "Nagm", ["N'Ko"] = "Nkoo", ["Nabataean"] = "Nbat", ["Nandinagari"] = "Nand", ["New Tai Lue"] = "Talu", ["Newa"] = "Newa", ["Northeastern Iberian"] = "Ibrnn", ["Nyiakeng Puachue Hmong"] = "Hmnp", ["Nüshu"] = "Nshu", ["Odia"] = "Orya", ["Ogham"] = "Ogam", ["Ol Chiki"] = "Olck", ["Ol Onal"] = "Onao", ["Old Cyrillic"] = "Cyrs", ["Old Hungarian"] = "Hung", ["Old Italic"] = "Ital", ["Old Permic"] = "Perm", ["Old Persian"] = "Xpeo", ["Old Sogdian"] = "Sogo", ["Old Turkic"] = "Orkh", ["Old Uyghur"] = "Ougr", ["Osage"] = "Osge", ["Osmanya"] = "Osma", ["Pahawh Hmong"] = "Hmng", ["Palmyrene"] = "Palm", ["Pau Cin Hau"] = "Pauc", ["Pazend"] = "pal-Avst", ["Phags-pa"] = "Phag", ["Phoenician"] = "Phnx", ["Pollard"] = "Plrd", ["Proto-Cuneiform"] = "Pcun", ["Proto-Elamite"] = "Pelm", ["Proto-Sinaitic"] = "Psin", ["Psalter Pahlavi"] = "Phlp", ["Ranjana"] = "Ranj", ["Rejang"] = "Rjng", ["Rongorongo"] = "Roro", ["Rumi numerals"] = "Rumin", ["Runic"] = "Runr", ["Samaritan"] = "Samr", ["Saurashtra"] = "Saur", ["Shahmukhi"] = "Aran", ["Sharada"] = "Shrd", ["Shavian"] = "Shaw", ["Siddham"] = "Sidd", ["Sidetic"] = "Sidt", ["SignWriting"] = "Sgnw", ["Simplified Han"] = "Hans", ["Sinhalese"] = "Sinh", ["Sogdian"] = "Sogd", ["Sorang Sompeng"] = "Sora", ["Southeastern Iberian"] = "Ibrns", ["Soyombo"] = "Soyo", ["Sui"] = "Shui", ["Sundanese"] = "Sund", ["Sunuwar"] = "Sunu", ["Sylheti Nagri"] = "Sylo", ["Syriac"] = "Syrc", ["Tagbanwa"] = "Tagb", ["Tai Nüa"] = "Tale", ["Tai Tham"] = "Lana", ["Tai Viet"] = "Tavt", ["Takri"] = "Takr", ["Tamil"] = "Taml", ["Tamyig"] = "sit-tam-Tibt", ["Tangsa"] = "Tnsa", ["Tangut"] = "Tang", ["Telugu"] = "Telu", ["Tengwar"] = "Teng", ["Thaana"] = "Thaa", ["Thai"] = "Thai", ["Tibetan"] = "Tibt", ["Tifinagh"] = "Tfng", ["Tigalari"] = "Tutg", ["Tirhuta"] = "Tirh", ["Todhri"] = "Todr", ["Tolong Siki"] = "Tols", ["Toto"] = "Toto", ["Traditional Han"] = "Hant", ["Ugaritic"] = "Ugar", ["Vai"] = "Vaii", ["Varang Kshiti"] = "Wara", ["Visible Speech"] = "Visp", ["Vithkuqi"] = "Vith", ["Wancho"] = "Wcho", ["Woleai"] = "Wole", ["Xibe"] = "sjo-Mong", ["Yezidi"] = "Yezi", ["Yi"] = "Yiii", ["Zanabazar Square"] = "Zanb", ["Zhuyin"] = "Bopo", ["Znamenny musical notation"] = "Zname", ["flag semaphore"] = "Semap", ["mathematical notation"] = "Zmth", ["musical notation"] = "Music", ["symbolic"] = "Zsym", ["uncoded"] = "Zzzz", ["undetermined"] = "Zyyy", ["unspecified"] = "None", ["unwritten"] = "Zxxx", } 11ypk0mryf8ubxsjcvzcgkskm7982r1 487972 487953 2026-09-04T05:01:05Z SM7 6218 देवनागरी 487972 Scribunto text/plain return { ["Adlam"] = "Adlm", ["Afaka"] = "Afak", ["Ahom"] = "Ahom", ["Anatolian hieroglyphic"] = "Hluw", ["Ancient North Arabian"] = "Narb", ["Ancient South Arabian"] = "Sarb", ["Arabic"] = "Arab", ["Armenian"] = "Armn", ["असमिया"] = "as-Beng", ["Avestan"] = "Avst", ["Balbodh"] = "Deva", ["Balinese"] = "Bali", ["Bamum"] = "Bamu", ["Bassa"] = "Bass", ["Batak"] = "Batk", ["Baybayin"] = "Tglg", ["Bengali"] = "Beng", ["Bhaiksuki"] = "Bhks", ["Blissymbolic"] = "Blis", ["Book Pahlavi"] = "Phlv", ["Brahmi"] = "Brah", ["Braille"] = "Brai", ["Buhid"] = "Buhd", ["Burmese"] = "Mymr", ["Canadian syllabic"] = "Cans", ["Carian"] = "Cari", ["Caucasian Albanian"] = "Aghb", ["Chakma"] = "Cakm", ["Cham"] = "Cham", ["Cherokee"] = "Cher", ["Chisoi"] = "Chis", ["Clear Script"] = "xwo-Mong", ["Coptic"] = "Copt", ["Cuneiform"] = "Xsux", ["Cypriot"] = "Cprt", ["Cypro-Minoan"] = "Cpmn", ["Cyrillic"] = "Cyrl", ["Demotic"] = "Egyd", ["Deseret"] = "Dsrt", ["देवनागरी"] = "Deva", ["Dhives Akuru"] = "Diak", ["Dogra"] = "Dogr", ["Dongba"] = "Nkdb", ["Duployan"] = "Dupl", ["Egyptian hieroglyphic"] = "Egyp", ["Elbasan"] = "Elba", ["Elymaic"] = "Elym", ["Ethiopic"] = "Ethi", ["Fraktur"] = "Latf", ["Fraser"] = "Lisu", ["Gaelic"] = "Latg", ["Garay"] = "Gara", ["Geba"] = "Nkgb", ["Georgian"] = "Geor", ["Glagolitic"] = "Glag", ["Gothic"] = "Goth", ["Grantha"] = "Gran", ["Greek"] = "Grek", ["Gujarati"] = "Gujr", ["Gunjala Gondi"] = "Gong", ["Gurmukhi"] = "Guru", ["Han"] = "Hani", ["Hangul"] = "Hang", ["Hanifi Rohingya"] = "Rohg", ["Hanunoo"] = "Hano", ["Hatran"] = "Hatr", ["Hebrew"] = "Hebr", ["Hieratic"] = "Egyh", ["Hiragana"] = "Hira", ["Image-rendered"] = "Image", ["Imperial Aramaic"] = "Armi", ["Indus"] = "Inds", ["Inscriptional Pahlavi"] = "Phli", ["Inscriptional Parthian"] = "Prti", ["International Phonetic Alphabet"] = "Ipach", ["Japanese"] = "Jpan", ["Javanese"] = "Java", ["Jurchen"] = "Jurc", ["Kaithi"] = "Kthi", ["Kana"] = "Hrkt", ["Kannada"] = "Knda", ["Katakana"] = "Kana", ["Kawi"] = "Kawi", ["Kayah Li"] = "Kali", ["Kharoshthi"] = "Khar", ["Khema"] = "Gukh", ["Khitan large"] = "Kitl", ["Khitan small"] = "Kits", ["Khmer"] = "Khmr", ["Khojki"] = "Khoj", ["Khom Thai"] = "Khomt", ["Khudabadi"] = "Sind", ["Khutsuri"] = "Geok", ["Khwarezmian"] = "Chrs", ["Kirat Rai"] = "Krai", ["Korean"] = "Kore", ["Kpelle"] = "Kpel", ["Kulitan"] = "Kulit", ["Lai Tay"] = "Tayo", ["Lao"] = "Laoo", ["Latin"] = "Latn", ["Leke"] = "Leke", ["Lepcha"] = "Lepc", ["Limbu"] = "Limb", ["Linear A"] = "Lina", ["Linear B"] = "Linb", ["Loma"] = "Loma", ["Lontara"] = "Bugi", ["Lycian"] = "Lyci", ["Lydian"] = "Lydi", ["Mahajani"] = "Mahj", ["Makasar"] = "Maka", ["Malayalam"] = "Mlym", ["Manchu"] = "mnc-Mong", ["Mandaic"] = "Mand", ["Manichaean"] = "Mani", ["Marchen"] = "Marc", ["Masaram Gondi"] = "Gonm", ["Maya"] = "Maya", ["Medefaidrin"] = "Medf", ["Meitei Mayek"] = "Mtei", ["Mende"] = "Mend", ["Meroitic cursive"] = "Merc", ["Meroitic hieroglyphic"] = "Mero", ["Modi"] = "Modi", ["Mongolian"] = "Mong", ["Moon"] = "Moon", ["Morse code"] = "Morse", ["Mru"] = "Mroo", ["Multani"] = "Mult", ["Mundari Bani"] = "Nagm", ["N'Ko"] = "Nkoo", ["Nabataean"] = "Nbat", ["Nandinagari"] = "Nand", ["New Tai Lue"] = "Talu", ["Newa"] = "Newa", ["Northeastern Iberian"] = "Ibrnn", ["Nyiakeng Puachue Hmong"] = "Hmnp", ["Nüshu"] = "Nshu", ["Odia"] = "Orya", ["Ogham"] = "Ogam", ["Ol Chiki"] = "Olck", ["Ol Onal"] = "Onao", ["Old Cyrillic"] = "Cyrs", ["Old Hungarian"] = "Hung", ["Old Italic"] = "Ital", ["Old Permic"] = "Perm", ["Old Persian"] = "Xpeo", ["Old Sogdian"] = "Sogo", ["Old Turkic"] = "Orkh", ["Old Uyghur"] = "Ougr", ["Osage"] = "Osge", ["Osmanya"] = "Osma", ["Pahawh Hmong"] = "Hmng", ["Palmyrene"] = "Palm", ["Pau Cin Hau"] = "Pauc", ["Pazend"] = "pal-Avst", ["Phags-pa"] = "Phag", ["Phoenician"] = "Phnx", ["Pollard"] = "Plrd", ["Proto-Cuneiform"] = "Pcun", ["Proto-Elamite"] = "Pelm", ["Proto-Sinaitic"] = "Psin", ["Psalter Pahlavi"] = "Phlp", ["Ranjana"] = "Ranj", ["Rejang"] = "Rjng", ["Rongorongo"] = "Roro", ["Rumi numerals"] = "Rumin", ["Runic"] = "Runr", ["Samaritan"] = "Samr", ["Saurashtra"] = "Saur", ["Shahmukhi"] = "Aran", ["Sharada"] = "Shrd", ["Shavian"] = "Shaw", ["Siddham"] = "Sidd", ["Sidetic"] = "Sidt", ["SignWriting"] = "Sgnw", ["Simplified Han"] = "Hans", ["Sinhalese"] = "Sinh", ["Sogdian"] = "Sogd", ["Sorang Sompeng"] = "Sora", ["Southeastern Iberian"] = "Ibrns", ["Soyombo"] = "Soyo", ["Sui"] = "Shui", ["Sundanese"] = "Sund", ["Sunuwar"] = "Sunu", ["Sylheti Nagri"] = "Sylo", ["Syriac"] = "Syrc", ["Tagbanwa"] = "Tagb", ["Tai Nüa"] = "Tale", ["Tai Tham"] = "Lana", ["Tai Viet"] = "Tavt", ["Takri"] = "Takr", ["Tamil"] = "Taml", ["Tamyig"] = "sit-tam-Tibt", ["Tangsa"] = "Tnsa", ["Tangut"] = "Tang", ["Telugu"] = "Telu", ["Tengwar"] = "Teng", ["Thaana"] = "Thaa", ["Thai"] = "Thai", ["Tibetan"] = "Tibt", ["Tifinagh"] = "Tfng", ["Tigalari"] = "Tutg", ["Tirhuta"] = "Tirh", ["Todhri"] = "Todr", ["Tolong Siki"] = "Tols", ["Toto"] = "Toto", ["Traditional Han"] = "Hant", ["Ugaritic"] = "Ugar", ["Vai"] = "Vaii", ["Varang Kshiti"] = "Wara", ["Visible Speech"] = "Visp", ["Vithkuqi"] = "Vith", ["Wancho"] = "Wcho", ["Woleai"] = "Wole", ["Xibe"] = "sjo-Mong", ["Yezidi"] = "Yezi", ["Yi"] = "Yiii", ["Zanabazar Square"] = "Zanb", ["Zhuyin"] = "Bopo", ["Znamenny musical notation"] = "Zname", ["flag semaphore"] = "Semap", ["mathematical notation"] = "Zmth", ["musical notation"] = "Music", ["symbolic"] = "Zsym", ["uncoded"] = "Zzzz", ["undetermined"] = "Zyyy", ["unspecified"] = "None", ["unwritten"] = "Zxxx", } cnro82i2kdl2jd127fnynp9hi87l6wy मॉड्यूल:scripts/canonical names.json 828 306977 487951 487839 2026-09-03T19:39:01Z SM7 6218 असमिया 487951 json application/json { "Adlam": "Adlm", "Afaka": "Afak", "Ahom": "Ahom", "Anatolian hieroglyphic": "Hluw", "Ancient North Arabian": "Narb", "Ancient South Arabian": "Sarb", "Arabic": "Arab", "Armenian": "Armn", "असमिया": "as-Beng", "Avestan": "Avst", "Balbodh": "Deva", "Balinese": "Bali", "Bamum": "Bamu", "Bassa": "Bass", "Batak": "Batk", "Baybayin": "Tglg", "Bengali": "Beng", "Bhaiksuki": "Bhks", "Blissymbolic": "Blis", "Book Pahlavi": "Phlv", "Brahmi": "Brah", "Braille": "Brai", "Buhid": "Buhd", "Burmese": "Mymr", "Canadian syllabic": "Cans", "Carian": "Cari", "Caucasian Albanian": "Aghb", "Chakma": "Cakm", "Cham": "Cham", "Cherokee": "Cher", "Chisoi": "Chis", "Clear Script": "xwo-Mong", "Coptic": "Copt", "Cuneiform": "Xsux", "Cypriot": "Cprt", "Cypro-Minoan": "Cpmn", "Cyrillic": "Cyrl", "Demotic": "Egyd", "Deseret": "Dsrt", "Devanagari": "Deva", "Dhives Akuru": "Diak", "Dogra": "Dogr", "Dongba": "Nkdb", "Duployan": "Dupl", "Egyptian hieroglyphic": "Egyp", "Elbasan": "Elba", "Elymaic": "Elym", "Ethiopic": "Ethi", "Fraktur": "Latf", "Fraser": "Lisu", "Gaelic": "Latg", "Garay": "Gara", "Geba": "Nkgb", "Georgian": "Geor", "Glagolitic": "Glag", "Gothic": "Goth", "Grantha": "Gran", "Greek": "Grek", "Gujarati": "Gujr", "Gunjala Gondi": "Gong", "Gurmukhi": "Guru", "Han": "Hani", "Hangul": "Hang", "Hanifi Rohingya": "Rohg", "Hanunoo": "Hano", "Hatran": "Hatr", "Hebrew": "Hebr", "Hieratic": "Egyh", "Hiragana": "Hira", "Image-rendered": "Image", "Imperial Aramaic": "Armi", "Indus": "Inds", "Inscriptional Pahlavi": "Phli", "Inscriptional Parthian": "Prti", "International Phonetic Alphabet": "Ipach", "Japanese": "Jpan", "Javanese": "Java", "Jurchen": "Jurc", "Kaithi": "Kthi", "Kana": "Hrkt", "Kannada": "Knda", "Katakana": "Kana", "Kawi": "Kawi", "Kayah Li": "Kali", "Kharoshthi": "Khar", "Khema": "Gukh", "Khitan large": "Kitl", "Khitan small": "Kits", "Khmer": "Khmr", "Khojki": "Khoj", "Khom Thai": "Khomt", "Khudabadi": "Sind", "Khutsuri": "Geok", "Khwarezmian": "Chrs", "Kirat Rai": "Krai", "Korean": "Kore", "Kpelle": "Kpel", "Kulitan": "Kulit", "Lai Tay": "Tayo", "Lao": "Laoo", "Latin": "Latn", "Leke": "Leke", "Lepcha": "Lepc", "Limbu": "Limb", "Linear A": "Lina", "Linear B": "Linb", "Loma": "Loma", "Lontara": "Bugi", "Lycian": "Lyci", "Lydian": "Lydi", "Mahajani": "Mahj", "Makasar": "Maka", "Malayalam": "Mlym", "Manchu": "mnc-Mong", "Mandaic": "Mand", "Manichaean": "Mani", "Marchen": "Marc", "Masaram Gondi": "Gonm", "Maya": "Maya", "Medefaidrin": "Medf", "Meitei Mayek": "Mtei", "Mende": "Mend", "Meroitic cursive": "Merc", "Meroitic hieroglyphic": "Mero", "Modi": "Modi", "Mongolian": "Mong", "Moon": "Moon", "Morse code": "Morse", "Mru": "Mroo", "Multani": "Mult", "Mundari Bani": "Nagm", "N'Ko": "Nkoo", "Nabataean": "Nbat", "Nandinagari": "Nand", "New Tai Lue": "Talu", "Newa": "Newa", "Northeastern Iberian": "Ibrnn", "Nyiakeng Puachue Hmong": "Hmnp", "Nüshu": "Nshu", "Odia": "Orya", "Ogham": "Ogam", "Ol Chiki": "Olck", "Ol Onal": "Onao", "Old Cyrillic": "Cyrs", "Old Hungarian": "Hung", "Old Italic": "Ital", "Old Permic": "Perm", "Old Persian": "Xpeo", "Old Sogdian": "Sogo", "Old Turkic": "Orkh", "Old Uyghur": "Ougr", "Osage": "Osge", "Osmanya": "Osma", "Pahawh Hmong": "Hmng", "Palmyrene": "Palm", "Pau Cin Hau": "Pauc", "Pazend": "pal-Avst", "Phags-pa": "Phag", "Phoenician": "Phnx", "Pollard": "Plrd", "Proto-Cuneiform": "Pcun", "Proto-Elamite": "Pelm", "Proto-Sinaitic": "Psin", "Psalter Pahlavi": "Phlp", "Ranjana": "Ranj", "Rejang": "Rjng", "Rongorongo": "Roro", "Rumi numerals": "Rumin", "Runic": "Runr", "Samaritan": "Samr", "Saurashtra": "Saur", "Shahmukhi": "Aran", "Sharada": "Shrd", "Shavian": "Shaw", "Siddham": "Sidd", "Sidetic": "Sidt", "SignWriting": "Sgnw", "Simplified Han": "Hans", "Sinhalese": "Sinh", "Sogdian": "Sogd", "Sorang Sompeng": "Sora", "Southeastern Iberian": "Ibrns", "Soyombo": "Soyo", "Sui": "Shui", "Sundanese": "Sund", "Sunuwar": "Sunu", "Sylheti Nagri": "Sylo", "Syriac": "Syrc", "Tagbanwa": "Tagb", "Tai Nüa": "Tale", "Tai Tham": "Lana", "Tai Viet": "Tavt", "Takri": "Takr", "Tamil": "Taml", "Tamyig": "sit-tam-Tibt", "Tangsa": "Tnsa", "Tangut": "Tang", "Telugu": "Telu", "Tengwar": "Teng", "Thaana": "Thaa", "Thai": "Thai", "Tibetan": "Tibt", "Tifinagh": "Tfng", "Tigalari": "Tutg", "Tirhuta": "Tirh", "Todhri": "Todr", "Tolong Siki": "Tols", "Toto": "Toto", "Traditional Han": "Hant", "Ugaritic": "Ugar", "Vai": "Vaii", "Varang Kshiti": "Wara", "Visible Speech": "Visp", "Vithkuqi": "Vith", "Wancho": "Wcho", "Woleai": "Wole", "Xibe": "sjo-Mong", "Yezidi": "Yezi", "Yi": "Yiii", "Zanabazar Square": "Zanb", "Zhuyin": "Bopo", "Znamenny musical notation": "Zname", "flag semaphore": "Semap", "mathematical notation": "Zmth", "musical notation": "Music", "symbolic": "Zsym", "uncoded": "Zzzz", "undetermined": "Zyyy", "unspecified": "None", "unwritten": "Zxxx" } 3ia1s3zywuhfipimdigpxva7b9up8oj 487971 487951 2026-09-04T05:00:38Z SM7 6218 देवनागरी 487971 json application/json { "Adlam": "Adlm", "Afaka": "Afak", "Ahom": "Ahom", "Anatolian hieroglyphic": "Hluw", "Ancient North Arabian": "Narb", "Ancient South Arabian": "Sarb", "Arabic": "Arab", "Armenian": "Armn", "असमिया": "as-Beng", "Avestan": "Avst", "Balbodh": "Deva", "Balinese": "Bali", "Bamum": "Bamu", "Bassa": "Bass", "Batak": "Batk", "Baybayin": "Tglg", "Bengali": "Beng", "Bhaiksuki": "Bhks", "Blissymbolic": "Blis", "Book Pahlavi": "Phlv", "Brahmi": "Brah", "Braille": "Brai", "Buhid": "Buhd", "Burmese": "Mymr", "Canadian syllabic": "Cans", "Carian": "Cari", "Caucasian Albanian": "Aghb", "Chakma": "Cakm", "Cham": "Cham", "Cherokee": "Cher", "Chisoi": "Chis", "Clear Script": "xwo-Mong", "Coptic": "Copt", "Cuneiform": "Xsux", "Cypriot": "Cprt", "Cypro-Minoan": "Cpmn", "Cyrillic": "Cyrl", "Demotic": "Egyd", "Deseret": "Dsrt", "देवनागरी": "Deva", "Dhives Akuru": "Diak", "Dogra": "Dogr", "Dongba": "Nkdb", "Duployan": "Dupl", "Egyptian hieroglyphic": "Egyp", "Elbasan": "Elba", "Elymaic": "Elym", "Ethiopic": "Ethi", "Fraktur": "Latf", "Fraser": "Lisu", "Gaelic": "Latg", "Garay": "Gara", "Geba": "Nkgb", "Georgian": "Geor", "Glagolitic": "Glag", "Gothic": "Goth", "Grantha": "Gran", "Greek": "Grek", "Gujarati": "Gujr", "Gunjala Gondi": "Gong", "Gurmukhi": "Guru", "Han": "Hani", "Hangul": "Hang", "Hanifi Rohingya": "Rohg", "Hanunoo": "Hano", "Hatran": "Hatr", "Hebrew": "Hebr", "Hieratic": "Egyh", "Hiragana": "Hira", "Image-rendered": "Image", "Imperial Aramaic": "Armi", "Indus": "Inds", "Inscriptional Pahlavi": "Phli", "Inscriptional Parthian": "Prti", "International Phonetic Alphabet": "Ipach", "Japanese": "Jpan", "Javanese": "Java", "Jurchen": "Jurc", "Kaithi": "Kthi", "Kana": "Hrkt", "Kannada": "Knda", "Katakana": "Kana", "Kawi": "Kawi", "Kayah Li": "Kali", "Kharoshthi": "Khar", "Khema": "Gukh", "Khitan large": "Kitl", "Khitan small": "Kits", "Khmer": "Khmr", "Khojki": "Khoj", "Khom Thai": "Khomt", "Khudabadi": "Sind", "Khutsuri": "Geok", "Khwarezmian": "Chrs", "Kirat Rai": "Krai", "Korean": "Kore", "Kpelle": "Kpel", "Kulitan": "Kulit", "Lai Tay": "Tayo", "Lao": "Laoo", "Latin": "Latn", "Leke": "Leke", "Lepcha": "Lepc", "Limbu": "Limb", "Linear A": "Lina", "Linear B": "Linb", "Loma": "Loma", "Lontara": "Bugi", "Lycian": "Lyci", "Lydian": "Lydi", "Mahajani": "Mahj", "Makasar": "Maka", "Malayalam": "Mlym", "Manchu": "mnc-Mong", "Mandaic": "Mand", "Manichaean": "Mani", "Marchen": "Marc", "Masaram Gondi": "Gonm", "Maya": "Maya", "Medefaidrin": "Medf", "Meitei Mayek": "Mtei", "Mende": "Mend", "Meroitic cursive": "Merc", "Meroitic hieroglyphic": "Mero", "Modi": "Modi", "Mongolian": "Mong", "Moon": "Moon", "Morse code": "Morse", "Mru": "Mroo", "Multani": "Mult", "Mundari Bani": "Nagm", "N'Ko": "Nkoo", "Nabataean": "Nbat", "Nandinagari": "Nand", "New Tai Lue": "Talu", "Newa": "Newa", "Northeastern Iberian": "Ibrnn", "Nyiakeng Puachue Hmong": "Hmnp", "Nüshu": "Nshu", "Odia": "Orya", "Ogham": "Ogam", "Ol Chiki": "Olck", "Ol Onal": "Onao", "Old Cyrillic": "Cyrs", "Old Hungarian": "Hung", "Old Italic": "Ital", "Old Permic": "Perm", "Old Persian": "Xpeo", "Old Sogdian": "Sogo", "Old Turkic": "Orkh", "Old Uyghur": "Ougr", "Osage": "Osge", "Osmanya": "Osma", "Pahawh Hmong": "Hmng", "Palmyrene": "Palm", "Pau Cin Hau": "Pauc", "Pazend": "pal-Avst", "Phags-pa": "Phag", "Phoenician": "Phnx", "Pollard": "Plrd", "Proto-Cuneiform": "Pcun", "Proto-Elamite": "Pelm", "Proto-Sinaitic": "Psin", "Psalter Pahlavi": "Phlp", "Ranjana": "Ranj", "Rejang": "Rjng", "Rongorongo": "Roro", "Rumi numerals": "Rumin", "Runic": "Runr", "Samaritan": "Samr", "Saurashtra": "Saur", "Shahmukhi": "Aran", "Sharada": "Shrd", "Shavian": "Shaw", "Siddham": "Sidd", "Sidetic": "Sidt", "SignWriting": "Sgnw", "Simplified Han": "Hans", "Sinhalese": "Sinh", "Sogdian": "Sogd", "Sorang Sompeng": "Sora", "Southeastern Iberian": "Ibrns", "Soyombo": "Soyo", "Sui": "Shui", "Sundanese": "Sund", "Sunuwar": "Sunu", "Sylheti Nagri": "Sylo", "Syriac": "Syrc", "Tagbanwa": "Tagb", "Tai Nüa": "Tale", "Tai Tham": "Lana", "Tai Viet": "Tavt", "Takri": "Takr", "Tamil": "Taml", "Tamyig": "sit-tam-Tibt", "Tangsa": "Tnsa", "Tangut": "Tang", "Telugu": "Telu", "Tengwar": "Teng", "Thaana": "Thaa", "Thai": "Thai", "Tibetan": "Tibt", "Tifinagh": "Tfng", "Tigalari": "Tutg", "Tirhuta": "Tirh", "Todhri": "Todr", "Tolong Siki": "Tols", "Toto": "Toto", "Traditional Han": "Hant", "Ugaritic": "Ugar", "Vai": "Vaii", "Varang Kshiti": "Wara", "Visible Speech": "Visp", "Vithkuqi": "Vith", "Wancho": "Wcho", "Woleai": "Wole", "Xibe": "sjo-Mong", "Yezidi": "Yezi", "Yi": "Yiii", "Zanabazar Square": "Zanb", "Zhuyin": "Bopo", "Znamenny musical notation": "Zname", "flag semaphore": "Semap", "mathematical notation": "Zmth", "musical notation": "Music", "symbolic": "Zsym", "uncoded": "Zzzz", "undetermined": "Zyyy", "unspecified": "None", "unwritten": "Zxxx" } niv67oiptd1ughx50cwo2of6a21dhfi কৃষক 0 306988 487896 487889 2026-09-03T13:38:41Z SM7 6218 +added tl:wp for testing 487896 wikitext text/x-wiki ==असमिया== {{wp|as:কৃষি}} ===व्युत्पत्ति=== {{lbor|as|sa|कृषक}}. ===संज्ञा=== {{as-noun}} # [[कृषक]] # [[किसान]] === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # खेती-बारी करने वाला, कृषक। (पुल्लिंग) {{C|as|लोग}} [[श्रेणी:हिन्दी-प्रकाशितकोशों से अर्थ-हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश]] ==बंगाली== ===व्युत्पत्ति=== {{lbor|bn|sa|कृषक}}. ===उच्चारण=== {{bn-IPA}} ===संज्ञा=== {{bn-noun}} # [[किसान]], [[कृषक]], खेतीबाड़ी करने वाला। {{C|bn|लोग}} 46yinkxvd5ltkcs2ijf4f1gv2ccqrw3 मॉड्यूल:data/namespaces 828 307002 487894 2026-09-03T13:30:22Z SM7 6218 अंग्रेजी विक्षनरी से आयातित 487894 Scribunto text/plain local data = {} local gsub = string.gsub local next = next local ulower = require("Module:string utilities").lower for _, namespace in next, mw.site.namespaces do local prefix = ulower((gsub(namespace.name, "_", " "))) data[prefix] = prefix for _, alias in next, namespace.aliases do data[ulower((gsub(alias, "_", " ")))] = prefix end end return data qbasf1wuit8dmyo26k8ojua3okgfc5l मॉड्यूल:data/interwikis 828 307003 487895 2026-09-03T13:32:29Z SM7 6218 अंग्रेजी विक्षनरी से आयातित 487895 Scribunto text/plain local data = {} local gsub = string.gsub local next = next local ulower = require("Module:string utilities").lower for _, interwiki in next, mw.site.interwikiMap() do data[ulower((gsub(interwiki.prefix, "_", " ")))] = interwiki.isCurrentWiki and "current" or interwiki.isLocal and "local" or "external" end return data sj16ikp1xmfv7lsala0b7bnu9dlinm5 साँचा:wikipedia/doc 10 307004 487897 2026-09-03T13:41:32Z SM7 6218 अंग्रेजी विक्षनरी से आयातित 487897 wikitext text/x-wiki {{documentation subpage}} {{shortcut|wp}} {{uses lua|interproject}} This template shows a right-floating sister-project box with a link to a Wikipedia page. The template should be placed inside the section it refers to, immediately after the header. In the default case (a reference to the English Wikipedia) that is immediately following the <code>==English==</code> header. If there are also images, box templates such as this should appear first. Alternatively, consider linking to Wikipedia in the "Further reading" section using the inline template {{temp|pedia}}.<ref>Some editors prefer inline linking in all cases, but there is currently no consensus for one approach over the other. See, for example, [[Wiktionary:Beer_parlour/2017/June#Where_to_place_%7B%7Bwikipedia%7D%7D_templates?|this 2017 Beer Parlour discussion]]. As of Feb 2021, {{temp|wikipedia}} had about 225,000 mainspace transclusions compared to about 28,000 for inline {{temp|pedia}}.</ref> ==Parameters== All parameters are optional. ; {{para|1}} : Specifies the Wikipedia page(s) to link to, comma-separated (with no space following the comma). By default, this is the same as the name of the current Wiktionary page. More specifically: :# If the language is other than English, prefix the page with the Wikimedia language code (see [[Wiktionary:Wikimedia language codes]]) of the Wikipedia version to link to. This is not necessarily the same as the Wiktionary-internal language code; it supports language codes that are not allowed on Wiktionary itself, such as {{cd|hr}} for Croatian, and occasionally different codes are used for the same language. :# Separate multiple pages with a comma (with no space following). If a language code is specified for a given page, it becomes the default for the next page, so e.g. {{tl|wp|de:Laubach,Landkreis Gießen}} (or just {{tl|wp|de:,Landkreis Gießen}}, if used on the Wiktionary page [[Laubach]]) will link to two articles {{w|lang=de|Laubach}} and {{w|lang=de|Landkreis Gießen}} on the German Wikipedia. The default for the first specified page is English ({{cd|en:}}). If the Wikipedia page contains a literal comma not followed by a space, put brackets around the link. For example, to link to an article {{w|lang=it|1,2-dicloroetano}} on the Italian Wikipedia, use {{tl|wp|<nowiki>it:[[1,2-dicloroetano]]</nowiki>}}. :# Use the syntax <code><nowiki>[[</nowiki><var>page</var>|<var>display-form</var><nowiki>]]</nowiki></code> to link to a page named <code><var>page</var></code> but display it as <code><var>display-form</var></code>. Language codes go outside the brackets; thus, use {{tl|<nowiki>yo:[[Bùrúndì|Bùrúńdì]]</nowiki>}} to link to the Yoruba Wikipedia article {{w|lang=yo|Bùrúndì}} while displaying it as {{cd|Bùrúńdì}} (note the difference between the article and the display form: the display form has an acute accent over the ''n''). :# To link to a specific section of a given article, place the section name after a {{cd|#}}, e.g. {{tl|wp|Edward#People surnamed Edward}} to link to the section titled {{cd|People surnamed Edward}} on the page {{w|Edward}}. :# A {{cd|+}} anywhere in a given Wikipedia link is replaced with the name of the current Wiktionary page. Thus, {{tl|wp|+#People surnamed +}} is equivalent to {{tl|wp|Edward#People surnamed Edward}} if used on the Wiktionary page [[Edward]], and {{tl|wp|<nowiki>[[+#Places in the United States|+ (places)]]</nowiki>}} is equivalent to {{tl|wp|<nowiki>[[English#Places in the United States|English (places)]]</nowiki>}} if used on the Wiktionary page [[English]]. The {{cd|+}} does not have to be a word by itself; e.g. on the page [[October]], {{tl|wp|+ing}} links to {{w|Octobering}}. To include a literal {{cd|+}} sign in a link, prefix it with a backslash, i.e. {{cd|\+}}. :# The inline modifier {{cd|<dab>}} placed after an article name links to a disambiguation page. The inline modifier {{cd|<dab!>}} is similar but includes the text {{cd| (disambiguation)}} in the display form, while {{cd|<dab>}} does not. Thus, on the page [[GDP]], {{tl|wp|<dab>}} or {{tl|wp|+<dab>}} is equivalent to writing {{tl|wp|<nowiki>[[GDP (disambiguation)|GDP]]</nowiki>}}, and on the page [[pie]], {{tl|wp|<dab!>}} or {{tl|wp|+<dab!>}} is equivalent to writing {{tl|wp|<nowiki>[[pie (disambiguation)]]</nowiki>}}. The text will be localized for the target language with [[Module:interproject/data/disambiguation]]; missing languages default to English. ; {{para|cat}} or {{para|category}} : Specifies the Wikipedia category or categories to link to. The syntax is identical to that used in {{para|1}}. ; {{para|portal}} : Specifies the Wikipedia portal page(s) to link to. The syntax is identical to that used in {{para|1}}. Currently, you cannot mix article links with category and/or portal links; to do this, use separate invocations of {{tl|wp}}. ==Examples== {| class="wikitable" ! Wikicode ! Output |- | {{demo2c|<nowiki>{{wp|afterlife}}</nowiki>}} |- | {{demo2c|<nowiki>{{wp|[[Trunk (botany)|trunk]]}}</nowiki>}} |- | {{demo2c|<nowiki>{{wp|it:Roma}}</nowiki>}} |- | {{demo2c|<nowiki>{{wp|wrong<dab>}}</nowiki>}} |- | {{demo2c|<nowiki>{{wp|monarchy,kingdom (biology)}}</nowiki>}} |- | {{demo2c|<nowiki>{{wp|[[monarchy|tyranny]],[[kingdom (biology)|lionny]]}}</nowiki>}} |- | {{demo2c|<nowiki>{{wp|cat=colors}}</nowiki>}} |- | {{demo2c|<nowiki>{{wp|cat=colors,national colours}}</nowiki>}} |- | {{demo2c|<nowiki>{{wp|cat=es:[[colores|colors]],[[pintura|painting]]}}</nowiki>}} |- | {{demo2c|<nowiki>{{wp|portal=energy}}</nowiki>}} |- | {{demo2c|<nowiki>{{wp|Trial#Mistrials}}</nowiki>}} |- | {{demo2c|<nowiki>{{wp|zh:,yue:,lzh:,gan:,hak:súi,cdo:cūi,nan:chúi,wuu:|pagename=水}}</nowiki>}} |} ==See also== * {{temp|slim-wikipedia}} — visually slimmer version of this template * {{temp|w}} — plain inline link * {{temp|pedia}} — for citing pages * {{temp|quote-wikipedia}} — for quoting pages * {{temp|uw-notwikipedia}} ==Notes== {{reflist}} ==TemplateData== {{TemplateData header}} <templatedata> { "params": { "1": { "label": "Article to link", "example": "color", "type": "line", "description": "Article to link to on the Wikipedia", "default": "{{subst:BASEPAGENAME}}", "suggested": true }, "2": { "label": "Link label", "description": "If provided, overrides the displayed form of the link", "type": "line", "example": "colors", "deprecated": true }, "lang": { "label": "Language code", "description": "Wikipedia language code for the Wikipedia language to link", "example": "es", "type": "line", "default": "en", "deprecated": true }, "mul": { "label": "Second article to link", "description": "Provides a second article to link to", "example": "painting", "type": "line", "deprecated": true }, "mullabel": { "label": "Second article label", "description": "Overrides the displayed form of the second link.", "example": "paintings", "type": "line", "deprecated": true }, "cat": { "aliases": [ "category" ], "label": "Category to link", "description": "Category to link on Wikipedia, instead of an article", "example": "colors", "type": "line" }, "portal": { "label": "Portal to link", "description": "Portal to link on Wikipedia, instead of an article", "example": "energy", "type": "line" }, "mulcat": { "label": "Second category to link", "description": "Second category to link on Wikipedia, replacing the second article link", "type": "line", "deprecated": true }, "mulcatlabel": { "label": "Second category label", "description": "If provided, overrides the displayed form of the second category", "type": "line", "deprecated": true }, "section": { "label": "Section", "description": "Section to link on Wikipedia", "type": "string", "deprecated": true } }, "description": "Links Wikipedia in a box that floats to the right", "format": "{{_| _ = _}}\n", "paramOrder": [ "1", "cat", "portal", "2", "lang", "section", "mul", "mullabel", "mulcat", "mulcatlabel" ] } </templatedata> <includeonly> [[Category:Sidebar interwiki link templates]] </includeonly> 04rjf994puhim5m1rho7pmmmqp0pam1 मीडियाविकि:Gadget-VisibilityToggles.js 8 307005 487901 2026-09-03T14:05:48Z SM7 6218 from enwikt 487901 javascript text/javascript /* eslint-env es5, browser, jquery */ /* eslint semi: "error" */ /* jshint esversion: 5, eqeqeq: true */ /* globals $, mw */ /* requires mw.cookie, mw.storage */ (function VisibilityTogglesIIFE () { "use strict"; // Toggle object that is constructed so that `toggle.status = !toggle.status` // automatically calls either `toggle.show()` or `toggle.hide()` as appropriate. // Creating toggle also automatically calls either the show or the hide function. function Toggle (showFunction, hideFunction) { this.show = showFunction, this.hide = hideFunction; } Toggle.prototype = { get status () { return this._status; }, set status (newStatus) { if (typeof newStatus !== "boolean") throw new TypeError("Value of 'status' must be a boolean."); if (newStatus === this._status) return; this._status = newStatus; if (this._status !== this.toggleCategory.status) this.toggleCategory.updateToggle(this._status); if (this._status) this.show(); else this.hide(); }, }; /* * Handles storing a boolean value associated with a `name` stored in * localStorage under `key`. * * The `get` method returns `true`, `false`, or `undefined` (if the storage * hasn't been tampered with). * The `set` method only allows setting `true` or `false`. */ function BooleanStorage(key, name) { if (typeof key !== "string") throw new TypeError("Expected string"); if (!(typeof name === "string" && name !== "")) { throw new TypeError("Expected non-empty string"); } this.key = key; // key for localStorage this.name = name; // name of toggle category function convertOldCookie(cookie) { return cookie.split(';') .filter(function(e) { return e !== ''; }) .reduce(function(memo, currentValue) { var match = /(.+?)=(\d)/.exec(currentValue); // only to test for temporary =[01] format if (match) { memo[match[1]] = Boolean(Number(match[2])); } else { memo[currentValue] = true; } return memo; }, {}); } // Look for cookie in old format. var cookie = mw.cookie.get(key); if (cookie !== null) { this.obj = $.extend(this.obj, convertOldCookie(cookie)); mw.cookie.set(key, null); // Remove cookie. } } BooleanStorage.prototype = { get: function () { return this.obj[this.name]; }, set: function (value) { if (typeof value !== "boolean") throw new TypeError("Expected boolean"); var obj = this.obj; if (obj[this.name] !== value) { obj[this.name] = value; this.obj = obj; } }, // obj allows getting and setting the object version of the stored value. get obj() { if (typeof this.rawValue !== "string") return {}; try { return JSON.parse(this.rawValue); } catch (e) { if (e instanceof SyntaxError) { return {}; } else { throw e; } } }, set obj(value) { // throws TypeError ("cyclic object value") this.rawValue = JSON.stringify(value); }, // rawValue allows simple getting and setting of the stringified object. get rawValue () { return mw.storage.get(this.key); }, set rawValue (value) { return mw.storage.set(this.key, value); }, }; // This is a version of the actual CSS identifier syntax (described here: // https://stackoverflow.com/a/2812097), with only ASCII and that must begin // with an alphabetic character. var asciiCssIdentifierRegex = /^[a-zA-Z][a-zA-Z0-9_-]+$/; function ToggleCategory (name, defaultStatus) { this.name = name; this.sidebarToggle = this.newSidebarToggle(); this.storage = new BooleanStorage("Visibility", name); this.status = this.getInitialStatus(defaultStatus); } // Have toggle category inherit array methods. ToggleCategory.prototype = []; ToggleCategory.prototype.addToggle = function (showFunction, hideFunction) { var toggle = new Toggle(showFunction, hideFunction); toggle.toggleCategory = this; this.push(toggle); toggle.status = this.status; return toggle; }; // Generate an identifier consisting of a lowercase ASCII letter and a random integer. function randomAsciiCssIdentifier() { var digits = 9; var lowCodepoint = "a".codePointAt(0), highCodepoint = "z".codePointAt(0); return String.fromCodePoint( lowCodepoint + Math.floor(Math.random() * (highCodepoint - lowCodepoint))) + String(Math.floor(Math.random() * Math.pow(10, digits))); } function getCssIdentifier(name) { name = name.replace(/\s+/g, "-"); // Generate a valid ASCII CSS identifier. if (!asciiCssIdentifierRegex.test(name)) { // Remove characters that are invalid in an ASCII CSS identifier. name = name.replace(/^[^a-zA-Z]+/, "").replace(/[^a-zA-Z_-]+/g, ""); if (!asciiCssIdentifierRegex.test(name)) name = randomAsciiCssIdentifier(); } return name; } // Add a new global toggle to the sidebar. ToggleCategory.prototype.newSidebarToggle = function () { var name = getCssIdentifier(this.name); var id = "p-visibility-" + name; var sidebarToggle = $("#" + id); if (sidebarToggle.length > 0) return sidebarToggle; var listEntry = $("<li>"); if (mw.config.get("skin") === "vector-2022") listEntry.addClass("mw-list-item"); sidebarToggle = $("<a>", { id: id, href: "#visibility-" + this.name, }) .click((function () { this.status = !this.status; this.storage.set(this.status); return false; }).bind(this)); listEntry.append(sidebarToggle).appendTo(this.buttons); return sidebarToggle; }; // Update the status of the sidebar toggle for the category when all of its // toggles on the page are toggled one way. ToggleCategory.prototype.updateToggle = function (status) { if (this.length > 0 && this.every(function (toggle) { return toggle.status === status; })) this.status = status; }; // getInitialStatus is only called when a category is first created. ToggleCategory.prototype.getInitialStatus = function (defaultStatus) { function isFragmentSet(name) { return location.hash.toLowerCase().split("_")[0] === "#" + name.toLowerCase(); } function isHideCatsSet(name) { var match = /^.+?\?(?:.*?&)*?hidecats=(.+?)(?:&.*)?$/.exec(location.href); if (match !== null) { var hidecats = match[1].split(","); for (var i = 0; i < hidecats.length; ++i) { switch (hidecats[i]) { case name: case "all": return false; case "!" + name: case "none": return true; } } } return false; } function isWiktionaryPreferencesCookieSet() { return mw.cookie.get("WiktionaryPreferencesShowNav") === "true"; } // TODO check category-specific cookies return isFragmentSet(this.name) || isHideCatsSet(this.name) || isWiktionaryPreferencesCookieSet() || (function(storedValue) { return storedValue !== undefined ? storedValue : Boolean(defaultStatus); }(this.storage.get())); }; Object.defineProperties(ToggleCategory.prototype, { status: { get: function () { return this._status; }, set: function (status) { if (typeof status !== "boolean") throw new TypeError("Value of 'status' must be a boolean."); if (status === this._status) return; this._status = status; // Change the state of all Toggles in the ToggleCategory. for (var i = 0; i < this.length; i++) this[i].status = status; this.sidebarToggle.text((status ? "Hide " : "Show ") + this.name); }, }, buttons: { get: function () { var buttons = $("#p-visibility ul"); if (buttons.length > 0) return buttons; buttons = $("<ul>"); // unused var collapsed = mw.cookie.get("vector-nav-p-visibility") === "false"; if (mw.config.get("skin") === "vector-2022") { /* add to right-hand side ('tools') bar */ var toolbox = $("<div>", { "class": "vector-menu mw-portlet mw-portlet-visibility", "id": "p-visibility" }) .append($('<div id="p-visibility-label" aria-label="" class="vector-menu-heading">Visibility</div>')) .append($("<div>", { class: "vector-menu-content" }).append(buttons.addClass("vector-menu-content-list"))); $('#vector-page-tools').append(toolbox); } else { var toolbox = $("<div>", { "class": "vector-menu vector-menu-portal portal portlet", "id": "p-visibility" }) .append($('<label id="p-visibility-label" aria-label="" class="vector-menu-heading"><span class="vector-menu-heading-label">Visibility</span></label>')) .append($("<div>", { class: "pBody body vector-menu-content" }).append(buttons)); var insert = document.getElementById("p-lang") || document.getElementById("p-feedback"); if (insert) { $(insert).before(toolbox); } else { var sidebar = document.getElementById("mw-panel") || document.getElementById("column-one"); $(sidebar).append(toolbox); } } return buttons; } } }); function VisibilityToggles () { // table containing ToggleCategories this.togglesByCategory = {}; } // Add a new toggle, adds a Show/Hide category button in the toolbar. // Returns a function that when called, calls showFunction and hideFunction // alternately and updates the sidebar toggle for the category if necessary. VisibilityToggles.prototype.register = function (category, showFunction, hideFunction, defaultStatus) { if (!(typeof category === "string" && category !== "")) return; var toggle = this.addToggleCategory(category, defaultStatus) .addToggle(showFunction, hideFunction); return function () { toggle.status = !toggle.status; }; }; VisibilityToggles.prototype.addToggleCategory = function (name, defaultStatus) { return (this.togglesByCategory[name] = this.togglesByCategory[name] || new ToggleCategory(name, defaultStatus)); }; window.alternativeVisibilityToggles = new VisibilityToggles(); window.VisibilityToggles = window.alternativeVisibilityToggles; })(); 8qjkkje953u8o41wk9sjre7nivtbk7y साँचा:पूर्ण हुआ 10 307006 487904 2026-09-03T14:11:08Z SM7 6218 SM7 ने पृष्ठ [[साँचा:पूर्ण हुआ]] को [[साँचा:done]] पर स्थानांतरित किया 487904 wikitext text/x-wiki #पुनर्प्रेषित [[साँचा:done]] a1p5evulfeip4blqaucea76tvygwf2t मॉड्यूल:translations/styles.css 828 307007 487911 2026-09-03T15:33:40Z SM7 6218 अंग्रेजी विक्षनरी से आयातित 487911 sanitized-css text/css .translations { width: 100%; margin: 0; } .translations-cell { background-color: var(--wikt-palette-lightyellow, #FFFFe0); vertical-align: top; text-align: left; } 1mxnmdylu4jjj658zjlpeihbd9dnfc0 मॉड्यूल:anchors 828 307008 487921 2026-09-03T16:07:55Z SM7 6218 अंग्रेजी विक्षनरी से आयातित 487921 Scribunto text/plain local export = {} local string_utilities_module = "Module:string utilities" local anchor_encode = mw.uri.anchorEncode local concat = table.concat local insert = table.insert local language_anchor -- Defined below. local function decode_entities(...) decode_entities = require(string_utilities_module).decode_entities return decode_entities(...) end local function encode_entities(...) encode_entities = require(string_utilities_module).encode_entities return encode_entities(...) end -- Returns the anchor text to be used as the fragment of a link to a language section. function export.language_anchor(lang, id) return anchor_encode(lang:getFullName() .. ": " .. id) end language_anchor = export.language_anchor -- Normalizes input text (removes formatting etc.), which can then be used as an anchor in an `id=` field. function export.normalize_anchor(str) return decode_entities(anchor_encode(str)) end function export.make_anchors(ids) local anchors = {} for i = 1, #ids do local id = ids[i] local el = mw.html.create("span") :addClass("template-anchor") :attr("id", anchor_encode(id)) :attr("data-id", id) insert(anchors, tostring(el)) end return concat(anchors) end function export.senseid(lang, id, tag_name) -- The following tag is opened but never closed, where is it supposed to be closed? -- with <li> it doesn't matter, as it is closed automatically. -- with <p> it is a problem -- Cannot use mw.html here as it always closes tags return "<" .. tag_name .. " class=\"senseid\" id=\"" .. language_anchor(lang, id) .. "\" data-lang=\"" .. lang:getCode() .. "\" data-id=\"" .. encode_entities(id) .. "\">" end function export.etymid(lang, id) -- Use a <ul> tag to ensure spacing doesn't get messed up. local el = mw.html.create("ul") :addClass("etymid") :attr("id", language_anchor(lang, id)) :attr("data-lang", lang:getCode()) :attr("data-id", id) return tostring(el) end function export.etymonid(lang, id, opts) opts = opts or {} -- Use a <ul> tag to ensure spacing doesn't get messed up. local el = mw.html.create("ul") :addClass("etymonid") :attr("data-lang", lang:getCode()) if id then el:attr("id", language_anchor(lang, id)) el:attr("data-id", id) end if opts.no_tree then el:attr("data-no-tree", "1") end if opts.title then el:attr("data-title", opts.title) end if opts.empty_tree then el:attr("data-empty-tree", "1") end if opts.ety_tree_json then el:attr("data-ety-tree-json", opts.ety_tree_json) end return tostring(el) end return export 2o0jqln8y0bxvpfhe66eogs2k88qkap मॉड्यूल:anchors/templates 828 307009 487922 2026-09-03T16:09:21Z SM7 6218 अंग्रेजी विक्षनरी से आयातित 487922 Scribunto text/plain -- Prevent substitution. if mw.isSubsting() then return require("Module:unsubst") end local m_anchors = require("Module:anchors") local load_data = mw.loadData local process_params = require("Module:parameters").process local export = {} function export.anchor_t(frame) return m_anchors.make_anchors(process_params(frame:getParent().args, load_data("Module:parameters/data").anchor)[1]) end function export.senseid_t(frame) local args = process_params(frame:getParent().args, load_data("Module:parameters/data").senseid) return m_anchors.senseid(args[1], args[2], args.tag) end function export.etymid_t(frame) local args = process_params(frame:getParent().args, load_data("Module:parameters/data").etymid) return m_anchors.etymid(args[1], args[2]) end return export atlebd9m4unw4xc8k1jsx8y3ma8yi81 मॉड्यूल:category tree/lang/en 828 307010 487925 2026-09-03T16:16:40Z SM7 6218 अंग्रेजी विक्षनरी से आयातित 487925 Scribunto text/plain local labels = {} labels["translation hubs"] = { description = "{{{langname}}} terms that do not mean more than the sum of their parts but are retained for the benefit of translation, per {{section link|Wiktionary:Criteria for inclusion#Translation hubs}}.", additional = "See also {{tl|translation only}}.", parents = {"entry maintenance"}, } -- Add irregular plural categories. local irregular_plurals = require("Module:form of/lang-data/en/functions").irregular_plurals labels["irregular plurals"] = { description = "{{{langname}}} irregular noun plurals.", additional = "The criteria for inclusion and singular forms can be found in [[:Category:English nouns with irregular plurals]].", parents = {{name = "noun forms", sort = "*"}}, } labels["miscellaneous irregular plurals"] = { description = "{{{langname}}} irregular noun plurals that do not fall into one of the most common irregular plural categories (e.g. [[:Category:English plurals in -ae with singular in -a|Category:English plurals in ''-ae'' with singular in ''-a'']] or [[:Category:English plurals in -men with singular in -man|Category:English plurals in ''-men'' with singular in ''-man'']]).", additional = "This mostly includes nouns whose plurals originate from a language other than Greek, Latin, Italian or French, or native irregular plurals such as {{m|en|dice}} (plural of {{m|en|die}}).", parents = "irregular plurals", } local function replace_angle_brackets(text) return (text:gsub("<<(.-)>>", "{{m|en||%1}}")) end local function replace_angle_brackets_plain(text) return (text:gsub("<<(.-)>>", "%1")) end for _, irreg_plural in ipairs(irregular_plurals) do local cat, description = irreg_plural.cat, irreg_plural.description if not description then description = cat local desc_suffix = irreg_plural.desc_suffix if desc_suffix then description = description .. desc_suffix end description = "English " .. description .. "." end local breadcrumb = irreg_plural.breadcrumb if not breadcrumb then breadcrumb = cat:match("^plurals in (.*)") or cat:match("^plurals with (.*)") or cat end local additional = irreg_plural.additional labels[replace_angle_brackets_plain(cat)] = { description = replace_angle_brackets(description), additional = additional and replace_angle_brackets(additional), displaytitle = replace_angle_brackets("English " .. cat), breadcrumb = replace_angle_brackets(breadcrumb), parents = {{name = "irregular plurals", sort = irreg_plural.sort_key or replace_angle_brackets_plain(breadcrumb):gsub("^%-", "")}}, } end labels["auxiliary verb forms"] = { description = "{{{langname}}} auxiliary verbs that are inflected to display grammatical relations other than the main form.", parents = {"verb forms", "auxiliary verbs"}, } labels["terms with early reduction of Middle English /iu̯r(ə)/"] = { description = "In Modern English, {{IPAchar|/jə(ɹ)/}} ({{IPAchar|/t͡ʃə(ɹ)/|/d͡ʒə(ɹ)/|/ʃə(ɹ)/|/ʒə(ɹ)/}} after historic {{IPAchar|/t/|/d/|/s/|/z/}}) is the usual reflex of unstressed Middle English {{IPAchar|/iu̯r(ə)/}}. However, in the late Middle English vernacular, there was a tendency to reduce this sound to {{IPAchar|/ir/|/ur/}}, which regularly developed to modern {{IPAchar|/ə(ɹ)/}} instead of {{IPAchar|/jə(ɹ)/}}, While forms reflecting this tendency were adopted in the standard language for some words (e.g. {{m|en|fritter}}), in others such forms were eventually relegated to nonstandard speech before becoming extinct (e.g. {{m|en|nater}} for {{m|en|nature}}).", displaytitle = "{{{langname}}} terms with early reduction of Middle English {{IPAchar|/iu̯r(ə)/}}", parents = {"terms by phonemic property"}, } labels["terms with /ɛ/ for Old English /y/"] = { description = "In [[w:Old English dialects|Kentish]] Old English, historic {{IPAchar|/y/}} became {{IPAchar|/e/}}, which regularly developed to modern {{IPAchar|/ɛ/}}. Even in Kent, these forms have been mostly replaced by those showing the usual [[w:Old English dialects|Anglian]] development to modern {{IPAchar|/ɪ/}}, but a few survive, whether in the standard language or dialectally. Note that before {{IPAchar|/ɹ/}} then a consonant, this sound has developed further to {{IPAchar|/ɜː(ɹ)/}}. Additionally, terms which never had {{IPAchar|/y/}} in the variety of Old English they come from should not be included in this category (an example is {{m|en|elder|t=senior}}, which comes from Anglian {{m|ang|eldra}}, not West Saxon {{m|ang|ieldra}}, {{m|ang|yldra}}).", displaytitle = "{{{langname}}} terms with {{IPAchar|/ɛ/}} for Old English {{IPAchar|/y/}}", parents = {"terms by phonemic property"}, } labels["terms with /ʌ~ʊ/ for Old English /y/"] = { description = "Especially in the southern West Midlands and the Southwest of England, Old English {{IPAchar|/y/}} often became Middle English {{IPAchar|/u/}} in the vicinity of a following {{IPAchar|/r/}}, labial consonant, or postalveolar consonant. Southern influence has resulted in such forms being reasonably common in the modern standard, where this {{IPAchar|/u/}} is regularly reflected as {{IPAchar|/ʌ/}}, {{IPAchar|/ʊ/}}, or before (historic) preconsonantal {{IPAchar|/ɹ/}}, {{IPAchar|/ɜ(ː)/}}.", displaytitle = "{{{langname}}} terms with {{IPAchar|/ʌ~ʊ/}} for Old English {{IPAchar|/y/}}", parents = {"terms by phonemic property"}, } labels["terms with /i/ for expected final /ə/"] = { description = "In [[rhotic]] dialects of English, final {{IPAchar|/ə/}} generally does not appear in native vocabulary; as a result, some rhotic or historically-rhotic dialects tended to use word-final {{IPAchar|/i/}} where {{IPAchar|/ə/}} occurs in the standard language. Due to the influence of the standard language and other dialects, this feature is nearly extinct, though it has been adopted in the stanard language in {{m|en|nary}} (from {{m|en|ne'er}} {{m|en|a}}).", displaytitle = "{{{langname}}} terms with {{IPAchar|/i/}} for expected final {{IPAchar|/ə/}}", parents = {"terms by phonemic property"}, } labels["terms with assimilation of historic /ɹ/"] = { description = "Beginning in the Middle English period, a tendency developed for {{IPAchar|/ɹ/}} to be assimilated before coronal consonants, especially {{IPAchar|/s/}}; this is distinct from later non-[[rhoticity]]. While forms reflecting this tendency have been adopted for some words in the standard language (such as {{m|en|bass|id=fish|t=fish}} ← {{m+|ang|bærs}}), others survive only dialectally or informally (e.g. {{m|en|hoss}}, {{m|en|passel}}).", displaytitle = "{{{langname}}} terms with assimilation of historic {{IPAchar|/ɹ/}}", parents = {"terms by phonemic property"}, } labels["terms with dissimilation of historic /ɹ/"] = { description = "Beginning in the Middle English period, a tendency developed for {{IPAchar|/ɹ/}} to be lost in words when another {{IPAchar|/ɹ/}} occured. While forms reflecting this tendency have been adopted for some words in the standard language, others survive only dialectally or informally (e.g. {{m|en|catridge}}).", displaytitle = "{{{langname}}} terms with dissimilation of historic {{IPAchar|/ɹ/}}", parents = {"terms by phonemic property"}, } labels["terms with unetymological /ɹ/"] = { description = "Many English words have acquired an unetymological {{IPAchar|/ɹ/}}, either due to either purely phonetic processes or various kinds of {{glossary|hypercorrection}} (of non-rhoticity, the [[:Category:English terms with assimilation of historic /ɹ/|assimilation of {{IPAchar|/ɹ/}} before coronals]], or [[:Category:English terms with dissimilation of historic /ɹ/|dissimilation of {{IPAchar|/ɹ/}}]]). While forms reflecting this tendency have been adopted in the standard language (e.g. {{m|en|parsnip}}), others survive only dialectally or informally (e.g. {{m|en|warsh}}).", displaytitle = "{{{langname}}} terms with unetymological {{IPAchar|/ɹ/}}", parents = {"hypercorrections"}, } labels["terms with unexpected final devoicing"] = { description = "In prehistoric Old English, final fricatives were {{w|final-obstruent devoicing|devoiced}}; compare {{m+|ang|līf}} to {{m+|goh|līb|t=life}}. In standard English, this process did not affect {{glossary|plosive|plosives}} (e.g. {{m|en|road}}) or secondary word-final fricatives (e.g. {{m|en|love}}), but some dialects devoiced these consonants, especially when unstressed (this was particularly common in Middle English). No modern variety universally has this devoicing, but some devoiced forms survive dialectally (e.g. {{m|en|anythink}}) or have been adopted in the standard language (most notably in the past tense of some irregular verbs, such as {{m|en|sent}}, aided by analogy with e.g. {{m|en|kept}}).", parents = {"terms by phonemic property"}, } labels["terms with Middle English front rounded vowel spellings"] = { description = "In Southern and southern West Midland Middle English, Old English ''y̆ ȳ'' {{IPAchar|/y/|/yː/}} retained their rounding, while ''ĕo ēo'' {{IPAchar|/eo̯/|/eːo̯/}} developed into the mid front rounded vowels {{IPAchar|/œ/|/øː/}}. While these vowels were eventually unrounded to {{IPAchar|/i/|/iː/}} and {{IPAchar|/ɛ/|/eː/}} respectively in Late Middle English in a recapitulation of the development that other dialects underwent earlier, the associated spellings ''u, ui, uy'' (especially for {{IPAchar|/y/|/yː/}}) and ''eo, eu, oe, ue'' (especially for {{IPAchar|/œ/|/øː/}}) are occasionally retained in Modern English due to these dialects’ influence, especially in placenames.", parents = {"terms by orthographic property"}, } labels["terms with Middle English initial fricative voicing"] = { description = "In Kentish, Southern, and Southwest Midland Middle English, the fricatives {{IPAchar|/f θ s ʃ/}} were voiced to {{IPAchar|/v ð z ʒ/}} at the beginning of a word or morpheme. This change has gradually been reversed due to the influence of the East Midland standard, but this was recent enough to leave traces in dialect literature in many regions, while relic items persist even today, whether dialectally or in the standard language. Terms where historically voiceless initial fricatives have come to be voiced due to other processes, such as borrowings from other Germanic languages with analogous sound changes, should not be included in this category.", parents = {"terms by phonemic property"}, } labels["terms with unraised Middle English /ɛː/"] = { description = "Middle English and Early Modern English {{IPAchar|/ɛː/}} regularly becomes {{IPAchar|/iː/}} ({{IPAchar|/ɪə/}}/{{IPAchar|/ɪ(ə)ɹ/}} before earlier preconsonantal {{IPAchar|/ɹ/}}) in the modern standard, but in some lexical items it has exceptionally developed to {{IPAchar|/eɪ/}} ({{IPAchar|/ɛː/}}/{{IPAchar|/ɛ(ə)ɹ/}} before earlier preconsonantal {{IPAchar|/ɹ/}}) due to dialectal influence. This category also includes dialectal forms where {{IPAchar|[eɪ]}} or something like it (commonly {{IPAchar|[eː]}}) is a more typical development, such as {{m|en|Jaysus}}, {{m|en|tay}}.", displaytitle = "{{{langname}}} terms with unraised Middle English {{IPAchar|/ɛː/}}", parents = {"terms by phonemic property"}, } labels["terms with Middle English prothetic /j w/"] = { description = "In Late Middle English, long vowels tended to develop a prothetic semivowel when word-initial or following {{IPAchar|/h/}}; {{IPAchar|/j/}} when preceding a front vowel, while {{IPAchar|/w/}} when preceding a back vowel. While forms reflecting this tendency have been adopted in the standard language (e.g. {{m|en|one}}, {{m|en|yew}}), others survive only dialectally or informally (e.g. {{m|en|wold|t=old}}). in some dialects, this process has been extended to post-consonantal position (e.g. {{m|en|tyebble}}); this category does not include such forms.", displaytitle = "{{{langname}}} terms with Middle English prothetic {{IPAchar|/j w/}}", parents = {"terms by phonemic property"}, } labels["terms with open-syllable lengthening of Middle English /i u/"] = { description = "In Northern Middle English, Old English {{IPAchar|/i/|/u/}} often lengthened to {{IPAchar|/eː/|/oː/}} in stressed open syllables of multisyllabic words. Though the majority of forms with this development have been replaced with those displaying the reflex of unlengthened vowels in modern Northern English dialects and Scots, some have either remained dialectally (e.g. {{m|en|aboon}}) or entered the standard language (e.g. {{m|en|week}}) due to the southward dissemination of lengthened forms in later Middle English.", displaytitle = "{{{langname}}} terms with open-syllable lengthening of Middle English {{IPAchar|/i u/}}", parents = {"terms by phonemic property"}, } labels["terms with unexpected syllabic -ed"] = { description = "English words with ⟨-ed⟩ pronounced {{IPAchar|/əd/}} or {{IPAchar|/ɪd/}} after a vowel or after a consonant other than {{IPAchar|/d/}} or {{IPAchar|/t/}}.", parents = {"terms by phonemic property"}, } labels["terms with initial /t͡s/"] = { description = "The [[w:voiceless alveolar affricate|voiceless alveolar affricate]] ({{IPAchar|/t͡s/}}) does not occur at the beginning of native English words, but words containing it have been borrowed into English from a number of other languages, including German, Greek, Hebrew, Japanese, Russian, Tswana, and Yiddish and can usually be identified by the prefix ''ts-'' or ''tz-'' (more rarely ''cz-'' or ''z-''). In less formal speech, the sound may be substituted by {{IPAchar|/s/}}, {{IPAchar|/z/}} or rarely {{IPAchar|/t/}}.", displaytitle = "{{{langname}}} terms with initial {{IPAchar|/t͡s/}}", parents = {"terms by phonemic property"}, } labels["terms with /x/"] = { description = "The [[w:voiceless velar fricative|voiceless velar fricative]] ({{IPAchar|/x/}}) fell out of use in most English dialects, but survived in Scottish English and has subsequently been reborrowed into other dialects. In addition, some words borrowed from other languages such as German and Hebrew also include this sound. Speakers who struggle to produce {{IPAchar|/x/}} usually substitute {{IPAchar|/k/}}, or in cases where the sound occurs at the beginning of a word, {{IPAchar|/h/}}.", displaytitle = "{{{langname}}} terms with {{IPAchar|/x/}}", parents = {"terms by phonemic property"}, } labels["productive prefixes"] = { description = "{{{langname}}} prefixes that have been used recently to form new words.", parents = {"prefixes"}, } labels["productive suffixes"] = { description = "{{{langname}}} suffixes that have been used recently to form new words.", parents = {"suffixes"}, } labels["unproductive prefixes"] = { description = "{{{langname}}} prefixes that are no longer used to form new words.", parents = {"prefixes"}, } labels["unproductive suffixes"] = { description = "{{{langname}}} suffixes that are no longer used to form new words.", parents = {"suffixes"}, } return {LABELS = labels} cwp0gbmrpci8kkoo97633qpdmdjetsg मॉड्यूल:form of/lang-data/en/functions 828 307011 487926 2026-09-03T16:59:48Z SM7 6218 अंग्रेजी विक्षनरी से आयातित 487926 Scribunto text/plain --[=[ This module contains lang-specific functions for English. TODO: * Handle alternative forms in umlaut more elegantly. * Enable multiple categories (e.g. umlaut and plural in -n). * Handle dobuled-consonants with Germanic plurals (e.g. "Yid" to "Yidden"). * Handle trivial consonant changes in umlaut plurals (e.g. "cow" to "kine"). ]=] local en_utilities_module = "Module:en-utilities" local headword_data_module = "Module:headword/data" local links_module = "Module:links" local load_module = "Module:load" local string_utilities_module = "Module:string utilities" local table_module = "Module:table" local utilities_module = "Module:utilities" local ipairs = ipairs local require = require local toNFD = mw.ustring.toNFD local type = type --[==[ Loaders for functions in other modules, which overwrite themselves with the target function when called. This ensures modules are only loaded when needed, retains the speed/convenience of locally-declared pre-loaded functions, and has no overhead after the first call, since the target functions are called directly in any subsequent calls.]==] local function get_fragment(...) get_fragment = require(links_module).get_fragment return get_fragment(...) end local function remove_links(...) remove_links = require(links_module).remove_links return remove_links(...) end local function get_link_page(...) get_link_page = require(links_module).get_link_page return get_link_page(...) end local function insert_if_not(...) insert_if_not = require(table_module).insertIfNot return insert_if_not(...) end local function is_regular_plural(...) is_regular_plural = require(en_utilities_module).is_regular_plural return is_regular_plural(...) end local function load_data(...) load_data = require(load_module).load_data return load_data(...) end local function pattern_escape(...) pattern_escape = require(string_utilities_module).pattern_escape return pattern_escape(...) end local function remove_possessive(...) remove_possessive = require(en_utilities_module).remove_possessive return remove_possessive(...) end local function split(...) split = require(string_utilities_module).split return split(...) end local function u(...) u = require(string_utilities_module).char return u(...) end local function ugsub(...) ugsub = require(string_utilities_module).gsub return ugsub(...) end local function ulower(...) ulower = require(string_utilities_module).lower return ulower(...) end local function umatch(...) umatch = require(string_utilities_module).match return umatch(...) end --[==[ Loaders for objects, which load data (or some other object) into some variable, which can then be accessed as "foo or get_foo()", where the function get_foo sets the object to "foo" and then returns it. This ensures they are only loaded when needed, and avoids the need to check for the existence of the object each time, since once "foo" has been set, "get_foo" will not be called again.]==] local diacritics local function get_diacritics() diacritics, get_diacritics = load_data(headword_data_module).page.comb_chars.diacritics_all .. "*", nil return diacritics end local vowels local function get_vowels() vowels, get_vowels = require(en_utilities_module).vowels, nil return vowels end ----------------------- Category functions ----------------------- -- Double the final consonant of a term if preceded by a single vowel, which is common with Germanic suffixes. local function double_final_consonant(term) local stem, final = term:match("^(.*)([bcdfghjklmnpqrstvxz])$") -- Include "h" and "x" just in case. if not stem then return term end diacritics = diacritics or get_diacritics() stem = umatch(ulower(toNFD(stem)), "^(.-)" .. diacritics .. "[" .. (vowels or get_vowels()) .. "]" .. diacritics .. "$") if not stem then return term end -- If not preceded by a vowel (treating "y" as a consonant if not preceded -- by another consonant), then the final consonant is doubled. if stem == "" or stem == "y" or umatch(stem, "[" .. vowels .. "]" .. diacritics .. "y$") or umatch(stem, "[^" .. vowels .. "]$") then return term .. final end return term end local function check_germanic_suffix(pagename, lemma, stem) -- Usually requires an epenthetic "e" (e.g. "foxen"), but not always -- (e.g. "feathern"). if lemma == stem or lemma .. "e" == stem then return true end -- Final -er sometimes becomes -ren (e.g. "sistren"). local reduced = lemma:match("^(.-)er$") if reduced and (reduced .. "re") == stem then return true end local doubled = double_final_consonant(lemma) return doubled .. "e" == stem end -- List of umlaut plurals. Each entry is of the form {SINGULAR, PLURAL}, where any lemma ending in SINGULAR whose plural -- ends in PLURAL are counted (hence [[dormouse]] plural [[dormice]] is counted). The entries are Lua patterns. local umlaut_plurals = { -- [[mouse]] -> [[mice]], [[louse]] -> [[lice]], jocular [[house]] -> [[hice]], [[spouse]] -> [[spice]] {"ouse", "ice"}, -- [[goose]] -> [[geese]], [[swoose]] -> [[sweese]], jocular [[moose]] -> [[meese]] {"oose", "eese"}, {"an", "en"}, {"ann", "enn"}, {"anne", "enne"}, {"oot", "eet"}, {"oote", "eete"}, {"ooth", "eeth"}, {"oof", "eef"}, {"other", "ethren"}, {"other", "ethern"}, {"other", "etheren"}, {"ow", "[iy]e?"}, {"ow", "[iy]ne"}, } --[=[ The key `cat` must be specified and is the name of the category following the language name. Suffixes enclosed in double angle brackets, e.g. <<-ata>>, are italicized (as if written e.g. {{m|en||-ata}}) in the displayed title, but not in the category name itself. The description of the category comes from the `description` field; if omitted, it is constructed from the category by adding "English irregular" to the beginning and appending the value of `desc_suffix` (if given) to the end. Suffixes enclosed in double angle brackets are italicized, as described above, and template calls are permitted. The key `matches_plural` must be specified and is either a string or a function. If a string, the string is a Lua pattern that should match the end of the pagename, and the remainder becomes the stem passed to `matches_lemma` (see below). If a function, it should accept two arguments, the pagename and the lemma (or more precisely, the words in the pagename and lemma that differ, if there are multiple words), and should return the stem of the pagename (minus the ending) if the pagename matches the ending, otherwise nil. The key `matches_lemma` must be specified and is either a string or a function. If a string, the string is a Lua pattern that should match the lemma. If a function, it should accept three arguments, the pagename and lemma as in `matches_plural`, and the stem returned by `matches_plural` or extracted from the pagename and ending. It should return a boolean indicating whether the lemma matches. The key `additional`, if given, is additional text to include in the category description as displayed on the page itself, but not in the summary of the category as displayed on other pages. For further information, see the `additional` field in [[Module:category tree/poscatboiler/data/documentation]]. The key `breadcrumb`, if given, is the breadcrumb text. See [[Module:category tree/poscatboiler/data/documentation]]. If omitted, the breadcrumb is constructed from the category name by remvoing "plurals in" from the beginning of the category name. The key `sort_key`, if given, specifies the sort key for the category in its parent category [[:Category:English irregular plurals]]. By default it is derived from the breadcrumb by removing an initial hyphen. If a plural doesn't match any of the entries, it goes into [[:Category:English miscellaneous irregular plurals]]. Note that before checking these entries, plurals that are the same as the singular are excluded (i.e. not considered irregular), as are plurals formed from the singular by adding [[-s]], [[-es]], [[-'s]] or [[-ses]] (if the singular ends in '-s'; cf. [[bus]] -> 'busses', [[dis]] -> 'disses'), or by replacing final [[-y]] with [[-ies]]. ]=] local irregular_plurals = { { -- siphon off "women" plurals 'English plurals in -men with singular in -man' cat = "plurals in <<-women>> with singular in <<-woman>>", additional = "Plurals formed by replacing a final <<-man>> with a final <<-men>> are found in [[:Category:English plurals in -men with singular in -man|Category:English plurals in ''-men'' with singular in ''-man'']].", matches_plural = "[Ww]omen", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. pagename:sub(-5, -3) .. "an" end, }, { -- siphon off most of the "umlaut" plurals that will otherwise end up in 'English miscellaneous irregular plurals' cat = "plurals in <<-men>> with singular in <<-man>>", additional = "Plurals formed by replacing a final <<-woman>> with a final <<-women>> are found in [[:Category:English plurals in -women with singular in -woman|Category:English plurals in ''-women'' with singular in ''-woman'']].", matches_plural = "[Mm]en", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. pagename:sub(-3, -3) .. "an" end, }, { cat = "plurals with umlaut", description = "{{{langname}}} irregular noun plurals that are formed via [[umlaut]], i.e. by changing the root vowel rather than adding a suffix.", additional = [==[See also: * Plurals formed by replacing a final <<-man>> with <<-men>> are found in [[:Category:English plurals in -men with singular in -man|Category:English plurals in ''-men'' with singular in ''-man'']] * Plurals formed by replacing a final <<-woman>> with a final <<-women>> are found in [[:Category:English plurals in -women with singular in -woman|Category:English plurals in ''-women'' with singular in ''-woman'']]]==], sort_key = "umlaut", matches_plural = function(pagename, lemma) for _, umlaut_plural in ipairs(umlaut_plurals) do local stem = umatch(lemma, "^(.-)%f[" .. (vowels or get_vowels()) .. "]" .. umlaut_plural[1] .. "$") if stem and ( umatch(pagename, "^" .. pattern_escape(stem) .. umlaut_plural[2] .. "$") or -- FIXME: this is really hacky ("cow" to "kyne"). umatch(pagename, "^" .. pattern_escape(stem):gsub("c", "k") .. umlaut_plural[2] .. "$") ) then return stem end end end, matches_lemma = function(pagename, lemma, stem) -- All the work already done in matches_plural(). return true end, }, { cat = "plurals in <<-tia>> with singular in <<-s>>", desc_suffix = ", mostly originating from Latin participles", matches_plural = "tia", matches_lemma = "s", }, { cat = "plurals in <<-ia>> with singular in <<-e>>", desc_suffix = ", mostly originating from Latin neuter nouns", matches_plural = "ia", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "e" end, }, { cat = "plurals in <<-ia>> with singular in <<-i>> or <<-y>>", desc_suffix = ", mostly originating from Greek neuter nouns", matches_plural = "ia", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "i" or lemma == stem .. "y" end, }, { cat = "plurals in <<-ina>> with singular in <<-en>>", desc_suffix = ", mostly originating from Latin neuter nouns", additional = [==[ * Plurals formed by replacing a final <<-inum>> with a final <<-ina>> are found in [[:Category:English plurals in -a with singular in -um|Category:English plurals in ''-a'' with singular in ''-um'']]. * Plurals formed by replacing a final <<-inon>> with a final <<-ina>> are found in [[:Category:English plurals in -a with singular in -on|Category:English plurals in ''-a'' with singular in ''-on'']].]==], matches_plural = "ina", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "en" end, }, { cat = "plurals in <<-ra>> with singular in <<-s>>", desc_suffix = ", mostly originating from Latin neuter nouns", additional = [==[Sometimes the preceding vowel changes; e.g. <<-us>> commonly changes to <<-era>> or <<-ora>> in the plural. * Plurals formed by replacing a final <<-rum>> with a final <<-ra>> are found in [[:Category:English plurals in -a with singular in -um|Category:English plurals in ''-a'' with singular in ''-um'']]. * Plurals formed by replacing a final <<-ron>> with a final <<-ra>> are found in [[:Category:English plurals in -a with singular in -on|Category:English plurals in ''-a'' with singular in ''-on'']].]==], matches_plural = "ra", matches_lemma = function(pagename, lemma, stem) return lemma:find("s$") end, }, { cat = "plurals in <<-ata>> with singular in <<-a>> or <<-e>>", desc_suffix = ", mostly originating from Ancient Greek neuter nouns in {{m|grc|-μᾰ}}", matches_plural = "ata", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "a" or lemma == stem .. "e" end, }, { cat = "plurals in <<-ata>> with singular in <<-as>>", desc_suffix = ", mostly originating from Ancient Greek neuter nouns", matches_plural = "ata", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "as" end, }, { cat = "plurals in <<-au>>", desc_suffix = ", mostly originating from Welsh", matches_plural = "au", matches_lemma = function(pagename, lemma, stem) return lemma == stem end, }, { cat = "plurals in <<-a>> with singular in <<-an>>", desc_suffix = ", mostly originating from Latin or Greek neuter nouns", additional = [==[See also: * Plurals formed by replacing a final <<-um>> with a final <<-a>> are found in [[:Category:English plurals in -a with singular in -um|Category:English plurals in ''-a'' with singular in ''-um'']]. * Plurals formed by replacing a final <<-on>> with a final <<-a>> are found in [[:Category:English plurals in -a with singular in -on|Category:English plurals in ''-a'' with singular in ''-on'']].]==], matches_plural = "a", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "an" end, }, { cat = "plurals in <<-a>> with singular in <<-on>>", desc_suffix = ", mostly originating from Greek or Latin nouns", additional = [==[See also: * Plurals formed by replacing a final <<-um>> with a final <<-a>> are found in [[:Category:English plurals in -a with singular in -um|Category:English plurals in ''-a'' with singular in ''-um'']]. * Plurals formed by replacing a final <<-an>> with a final <<-a>> are found in [[:Category:English plurals in -a with singular in -an|Category:English plurals in ''-a'' with singular in ''-an'']].]==], matches_plural = "a", matches_lemma = function(pagename, lemma, stem) return umatch(toNFD(lemma), "^" .. pattern_escape(toNFD(stem)) .. "o" .. (diacritics or get_diacritics()) .. "n$") end }, { cat = "plurals in <<-a>> with singular in <<-um>>", desc_suffix = ", mostly originating from Latin nouns", additional = [==[See also: * Plurals formed by replacing a final <<-on>> with a final <<-a>> are found in [[:Category:English plurals in -a with singular in -on|Category:English plurals in ''-a'' with singular in ''-on'']]. * Plurals formed by replacing a final <<-an>> with a final <<-a>> are found in [[:Category:English plurals in -a with singular in -an|Category:English plurals in ''-a'' with singular in ''-an'']].]==], matches_plural = "a", matches_lemma = function(pagename, lemma, stem) return umatch(toNFD(lemma), "^" .. pattern_escape(toNFD(stem)) .. "u" .. (diacritics or get_diacritics()) .. "m$") end }, { cat = "plurals in <<-a>>", desc_suffix = ", mostly originating from Greek or Latin nouns", additional = [==[See also: * Plurals formed by replacing a final <<-um>> with a final <<-a>> are found in [[:Category:English plurals in -a with singular in -um|Category:English plurals in ''-a'' with singular in ''-um'']]. * Plurals formed by replacing a final <<-on>> with a final <<-a>> are found in [[:Category:English plurals in -a with singular in -on|Category:English plurals in ''-a'' with singular in ''-on'']]. * Plurals formed by replacing a final <<-an>> with a final <<-a>> are found in [[:Category:English plurals in -a with singular in -an|Category:English plurals in ''-a'' with singular in ''-an'']].]==], matches_plural = "a", matches_lemma = function(pagename, lemma, stem) return lemma == stem end, }, { cat = "plurals in <<-ae>> with singular in <<-a>>", desc_suffix = ", mostly originating from Latin feminine nouns", additional = "The <<-ae>> can also be written as a ligature <<-æ>>.", matches_plural = function(pagename, lemma) return pagename:match("^(.*)ae$") or pagename:match("^(.*)æ$") end, matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "a" end, }, { cat = "plurals in <<-ae>> with singular in <<-e>>", desc_suffix = ", mostly originating from Greek feminine nouns", additional = "The <<-ae>> can also be written as a ligature <<-æ>>.", matches_plural = function(pagename, lemma) return pagename:match("^(.*)ae$") or pagename:match("^(.*)æ$") end, matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "e" end, }, { cat = "plurals in <<-ae>>", desc_suffix = ", mostly originating from Latin and Greek feminine nouns", additional = [==[The <<-ae>> can also be written as a ligature <<-æ>>. See also: * [[:Category:English plurals in -ae with singular in -a|Category:English plurals in ''-ae'' with singular in ''-a'']] * [[:Category:English plurals in -ae with singular in -e|Category:English plurals in ''-ae'' with singular in ''-e'']]]==], matches_plural = function(pagename, lemma) return pagename:match("^(.*)ae$") or pagename:match("^(.*)æ$") end, matches_lemma = function(pagename, lemma, stem) return lemma == stem end, }, { -- siphon off most of the "-people" plurals that will otherwise end up in 'English miscellaneous irregular plurals' cat = "plurals in <<-people>> with singular in <<-person>>", matches_plural = "people", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "person" end, }, { cat = "plurals in <<-e>> with singular in <<-a>> or <<-ia>>", desc_suffix = ", mostly originating from Italian feminine nouns", matches_plural = "e", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "a" or lemma == stem .. "ia" or (stem:match("[cg]h$") and lemma == stem:sub(1, -2) .. "a") end, }, { cat = "plurals in <<-e>>", desc_suffix = ", mostly originating from German masculine or neuter nouns", additional = "These are formed by adding <<-e>>. See also [[:Category:English plurals in -e with singular in -a or -ia|Category:English plurals in ''-e'' with singular in ''-a'' or ''-ia'']].", matches_plural = "e", matches_lemma = function(pagename, lemma, stem) return lemma == stem or double_final_consonant(lemma) == stem end, }, { cat = "plurals in <<-oth>>", desc_suffix = ", mostly originating from Hebrew feminine nouns", matches_plural = "oth", matches_lemma = function(pagename, lemma, stem) return true end, }, { cat = "plurals in <<-ai>> with singular in <<-a>> or <<-e>>", desc_suffix = ", mostly originating from Greek feminine nouns", matches_plural = "ai", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "a" or lemma == stem .. "e" end, }, { cat = "plurals in <<-ai>> with singular in <<-es>> or <<-is>>", desc_suffix = ", mostly originating from Greek masculine nouns", matches_plural = "ai", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "es" or lemma == stem .. "is" end, }, { cat = "plurals in <<-oi>> with singular in <<-os>>", desc_suffix = ", mostly originating from Greek masculine nouns", matches_plural = "oi", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "os" end, }, { cat = "plurals in <<-i>> with singular in <<-os>>", desc_suffix = ", mostly originating from Greek or Latin nouns", additional = "Plurals formed by replacing a final <<-us>> with a final <<-i>> are found in [[:Category:English plurals in -i with singular in -us|Category:English plurals in ''-i'' with singular in ''-us'']].", matches_plural = "i?i", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "os" or (lemma == stem .. "ios" and stem .. "i" ~= pagename) end, }, { cat = "plurals in <<-i>> with singular in <<-us>>", desc_suffix = ", mostly originating from Latin nouns", additional = "Plurals formed by replacing a final <<-os>> with a final <<-i>> are found in [[:Category:English plurals in -i with singular in -os|Category:English plurals in ''-i'' with singular in ''-os'']].", matches_plural = "i?i", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "us" or (lemma == stem .. "ius" and stem .. "i" ~= pagename) end, }, { cat = "plurals in <<-i>> with singular in <<-a>> or <<-ia>>", desc_suffix = ", mostly originating from Russian or Ukrainian masculine and feminine nouns or Italian masculine nouns", matches_plural = "i", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "a" or lemma == stem .. "ia" or (stem:match("[cg]h$") and lemma == stem:sub(1, -2) .. "a") end, }, { cat = "plurals in <<-i>> with singular in <<-e>>", desc_suffix = ", mostly originating from Italian masculine nouns", matches_plural = "i", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "e" end, }, { cat = "plurals in <<-i>> with singular in <<-o>> or <<-io>>", desc_suffix = ", mostly originating from Italian masculine nouns", matches_plural = "i", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "o" or lemma == stem .. "io" or (stem:match("[cg]h$") and lemma == stem:sub(1, -2) .. "o") end, }, { cat = "plurals in <<-i>>", additional = [==[These are formed by adding <<i>>. See also: * [[:Category:English plurals in -i with singular in -a or -ia|Category:English plurals in ''-i'' with singular in ''-a'' or ''-ia'']] * [[:Category:English plurals in -i with singular in -e|Category:English plurals in ''-i'' with singular in ''-e'']] * [[:Category:English plurals in -i with singular in -o or -io|Category:English plurals in ''-i'' with singular in ''-o'' or ''-io'']] * [[:Category:English plurals in -i with singular in -os|Category:English plurals in ''-i'' with singular in ''-os'']] * [[:Category:English plurals in -i with singular in -us|Category:English plurals in ''-i'' with singular in ''-us'']]]==], matches_plural = "i", matches_lemma = function(pagename, lemma, stem) return lemma == stem end, }, { -- siphon off most of the "-sful" plurals that will otherwise end up in 'English miscellaneous irregular plurals' cat = "plurals in <<-sful>> with singular in <<-ful>>", additional = "This includes examples such as {{m|en|teaspoonful}}, plural {{m|en|teaspoonsful}}. Generally " .. "these refer to specific measures. Note that not all nouns in <<-ful>> pluralize this way; e.g. the " .. "plural of {{m|en|handful}} is normally {{m|en|handfuls}} (but {{m|en|handsful}} is possible, if rare).", matches_plural = "sful", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "ful" or -- [[boxesful]], [[brushesful]], [[busesful]], [[classesful]], [[dishesful]], [[glassesful]], etc. stem:find("e$") and lemma == stem:gsub("e$", "") .. "ful" or -- [[bakeriesful]], [[belliesful]], [[galleriesful]], [[librariesful]], [[pantriesful]], etc. stem:find("ie$") and lemma == stem:gsub("ie$", "y") .. "ful" end, }, { cat = "plurals in <<-im>>", desc_suffix = ", mostly originating from Hebrew masculine nouns", additional = "Generally these are formed by simply adding <<-im>>, or <<-m>> if the singular ends in <<-i>> ({{m|en|illui}} – {{m|en|illuim}}; but cf. {{m|en|goiim}}). Some changes that may occur are <<-e->> to <<-a->> or vice versa ({{m|en|heder}} – {{m|en|hadarim}}; {{m|en|gaon}} – {{m|en|geonim}}), <<-f>> to <<-v->> ({{m|en|ganef}} – {{m|en|ganevim}}), and <<-s>> to <<-t->> ({{m|en|balabos}} – {{m|en|balabatim}}).", matches_plural = "im", matches_lemma = function(pagename, lemma, stem) return true end, }, { cat = "plurals in <<-children>> with singular in <<-child>>", matches_plural = "[Cc]hildren", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. pagename:sub(-8, -4) end, }, { cat = "plurals in <<-in>>", desc_suffix = ", mostly originating from Hebrew and Arabic masculine nouns", matches_plural = "in", matches_lemma = function(pagename, lemma, stem) return true end, }, { cat = "plurals in <<-n>>", desc_suffix = ", mostly originating from Germanic nouns", additional = [==[See also: * Plurals formed by replacing a final <<-man>> with <<-men>> are found in [[:Category:English plurals in -men with singular in -man|Category:English plurals in ''-men'' with singular in ''-man'']] * Plurals formed by replacing a final <<-woman>> with a final <<-women>> are found in [[:Category:English plurals in -women with singular in -woman|Category:English plurals in ''-women'' with singular in ''-woman'']] * Plurals formed by replacing a final <<-child>> with <<-children>> are found in [[:Category:English plurals in -children with singular in -child|Category:English plurals in ''-children'' with singular in ''-child'']]]==], matches_plural = "n", matches_lemma = check_germanic_suffix, }, { cat = "plurals in <<-ar>>", desc_suffix = ", mostly originating from North Germanic nouns", matches_plural = "ar", matches_lemma = function(pagename, lemma, stem) return lemma == stem end, }, { cat = "plurals in <<-ir>>", desc_suffix = ", mostly originating from North Germanic nouns", matches_plural = "ir", matches_lemma = function(pagename, lemma, stem) return lemma == stem end, }, { cat = "plurals in <<-or>> with singular in <<-a>>", desc_suffix = ", mostly originating from Swedish nouns", matches_plural = "or", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "a" end, }, { cat = "plurals in <<-r>>", desc_suffix = ", mostly originating from Germanic nouns", matches_plural = "r", matches_lemma = check_germanic_suffix, }, { cat = "plurals in <<-bes>> with singular in <<-bs>>", desc_suffix = ", mostly originating from Latin or Greek masculine or feminine nouns", matches_plural = "bes", matches_lemma = "bs", }, { cat = "plurals in <<-ces>> with singular in <<-x>>", desc_suffix = ", mostly originating from Latin masculine or feminine nouns", additional = "Generally these are formed by changing a final <<-x>> into <<-ces>> or a final <<-ex>> into <<-ices>>.", matches_plural = "ces", matches_lemma = "x", }, { cat = "plurals in <<-des>> with singular in <<-d>>", desc_suffix = ", mostly originating from Latin or Greek masculine or feminine nouns, or Spanish feminine nouns", matches_plural = "des", matches_lemma = "d", }, { cat = "plurals in <<-des>> with singular in <<-s>>", desc_suffix = ", mostly originating from Latin or Greek masculine or feminine nouns", matches_plural = "des", matches_lemma = "s", }, { cat = "plurals in <<-ges>> with singular in <<-x>>", desc_suffix = ", mostly originating from Greek masculine or feminine nouns", matches_plural = "ges", matches_lemma = "x", }, { cat = "plurals in <<-ies>> with singular in <<-ey>>", matches_plural = "ies", matches_lemma = "ey", }, { cat = "plurals in <<-ies>> with singular in <<-i>>", matches_plural = "ies", matches_lemma = "i", }, { cat = "plurals in <<-kes>> with singular in <<-x>>", desc_suffix = ", mostly originating from Greek masculine or feminine nouns", matches_plural = "kes", matches_lemma = "x", }, { cat = "plurals in <<-ines>> with singular in <<-o>>", desc_suffix = ", mostly originating from Latin masculine or feminine nouns", matches_plural = "ines", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "o" end, }, { cat = "plurals in <<-ones>> with singular in <<-o>>", desc_suffix = ", mostly originating from Latin masculine or feminine nouns", matches_plural = "ones", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "o" end, }, { -- cf. [[eikon]] pl. [[eikones]] cat = "plurals in <<-ones>> with singular in <<-on>>", desc_suffix = ", mostly originating from Greek or Spanish masculine nouns", matches_plural = "ones", matches_lemma = function(pagename, lemma, stem) return umatch(toNFD(lemma), "^" .. pattern_escape(toNFD(stem)) .. "o" .. (diacritics or get_diacritics()) .. "n$") end }, { cat = "plurals in <<-oes>> with singular in <<-o>>", matches_plural = "oes", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "o" end, }, { -- cf. [[levator]] pl. [[levatores]] cat = "plurals in <<-ores>> with singular in <<-or>>", desc_suffix = ", mostly originating from Latin masculine nouns", matches_plural = "ores", matches_lemma = function(pagename, lemma, stem) return umatch(toNFD(lemma), "^" .. pattern_escape(toNFD(stem)) .. "o" .. (diacritics or get_diacritics()) .. "r$") end, }, { cat = "plurals in <<-pes>> with singular in <<-ps>>", desc_suffix = ", mostly originating from Latin or Greek masculine or feminine nouns", matches_plural = "pes", matches_lemma = "ps", }, { cat = "plurals in <<-res>> with singular in <<-r>>", desc_suffix = ", mostly originating from Greek, Latin, Portuguese, or Spanish masculine nouns", additional = "See also [[:Category:English plurals in -ores with singular in -or|Category:English plurals in ''-ores'' with singular in ''-or'']].", matches_plural = "res", matches_lemma = "r", }, { cat = "plurals in <<-tes>> with singular in <<-s>>", desc_suffix = ", mostly originating from Latin or Greek masculine or feminine nouns", matches_plural = "tes", matches_lemma = "s", }, { cat = "plurals in <<-ues>> with singular in <<-u>>", matches_plural = "ues", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "u" end, }, { cat = "plurals in <<-ūs>> or <<-ûs>> with singular in <<-us>>", desc_suffix = ", originating from Latin masculine or feminine [[Appendix:Latin fourth declension|fourth-declension]] nouns", matches_plural = "[ūû]s", matches_lemma = "us", }, { cat = "plurals in <<-ves>> with singular in <<-f>> or <<-fe>>", desc_suffix = ", mostly originating from native English formations", matches_plural = "ves", matches_lemma = "fe?", }, { cat = "plurals with <<-xx->> instead of <<-x->>", desc_suffix = ", which are typically neologisms", matches_plural = "xxes", matches_lemma = function(pagename, lemma, stem) return is_regular_plural(stem .. "xes", lemma, "noun+") end, }, { cat = "plurals in <<-es>> with singular in <<-is>>", desc_suffix = ", mostly originating from Greek feminine nouns, or analogous formations", matches_plural = "es", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "is" end, }, { cat = "plurals in <<-es>> where <<-s>> is expected", desc_suffix = ", which chiefly occur in Early Modern English", matches_plural = "es", matches_lemma = function(pagename, lemma, stem) return is_regular_plural(stem .. "s", lemma, "noun+") end, }, { cat = "plurals in <<-eis>> with singular in <<-is>>", desc_suffix = ", mostly originating from Greek feminine nouns", matches_plural = "eis", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "is" end, }, { cat = "plurals in <<-s>> where <<-ies>> is expected", desc_suffix = ", which chiefly occur on an ad hoc basis", matches_plural = "ys", matches_lemma = function(pagename, lemma, stem) return is_regular_plural(stem .. "ies", lemma, "noun+") end, }, { cat = "plurals in <<-'s>>", desc_suffix = ", mostly used where plurals ending in <<-s>> would appear strange or cause confusion", matches_plural = function(pagename, lemma) local stem = remove_possessive(pagename) return stem ~= pagename and stem or nil end, matches_lemma = function(pagename, lemma, stem) return lemma == stem end, }, { cat = "plurals in <<-s>> where <<-es>> is expected", desc_suffix = ", which chiefly occur on an ad hoc basis", matches_plural = "s", matches_lemma = function(pagename, lemma, stem) return is_regular_plural(stem .. "es", lemma, "noun+") end, }, { cat = "plurals in <<-ot>>", desc_suffix = ", mostly originating from Hebrew feminine nouns", matches_plural = "ot", matches_lemma = function(pagename, lemma, stem) return true end, }, { cat = "plurals in <<-x>> with singular in <<-c>>, <<-ck>> or <<-k>>", desc_suffix = ", mostly as slang forms of plurals ending in <<-s>>", matches_plural = "x", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "c" or lemma == stem .. "ck" or lemma == stem .. "k" end, }, { cat = "plurals in <<-x>>", desc_suffix = ", mostly originating from French masculine nouns", additional = "Generally these are formed by adding <<-x>> to a noun ending in <<-u>>; changing final <<-al>> or <<-ail>> to <<-aux>>; or changing final <<-el>> to <<-eaux>>.", matches_plural = "x", matches_lemma = "[lu]", }, { cat = "plurals in <<-y>> with singular in <<-a>>", desc_suffix = ", mostly originating from Czech or Polish feminine nouns or Russian or Ukrainian masculine and feminine nouns", matches_plural = "y", matches_lemma = function(pagename, lemma, stem) return lemma == stem .. "a" end, }, { cat = "plurals in <<-y>>", desc_suffix = ", mostly originating from Polish feminine nouns, Russian or Ukrainian masculine and feminine nouns, or Czech masculine nouns", additional = "The stem may be reduced (e.g. {{m|en|khokhol}} – {{m|en|khokhly}}). Plurals formed by replacing a final <<-a>> with <<-y>> are found in [[:Category:English plurals in -y with singular in -a|Category:English plurals in ''-y'' with singular in ''-a'']].", matches_plural = "y", matches_lemma = function(pagename, lemma, stem) if lemma == stem then return true end -- Try again with vowel reduction in the lemma. vowels = vowels or get_vowels() diacritics = diacritics or get_diacritics() lemma = ugsub(lemma, "([^" .. vowels .. "]" .. diacritics .. ")[" .. vowels .. "]" .. diacritics .. "([^" .. vowels .. "]+)$", "%1%2") return lemma == stem end, }, { cat = "plurals in <<-z>>", desc_suffix = ", mostly as slang forms of plurals ending in <<-s>>", matches_plural = "z", matches_lemma = function(pagename, lemma, stem) return lemma == stem end, }, } -- Check a given word. Increment `diff` if the pagename word is different and isn't possessive. local function handle_word(pagename_word, lemma_word, categories, diff) if pagename_word == lemma_word then return diff end local pagename_nonposs, poss = remove_possessive(pagename_word) if pagename_nonposs ~= pagename_word then local lemma_nonposs = remove_possessive(lemma_word) if lemma_nonposs ~= lemma_word then poss, pagename_word, lemma_word = true, pagename_nonposs, lemma_nonposs end end if diff == 1 and not poss then return diff + 1 elseif is_regular_plural(pagename_word, lemma_word, "noun+") then return diff + (poss and 0 or 1) end local is_match for _, irreg_plural in ipairs(irregular_plurals) do local matches_plural, stem = irreg_plural.matches_plural if type(matches_plural) == "string" then stem = umatch(pagename_word, "^(.-)" .. matches_plural .. "$") else stem = matches_plural(pagename_word, lemma_word) end if stem then local matches_lemma = irreg_plural.matches_lemma if type(matches_lemma) == "string" then is_match = umatch(lemma_word, matches_lemma .. "$") else is_match = matches_lemma(pagename_word, lemma_word, stem) end if is_match then local cat = irreg_plural.cat:gsub("<<(.-)>>", "%1") insert_if_not(categories, cat) break end end end if not is_match then insert_if_not(categories, "miscellaneous irregular plurals") end return diff + (poss and 0 or 1) end local function handle_lemma(lang, pagename, lemma, categories) lemma = get_link_page(remove_links(lemma), lang) if lemma == pagename then return end local pagename_words, lemma_words = split(pagename, "([-%s])"), split(lemma, "([-%s])") -- Different number of words. if #pagename_words ~= #lemma_words then return insert_if_not(categories, "miscellaneous irregular plurals") end local lemma_categories, diff = {}, 0 for i = 1, #pagename_words, 2 do diff = handle_word(pagename_words[i], lemma_words[i], lemma_categories, diff) -- If two (non-possessive) words differ, only add the miscellaneous category. if diff == 2 then for j = 2, #categories do categories[j] = nil end categories[2] = "miscellaneous irregular plurals" return end end for _, cat in ipairs(lemma_categories) do insert_if_not(categories, cat) end end local function irregular_plural_categories(data) if not (data.pagename and data.lemmas) then return end local pagename, categories = data.pagename, {"multi"} for _, lemma_obj in ipairs(data.lemmas) do local term = lemma_obj.term if term then -- I don't know if it makes sense to check the lemma_obj for a lang object or if it's ever -- different from `data.lang`, but it seems like defensive coding. handle_lemma(lemma_obj.lang or data.lang, pagename, term, categories) end end return categories end local cat_functions = { -- This function is invoked for plurals by an entry in [[Module:form of/cats]]. ["en-irregular-plural-categories"] = irregular_plural_categories, } -- We need to return the irreg_plurals structure so that the category handler in -- [[Module:category tree/poscatboiler/data/lang-specific/en]] can access it. return {cat_functions = cat_functions, irregular_plurals = irregular_plurals} 2o72zi9q216emcayh95en6ffyifqq0j मॉड्यूल:collapsible category tree 828 307012 487936 2026-09-03T17:21:03Z SM7 6218 अंग्रेजी विक्षनरी से आयातित 487936 Scribunto text/plain local export = {} local m_utilities = require("Module:utilities") function export.make(args) local lang = args.lang local sc = args.sc -- Add a span which records information to be used by the catfix gadget. local catfix_info = lang and m_utilities.catfix(lang, sc) or "" -- Only provide collapsibility if 5 or more elements local pages_in_cat = mw.site.stats.pagesInCategory(args.category, "pages") local collapsible = pages_in_cat >= 5 -- CategoryTree only shows the first 200 categories. How many pages are left over? local pages_left_over = ((pages_in_cat <= 200) and 0 or (pages_in_cat - 200)) local output = mw.getCurrentFrame():callParserFunction{ name = "#categorytree", args = { args.category, type = "pages", depth = 1, class = "\"columns-bg term-list" .. (sc and " " .. sc:getCode() or "") .. "\"", style = "counter-reset: pagesleftover " .. pages_left_over, namespaces = "-" .. (mw.title.getCurrentTitle().nsText == "Reconstruction" and " Reconstruction" or ""), ["data-pages-in-cat"] = pages_in_cat, ["data-pages-left-over"] = pages_left_over, } } if collapsible then output = mw.html.create("div") :addClass("list-switcher-wrapper") :node( mw.html.create("div") :addClass("list-switcher list-switcher-category-tree") :wikitext(output) ) else output = mw.html.create("div") :addClass("list-switcher-category-tree") :wikitext(output) end -- Maintenance categories local categories = "" if pages_in_cat == 0 and not mw.title.new(args.category, 'Category').exists then categories = categories .. require("Module:utilities").format_categories('Entries with collapsible category trees for nonexistent categories') end return require("Module:TemplateStyles")("Module:collapsible category tree/style.css") .. catfix_info .. tostring(output) .. categories end -- for direct invocation from a wikitext ("wt") template function export.make_wt(frame) return export.make(frame.args) end return export noxvaald1o646ux246iwd39iqrdltvo मॉड्यूल:collapsible category tree/style.css 828 307013 487937 2026-09-03T17:22:35Z SM7 6218 अंग्रेजी विक्षनरी से आयातित 487937 sanitized-css text/css /* Styles applying equally to collapsible and non-collapsible instances */ .columns-bg.term-list.CategoryTreeTag { margin-top: 0; margin-bottom: 0; } /* suppress triangular toggle button */ .columns-bg.term-list.CategoryTreeTag .CategoryTreeToggle { display: none; } /* Match global .list-switcher-header styles */ .columns-bg.term-list.CategoryTreeTag > div > div.CategoryTreeItem { /* START global .list-switcher-header styles */ background: var(--wikt-palette-grey-indigo-2); font-weight: bold; font-size: 95%; padding: 0.2em 0.4em 0.1em 0.6em; /* END global .list-switcher-header styles */ /* Extra styles added to global .list-switcher-header rules: */ margin-right: -0.3em; } .columns-bg.term-list.CategoryTreeTag > div > div.CategoryTreeChildren { padding-top: 0.1em; } /* Make the list switcher one line taller than default */ .list-switcher-category-tree { bottom: calc(4.4 * 1.6em); /* can't use "lh" units in TemplateStyles */ } .list-switcher-category-tree.list-switcher-collapsed { max-height: calc(4.4 * 1.6em); /* can't use "lh" units in TemplateStyles */ } /* The objective of the next few rules is to make CategoryTree's <div> output look indistinguishable from a default MediaWiki bulleted list. */ .list-switcher-category-tree .CategoryTreeChildren { column-count: 3; /* match default MediaWiki styling of <ul> */ margin-left: 1.6em; margin-right: 0; margin-inline-start: 1.6em; margin-inline-end: 0; padding: 0; } .list-switcher-category-tree .CategoryTreeChildren .CategoryTreeSection { /* match default MediaWiki styling of <li> */ display: list-item; margin-bottom: 0.1em; } .list-switcher-category-tree .CategoryTreeChildren .CategoryTreeItem { display: inline; } .list-switcher-category-tree .CategoryTreePageBullet { display: none; } /* hack - proof of concept */ .list-switcher-category-tree > .CategoryTreeTag:not([data-pages-left-over="0"]) .CategoryTreeChildren::after { content: "...and " counter(pagesleftover) " more"; } /* space between adjacent category trees - e.g. [[-DZÍÍʼ]] */ .list-switcher-category-tree + link + .list-switcher-category-tree, .list-switcher-category-tree + style + .list-switcher-category-tree, .list-switcher-category-tree + .list-switcher-category-tree { margin-top: 0.6em; } 8qzbig2kxhscqw3korovk3qq3v3xt3x श्रेणी:प्रविष्टि रखरखाव भाषा अनुसार 14 307014 487954 2026-09-03T19:47:57Z SM7 6218 प्रविष्टि रखरखाव 487954 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx 487997 487954 2026-09-04T07:22:53Z SM7 6218 SM7 ने अनुप्रेषण छोड़े बिना पृष्ठ [[श्रेणी:प्रविष्टि रखरखाव]] को [[श्रेणी:प्रविष्टि रखरखाव भाषा अनुसार]] पर स्थानांतरित किया: auto cat प्रारूप अनुसार उचित नाम पर 487954 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx मॉड्यूल:category tree/wiktionary 828 307015 487959 2026-09-03T20:23:36Z SM7 6218 "local raw_categories = {} ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["..." के साथ नया पृष्ठ बनाया 487959 Scribunto text/plain local raw_categories = {} ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["विक्षनरी"] = { description = "High level category for material about Wiktionary and its operation.", parents = "मूलभूत श्रेणी", } raw_categories["Wiktionary statistics"] = { description = "Categories and pages containing statistics about how Wiktionary is used.", breadcrumb_base = "statistics", parents = "विक्षनरी", } raw_categories["Wiktionary policies"] = { topright = "{{shortcut|WT:POL}}", preceding = "{{see also|Wiktionary:Index to policies}}", description = "[[Wiktionary:Main Page|Wiktionary]] official policies, guidelines or common practices, spelled out as clearly as possible, to date.", additional = "Do not modify these pages without a prior discussion on [[Wiktionary:BP]], followed by a [[Wiktionary:VOTE|vote]]. Even subtle or seemingly inconsequential changes to these pages ''may'' result in a block, so please discuss all changes prior to implementation.", breadcrumb_base = "policies", parents = "विक्षनरी", } raw_categories["Wiktionary think tank policies"] = { description = "Unofficial policies that have not been approved by a [[Wiktionary:Votes|vote]].", additional = "For official policies, see [[:Category:Wiktionary policies]].", breadcrumb_base = "think tank", parents = "विक्षनरी नीतियाँ", } raw_categories["Wiktionary essays"] = { description = "Essays written by individual users on various topics related to Wiktionary.", additional = "This category is added by {{tl|essay}}.", breadcrumb_base = "essays", parents = "विक्षनरी", } raw_categories["Wiktionary language considerations"] = { topright = "{{shortcut|WT:AXX}}", description = "Pages containing guidelines for writing entries in specific languages.", breadcrumb_base = "language considerations", parents = { "विक्षनरी", "Pages containing style information", }, } raw_categories["Wiktionary multilingual topics"] = { description = "Pages and categories dedicated to topics involving relations among languages.", breadcrumb_base = "multilingual topics", parents = { "विक्षनरी", {name = "Wiktionary language considerations", sort = "multilingual topics"}, "Pages containing style information", }, } raw_categories["Pages containing style information"] = { description = "Pages that provide style information that may be relevant to a style guide in development.", additional = [=[ Not all these pages will be integrated; some may be redirected or trimmed, others may be rewritten or integrated into the style guide as-is, and others may not be integrated at all. This is simply a tracking category. No changes to these pages will be made without first obtaining consensus to do so. {| class="wikitable" |+Sort key |- ! Key !! Meaning |- | C || Categories |- | D || Dictionary pages |- | M || Miscellaneous |- | T || Thesaurus pages |- | W || Wiktionary pages |- | X || Templates |} ]=], parents = "Redirects", can_be_empty = true, hidden = true, } raw_categories["Style guidelines"] = { description = "Pages that are part of the [[WT:STYLE|Style guide]].", parents = "Wiktionary policies", } raw_categories["Wiktionary archives"] = { description = "No-longer-relevant pages that have been archived for future reference.", breadcrumb_base = "archives", parents = "विक्षनरी", } raw_categories["Wiktionary beginners"] = { description = "Pages related to newcomers to Wiktionary.", breadcrumb_base = "beginners", parents = "विक्षनरी", } raw_categories["Help"] = { description = "Pages and categories providing [[Help:Contents|help]] and tips on how to use and contribute to Wiktionary.", additional = [=[ ==Welcome newcomers== Hello, and welcome to Wiktionary. Thank you for your contributions. We hope you like the place and decide to stay. Here are a few good links for newcomers: *[[Wiktionary:Tutorial|Wiktionary Tutorial]] *[[Help:How to edit a page|How to edit a page]] *[[Help:Starting a new page|How to start a page]] *[[Wiktionary:Entry layout|Our format guidelines]] *[[Wiktionary:Criteria for inclusion|Criteria for inclusion]] *[[Wiktionary:Sandbox]] (a safe place for testing syntax) *[[Wiktionary:What Wiktionary is not|What Wiktionary is not]] *[[Help:Index|An index of all help pages]] *[[Help:Contents]] *[[Help:FAQ|FAQ]] ]=], parents = { "विक्षनरी", "Wiktionary beginners", } } raw_categories["Help:Editing"] = { description = "Help pages related to editing Wiktionary entries.", breadcrumb_base = "editing", parents = "Help", } raw_categories["Help:Formatting"] = { description = "Help pages and guides about how information is laid out in a Wiktionary entry.", additional = "[[Wiktionary:Entry layout]] is the official policy guide for laying out entries. [[:Category:Help:Editing]] contains information on how to use the editing interface.", breadcrumb_base = "formatting", parents = "Help", } raw_categories["Wiktionary files"] = { description = "Files (any images, sound, media, etc.) uploaded to Wiktionary.", additional = "__NOGALLERY__\nSee also [[Special:ListFiles]].", breadcrumb_base = "files", parents = "विक्षनरी", } raw_categories["Wiktionary fun stuff"] = { description = "Wiktionary humorous pages.", additional = "{{humor}}", breadcrumb_base = "fun stuff", parents = "विक्षनरी", } return { RAW_CATEGORIES = raw_categories } jalr9ks8hm3g2cfyjsozqta6r9ncw36 487960 487959 2026-09-03T20:23:59Z SM7 6218 SM7 ने पृष्ठ [[मॉड्यूल:category tree/विक्षनरी]] को [[मॉड्यूल:category tree/wiktionary]] पर स्थानांतरित किया 487959 Scribunto text/plain local raw_categories = {} ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["विक्षनरी"] = { description = "High level category for material about Wiktionary and its operation.", parents = "मूलभूत श्रेणी", } raw_categories["Wiktionary statistics"] = { description = "Categories and pages containing statistics about how Wiktionary is used.", breadcrumb_base = "statistics", parents = "विक्षनरी", } raw_categories["Wiktionary policies"] = { topright = "{{shortcut|WT:POL}}", preceding = "{{see also|Wiktionary:Index to policies}}", description = "[[Wiktionary:Main Page|Wiktionary]] official policies, guidelines or common practices, spelled out as clearly as possible, to date.", additional = "Do not modify these pages without a prior discussion on [[Wiktionary:BP]], followed by a [[Wiktionary:VOTE|vote]]. Even subtle or seemingly inconsequential changes to these pages ''may'' result in a block, so please discuss all changes prior to implementation.", breadcrumb_base = "policies", parents = "विक्षनरी", } raw_categories["Wiktionary think tank policies"] = { description = "Unofficial policies that have not been approved by a [[Wiktionary:Votes|vote]].", additional = "For official policies, see [[:Category:Wiktionary policies]].", breadcrumb_base = "think tank", parents = "विक्षनरी नीतियाँ", } raw_categories["Wiktionary essays"] = { description = "Essays written by individual users on various topics related to Wiktionary.", additional = "This category is added by {{tl|essay}}.", breadcrumb_base = "essays", parents = "विक्षनरी", } raw_categories["Wiktionary language considerations"] = { topright = "{{shortcut|WT:AXX}}", description = "Pages containing guidelines for writing entries in specific languages.", breadcrumb_base = "language considerations", parents = { "विक्षनरी", "Pages containing style information", }, } raw_categories["Wiktionary multilingual topics"] = { description = "Pages and categories dedicated to topics involving relations among languages.", breadcrumb_base = "multilingual topics", parents = { "विक्षनरी", {name = "Wiktionary language considerations", sort = "multilingual topics"}, "Pages containing style information", }, } raw_categories["Pages containing style information"] = { description = "Pages that provide style information that may be relevant to a style guide in development.", additional = [=[ Not all these pages will be integrated; some may be redirected or trimmed, others may be rewritten or integrated into the style guide as-is, and others may not be integrated at all. This is simply a tracking category. No changes to these pages will be made without first obtaining consensus to do so. {| class="wikitable" |+Sort key |- ! Key !! Meaning |- | C || Categories |- | D || Dictionary pages |- | M || Miscellaneous |- | T || Thesaurus pages |- | W || Wiktionary pages |- | X || Templates |} ]=], parents = "Redirects", can_be_empty = true, hidden = true, } raw_categories["Style guidelines"] = { description = "Pages that are part of the [[WT:STYLE|Style guide]].", parents = "Wiktionary policies", } raw_categories["Wiktionary archives"] = { description = "No-longer-relevant pages that have been archived for future reference.", breadcrumb_base = "archives", parents = "विक्षनरी", } raw_categories["Wiktionary beginners"] = { description = "Pages related to newcomers to Wiktionary.", breadcrumb_base = "beginners", parents = "विक्षनरी", } raw_categories["Help"] = { description = "Pages and categories providing [[Help:Contents|help]] and tips on how to use and contribute to Wiktionary.", additional = [=[ ==Welcome newcomers== Hello, and welcome to Wiktionary. Thank you for your contributions. We hope you like the place and decide to stay. Here are a few good links for newcomers: *[[Wiktionary:Tutorial|Wiktionary Tutorial]] *[[Help:How to edit a page|How to edit a page]] *[[Help:Starting a new page|How to start a page]] *[[Wiktionary:Entry layout|Our format guidelines]] *[[Wiktionary:Criteria for inclusion|Criteria for inclusion]] *[[Wiktionary:Sandbox]] (a safe place for testing syntax) *[[Wiktionary:What Wiktionary is not|What Wiktionary is not]] *[[Help:Index|An index of all help pages]] *[[Help:Contents]] *[[Help:FAQ|FAQ]] ]=], parents = { "विक्षनरी", "Wiktionary beginners", } } raw_categories["Help:Editing"] = { description = "Help pages related to editing Wiktionary entries.", breadcrumb_base = "editing", parents = "Help", } raw_categories["Help:Formatting"] = { description = "Help pages and guides about how information is laid out in a Wiktionary entry.", additional = "[[Wiktionary:Entry layout]] is the official policy guide for laying out entries. [[:Category:Help:Editing]] contains information on how to use the editing interface.", breadcrumb_base = "formatting", parents = "Help", } raw_categories["Wiktionary files"] = { description = "Files (any images, sound, media, etc.) uploaded to Wiktionary.", additional = "__NOGALLERY__\nSee also [[Special:ListFiles]].", breadcrumb_base = "files", parents = "विक्षनरी", } raw_categories["Wiktionary fun stuff"] = { description = "Wiktionary humorous pages.", additional = "{{humor}}", breadcrumb_base = "fun stuff", parents = "विक्षनरी", } return { RAW_CATEGORIES = raw_categories } jalr9ks8hm3g2cfyjsozqta6r9ncw36 मॉड्यूल:category tree/विक्षनरी 828 307016 487961 2026-09-03T20:23:59Z SM7 6218 SM7 ने पृष्ठ [[मॉड्यूल:category tree/विक्षनरी]] को [[मॉड्यूल:category tree/wiktionary]] पर स्थानांतरित किया 487961 Scribunto text/plain return require [[मॉड्यूल:category tree/wiktionary]] qewi9lp47fe33nq1r882rvwby1smyym অগ্নিকান্ড 0 307017 487964 2026-09-04T04:20:51Z अजीत कुमार तिवारी 4887 +1 487964 wikitext text/x-wiki ==असमिया== {{wp|as:অগ্নিকান্ড}} ===व्युत्पत्ति=== {{lbor|as|sa|अग्निकाण्ड}}. ===संज्ञा=== {{as-noun}} # [[अग्निकांड]] === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # दूर तक फैलने वाली आग जो अत्यधिक नाशक हो। {{C|as|घटना}} [[श्रेणी:हिन्दी-प्रकाशितकोशों से अर्थ-हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश]] ==बंगाली== ===व्युत्पत्ति=== {{lbor|bn|sa|अग्निकाण्ड}}. ===उच्चारण=== {{bn-IPA}} ===संज्ञा=== {{bn-noun}} # [[अग्निकांड]], आग लगने की घटना। {{C|bn|घटना}} 1ix9tslnix5sft4nbnpxj2sjsnz0sbz 487965 487964 2026-09-04T04:21:41Z अजीत कुमार तिवारी 4887 487965 wikitext text/x-wiki ==असमिया== ===व्युत्पत्ति=== {{lbor|as|sa|अग्निकाण्ड}}. ===संज्ञा=== {{as-noun}} # [[अग्निकांड]] === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # दूर तक फैलने वाली आग जो अत्यधिक नाशक हो। {{C|as|घटना}} [[श्रेणी:हिन्दी-प्रकाशितकोशों से अर्थ-हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश]] ==बंगाली== ===व्युत्पत्ति=== {{lbor|bn|sa|अग्निकाण्ड}}. ===उच्चारण=== {{bn-IPA}} ===संज्ञा=== {{bn-noun}} # [[अग्निकांड]], आग लगने की घटना। {{C|bn|घटना}} okg3j1ymwbo9oy38rge050ojegltkus অগ্নিমান্দ্য 0 307018 487966 2026-09-04T04:32:36Z अजीत कुमार तिवारी 4887 +असमिया से शब्द. 487966 wikitext text/x-wiki ==असमिया== ===व्युत्पत्ति=== {{lbor|as|sa|अग्निमान्द्य}}. ===संज्ञा=== {{as-noun}} # [[अग्निमान्द्य]] === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # जठराग्नि का मंद हो जाना, भूख कम लगने का रोग, मंदाग्नि। (पुल्लिंग) [[श्रेणी:हिन्दी-प्रकाशितकोशों से अर्थ-हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश]] ==बंगाली== ===व्युत्पत्ति=== {{lbor|bn|sa|अग्निमान्द्य}}. ===उच्चारण=== {{bn-IPA}} ===संज्ञा=== {{bn-noun}} # [[अग्निमांद्य]], [[मंदाग्नि]], भूख कम लगने का रोग। 8o1ow02msiugcmfz86v8yes3pambgh6 मंदाग्नि 0 307019 487967 2026-09-04T04:33:01Z अजीत कुमार तिवारी 4887 [[अग्निमांद्य]] को अनुप्रेषित 487967 wikitext text/x-wiki #पुनर्प्रेषित [[अग्निमांद्य]] gvgsj7gk1o2956oyhazbhs5sw3inhvs 488001 487967 2026-09-04T07:39:27Z अजीत कुमार तिवारी 4887 [[अग्निमांद्य]] तक का अनुप्रेषण हटाया 488001 wikitext text/x-wiki देखिए [[अग्निमांद्य]]। aylmqg78iuw4hdwgrtse4bitp8kdjzx श्रेणी:सभी लिपियाँ 14 307020 487969 2026-09-04T04:57:45Z SM7 6218 "{{auto cat}}" के साथ नया पृष्ठ बनाया 487969 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx অগ্ৰজ 0 307021 487975 2026-09-04T05:14:37Z अजीत कुमार तिवारी 4887 +असमिया से शब्द. 487975 wikitext text/x-wiki ==असमिया== ===व्युत्पत्ति=== {{lbor|as|sa|अग्रज}}. ===संज्ञा=== {{as-noun}} # [[अग्रज]] === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # बड़ा भाई। (पुल्लिंग) [[श्रेणी:हिन्दी-प्रकाशितकोशों से अर्थ-हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश]] ==बंगाली== ===व्युत्पत्ति=== {{lbor|bn|sa|अग्रज}}. ===उच्चारण=== {{bn-IPA}} ===संज्ञा=== {{bn-noun}} # [[अग्रज]], बडा भाई। cu0xuua4ya8dv1qhbwxh4wbp6zpqhrc 487976 487975 2026-09-04T05:17:22Z अजीत कुमार तिवारी 4887 /* उच्चारण */ 487976 wikitext text/x-wiki ==असमिया== ===व्युत्पत्ति=== {{lbor|as|sa|अग्रज}}. ===संज्ञा=== {{as-noun}} # [[अग्रज]] === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # बड़ा भाई। (पुल्लिंग) [[श्रेणी:हिन्दी-प्रकाशितकोशों से अर्थ-हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश]] ==बंगाली== ===व्युत्पत्ति=== {{lbor|bn|sa|अग्रज}}. ===उच्चारण=== {{bn-IPA|অগ্রজ}} ===संज्ञा=== {{bn-noun}} # [[अग्रज]], बडा भाई। byknsyu09hoefhvile1m3owwhwnqjrp অগ্রদূত 0 307022 487978 2026-09-04T05:24:29Z अजीत कुमार तिवारी 4887 +असमिया से शब्द. 487978 wikitext text/x-wiki ==असमिया== ===व्युत्पत्ति=== {{lbor|as|sa|अग्रदूत}}. ===संज्ञा=== {{as-noun}} # [[अग्रदूत]] === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # पहले से पहुँचकर किसी के जाने की सूचना देने वाला। (पुल्लिंग) {{C|as|लोग}} [[श्रेणी:हिन्दी-प्रकाशितकोशों से अर्थ-हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश]] ==बंगाली== ===व्युत्पत्ति=== {{lbor|bn|sa|अग्रदूत}}. ===उच्चारण=== {{bn-IPA}} ===संज्ञा=== {{bn-noun}} # [[अग्रदूत]], पहले से पहुँचकर सूचना देने वाला। {{C|bn|लोग}} 9jpfz3bypozu3ljstr48979ihfnx7w5 मॉड्यूल:category tree/miscellaneous 828 307023 487979 2026-09-04T05:27:39Z SM7 6218 अंग्रेजी विक्षनरी से आयातित 487979 Scribunto text/plain local labels = {} local raw_categories = {} ----------------------------------------------------------------------------- -- -- -- LABELS -- -- -- ----------------------------------------------------------------------------- -- Appendices labels["appendices"] = { description = "Pages containing additional information about {{{langdisp}}}.", parents = {{name = "{{{langcat}}}", raw = true}}, umbrella = { description = "Categories with pages containing additional information about a given language.", parents = {"Category:Appendices"}, breadcrumb = "By language", }, } -- Citations pages labels["citations pages"] = { description = "Pages documenting instances of actual usage of {{{langname}}} terms.", parents = {{name = "{{{langcat}}}", raw = true}}, umbrella = { description = "Categories with pages documenting instances of actual usage of terms in a given language.", parents = {"Category:Citations pages"}, breadcrumb = "Citations pages by language", }, } labels["citations pages for undefined terms"] = { description = "Pages documenting instances of actual usage of {{{langname}}} terms which are not defined yet.", additional = "Citation pages in {{{langdisp}}} are automatically added here when any of the corresponding entries either does not exist (is a redlink) or does not have a {{{langname}}} section (is an orange link). You can also add citation pages to this category manually when the entry exists but it has not been defined in that specific meaning. Before removing a page from this category, please verify that all citations relate to senses properly defined in the entry.", parents = {"citations pages"}, umbrella = { description = "Categories with pages documenting instances of actual usage of terms in a given language which are not defined yet.", parents = {"Requests", "Category:Citations pages"}, breadcrumb = "Citations pages for undefined terms by language", }, can_be_empty = true, hidden = true, } -- Dialectal equivalent maps labels["dialectal equivalent maps"] = { description = "Maps showing the distribution of dialectal equivalents for terms in {{{langname}}}.", parents = {{name = "{{{langcat}}}", sort = "dialectal equivalent maps", raw = true}}, umbrella = { description = "Categories with maps showing the distribution of dialectal equivalents for terms in a given language.", parents = {"Umbrella metacategories"}, breadcrumb = "Dialectal equivalent maps", }, } -- Thesaurus entries labels["thesaurus entries"] = { description = "[[WT:WS|Thesaurus]] entries for listing [[Wiktionary:Semantic relations|semantically related terms]] such as [[synonym]]s, [[antonym]]s, [[hyponym]]s, [[hypernym]]s, [[meronym]]s, and [[holonym]]s of {{{langname}}} words.", parents = {{name = "{{{langcat}}}", raw = true}}, umbrella = { description = "Categories with [[WT:WS|thesaurus]] entries for listing [[Wiktionary:Semantic relations|semantically related terms]].", breadcrumb = "By language", parents = {{name = "Category:Thesaurus", sort = " "}}, }, } ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["मूलभूत श्रेणी"] = { topright = "{{commonscat|CommonsRoot}}", description = "यह पृष्ठ सबसे ऊपर की (टॉप-लेवल) श्रेणी है। विक्षनरी की सभी अन्य श्रेणियाँ इसके अंतर्गत अथवा इसके नीचे के लेवल की श्रेणियों में आने चाहिए।", additional = "ध्यान दें कि अधिकतर श्रेणियाँ [[:श्रेणी:सभी विषय]] या फिर [[:श्रेणी:सभी भाषाएँ|भाषाओं]] की उप श्रेणियों में आती हैं। <em>कोड लिखने वालों के लिये</em>: यह श्रेणी स्वयं RAW CATEGORY के रूप में [[मॉड्यूल:category tree/miscellaneous]] पर परिभाषित है।", } raw_categories["परिशिष्ट"] = { description = "सभी परिशिष्ट के लिये टॉप-लेवल श्रेणी।", additional = "{{विक्षनरी:परिशिष्ट:विषयसूची}}", parents = {"मूलभूत श्रेणी"}, } raw_categories["अंब्रेला मेटाश्रेणियाँ"] = { description = "This page contains '''umbrella metacategories''', which group umbrella categories under high-level topics.", additional = "Umbrella categories in turn group language-specific categories devoted to particular low-level topics.", parents = {"मूलभूत श्रेणी"}, } return {LABELS = labels, RAW_CATEGORIES = raw_categories} l1vbr3szpjz9m16okpq3cgem5x1sskv 487989 487979 2026-09-04T06:24:44Z SM7 6218 localization... 487989 Scribunto text/plain local labels = {} local raw_categories = {} ----------------------------------------------------------------------------- -- -- -- LABELS -- -- -- ----------------------------------------------------------------------------- -- Appendices labels["परिशिष्ट"] = { description = "Pages containing additional information about {{{langdisp}}}.", parents = {{name = "{{{langcat}}}", raw = true}}, umbrella = { description = "Categories with pages containing additional information about a given language.", parents = {"श्रेणी:परिशिष्ट"}, breadcrumb = "भाषा अनुसार", }, } -- Citations pages labels["उद्धरण पृष्ठ"] = { description = "Pages documenting instances of actual usage of {{{langname}}} terms.", parents = {{name = "{{{langcat}}}", raw = true}}, umbrella = { description = "Categories with pages documenting instances of actual usage of terms in a given language.", parents = {"श्रेणी:उद्धरण पृष्ठ"}, breadcrumb = "उद्धरण पृष्ठ भाषा अनुसार", }, } labels["citations pages for undefined terms"] = { description = "Pages documenting instances of actual usage of {{{langname}}} terms which are not defined yet.", additional = "Citation pages in {{{langdisp}}} are automatically added here when any of the corresponding entries either does not exist (is a redlink) or does not have a {{{langname}}} section (is an orange link). You can also add citation pages to this category manually when the entry exists but it has not been defined in that specific meaning. Before removing a page from this category, please verify that all citations relate to senses properly defined in the entry.", parents = {"citations pages"}, umbrella = { description = "Categories with pages documenting instances of actual usage of terms in a given language which are not defined yet.", parents = {"Requests", "Category:Citations pages"}, breadcrumb = "Citations pages for undefined terms by language", }, can_be_empty = true, hidden = true, } -- Dialectal equivalent maps labels["dialectal equivalent maps"] = { description = "Maps showing the distribution of dialectal equivalents for terms in {{{langname}}}.", parents = {{name = "{{{langcat}}}", sort = "dialectal equivalent maps", raw = true}}, umbrella = { description = "Categories with maps showing the distribution of dialectal equivalents for terms in a given language.", parents = {"छतरी मेटाश्रेणियाँ"}, breadcrumb = "Dialectal equivalent maps", }, } -- Thesaurus entries labels["समांतर कोश प्रविष्टियाँ"] = { description = "[[WT:WS|Thesaurus]] entries for listing [[Wiktionary:Semantic relations|semantically related terms]] such as [[synonym]]s, [[antonym]]s, [[hyponym]]s, [[hypernym]]s, [[meronym]]s, and [[holonym]]s of {{{langname}}} words.", parents = {{name = "{{{langcat}}}", raw = true}}, umbrella = { description = "Categories with [[WT:WS|thesaurus]] entries for listing [[Wiktionary:Semantic relations|semantically related terms]].", breadcrumb = "भाषा अनुसार", parents = {{name = "श्रेणी:समांतर कोश", sort = " "}}, }, } ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["मूलभूत श्रेणी"] = { topright = "{{commonscat|CommonsRoot}}", description = "यह पृष्ठ सबसे ऊपर की (टॉप-लेवल) श्रेणी है। विक्षनरी की सभी अन्य श्रेणियाँ इसके अंतर्गत अथवा इसके नीचे के लेवल की श्रेणियों में आने चाहिए।", additional = "ध्यान दें कि अधिकतर श्रेणियाँ [[:श्रेणी:सभी विषय]] या फिर [[:श्रेणी:सभी भाषाएँ|भाषाओं]] की उप श्रेणियों में आती हैं। <em>कोड लिखने वालों के लिये</em>: यह श्रेणी स्वयं RAW CATEGORY के रूप में [[मॉड्यूल:category tree/miscellaneous]] पर परिभाषित है।", } raw_categories["परिशिष्ट"] = { description = "सभी परिशिष्ट के लिये टॉप-लेवल श्रेणी।", additional = "{{विक्षनरी:परिशिष्ट:विषयसूची}}", parents = {"मूलभूत श्रेणी"}, } raw_categories["छतरी मेटाश्रेणियाँ"] = { description = "This page contains '''umbrella metacategories''', which group umbrella categories under high-level topics.", additional = "Umbrella categories in turn group language-specific categories devoted to particular low-level topics.", parents = {"मूलभूत श्रेणी"}, } return {LABELS = labels, RAW_CATEGORIES = raw_categories} mm7eip2jdd1nns3m3nhwu67fzc0ywdw অগ্ৰাহ্য 0 307024 487981 2026-09-04T05:35:34Z अजीत कुमार तिवारी 4887 +असमिया से शब्द. 487981 wikitext text/x-wiki ==असमिया== ===व्युत्पत्ति=== {{lbor|as|sa|অগ্ৰাহ্য}}. ===विशेषण=== {{as-adj}} # [[अग्राह्य]] === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # ग्रहण के अयोग्य; अस्वीकरणीय, त्याज्य; # अविचारणीय; # अविश्वसनीय। (पुल्लिंग) [[श्रेणी:हिन्दी-प्रकाशितकोशों से अर्थ-हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश]] ==बंगाली== ===व्युत्पत्ति=== {{lbor|bn|sa|अग्राह्य}}. ===उच्चारण=== {{bn-IPA}} ===संज्ञा=== {{bn-noun}} # [[अग्राह्य]], [[त्याज्य]], [[अविश्वसनीय]], ग्रहण न करने योग्य। 7z4po2wq64c5f72ogiyt5pb5fgzk0qm 487982 487981 2026-09-04T05:37:31Z अजीत कुमार तिवारी 4887 /* व्युत्पत्ति */ सुधार. 487982 wikitext text/x-wiki ==असमिया== ===व्युत्पत्ति=== {{lbor|as|sa|अग्राह्य}}. ===विशेषण=== {{as-adj}} # [[अग्राह्य]] === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # ग्रहण के अयोग्य; अस्वीकरणीय, त्याज्य; # अविचारणीय; # अविश्वसनीय। (पुल्लिंग) [[श्रेणी:हिन्दी-प्रकाशितकोशों से अर्थ-हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश]] ==बंगाली== ===व्युत्पत्ति=== {{lbor|bn|sa|अग्राह्य}}. ===उच्चारण=== {{bn-IPA}} ===संज्ञा=== {{bn-noun}} # [[अग्राह्य]], [[त्याज्य]], [[अविश्वसनीय]], ग्रहण न करने योग्य। 8cu9qrisz3itvtgyvfj5hw0u1trsfat 487983 487982 2026-09-04T05:38:04Z अजीत कुमार तिवारी 4887 /* उच्चारण */ 487983 wikitext text/x-wiki ==असमिया== ===व्युत्पत्ति=== {{lbor|as|sa|अग्राह्य}}. ===विशेषण=== {{as-adj}} # [[अग्राह्य]] === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # ग्रहण के अयोग्य; अस्वीकरणीय, त्याज्य; # अविचारणीय; # अविश्वसनीय। (पुल्लिंग) [[श्रेणी:हिन्दी-प्रकाशितकोशों से अर्थ-हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश]] ==बंगाली== ===व्युत्पत्ति=== {{lbor|bn|sa|अग्राह्य}}. ===उच्चारण=== {{bn-IPA|অগ্রাহ্য}} ===संज्ञा=== {{bn-noun}} # [[अग्राह्य]], [[त्याज्य]], [[अविश्वसनीय]], ग्रहण न करने योग्य। mm8m3sp94iywa4qklmc5o101twpekdl 487984 487983 2026-09-04T05:39:03Z अजीत कुमार तिवारी 4887 /* संज्ञा */ 487984 wikitext text/x-wiki ==असमिया== ===व्युत्पत्ति=== {{lbor|as|sa|अग्राह्य}}. ===विशेषण=== {{as-adj}} # [[अग्राह्य]] === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # ग्रहण के अयोग्य; अस्वीकरणीय, त्याज्य; # अविचारणीय; # अविश्वसनीय। (पुल्लिंग) [[श्रेणी:हिन्दी-प्रकाशितकोशों से अर्थ-हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश]] ==बंगाली== ===व्युत्पत्ति=== {{lbor|bn|sa|अग्राह्य}}. ===उच्चारण=== {{bn-IPA|অগ্রাহ্য}} ===विशेषण=== {{bn-adj}} # [[अग्राह्य]], [[त्याज्य]], [[अविश्वसनीय]], ग्रहण न करने योग्य। 3v74ume467q7onk2r13lrq7o0da5x94 सदस्य:SM7/Utilities/category tree 2 307025 487985 2026-09-04T05:39:58Z SM7 6218 नया जानकारी पेज बनाया 487985 wikitext text/x-wiki यहाँ विक्षनरी पर श्रेणीकरण की कोडिंग संबंधी जानकारी है। * [[मॉड्यूल:category tree/poscatboiler/data/miscellaneous]] पुराना है। अब इसकी जगह [[मॉड्यूल:category tree/miscellaneous]] का इस्तेमाल हो रहा। इसी पर [[:श्रेणी:मूलभूत श्रेणी]] परिभाषित है। eaivv3vvqbua0sg5iarkmkagehztpum 488015 487985 2026-09-04T08:06:05Z SM7 6218 488015 wikitext text/x-wiki यहाँ विक्षनरी पर श्रेणीकरण की कोडिंग संबंधी जानकारी है। * [[मॉड्यूल:category tree/poscatboiler/data/miscellaneous]] पुराना है। अब इसकी जगह [[मॉड्यूल:category tree/miscellaneous]] का इस्तेमाल हो रहा। इसी पर [[:श्रेणी:मूलभूत श्रेणी]] परिभाषित है। == श्रेणियाँ और उनके संगत अंग्रेजी नाम == * [[:श्रेणी:साँचा:auto cat को कॉल करने वाली श्रेणियाँ]] <small>[[:en:Category:Categories calling Template:auto cat]]</small> * [[:श्रेणी:त्रुटिपूर्ण नामों वाली श्रेणियाँ]] - <small>[[:en:Category:Categories with incorrect names]]</small> jqtwp63hrabxtkb5syhu4a9ujna3sdt मॉड्यूल:category tree/styles.css 828 307026 487986 2026-09-04T05:41:53Z SM7 6218 अंग्रेजी विक्षनरी से आयातित 487986 sanitized-css text/css .ts-categoryBreadcrumbs { display: table; margin-bottom: 1.5em; padding-bottom: 0.2em; border-bottom: 1px solid var(--wikt-palette-lightgrey,#c8ccd1); font-size: 0.92857143em; /* 13 / 14 */ } .ts-categoryBreadcrumbs ol { margin: 0; padding-left: 0; list-style: none; } .ts-categoryBreadcrumbs li { display: inline; margin: 0; } .ts-categoryBreadcrumbs a { white-space: nowrap; } .ts-categoryBreadcrumbs-separator { margin: 0.07692309em; /* 1 / 13 */ color: var(--wikt-palette-dullblue, #49555f); } hxmwmpisj7qpf83cb9t2qdigj70czwb मॉड्यूल:message box/styles.css 828 307027 487987 2026-09-04T06:11:56Z SM7 6218 अंग्रेजी विक्षनरी से आयातित 487987 sanitized-css text/css .maintenance-box { width: 90%; margin: 0.75em auto; border-width: 1px; border-style: dashed; padding: 0.25em; } body.skin-vector-2022 .maintenance-box > table td p:last-of-type { /* remove extraneous bottom margin from bottom edge of maintenance box if it has multiple lines/paragraphs */ margin-bottom: 0.25em; } .maintenance-box-image-cell { padding: 0 0.5em; } .request-box { /* width: fit-content added as inline style */ margin: 0.75em 1em 0.75em 1em; border: 1px dashed var(--border-color-base, #999999); padding: 0.25em; background: var(--background-color-base, #FFFFFF); } body.skin-minerva .request-box table { margin-top: 0.25em; margin-bottom: 0.25em; } /* Colors */ .maintenance-box-blue { background-color: var(--wikt-palette-indigo-2, #E6E6FF); border: 1px dashed var(--wikt-palette-indigo-9, #000061); } .maintenance-box-red { background-color: var(--wikt-palette-red-2, #FFE6E6); border: 1px dashed var(--wikt-palette-red-9, #610000); } .maintenance-box-yellow { background-color: var(--wikt-palette-yellow-2, #FFFFE6); border: 1px dashed var(--wikt-palette-yellow-9, #616100); } .maintenance-box-grey { background-color: var(--wikt-palette-grey-2, #F2F2F2); border: 1px dashed var(--wikt-palette-grey-9, #303030); } .maintenance-box-orange { background-color: var(--wikt-palette-orange-2, #FFF2E6); border: 1px dashed var(--wikt-palette-orange-9, #612F00); } 94apw72wdbw2yvw3hygvo1l8sbdhyi8 অঘোৰপন্থ 0 307028 487991 2026-09-04T06:30:52Z अजीत कुमार तिवारी 4887 +असमिया से शब्द. 487991 wikitext text/x-wiki ==असमिया== {{wp|as:অঘোৰপন্থ}} ===व्युत्पत्ति=== {{lbor|as|sa|अघोरपन्थ}}. ===संज्ञा=== {{as-noun}} # [[अघोरपंथ]] === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # शिव का उपासक एक संप्रदाय जो मद्य-मांस आदि का भी सेवन करता है। (पुल्लिंग) {{C|as|संप्रदाय|पंथ}} [[श्रेणी:हिन्दी-प्रकाशितकोशों से अर्थ-हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश]] ==बंगाली== ===व्युत्पत्ति=== {{lbor|bn|sa|अघोरपन्थ}}. ===उच्चारण=== {{bn-IPA}} ===संज्ञा=== {{bn-noun}} # [[किसान]], [[कृषक]], खेतीबाड़ी करने वाला। {{C|bn|संप्रदाय|पंथ}} qn7q05hs1g4uw2sed6j1edzmi87wabk 487992 487991 2026-09-04T06:32:44Z अजीत कुमार तिवारी 4887 /* उच्चारण */ 487992 wikitext text/x-wiki ==असमिया== {{wp|as:অঘোৰপন্থ}} ===व्युत्पत्ति=== {{lbor|as|sa|अघोरपन्थ}}. ===संज्ञा=== {{as-noun}} # [[अघोरपंथ]] === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # शिव का उपासक एक संप्रदाय जो मद्य-मांस आदि का भी सेवन करता है। (पुल्लिंग) {{C|as|संप्रदाय|पंथ}} [[श्रेणी:हिन्दी-प्रकाशितकोशों से अर्थ-हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश]] ==बंगाली== ===व्युत्पत्ति=== {{lbor|bn|sa|अघोरपन्थ}}. ===उच्चारण=== {{bn-IPA|অঘোরপন্থ}} ===संज्ञा=== {{bn-noun}} # [[किसान]], [[कृषक]], खेतीबाड़ी करने वाला। {{C|bn|संप्रदाय|पंथ}} cdsf7gon9cgr0z9a87nr35k4sea73d0 487993 487992 2026-09-04T06:34:01Z अजीत कुमार तिवारी 4887 /* संज्ञा */ 487993 wikitext text/x-wiki ==असमिया== {{wp|as:অঘোৰপন্থ}} ===व्युत्पत्ति=== {{lbor|as|sa|अघोरपन्थ}}. ===संज्ञा=== {{as-noun}} # [[अघोरपंथ]] === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # शिव का उपासक एक संप्रदाय जो मद्य-मांस आदि का भी सेवन करता है। (पुल्लिंग) {{C|as|संप्रदाय|पंथ}} [[श्रेणी:हिन्दी-प्रकाशितकोशों से अर्थ-हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश]] ==बंगाली== ===व्युत्पत्ति=== {{lbor|bn|sa|अघोरपन्थ}}. ===उच्चारण=== {{bn-IPA|অঘোরপন্থ}} ===संज्ञा=== {{bn-noun}} # वामाचारी शिव उपासक संप्रदाय। {{C|bn|संप्रदाय|पंथ}} a8jo8eut6j4ujbl4o13vxq98uuhft0p मॉड्यूल:category tree/विक्षनरी रखरखाव 828 307029 487999 2026-09-04T07:36:08Z SM7 6218 अंग्रेजी विक्षनरी से आयातित+ अल्प स्थानीयकृत 487999 Scribunto text/plain local raw_categories = {} local raw_handlers = {} local m_template_parser = require("Module:template parser") local get_lang = require("Module:languages").getByCode local insert = table.insert local is_internal_title = require("Module:pages").is_internal_title local new_title = mw.title.new local split_lang_label = require("Module:category tree").split_lang_label local php_trim = require("Module:Scribunto").php_trim local uses_hidden_category = require("Module:maintenance category").uses_hidden_category ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["विक्षनरी रखरखाव"] = { description = "Categories containing pages that are being tracked for attention and improvement by editors.", breadcrumb_base = "रखरखाव", parents = "विक्षनरी", } raw_categories["खाली श्रेणियाँ"] = { topright = "{{shortcut|CAT:EC}}", description = "Categories with no members.", additional = [=[Categories are placed here by [[Module:category tree]] when they contain no pages or subcategories. Empty categories are not necessarily a problem, but they can clutter up their parent categories, or become orphaned if the structure of the category tree changes. This category therefore helps track down such cases, and allows them to be cleaned up. Because of the way the wiki software works, categories will appear here for a while afterwards if they were empty at first but had entries added to them later. This can be fixed by simply performing a "null edit" on the category page: edit the page, and save without making any changes. (Alternatively, use the "null edit" option provided by the "purge tab" [[Special:Preferences#mw-prefsection-gadgets|gadget]].) This can be avoided by adding entries to categories before creating them. It also helps to create categories from the "bottom up": start at the lowest level that has entries, then create its parent categories, then the parent categories of that, and so on.]=], parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["त्रुटिपूर्ण नामों वाली श्रेणियाँ"] = { description = "Categories with names that do not match the expected form within the category tree.", additional = [=[This usually happens when additional parameters have been given to {{tl|auto cat}} that don't match the name of the category, or when there is a problem with capitalization or spacing in the category name. ==इन्हें भी देखें== * [[:Category:Categories that are not defined in the category tree]]]=], parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Categories that are not defined in the category tree"] = { description = "Categories which use {{tl|auto cat}}, but which are not registered in the category tree data modules.", additional = [=[See the error box displayed on any of these categories for more info. ==इन्हें भी देखें== * [[:श्रेणी:त्रुटिपूर्ण नामों वाली श्रेणियाँ]]]=], parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Entries tagged as derogatory"] = { description = "Entries are placed in this category automatically when tagged with {{temp|derogatory}}. Do not add entries to this category manually.", parents = "विक्षनरी रखरखाव", breadcrumb = "Tagged as derogatory", can_be_empty = true, hidden = true, } raw_categories["Entries with deprecated labels"] = { description = "Entries which use labels which have been marked as deprecated and should no longer be used; these should be replaced according to the table below.", additional = [=[See all labels: [[Module:labels/data]], [[Module:labels/data/regional]], [[Module:labels/data/topical]]. {| class="wikitable sortable" ! Label ! Replace with |- | christianity || Christianity |- | currency || currencies, numismatics |- | emergency || emergency medicine |- | greekmyth || Greek mythology |- | industry || manufacturing |- | islam || Islam |- | morphology || linguistic morphology |- | musici || musical instruments |- | ordinal || ex. 1: [[14th]]: <nowiki>{{abbreviation of|fourteenth|lang=en}}</nowiki> <br> ex. 2: [[fourth]] (in definition): "The [[ordinal]] form of the number [[four]]." |- | plural || in the plural (usually) |- | quantum || quantum mechanics |- | singular || in the singular (usually) |- | usually plural<br/>usually in plural</br>usually in the plural || usually<nowiki>|</nowiki>in the plural |- | dual || in the dual |- | usually dual<br/>usually in dual</br>usually in the dual || usually<nowiki>|</nowiki>in the dual |- | vector || linear algebra |}]=], breadcrumb = "With deprecated labels", can_be_empty = true, hidden = true, parents = "विक्षनरी रखरखाव", } raw_categories["छुपाई गई श्रेणियाँ"] = { description = "Categories using the <code>[[mw:Help:Magic words#HIDDENCAT|<nowiki>__HIDDENCAT__</nowiki>]]</code> behavior switch, which hides the category from the lists of categories in its members and subcategories.", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["बृहदाकार श्रेणियाँ"] = { description = "Categories with more than 1 million members.", additional = "Such categories have the [[mw:Extension:DynamicPageList (Wikimedia)|DynamicPageList]] extension disabled, which is normally used to list the newest and oldest pages in a category. This is because categories above that size load very slowly when it is enabled, and in some cases become inaccessible due to timing-out.", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["प्रविष्टियों वाले पृष्ठ"] = { description = "Pages which contain language entries.", additional = "The subcategories within this category are used to determine the total number of entries on the English Wiktionary.", parents = "विक्षनरी", can_be_empty = true, hidden = true, } raw_categories["Unsupported titles"] = { description = "Pages with titles that are not supported by the MediaWiki software.", additional = "For an explanation of the reasons why certain titles are not supported, see [[Appendix:Unsupported titles]].", parents = "विक्षनरी", can_be_empty = true, hidden = true, } raw_categories["Indexed pages"] = { description = "Pages using the <code>[[mw:Help:Magic words#INDEX|<nowiki>__INDEX__</nowiki>]]</code> behavior switch, which tells search engines to index the page.", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Noindexed pages"] = { description = "Pages using the <code>[[mw:Help:Magic words#NOINDEX|<nowiki>__NOINDEX__</nowiki>]]</code> behavior switch, which tells search engines not to index the page.", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages using deprecated templates"] = { description = "This category contains entries, reconstruction pages, appendixes, sign glosses and citations pages using deprecated templates—templates that have failed our deletion process, and/or that have been replaced by superior templates.", additional = [=[This category is populated by {{tl|deprecated code}} and {{tl|deprecated lang param usage}}. The former is wrapped around templates that have been completely deprecated and remove from mainspace (particularly those in [[:Category:Successfully deprecated templates]]). The latter is wrapped around non-deprecated templates that accept the deprecated {{para|lang}} parameter; any use of that parameter will place the page in [[:Category:Pages using deprecated templates]]. Ideally, this category will be empty. Any pages in this category, particularly those in the mainspace, need to have their deprecated template usages corrected. ]=], breadcrumb = "Using deprecated templates", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages using lite templates"] = { description = "Pages which use at least one of the lite templates.", additional = "See [[:Category:Lua-free templates]].", breadcrumb = "Using lite templates", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with redundant inline etymon"] = { description = "Pages where the inline etymon term exists and the ID matches the one on the etymon page.", additional = "These should be reviewed and simplified to avoid redundant specification.", breadcrumb = "Redundant inline etymon", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages using etymon with no ID"] = { description = "Pages where {{tl|etymon}} is used without an ID and the linked page has only one etymon template for the language.", additional = "These should be updated to specify an explicit ID to avoid ambiguity if more etymons are added later.", breadcrumb = "ID-less etymon", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with inline etymon for redlinks"] = { description = "Pages where {{tl|etymon}} is used inside another {{tl|etymon}} and the target term is a redlink.", additional = "These should be reviewed once the target entries are created.", breadcrumb = "Inline etymon for redlinks", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with etymon"] = { description = "Pages that use the {{tl|etymon}} template.", breadcrumb = "Etymon", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with etymology trees"] = { description = "Pages that display an etymology tree generated by the {{tl|etymon}} template.", breadcrumb = "Etymology trees", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with etymology text stop language not in chain"] = { description = "Pages where {{tl|etymon}} is used with {{para|text}} set to stop at a language (e.g. {{code|text=:el}}) but that language never appears in the rendered etymology chain.", additional = "These should be reviewed and the {{para|text}} parameter corrected.", breadcrumb = "Etymology text stop language not in chain", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with tab characters"] = { description = "Pages which contain a tab character in their wikitext.", additional = "These should either be removed or replaced with spaces, because they go against [[WT:NORM]].", breadcrumb = "Tab characters", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with language headings in the wrong order"] = { description = "Pages in which the headings for each language's entry are in the wrong order.", additional = "Level 2 language headings should be in alphabetical order, except for Translingual and English, which go at the top (in that order).", breadcrumb = "Language headings in the wrong order", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with nonstandard language headings"] = { description = "Pages which contain a level 2 heading which does not match any language's canonical name.", additional = "The level 2 language heading for each language should always be that language's canonical name.", breadcrumb = "Nonstandard language headings", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with unwanted L1 headings"] = { description = "Pages which contain an unwanted level 1 heading.", additional = "Level 1 headings are not used in Wiktionary content pages, and only occur due to user error or vandalism.", breadcrumb = "Unwanted L1 headings", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with raw triple-brace template parameters"] = { description = "Pages which contain raw template parameters in the form of triple braces.", additional = "Triple-brace template parameters (e.g. {{param|param}}) are intended for use in templates, as they are substituted with the relevant template argument when the page is transcluded. Although they can theoretically be used on any page, there are currently no legitimate uses for them in content namespaces.\n\nTemplate parameters usually occur due to typos, or when {{tl|subst:}} has been used with a template that isn't supposed to be substed.", breadcrumb = "Raw template parameters", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with DEFAULTSORT conflicts"] = { topright = "{{shortcut|CAT:DEFAULTSORT}}", description = "Pages on which the {{tl|DEFAULTSORT:}} magic word has been used multiple times with different values.", additional = "In some (but not all) cases, this causes a warning to display on the page. In the vast majority of instances, an explicit use of {{tl|DEFAULTSORT:}} in wikitext should be <u>removed</u>.This is because the {{tl|head}} template handles it automatically. The only instances where it should be used in wikitext is outside of entries (i.e. outside of mainspace or the Reconstruction namespace)." .. "\n\nSee also [[:Category:Pages with DISPLAYTITLE conflicts]].", breadcrumb = "DEFAULTSORT conflicts", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with DISPLAYTITLE conflicts"] = { topright = "{{shortcut|CAT:DISPLAYTITLE}}", description = "Pages on which the {{tl|DISPLAYTITLE:}} magic word has been used multiple times with different values.", additional = "In some (but not all) cases, this causes a warning to display on the page. In the vast majority of instances, an explicit use of {{tl|DISPLAYTITLE:}} in wikitext should be <u>removed</u>.This is because the {{tl|head}} template handles it automatically. The only instances where it should be used in wikitext is outside of entries (i.e. outside of mainspace or the Reconstruction namespace)." .. "\n\nSee also [[:Category:Pages with DEFAULTSORT conflicts]].", breadcrumb = "DISPLAYTITLE conflicts", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with raw sortkeys"] = { description = "Pages on which a sortkey has been used with a raw category.", additional = "For example, {{code|[[<nowiki/>Category:IPA symbols|B]]}}." .. "\n\nThese are a priority to replace with category templates, since they are hard-coded and override the {{tl|DEFAULTSORT:}} value for the page. This causes problems if there are any changes to the sorting scheme for the category, because there is no way of changing them centrally.\n\n" .. "By comparison, raw categories which have no sortkey are less of a problem, because they will use the {{tl|DEFAULTSORT:}} value; this can be centrally controlled and is designed to be language-neutral, so avoids the issue of different editors using multiple different sorting schemes for the same category. However, they should still be replaced with category templates, since there may be additional language-specific sorting rules which cannot otherwise be applied.", breadcrumb = "Raw sortkeys", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with module errors"] = { topright = "{{shortcut|CAT:E|CAT:ERR|CAT:ERROR}}", description = "Pages that have errors in a [[Wiktionary:Scribunto|Lua]] module.", additional = "If entries are listed here for more than a day or two, the error should probably be reported at [[Wiktionary:GP|the Grease Pit]]. Memory errors are a common source of these errors; see the discussion at [[Wiktionary:Lua memory errors]]." .. "\n\nBecause the software does not immediately update pages when a change occurs in a template or module, errors listed here may have already been fixed. Therefore, please ensure that the error is still present before reporting problems. You can do this by performing a \"[[mw:Help:Dummy_edit#A_null_edit|null edit]]\" (editing the page and saving without making changes). If the error goes away then, it has already been fixed." .. "\n\n<u>You can use [https://en.wiktionary.org/wiki/Special:ApiSandbox#action=purge&format=json&forcelinkupdate=1&generator=categorymembers&utf8=1&formatversion=2&gcmtitle=Category%3APages%20with%20module%20errors&gcmlimit=20 this link] and press \"Make request\" to purge the cache of up to 20 pages from this category in one click.</u> This number can be adjusted up to 5,000, but anything above 30–100 will likely cause time-outs (depending on the size of the pages)." .. "\n\nThe contents of this category is controlled by [[Template:maintenance category]]. It is currently set to place talk pages, user pages{{,}} and user sandbox modules and templates in a separate category." .. "\n\nSee also [[:Category:Pages with ParserFunction errors]].", breadcrumb = "Module errors", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with ParserFunction errors"] = { topright = "{{shortcut|CAT:PFE}}", description = "Pages that have errors in a [[mw:Help:Extension:ParserFunctions|ParserFunction]] magic word.", additional = "Examples of these magic words are {{tl|#expr:}} and {{tl|#time:}}. If entries are listed here for more than a day or two, the error should probably be reported at [[Wiktionary:GP|the Grease Pit]]." .. "\n\nBecause the software does not immediately update pages when a change occurs in a template or module, errors listed here may have already been fixed. Therefore, please ensure that the error is still present before reporting problems. You can do this by performing a \"[[meta:Help:Dummy_edit#Null_edit|null edit]]\" (editing the page and saving without making changes). If the error goes away then, it has already been fixed." .. "\n\n<u>You can use [https://en.wiktionary.org/wiki/Special:ApiSandbox#action=purge&format=json&forcelinkupdate=1&generator=categorymembers&utf8=1&formatversion=2&gcmtitle=Category%3APages%20with%20ParserFunction%20errors&gcmlimit=20 this link] and press \"Make request\" to purge the cache of up to 20 pages from this category in one click.</u> This number can be adjusted up to 5,000, but anything above 30–100 will likely cause time-outs (depending on the size of the pages)." .. "\n\nThe contents of this category is controlled by [[Template:maintenance category]]. It is currently set to place talk pages, user pages{{,}} and user sandbox modules and templates in a separate category." .. "\n\nSee also [[:Category:Pages with module errors]].", breadcrumb = "ParserFunction errors", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Requests for moves, mergers and splits"] = { description = "Pages and categories which have been tagged with a request for them to be moved, merged or split.", breadcrumb = "Moves, mergers and splits", parents = { "विक्षनरी रखरखाव", "Requests" }, can_be_empty = true, hidden = true, } raw_categories["Pages to be merged"] = { description = "Pages tagged to be merged by the {{tl|merge}} template.", parents = "Requests for moves, mergers and splits", can_be_empty = true, } raw_categories["Pages to be moved"] = { description = "Pages tagged to be moved by the {{tl|move}} template.", parents = "Requests for moves, mergers and splits", can_be_empty = true, } raw_categories["Pages to be split"] = { description = "Pages tagged to be split by the {{tl|split}} template.", parents = "Requests for moves, mergers and splits", can_be_empty = true, } raw_categories["Category and label treatment requests"] = { description = "Content categories which have been tagged with {{tl|cltr}}, a request for them to be renamed, merged, split or deleted.", parents = { "विक्षनरी रखरखाव", "Requests" }, can_be_empty = true, hidden = true, } raw_categories["Pages using invalid parameters when calling templates"] = { description = "Pages that use unrecognized parameters when calling a template.", breadcrumb = "Invalid template parameters", parents = "विक्षनरी रखरखाव", can_be_empty = true, } raw_categories["Pages using catfix"] = { description = "Pages that use the <code>[[MediaWiki:Gadget-catfix.js|catfix]]</code> gadget.", additional = "This processes links to entries in language-specific categories by adding language-specific formatting, and points them to the language's section of the entry.", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["साँचा:minitoc को कॉल करने वाले पृष्ठ"] = { description = "Pages that display a mini table of contents by calling {{tl|minitoc}}.", additional = "This is used on very large pages with many entries, to assist with navigation.", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["साँचा:auto cat को कॉल करने वाली श्रेणियाँ"] = { description = "Categories that have been placed in another category by calling {{tl|auto cat}}.", additional = "This is the preferred way for categories to be subcategorized. The chief reason for this category is to facilitate the finding of categories which are not using {{tl|auto cat}} through the use of negative searches (e.g. qualifying a search with {{code|-incategory:\"{{PAGENAME}}\"}}).", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Categories with categories using raw markup"] = { description = "Categories that have been placed in another category using raw wiki markup (e.g. {{cl|Wiktionary}}). They should be added to the [[Module:category tree|category tree]] data instead.", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Documentation subpages"] = { description = "Documentation subpages of templates and modules.", parents = "Template documentation", } raw_categories["Orphaned documentation subpages"] = { description = "Documentation subpages whose main page was deleted, leaving the documentation orphaned.", additional = "Pages whose documentation page was created before the main page was created will also appear here. These should not be deleted; a null edit (edit with no changes) should fix this.", parents = {"Documentation subpages", "विक्षनरी रखरखाव"}, breadcrumb_first_sort_key = "Orphaned", can_be_empty = true, } raw_categories["Template documentation"] = { description = "Pages and categories relating to template documentation.", parents = "विक्षनरी", } raw_categories["Templates and modules needing documentation"] = { preceding = "{{also|:Category:Templates and modules with outdated documentation}}", description = "[[Wiktionary:Templates|Templates]] and [[Wiktionary:Modules|modules]] that require a documentation subpage.", additional = "See [[Help:Documenting templates and modules]] for more information.", parents = {"Template documentation", "विक्षनरी रखरखाव"}, can_be_empty = true, } raw_categories["Templates and modules with outdated documentation"] = { preceding = "{{also|:Category:Templates and modules needing documentation}}", description = "[[Wiktionary:Templates|Templates]] and [[Wiktionary:Modules|modules]] whose documentation is out of date.", additional = "See [[Help:Documenting templates]] for more information.", parents = {"Template documentation", "विक्षनरी रखरखाव"}, can_be_empty = true, } raw_categories["Pages using deprecated source tags"] = { description = "Pages that use the [[mw:Extension:SyntaxHighlight|SyntaxHighlight]] extension with legacy {{wt|source}} tags instead of {{wt|syntaxhighlight}}.", breadcrumb = "Deprecated source tags", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["पुनर्प्रेषण"] = { description = "Categories containing redirects of various sorts.", parents = "विक्षनरी", } raw_categories["Category redirects"] = { description = "Soft redirects from old names for categories to new names, populated by {{tl|movecat}}.", additional = "All categories under the old name should be empty.", breadcrumb = "category", parents = "पुनर्प्रेषण", } raw_categories["Empty category redirects"] = { description = "Category redirects where the redirected category is empty (as it should be).", breadcrumb = "empty", parents = {{name = "Category redirects", sort = " "}}, } raw_categories["Non-empty category redirects"] = { description = "Category redirects where the redirected category is not empty.", additional = "This category is populated by {{tl|movecat}} when it detects a non-empty category. This usually indicates that some template, or some page, is still using the old name.", breadcrumb = "non-empty", parents = {{name = "Category redirects", sort = " "}, "विक्षनरी रखरखाव"}, } raw_categories["Soft redirects"] = { description = "Soft redirects populated by {{tl|soft redirect}}.", breadcrumb = "soft", parents = "पुनर्प्रेषण", } raw_categories["User soft redirects"] = { description = "Soft redirects from former names of users to their current name.", breadcrumb = "user soft", parents = "पुनर्प्रेषण", } raw_categories["Redirects connected to a Wikidata item"] = { description = "Redirect pages which are connected to a [[d:|Wikidata]] item.", additional = "These are rarely needed, but are occasionally useful following a page merger, where other wikis may still separate the two.", parents = "पुनर्प्रेषण", can_be_empty = true, hidden = true, } -- Tracked according to [[phab:T347324]]. for ext, data in pairs { ["DynamicPageList"] = {"DynamicPageList (Wikimedia)", "T287380"}, ["EasyTimeline"] = {"EasyTimeline", "T137291"}, ["Graph"] = {"Graph", "T334940"}, ["Kartographer"] = {"Kartographer"}, ["Phonos"] = {"Phonos"}, ["Score"] = {"Score"}, ["WikiHiero"] = {"WikiHiero", "T344534"}, } do local link, phab = unpack(data) raw_categories["Pages using the " .. ext .. " extension"] = { description = ("Pages which make use of the [[mw:Extension:%s|%s]] extension."):format(link, ext), additional = phab and ("See [[phab:%s|%s]] on Phabricator for background information on why this extension is tracked."):format(phab, phab) or nil, parents = {name = "Wiktionary statistics", sort = ext}, can_be_empty = true, hidden = true, } end insert(raw_handlers, function(data) local template_type = data.category:match("^Pages using invalid parameters when calling (.+) templates$") if not template_type then return end local parents = { { name = "Pages using invalid parameters when calling templates", sort = template_type == "general use" and "*" or template_type, } } local lang = require("Module:languages").getByCanonicalName(template_type, nil, true) if lang then insert(parents, { name = "entry maintenance", is_label = true, lang = lang:getCode() }) end return { lang = lang and lang:getCode() or nil, description = "Pages that use unrecognized parameters when calling " .. template_type .. " templates.", parents = parents, breadcrumb = template_type, } end) do local prefixes = require("Module:table").listToSet { "list", "P", "R", "RQ", "table", "U" } local function add_parent(parents, seen, cat_type, sortkey) if seen[cat_type] then return end insert(parents, { name = ("Pages using invalid parameters when calling %s templates"):format(cat_type), sort = sortkey, }) seen[cat_type] = true end insert(raw_handlers, function(data) local template = data.category:match("^Pages using invalid parameters when calling (.+)$") if not template then return end -- Resolve any redirects. template = new_title(template) while template do local redirect = template.redirectTarget if not (redirect and is_internal_title(redirect)) then break end template = redirect end -- Disallow templates which would always hidden maintennace categories (e.g. sandboxes). if not (template and not uses_hidden_category(template)) then return end local prefixed_text, lang = template.prefixedText if template.namespace == 10 then local name = template.text -- Remove the prefix if present (e.g. "R:" or "RQ:"). local prefix, text = name:match("^(.-):(.+)") if not (prefix and prefixes[prefix]) then text = name end -- Check the initial language code, chopping off hyphenated sections until there's a match or they run out. local code = mw.ustring.match(text, "^[a-z][a-zA-Z-]*[a-zA-Z]%f[^%w]") while code do lang = get_lang(code) if lang then break end code = code:match("(.+)%-%a*$") end -- If no match and it's a list: or table: template, check if the template name ends "/CODE". if not lang and (prefix == "list" or prefix == "table") then code = text:match("%f[^/]%l[%a-]*%a$") if code then lang = get_lang(code) end end end local sortkey = template.text local parents, seen = {}, {} -- Categorize as language-specific if a language was found. if lang then add_parent(parents, seen, lang:getCanonicalName(), sortkey) end -- Also grab any language categories from the template page. for _, cat in ipairs(template.categories) do if cat:sub(-10) == " templates" or cat:sub(-13) == " subtemplates" then local cat_lang = split_lang_label(new_title(cat).text) if cat_lang then add_parent(parents, seen, cat_lang:getCanonicalName(), sortkey) end end end -- If none were found, categorize as general use. if #parents == 0 then add_parent(parents, seen, "general use", sortkey) end -- Only add can_be_empty if the template exists and contains checkparams. local content, can_be_empty = template:getContent() if content then -- Check for {{#invoke:checkparams|warn|...}}. -- args[1] is the module and args[2] is the function name, so #INVOKE: will throw an error if either is not present. for template in require("Module:template parser").find_templates(content) do if template:get_name() == "#INVOKE:" then local args = template:get_arguments() local arg_2 = args[2] if arg_2 and php_trim(args[1]) == "checkparams" and php_trim(arg_2) == "warn" then can_be_empty = true break end end end end return { canonical_name = "Pages using invalid parameters when calling " .. prefixed_text, lang = lang and lang:getCode() or nil, description = ("Pages that use unrecognized parameters when calling {{tl|%s}}.") :format(m_template_parser.getTemplateInvocationName(template)), additional = "These template calls should be reviewed and the invalid parameter(s) should be corrected or removed.", breadcrumb = prefixed_text, parents = parents, can_be_empty = can_be_empty, hidden = true, } end) end return { RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers } 737gm32lbrnnmc1hyaq5jvu59tashnk 488003 487999 2026-09-04T07:41:16Z SM7 6218 अनुवाद बाहर से आता है "छुपाई हुई श्रेणियाँ" 488003 Scribunto text/plain local raw_categories = {} local raw_handlers = {} local m_template_parser = require("Module:template parser") local get_lang = require("Module:languages").getByCode local insert = table.insert local is_internal_title = require("Module:pages").is_internal_title local new_title = mw.title.new local split_lang_label = require("Module:category tree").split_lang_label local php_trim = require("Module:Scribunto").php_trim local uses_hidden_category = require("Module:maintenance category").uses_hidden_category ----------------------------------------------------------------------------- -- -- -- RAW CATEGORIES -- -- -- ----------------------------------------------------------------------------- raw_categories["विक्षनरी रखरखाव"] = { description = "Categories containing pages that are being tracked for attention and improvement by editors.", breadcrumb_base = "रखरखाव", parents = "विक्षनरी", } raw_categories["खाली श्रेणियाँ"] = { topright = "{{shortcut|CAT:EC}}", description = "Categories with no members.", additional = [=[Categories are placed here by [[Module:category tree]] when they contain no pages or subcategories. Empty categories are not necessarily a problem, but they can clutter up their parent categories, or become orphaned if the structure of the category tree changes. This category therefore helps track down such cases, and allows them to be cleaned up. Because of the way the wiki software works, categories will appear here for a while afterwards if they were empty at first but had entries added to them later. This can be fixed by simply performing a "null edit" on the category page: edit the page, and save without making any changes. (Alternatively, use the "null edit" option provided by the "purge tab" [[Special:Preferences#mw-prefsection-gadgets|gadget]].) This can be avoided by adding entries to categories before creating them. It also helps to create categories from the "bottom up": start at the lowest level that has entries, then create its parent categories, then the parent categories of that, and so on.]=], parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["त्रुटिपूर्ण नामों वाली श्रेणियाँ"] = { description = "Categories with names that do not match the expected form within the category tree.", additional = [=[This usually happens when additional parameters have been given to {{tl|auto cat}} that don't match the name of the category, or when there is a problem with capitalization or spacing in the category name. ==इन्हें भी देखें== * [[:Category:Categories that are not defined in the category tree]]]=], parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Categories that are not defined in the category tree"] = { description = "Categories which use {{tl|auto cat}}, but which are not registered in the category tree data modules.", additional = [=[See the error box displayed on any of these categories for more info. ==इन्हें भी देखें== * [[:श्रेणी:त्रुटिपूर्ण नामों वाली श्रेणियाँ]]]=], parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Entries tagged as derogatory"] = { description = "Entries are placed in this category automatically when tagged with {{temp|derogatory}}. Do not add entries to this category manually.", parents = "विक्षनरी रखरखाव", breadcrumb = "Tagged as derogatory", can_be_empty = true, hidden = true, } raw_categories["Entries with deprecated labels"] = { description = "Entries which use labels which have been marked as deprecated and should no longer be used; these should be replaced according to the table below.", additional = [=[See all labels: [[Module:labels/data]], [[Module:labels/data/regional]], [[Module:labels/data/topical]]. {| class="wikitable sortable" ! Label ! Replace with |- | christianity || Christianity |- | currency || currencies, numismatics |- | emergency || emergency medicine |- | greekmyth || Greek mythology |- | industry || manufacturing |- | islam || Islam |- | morphology || linguistic morphology |- | musici || musical instruments |- | ordinal || ex. 1: [[14th]]: <nowiki>{{abbreviation of|fourteenth|lang=en}}</nowiki> <br> ex. 2: [[fourth]] (in definition): "The [[ordinal]] form of the number [[four]]." |- | plural || in the plural (usually) |- | quantum || quantum mechanics |- | singular || in the singular (usually) |- | usually plural<br/>usually in plural</br>usually in the plural || usually<nowiki>|</nowiki>in the plural |- | dual || in the dual |- | usually dual<br/>usually in dual</br>usually in the dual || usually<nowiki>|</nowiki>in the dual |- | vector || linear algebra |}]=], breadcrumb = "With deprecated labels", can_be_empty = true, hidden = true, parents = "विक्षनरी रखरखाव", } raw_categories["छुपाई हुई श्रेणियाँ"] = { description = "Categories using the <code>[[mw:Help:Magic words#HIDDENCAT|<nowiki>__HIDDENCAT__</nowiki>]]</code> behavior switch, which hides the category from the lists of categories in its members and subcategories.", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["बृहदाकार श्रेणियाँ"] = { description = "Categories with more than 1 million members.", additional = "Such categories have the [[mw:Extension:DynamicPageList (Wikimedia)|DynamicPageList]] extension disabled, which is normally used to list the newest and oldest pages in a category. This is because categories above that size load very slowly when it is enabled, and in some cases become inaccessible due to timing-out.", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["प्रविष्टियों वाले पृष्ठ"] = { description = "Pages which contain language entries.", additional = "The subcategories within this category are used to determine the total number of entries on the English Wiktionary.", parents = "विक्षनरी", can_be_empty = true, hidden = true, } raw_categories["Unsupported titles"] = { description = "Pages with titles that are not supported by the MediaWiki software.", additional = "For an explanation of the reasons why certain titles are not supported, see [[Appendix:Unsupported titles]].", parents = "विक्षनरी", can_be_empty = true, hidden = true, } raw_categories["Indexed pages"] = { description = "Pages using the <code>[[mw:Help:Magic words#INDEX|<nowiki>__INDEX__</nowiki>]]</code> behavior switch, which tells search engines to index the page.", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Noindexed pages"] = { description = "Pages using the <code>[[mw:Help:Magic words#NOINDEX|<nowiki>__NOINDEX__</nowiki>]]</code> behavior switch, which tells search engines not to index the page.", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages using deprecated templates"] = { description = "This category contains entries, reconstruction pages, appendixes, sign glosses and citations pages using deprecated templates—templates that have failed our deletion process, and/or that have been replaced by superior templates.", additional = [=[This category is populated by {{tl|deprecated code}} and {{tl|deprecated lang param usage}}. The former is wrapped around templates that have been completely deprecated and remove from mainspace (particularly those in [[:Category:Successfully deprecated templates]]). The latter is wrapped around non-deprecated templates that accept the deprecated {{para|lang}} parameter; any use of that parameter will place the page in [[:Category:Pages using deprecated templates]]. Ideally, this category will be empty. Any pages in this category, particularly those in the mainspace, need to have their deprecated template usages corrected. ]=], breadcrumb = "Using deprecated templates", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages using lite templates"] = { description = "Pages which use at least one of the lite templates.", additional = "See [[:Category:Lua-free templates]].", breadcrumb = "Using lite templates", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with redundant inline etymon"] = { description = "Pages where the inline etymon term exists and the ID matches the one on the etymon page.", additional = "These should be reviewed and simplified to avoid redundant specification.", breadcrumb = "Redundant inline etymon", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages using etymon with no ID"] = { description = "Pages where {{tl|etymon}} is used without an ID and the linked page has only one etymon template for the language.", additional = "These should be updated to specify an explicit ID to avoid ambiguity if more etymons are added later.", breadcrumb = "ID-less etymon", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with inline etymon for redlinks"] = { description = "Pages where {{tl|etymon}} is used inside another {{tl|etymon}} and the target term is a redlink.", additional = "These should be reviewed once the target entries are created.", breadcrumb = "Inline etymon for redlinks", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with etymon"] = { description = "Pages that use the {{tl|etymon}} template.", breadcrumb = "Etymon", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with etymology trees"] = { description = "Pages that display an etymology tree generated by the {{tl|etymon}} template.", breadcrumb = "Etymology trees", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with etymology text stop language not in chain"] = { description = "Pages where {{tl|etymon}} is used with {{para|text}} set to stop at a language (e.g. {{code|text=:el}}) but that language never appears in the rendered etymology chain.", additional = "These should be reviewed and the {{para|text}} parameter corrected.", breadcrumb = "Etymology text stop language not in chain", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with tab characters"] = { description = "Pages which contain a tab character in their wikitext.", additional = "These should either be removed or replaced with spaces, because they go against [[WT:NORM]].", breadcrumb = "Tab characters", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with language headings in the wrong order"] = { description = "Pages in which the headings for each language's entry are in the wrong order.", additional = "Level 2 language headings should be in alphabetical order, except for Translingual and English, which go at the top (in that order).", breadcrumb = "Language headings in the wrong order", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with nonstandard language headings"] = { description = "Pages which contain a level 2 heading which does not match any language's canonical name.", additional = "The level 2 language heading for each language should always be that language's canonical name.", breadcrumb = "Nonstandard language headings", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with unwanted L1 headings"] = { description = "Pages which contain an unwanted level 1 heading.", additional = "Level 1 headings are not used in Wiktionary content pages, and only occur due to user error or vandalism.", breadcrumb = "Unwanted L1 headings", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with raw triple-brace template parameters"] = { description = "Pages which contain raw template parameters in the form of triple braces.", additional = "Triple-brace template parameters (e.g. {{param|param}}) are intended for use in templates, as they are substituted with the relevant template argument when the page is transcluded. Although they can theoretically be used on any page, there are currently no legitimate uses for them in content namespaces.\n\nTemplate parameters usually occur due to typos, or when {{tl|subst:}} has been used with a template that isn't supposed to be substed.", breadcrumb = "Raw template parameters", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with DEFAULTSORT conflicts"] = { topright = "{{shortcut|CAT:DEFAULTSORT}}", description = "Pages on which the {{tl|DEFAULTSORT:}} magic word has been used multiple times with different values.", additional = "In some (but not all) cases, this causes a warning to display on the page. In the vast majority of instances, an explicit use of {{tl|DEFAULTSORT:}} in wikitext should be <u>removed</u>.This is because the {{tl|head}} template handles it automatically. The only instances where it should be used in wikitext is outside of entries (i.e. outside of mainspace or the Reconstruction namespace)." .. "\n\nSee also [[:Category:Pages with DISPLAYTITLE conflicts]].", breadcrumb = "DEFAULTSORT conflicts", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with DISPLAYTITLE conflicts"] = { topright = "{{shortcut|CAT:DISPLAYTITLE}}", description = "Pages on which the {{tl|DISPLAYTITLE:}} magic word has been used multiple times with different values.", additional = "In some (but not all) cases, this causes a warning to display on the page. In the vast majority of instances, an explicit use of {{tl|DISPLAYTITLE:}} in wikitext should be <u>removed</u>.This is because the {{tl|head}} template handles it automatically. The only instances where it should be used in wikitext is outside of entries (i.e. outside of mainspace or the Reconstruction namespace)." .. "\n\nSee also [[:Category:Pages with DEFAULTSORT conflicts]].", breadcrumb = "DISPLAYTITLE conflicts", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with raw sortkeys"] = { description = "Pages on which a sortkey has been used with a raw category.", additional = "For example, {{code|[[<nowiki/>Category:IPA symbols|B]]}}." .. "\n\nThese are a priority to replace with category templates, since they are hard-coded and override the {{tl|DEFAULTSORT:}} value for the page. This causes problems if there are any changes to the sorting scheme for the category, because there is no way of changing them centrally.\n\n" .. "By comparison, raw categories which have no sortkey are less of a problem, because they will use the {{tl|DEFAULTSORT:}} value; this can be centrally controlled and is designed to be language-neutral, so avoids the issue of different editors using multiple different sorting schemes for the same category. However, they should still be replaced with category templates, since there may be additional language-specific sorting rules which cannot otherwise be applied.", breadcrumb = "Raw sortkeys", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with module errors"] = { topright = "{{shortcut|CAT:E|CAT:ERR|CAT:ERROR}}", description = "Pages that have errors in a [[Wiktionary:Scribunto|Lua]] module.", additional = "If entries are listed here for more than a day or two, the error should probably be reported at [[Wiktionary:GP|the Grease Pit]]. Memory errors are a common source of these errors; see the discussion at [[Wiktionary:Lua memory errors]]." .. "\n\nBecause the software does not immediately update pages when a change occurs in a template or module, errors listed here may have already been fixed. Therefore, please ensure that the error is still present before reporting problems. You can do this by performing a \"[[mw:Help:Dummy_edit#A_null_edit|null edit]]\" (editing the page and saving without making changes). If the error goes away then, it has already been fixed." .. "\n\n<u>You can use [https://en.wiktionary.org/wiki/Special:ApiSandbox#action=purge&format=json&forcelinkupdate=1&generator=categorymembers&utf8=1&formatversion=2&gcmtitle=Category%3APages%20with%20module%20errors&gcmlimit=20 this link] and press \"Make request\" to purge the cache of up to 20 pages from this category in one click.</u> This number can be adjusted up to 5,000, but anything above 30–100 will likely cause time-outs (depending on the size of the pages)." .. "\n\nThe contents of this category is controlled by [[Template:maintenance category]]. It is currently set to place talk pages, user pages{{,}} and user sandbox modules and templates in a separate category." .. "\n\nSee also [[:Category:Pages with ParserFunction errors]].", breadcrumb = "Module errors", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Pages with ParserFunction errors"] = { topright = "{{shortcut|CAT:PFE}}", description = "Pages that have errors in a [[mw:Help:Extension:ParserFunctions|ParserFunction]] magic word.", additional = "Examples of these magic words are {{tl|#expr:}} and {{tl|#time:}}. If entries are listed here for more than a day or two, the error should probably be reported at [[Wiktionary:GP|the Grease Pit]]." .. "\n\nBecause the software does not immediately update pages when a change occurs in a template or module, errors listed here may have already been fixed. Therefore, please ensure that the error is still present before reporting problems. You can do this by performing a \"[[meta:Help:Dummy_edit#Null_edit|null edit]]\" (editing the page and saving without making changes). If the error goes away then, it has already been fixed." .. "\n\n<u>You can use [https://en.wiktionary.org/wiki/Special:ApiSandbox#action=purge&format=json&forcelinkupdate=1&generator=categorymembers&utf8=1&formatversion=2&gcmtitle=Category%3APages%20with%20ParserFunction%20errors&gcmlimit=20 this link] and press \"Make request\" to purge the cache of up to 20 pages from this category in one click.</u> This number can be adjusted up to 5,000, but anything above 30–100 will likely cause time-outs (depending on the size of the pages)." .. "\n\nThe contents of this category is controlled by [[Template:maintenance category]]. It is currently set to place talk pages, user pages{{,}} and user sandbox modules and templates in a separate category." .. "\n\nSee also [[:Category:Pages with module errors]].", breadcrumb = "ParserFunction errors", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Requests for moves, mergers and splits"] = { description = "Pages and categories which have been tagged with a request for them to be moved, merged or split.", breadcrumb = "Moves, mergers and splits", parents = { "विक्षनरी रखरखाव", "Requests" }, can_be_empty = true, hidden = true, } raw_categories["Pages to be merged"] = { description = "Pages tagged to be merged by the {{tl|merge}} template.", parents = "Requests for moves, mergers and splits", can_be_empty = true, } raw_categories["Pages to be moved"] = { description = "Pages tagged to be moved by the {{tl|move}} template.", parents = "Requests for moves, mergers and splits", can_be_empty = true, } raw_categories["Pages to be split"] = { description = "Pages tagged to be split by the {{tl|split}} template.", parents = "Requests for moves, mergers and splits", can_be_empty = true, } raw_categories["Category and label treatment requests"] = { description = "Content categories which have been tagged with {{tl|cltr}}, a request for them to be renamed, merged, split or deleted.", parents = { "विक्षनरी रखरखाव", "Requests" }, can_be_empty = true, hidden = true, } raw_categories["Pages using invalid parameters when calling templates"] = { description = "Pages that use unrecognized parameters when calling a template.", breadcrumb = "Invalid template parameters", parents = "विक्षनरी रखरखाव", can_be_empty = true, } raw_categories["Pages using catfix"] = { description = "Pages that use the <code>[[MediaWiki:Gadget-catfix.js|catfix]]</code> gadget.", additional = "This processes links to entries in language-specific categories by adding language-specific formatting, and points them to the language's section of the entry.", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["साँचा:minitoc को कॉल करने वाले पृष्ठ"] = { description = "Pages that display a mini table of contents by calling {{tl|minitoc}}.", additional = "This is used on very large pages with many entries, to assist with navigation.", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["साँचा:auto cat को कॉल करने वाली श्रेणियाँ"] = { description = "Categories that have been placed in another category by calling {{tl|auto cat}}.", additional = "This is the preferred way for categories to be subcategorized. The chief reason for this category is to facilitate the finding of categories which are not using {{tl|auto cat}} through the use of negative searches (e.g. qualifying a search with {{code|-incategory:\"{{PAGENAME}}\"}}).", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Categories with categories using raw markup"] = { description = "Categories that have been placed in another category using raw wiki markup (e.g. {{cl|Wiktionary}}). They should be added to the [[Module:category tree|category tree]] data instead.", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["Documentation subpages"] = { description = "Documentation subpages of templates and modules.", parents = "Template documentation", } raw_categories["Orphaned documentation subpages"] = { description = "Documentation subpages whose main page was deleted, leaving the documentation orphaned.", additional = "Pages whose documentation page was created before the main page was created will also appear here. These should not be deleted; a null edit (edit with no changes) should fix this.", parents = {"Documentation subpages", "विक्षनरी रखरखाव"}, breadcrumb_first_sort_key = "Orphaned", can_be_empty = true, } raw_categories["Template documentation"] = { description = "Pages and categories relating to template documentation.", parents = "विक्षनरी", } raw_categories["Templates and modules needing documentation"] = { preceding = "{{also|:Category:Templates and modules with outdated documentation}}", description = "[[Wiktionary:Templates|Templates]] and [[Wiktionary:Modules|modules]] that require a documentation subpage.", additional = "See [[Help:Documenting templates and modules]] for more information.", parents = {"Template documentation", "विक्षनरी रखरखाव"}, can_be_empty = true, } raw_categories["Templates and modules with outdated documentation"] = { preceding = "{{also|:Category:Templates and modules needing documentation}}", description = "[[Wiktionary:Templates|Templates]] and [[Wiktionary:Modules|modules]] whose documentation is out of date.", additional = "See [[Help:Documenting templates]] for more information.", parents = {"Template documentation", "विक्षनरी रखरखाव"}, can_be_empty = true, } raw_categories["Pages using deprecated source tags"] = { description = "Pages that use the [[mw:Extension:SyntaxHighlight|SyntaxHighlight]] extension with legacy {{wt|source}} tags instead of {{wt|syntaxhighlight}}.", breadcrumb = "Deprecated source tags", parents = "विक्षनरी रखरखाव", can_be_empty = true, hidden = true, } raw_categories["पुनर्प्रेषण"] = { description = "Categories containing redirects of various sorts.", parents = "विक्षनरी", } raw_categories["Category redirects"] = { description = "Soft redirects from old names for categories to new names, populated by {{tl|movecat}}.", additional = "All categories under the old name should be empty.", breadcrumb = "category", parents = "पुनर्प्रेषण", } raw_categories["Empty category redirects"] = { description = "Category redirects where the redirected category is empty (as it should be).", breadcrumb = "empty", parents = {{name = "Category redirects", sort = " "}}, } raw_categories["Non-empty category redirects"] = { description = "Category redirects where the redirected category is not empty.", additional = "This category is populated by {{tl|movecat}} when it detects a non-empty category. This usually indicates that some template, or some page, is still using the old name.", breadcrumb = "non-empty", parents = {{name = "Category redirects", sort = " "}, "विक्षनरी रखरखाव"}, } raw_categories["Soft redirects"] = { description = "Soft redirects populated by {{tl|soft redirect}}.", breadcrumb = "soft", parents = "पुनर्प्रेषण", } raw_categories["User soft redirects"] = { description = "Soft redirects from former names of users to their current name.", breadcrumb = "user soft", parents = "पुनर्प्रेषण", } raw_categories["Redirects connected to a Wikidata item"] = { description = "Redirect pages which are connected to a [[d:|Wikidata]] item.", additional = "These are rarely needed, but are occasionally useful following a page merger, where other wikis may still separate the two.", parents = "पुनर्प्रेषण", can_be_empty = true, hidden = true, } -- Tracked according to [[phab:T347324]]. for ext, data in pairs { ["DynamicPageList"] = {"DynamicPageList (Wikimedia)", "T287380"}, ["EasyTimeline"] = {"EasyTimeline", "T137291"}, ["Graph"] = {"Graph", "T334940"}, ["Kartographer"] = {"Kartographer"}, ["Phonos"] = {"Phonos"}, ["Score"] = {"Score"}, ["WikiHiero"] = {"WikiHiero", "T344534"}, } do local link, phab = unpack(data) raw_categories["Pages using the " .. ext .. " extension"] = { description = ("Pages which make use of the [[mw:Extension:%s|%s]] extension."):format(link, ext), additional = phab and ("See [[phab:%s|%s]] on Phabricator for background information on why this extension is tracked."):format(phab, phab) or nil, parents = {name = "Wiktionary statistics", sort = ext}, can_be_empty = true, hidden = true, } end insert(raw_handlers, function(data) local template_type = data.category:match("^Pages using invalid parameters when calling (.+) templates$") if not template_type then return end local parents = { { name = "Pages using invalid parameters when calling templates", sort = template_type == "general use" and "*" or template_type, } } local lang = require("Module:languages").getByCanonicalName(template_type, nil, true) if lang then insert(parents, { name = "entry maintenance", is_label = true, lang = lang:getCode() }) end return { lang = lang and lang:getCode() or nil, description = "Pages that use unrecognized parameters when calling " .. template_type .. " templates.", parents = parents, breadcrumb = template_type, } end) do local prefixes = require("Module:table").listToSet { "list", "P", "R", "RQ", "table", "U" } local function add_parent(parents, seen, cat_type, sortkey) if seen[cat_type] then return end insert(parents, { name = ("Pages using invalid parameters when calling %s templates"):format(cat_type), sort = sortkey, }) seen[cat_type] = true end insert(raw_handlers, function(data) local template = data.category:match("^Pages using invalid parameters when calling (.+)$") if not template then return end -- Resolve any redirects. template = new_title(template) while template do local redirect = template.redirectTarget if not (redirect and is_internal_title(redirect)) then break end template = redirect end -- Disallow templates which would always hidden maintennace categories (e.g. sandboxes). if not (template and not uses_hidden_category(template)) then return end local prefixed_text, lang = template.prefixedText if template.namespace == 10 then local name = template.text -- Remove the prefix if present (e.g. "R:" or "RQ:"). local prefix, text = name:match("^(.-):(.+)") if not (prefix and prefixes[prefix]) then text = name end -- Check the initial language code, chopping off hyphenated sections until there's a match or they run out. local code = mw.ustring.match(text, "^[a-z][a-zA-Z-]*[a-zA-Z]%f[^%w]") while code do lang = get_lang(code) if lang then break end code = code:match("(.+)%-%a*$") end -- If no match and it's a list: or table: template, check if the template name ends "/CODE". if not lang and (prefix == "list" or prefix == "table") then code = text:match("%f[^/]%l[%a-]*%a$") if code then lang = get_lang(code) end end end local sortkey = template.text local parents, seen = {}, {} -- Categorize as language-specific if a language was found. if lang then add_parent(parents, seen, lang:getCanonicalName(), sortkey) end -- Also grab any language categories from the template page. for _, cat in ipairs(template.categories) do if cat:sub(-10) == " templates" or cat:sub(-13) == " subtemplates" then local cat_lang = split_lang_label(new_title(cat).text) if cat_lang then add_parent(parents, seen, cat_lang:getCanonicalName(), sortkey) end end end -- If none were found, categorize as general use. if #parents == 0 then add_parent(parents, seen, "general use", sortkey) end -- Only add can_be_empty if the template exists and contains checkparams. local content, can_be_empty = template:getContent() if content then -- Check for {{#invoke:checkparams|warn|...}}. -- args[1] is the module and args[2] is the function name, so #INVOKE: will throw an error if either is not present. for template in require("Module:template parser").find_templates(content) do if template:get_name() == "#INVOKE:" then local args = template:get_arguments() local arg_2 = args[2] if arg_2 and php_trim(args[1]) == "checkparams" and php_trim(arg_2) == "warn" then can_be_empty = true break end end end end return { canonical_name = "Pages using invalid parameters when calling " .. prefixed_text, lang = lang and lang:getCode() or nil, description = ("Pages that use unrecognized parameters when calling {{tl|%s}}.") :format(m_template_parser.getTemplateInvocationName(template)), additional = "These template calls should be reviewed and the invalid parameter(s) should be corrected or removed.", breadcrumb = prefixed_text, parents = parents, can_be_empty = can_be_empty, hidden = true, } end) end return { RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers } r5mdi9pkv962gr1gfj8mcnq94v16akz श्रेणी:साँचा:auto cat को कॉल करने वाली श्रेणियाँ 14 307030 488000 2026-09-04T07:39:25Z SM7 6218 निर्मित 488000 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx साँचा:mbox/style.css 10 307031 488009 2026-09-04T07:56:56Z SM7 6218 "/** * {{ombox}} (other pages message box) styles * * @source https://www.mediawiki.org/wiki/MediaWiki:Gadget-enwp-boxes.css * @revision 2021-07-15 * * Note: forked to use the [[Wiktionary:Palette]]. */ table.ombox { margin: 4px 10%; border-collapse: collapse; /* Default "notice" gray */ border: 1px solid var(--border-color-base, #a2a9b1); background-color: var(--background-color-neutral-subtle, #f8f9fa); box-sizing:..." के साथ नया पृष्ठ बनाया 488009 sanitized-css text/css /** * {{ombox}} (other pages message box) styles * * @source https://www.mediawiki.org/wiki/MediaWiki:Gadget-enwp-boxes.css * @revision 2021-07-15 * * Note: forked to use the [[Wiktionary:Palette]]. */ table.ombox { margin: 4px 10%; border-collapse: collapse; /* Default "notice" gray */ border: 1px solid var(--border-color-base, #a2a9b1); background-color: var(--background-color-neutral-subtle, #f8f9fa); box-sizing: border-box; color: var(--color-base, #202122); } /* Wiktionary-specific mobile rule */ @media all and (max-width: 639px) { /* matches calc(640px - 1px) in Minerva CSS */ table.ombox { margin: 4px 0; } } /* An empty narrow cell */ .ombox td.mbox-empty-cell { border: none; padding: 0; width: 1px; } /* The message body cell(s) */ .ombox th.mbox-text, .ombox td.mbox-text { border: none; /* 0.9em left/right */ padding: 0.25em 0.9em; /* Make all mboxes the same width regardless of text length */ width: 100%; } /* The left image cell */ .ombox td.mbox-image { border: none; text-align: center; padding: 0.5em 0 0.5em 0.9em; } /* The right image cell */ .ombox td.mbox-imageright { border: none; text-align: center; padding: 0.5em 0.9em 0.5em 0; } body.skin--responsive table.ombox img { max-width: none !important; } table.ombox-notice { /* Gray */ border: 1px solid var(--border-color-base, #a2a9b1); } table.ombox-speedy { /* Pink */ background-color: var(--wikt-palette-lightred, #fee7e6); } table.ombox-speedy, table.ombox-delete { /* Red */ border: 1px solid var(--wikt-palette-deepred, #b32424); border-width: 2px; } @media screen { html.skin-theme-clientpref-night .ombox-speedy { background-color: #310402; /* Dark red, same hue/saturation as light */ } } @media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .ombox-speedy { background-color: #310402; /* Dark red, same hue/saturation as light */ } } table.ombox-content { /* Orange */ border: 1px solid var(--wikt-palette-orange, #f28500); } table.ombox-style { /* Yellow */ border: 1px solid var(--wikt-palette-brightyellow, #fc3); } table.ombox-move { /* Purple */ border: 1px solid var(--wikt-palette-purple-9, #9932cc); } table.ombox-protection { /* Gray-gold */ border: 2px solid var(--wikt-palette-dullgold, #a2a9b1); } /** * {{ombox|small=1}} styles * * These ".mbox-small" classes must be placed after all other * ".ombox" classes. "html body.mediawiki .ombox" * is so they apply only to other page message boxes. * * @source https://www.mediawiki.org/wiki/MediaWiki:Gadget-enwp-boxes.css * @revision 2021-07-15 */ /* START ENGLISH WIKTIONARY OVERRIDES */ /* The following styles were moved from [[MediaWiki:Common.css]] */ /* For the "small=yes" option: */ table.mbox-small { clear: right; float: right; margin: 4px 0 4px 1em; width: 238px; font-size: 88%; line-height: 1.25em; } /* For the "small=left" option: */ table.mbox-small-left { margin: 4px 1em 4px 0; width: 238px; border-collapse: collapse; font-size: 88%; line-height: 1.25em; } /* END ENGLISH WIKTIONARY OVERRIDES */ /* Cell sizes for ambox/tmbox/imbox/cmbox/ombox/fmbox/dmbox message boxes */ th.mbox-text, td.mbox-text { /* The message body cell(s) */ padding: 0.25em 0.9em; /* 0.9em left/right */ } td.mbox-image { /* The left image cell */ padding: 2px 0 2px 0.9em; /* 0.9em left, 0px right */ } td.mbox-imageright { /* The right image cell */ padding: 2px 0.9em 2px 0; /* 0px left, 0.9em right */ } /* Footer and header message box styles */ table.fmbox { clear: both; margin: 0.2em 0; width: 100%; border: 1px solid var(--border-color-base, #a2a9b1); background-color: var(--wikt-palette-paleblue, #f8f9fa); /* Default "system" gray */ box-sizing: border-box; } table.fmbox-system { background-color: var(--wikt-palette-paleblue, #f8f9fa); } table.fmbox-warning { border: 1px solid var(--wikt-palette-red-9, #bb7070); /* Dark pink */ background-color: var(--wikt-palette-lightred, #ffdbdb); /* Pink */ } table.fmbox-editnotice { background-color: transparent; } jhajvt7xnb5opkk7pe65o6v26t4581y श्रेणी:त्रुटिपूर्ण नामों वाली श्रेणियाँ 14 307032 488014 2026-09-04T08:03:31Z SM7 6218 निर्मित 488014 wikitext text/x-wiki {{auto cat}} eomzlm5v4j7ond1phrju7cnue91g5qx साँचा:subpages 10 307033 488025 2026-09-04T10:06:27Z SM7 6218 अंग्रेजी विक्षनरी से आयातित 488025 wikitext text/x-wiki <div style="width: auto; margin: 0px; overflow: auto;"> {| width="100%" style="font-size: 90%; background:transparent;" | {{Special:Prefixindex/{{{1|{{FULLPAGENAME}}}}}/|hideredirects={{{hideredirects|}}}|stripprefix={{{stripprefix|}}}}} |}</div><!-- --><noinclude>{{documentation}}</noinclude> nmuxgbm5kjbo1hcvmmp30tna7a7p15i অভাৱনীয 0 307034 488026 2026-09-04T10:19:41Z अजीत कुमार तिवारी 4887 +असमिया से शब्द. 488026 wikitext text/x-wiki ==असमिया== ===व्युत्पत्ति=== {{lbor|as|sa|अचिन्तनीय}}. ===विशेषण=== {{as-adj}} # [[अचिंतनीय]] === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # जिसका चिंतन या कल्पना न हो सके, अज्ञेय, दुर्बोध। [[श्रेणी:हिन्दी-प्रकाशितकोशों से अर्थ-हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश]]। 9yw1sa34aq3oolotl93afpo1orl4xxc অচেতন 0 307035 488027 2026-09-04T10:37:35Z अजीत कुमार तिवारी 4887 +असमिया से शब्द. 488027 wikitext text/x-wiki ==असमिया== ===व्युत्पत्ति=== {{lbor|as|sa|अचेतन}}. ==संज्ञा== {{as-noun}} # [[अचेतन]]। === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # जड़ पदार्थ; # मनोविज्ञान में मन का वह नीचे दबा हुआ सुप्तप्राय अंश जिसमें ऐसी धारणाएँ, भाव, संस्कार आदि पड़े-पड़े अपना कार्य करते रहते हैं जिनका पूरा, प्रत्यक्ष और स्पष्ट भान मनुष्य को नहीं होता। (पुल्लिंग) ===विशेषण=== {{as-adj}} # [[अचेतन]]। === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # चेतना रहित; # निर्जीव। [[श्रेणी:हिन्दी-प्रकाशितकोशों से अर्थ-हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश]] e6go1gp75yyi39imy7le2pubyt036n2 অস্পৃশ্য 0 307037 488029 2026-09-04T10:57:00Z अजीत कुमार तिवारी 4887 सही वर्तनी. 488029 wikitext text/x-wiki ==असमिया== ===व्युत्पत्ति=== {{lbor|as|sa|अस्पृश्य}}. ===संज्ञा=== {{as-noun}} # [[अस्पृश्य]]; # [[अछूत]]। === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # अछूत जाति का व्यक्ति, हरिजन, शूद्र। (पुल्लिंग) ===विशेषण=== {{as-adj}} # [[अस्पृश्य]]। === प्रकाशित कोशों से अर्थ === ==== हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश ==== # न छूने योग्य, अस्पृश्य। [[श्रेणी:हिन्दी-प्रकाशितकोशों से अर्थ-हिंदी-असमिया-अंग्रेज़ी त्रिभाषा कोश]] lkmp1hsyiqx3opniz572b04mgdgzurb