Wîkîferheng
kuwiktionary
https://ku.wiktionary.org/wiki/Destp%C3%AAk
MediaWiki 1.47.0-wmf.17
case-sensitive
Medya
Taybet
Gotûbêj
Bikarhêner
Gotûbêja bikarhêner
Wîkîferheng
Gotûbêja Wîkîferhengê
Wêne
Gotûbêja wêneyî
MediaWiki
Gotûbêja MediaWiki
Şablon
Gotûbêja şablonê
Alîkarî
Gotûbêja alîkariyê
Kategorî
Gotûbêja kategoriyê
Pêvek
Gotûbêja pêvekê
Nimînok
Gotûbêja nimînokê
Portal
Gotûbêja portalê
Tewandin
Gotûbêja tewandinê
Jinûvesazî
Gotûbêja jinûvesaziyê
TimedText
TimedText talk
Modul
Gotûbêja modulê
Event
Event talk
şar
0
3453
6342593
6242162
2026-08-25T12:47:23Z
Wikihez
7344
+nimûneya bikaranînê bi amûra « [[Mediawiki:Gadget-wikt.add-examples|Nimûne zêde bike]] » (v2.0).
6342593
wikitext
text/x-wiki
{{bnr-h|sar}}
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{kîte|ku|şar}}
=== Navdêr 1 ===
{{navdêr|ku|z=n}}
# {{guharto|ku|şehr}}
#* {{jêder-malper|ku|jêgirtin='''Şar'''ê dila<br>Rabe yaramin xemila xwe bike<br>Guliyên xwe berde<br>keziyên xwe şeke<br>Da biçîn Dihokê, '''şar'''ê dila|nivîskar=Mihemed Taha Akreyî |url=https://www.youtube.com/watch?v=cTPCkOAVw5s|sernav=Şarê dila}}
#* {{jêder-vîdeo|ku|hunermend=Mihemed Taha Akreyî|platform=w:Youtube|sernav=Şarê dila|tarîx=2016-05-09|url=https://www.youtube.com/watch?v=cTPCkOAVw5s|jêgirtin='''Şarê''' dila<br>Rabe yaramin xemila xwe bike<br>Guliyên xwe berde<br>keziyên xwe şeke<br>Da biçîn Dihokê, '''şarê''' dila}}
==== Jê ====
{{kol3|ku|cure=Jê
|hevşar
|hevşarî
|hevşarîtî
|şaredar
|şareza
|şarik
|şaristan
|şaristanî
|şarî
|şarîtî
|şarnişîn
|şarnişînî
|şaroçke
|şarok
}}
=== Navdêr 2 ===
{{navdêr|ku|z=m}}
# [[çarşef|Çarşefa]] ku jin xwe pê [[niximandin|diniximînin]].
#* {{bêmînak|ku}}
==== Etîmolojî ====
Hevreha {{q|ku|şal}}ê.
==== Werger ====
{{werger-ser}}
* {{Z|de}}: {{W+|de|Binde|f}}
{{werger-bin}}
=== Rengdêr ===
{{rengdêr|ku}}
# [[şareza]], [[zana]], [[pispor]], [[elimî]], [[hîn]]bûyî, [[fêr]]bûyî
#* {{jêder|ku|jêgirtin=Em kurd êdî şarê xwe bûne, tirk êdî nikarin me bixapînin.|Husein Muhammed axiftina kurmancekî [[Çewlig]]ê neqil dike, {{kzk}} 4/2013}}
==== Werger ====
{{werger-ser}}
{{werger-bin}}
== {{ziman|ckb}} ==
=== Navdêr ===
{{navdêr|ckb|sc=Latn}}
# {{ckb-Arab|شار|tr=-|w=[[bajar]]}}
== {{ziman|zza}} ==
=== Navdêr ===
{{navdêr|zza}}
# [[gel]], [[xelk]], [[mirov]]
#* {{bêmînak|zza}}
amqziyujpzmhccdzj43jmlquaoz4g0i
6342594
6342593
2026-08-25T12:47:42Z
Wikihez
7344
/* Navdêr 1 */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342594
wikitext
text/x-wiki
{{bnr-h|sar}}
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{kîte|ku|şar}}
=== Navdêr 1 ===
{{navdêr|ku|z=n}}
# {{guharto|ku|şehr}}
#* {{jêder-vîdeo|ku|hunermend=Mihemed Taha Akreyî|platform=w:Youtube|sernav=Şarê dila|tarîx=2016-05-09|url=https://www.youtube.com/watch?v=cTPCkOAVw5s|jêgirtin='''Şarê''' dila<br>Rabe yaramin xemila xwe bike<br>Guliyên xwe berde<br>keziyên xwe şeke<br>Da biçîn Dihokê, '''şarê''' dila}}
==== Jê ====
{{kol3|ku|cure=Jê
|hevşar
|hevşarî
|hevşarîtî
|şaredar
|şareza
|şarik
|şaristan
|şaristanî
|şarî
|şarîtî
|şarnişîn
|şarnişînî
|şaroçke
|şarok
}}
=== Navdêr 2 ===
{{navdêr|ku|z=m}}
# [[çarşef|Çarşefa]] ku jin xwe pê [[niximandin|diniximînin]].
#* {{bêmînak|ku}}
==== Etîmolojî ====
Hevreha {{q|ku|şal}}ê.
==== Werger ====
{{werger-ser}}
* {{Z|de}}: {{W+|de|Binde|f}}
{{werger-bin}}
=== Rengdêr ===
{{rengdêr|ku}}
# [[şareza]], [[zana]], [[pispor]], [[elimî]], [[hîn]]bûyî, [[fêr]]bûyî
#* {{jêder|ku|jêgirtin=Em kurd êdî şarê xwe bûne, tirk êdî nikarin me bixapînin.|Husein Muhammed axiftina kurmancekî [[Çewlig]]ê neqil dike, {{kzk}} 4/2013}}
==== Werger ====
{{werger-ser}}
{{werger-bin}}
== {{ziman|ckb}} ==
=== Navdêr ===
{{navdêr|ckb|sc=Latn}}
# {{ckb-Arab|شار|tr=-|w=[[bajar]]}}
== {{ziman|zza}} ==
=== Navdêr ===
{{navdêr|zza}}
# [[gel]], [[xelk]], [[mirov]]
#* {{bêmînak|zza}}
6v1kfe1evdpt1gu2l0kffttjvohn85e
6342595
6342594
2026-08-25T12:48:20Z
Wikihez
7344
/* Navdêr 1 */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342595
wikitext
text/x-wiki
{{bnr-h|sar}}
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{kîte|ku|şar}}
=== Navdêr 1 ===
{{navdêr|ku|z=n}}
# {{guharto|ku|şehr}}
#* {{jêder-vîdeo|ku|hunermend=Mihemed Taha Akreyî|platform=w:YouTube|sernav=Şarê dila|tarîx=2016-05-09|url=https://www.youtube.com/watch?v=cTPCkOAVw5s|jêgirtin='''Şarê''' dila<br>Rabe yaramin xemila xwe bike<br>Guliyên xwe berde<br>keziyên xwe şeke<br>Da biçîn Dihokê, '''şarê''' dila}}
==== Jê ====
{{kol3|ku|cure=Jê
|hevşar
|hevşarî
|hevşarîtî
|şaredar
|şareza
|şarik
|şaristan
|şaristanî
|şarî
|şarîtî
|şarnişîn
|şarnişînî
|şaroçke
|şarok
}}
=== Navdêr 2 ===
{{navdêr|ku|z=m}}
# [[çarşef|Çarşefa]] ku jin xwe pê [[niximandin|diniximînin]].
#* {{bêmînak|ku}}
==== Etîmolojî ====
Hevreha {{q|ku|şal}}ê.
==== Werger ====
{{werger-ser}}
* {{Z|de}}: {{W+|de|Binde|f}}
{{werger-bin}}
=== Rengdêr ===
{{rengdêr|ku}}
# [[şareza]], [[zana]], [[pispor]], [[elimî]], [[hîn]]bûyî, [[fêr]]bûyî
#* {{jêder|ku|jêgirtin=Em kurd êdî şarê xwe bûne, tirk êdî nikarin me bixapînin.|Husein Muhammed axiftina kurmancekî [[Çewlig]]ê neqil dike, {{kzk}} 4/2013}}
==== Werger ====
{{werger-ser}}
{{werger-bin}}
== {{ziman|ckb}} ==
=== Navdêr ===
{{navdêr|ckb|sc=Latn}}
# {{ckb-Arab|شار|tr=-|w=[[bajar]]}}
== {{ziman|zza}} ==
=== Navdêr ===
{{navdêr|zza}}
# [[gel]], [[xelk]], [[mirov]]
#* {{bêmînak|zza}}
d149jwdq8p6sve8ghciur6bvg593hx5
aştî
0
4116
6342662
6297615
2026-08-26T09:55:40Z
Wikihez
7344
[[Bikarhêner:Wikihez/templateScript2.js|TS]]: sererastkirin
6342662
wikitext
text/x-wiki
{{bnr-h|Aştî}}
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{deng|ku|LL-Q36368 (kur)-Dildadil-aştî.wav|dever=Amed}}
** {{deng|ku|LL-Q36163 (kmr)-Ebulfîda-aştî.wav|dever=Bidlîs}}
* {{ku-kîte}}
=== Navdêr ===
[[Wêne:Peace dove.svg|thumb|[[kevok|Kevok]]ên spî wek [[sembol]]a '''aştiyê''' tên nasîn.]]
{{navdêr|ku|z=m}}
# [[aramî]], [[tenahî]], [[hêminî]], [[hêwirî]], [[rehetî]]
#: {{dijmane|ku|ceng|şer}}
#* {{bêmînak|ku}}
# [[rewş]]a bê [[ceng]] û [[şer]] û [[pevçûn]]
#: {{dijmane|ku|heysûbeys|heytûhot|qerebalix}}
#* {{bêmînak|ku}}
# [[rewş]]a bê [[qerebalix]]
#* {{bêmînak|ku}}
==== Tewandin ====
{{ku-tewîn-nav/nû|mê}}
==== Bi alfabeyên din ====
* {{ku-ar|ئاشتی}}
* {{ku-kr|ашти}}
==== Formên alternatîv ====
* {{g|ku|aşitî}}
* {{g|ku|aşîtî}}
* {{g|ku|haşitî}}
==== Jê ====
{{kol3|ku
|aştî kirin<crz:lêker>
|aştîkirin<crz:navdêr>
|aştiyane
|aştîhez
|aştîparêz
|aştîparêzî
|aştîxwaz
|aştîxwazî
}}
==== Etîmolojî ====
Ji {{paş|ku|aşt|-î}}. Taliyê ji {{mîr|iir-pro|ku|*Hakştî}} ji {{mîr|ine-pro|ku|*he-ksti-|w=[[pergal]], [[sîstem]], [[nîzam]], [[rêz]]}} ji {{jinûvesazî|ine-pro|kes-|w=[[rêz]] kirin, dirist kirin, danîn}}.
Hevreha {{hv|ae||axştî|sc=Latn}}, {{hv|pal||aştî|sc=Latn}}, {{hv|fa|آشتی|tr=aştî}},
==== Werger ====
{{werger-ser}}
* {{Z|abe}}: {{W-|abe|wlakamigen}}
* {{Z|aa}}: {{W-|aa|wagari}}, {{W-|aa|amaan}}
* {{Z|af}}: {{W+|af|vrede}}
* {{Z|ak}}: {{W-|ak|asmondwoe}}
* {{Z|sq}}: {{W+|sq|paqe|m}}
* {{Z|de}}: {{W+|de|Frieden|n}}, {{W+|de|Friede|n}}, {{W-|de|Scheinfriede|n}}
* {{Z|am}}: {{W-|am|ሰላም}}
* {{Z|an}}: {{W-|an|paz}}
* {{Z|arc}}:
*: {{Z|aii}}: {{W-|aii|ܫܠܡܐ|n|tr=šlāmā}}
*: {{Z|syc}}: {{W-|syc|ܫܠܡܐ|n|tr=šəlāmā}}
*: {{Z|tmr}}: {{W-|arc|שְׁלָמָא|n|tr=šəlāmā}}
* {{Z|as}}: {{W-|as|শান্তি}}
* {{Z|ast}}: {{W-|ast|paz|m}}
* {{Z|ae}}: {{W-|ae|𐬁𐬑𐬱𐬙𐬌}}
* {{Z|az}}: {{W+|az|sülh}}, {{W-|az|barışıq}}
* {{Z|eu}}: {{W-|eu|bake}}
* {{Z|ba}}: {{W-|ba|тыныслыҡ}}
* {{Z|be}}: {{W-|be|мір|n}}
* {{Z|bn}}: {{W+|bn|শান্তি}}
* {{Z|bcl}}: {{W-|bcl|katoninongan}}
* {{Z|bg}}: {{W+|bg|мир|n}}
* {{Z|my}}: {{W+|my|ငြိမ်းချမ်းရေး}}
* {{Z|ce}}: {{W-|ce|машар}}
* {{Z|cs}}: {{W+|cs|mír|n}}
* {{Z|zh}}:
*: {{Z|yue}}: {{W-|yue|和平|tr=wo4 ping4}}
*: {{Z|dng}}: {{W-|dng|хәпин}}
*: {{Z|hak}}: {{W-|hak|和平|tr=fò-phìn}}
*: {{Z|cmn}}: {{W+|cmn|和平|tr=hépíng}}
*: {{Z|cdo}}: {{W-|cdo|和平|tr=huò-bìng}}
*: {{Z|nan}}: {{W+|nan|和平|tr=hô-pêng}}, {{W+|nan|和平|tr=hô͘-pêng}}
*: {{Z|wuu}}: {{W-|wuu|和平}}
* {{Z|ckt}}: {{W-|ckt|амаравкэгыргын|tr=amaravkėgyrgyn}}
* {{Z|da}}: {{W+|da|fred|g}}
* {{Z|id}}: {{W+|id|damai}}
* {{Z|ar}}: {{W+|ar|سَلَام|n}}, {{W+|ar|صُلْح|n}}, {{W+|ar|سِلْم|n}}
* {{Z|hy}}: {{W+|hy|խաղաղություն}}
* {{Z|eo}}: {{W+|eo|paco}}
* {{Z|et}}: {{W+|et|rahu}}
* {{Z|ext}}: {{W-|ext|pas}}
* {{Z|fa}}: {{W+|fa|آشتی|tr=âšti}}, {{W+|fa|صلح|tr=solh}}
* {{Z|fi}}: {{W+|fi|rauha}}
* {{Z|fr}}: {{W+|fr|paix|m}}
*: {{Z|fro}}: {{W-|fro|pais|m}}
* {{Z|fur}}: {{W-|fur|pâs|m}}
* {{Z|gd}}: {{W-|gd|sìth|m}}
* {{Z|gl}}: {{W+|gl|paz|m}}
* {{Z|gu}}: {{W+|gu|શાંતિ|m}}
* {{Z|ka}}: {{W-|ka|მშვიდობა}}
* {{Z|haw}}: {{W-|haw|maluhia}}
* {{Z|hi}}: {{W+|hi|शांति|m}}, {{W+|hi|अमन|n}}
* {{Z|nl}}: {{W+|nl|vrede|m}}, {{W+|nl|peis|m}}
* {{Z|he}}: {{W+|he|שָׁלוֹם|n|tr=shalóm|cuda=שלום \ שָׁלוֹם}}
* {{Z|io}}: {{W+|io|paco}}
* {{Z|ang}}: {{W-|ang|friþ|nt}}, {{W-|ang|griþ|nt}}
* {{Z|en}}: {{W+|en|peace}}
* {{Z|ia}}: {{W+|ia|pace}}
* {{Z|ga}}: {{W-|ga|síocháin|m}}
* {{Z|it}}: {{W+|it|pace|m}}
* {{Z|is}}: {{W+|is|friður|n}}, {{W-|is|friðartími|n}}
* {{Z|ja}}: {{W+|ja|平和|tr=へいわ, heiwa}}
* {{Z|kn}}: {{W+|kn|ಶಾಂತಿ}}
* {{Z|ca}}: {{W+|ca|pau|m}}
* {{Z|ky}}: {{W+|ky|тынчтык}}, {{W+|ky|татуулук}}
* {{Z|si}}: {{W-|si|සාමය}}
* {{Z|ko}}: {{W+|ko|평화}}
* {{Z|lad}}:
*: Latînî: {{W-|lad|paz|m}}
* {{Z|la}}: {{W+|la|pax|m}}
* {{Z|lv}}: {{W-|lv|miers|n}}
* {{Z|lo}}: {{W+|lo|ສັນຕິພາບ}}
* {{Z|lt}}: {{W+|lt|taika|m}}
* {{Z|liv}}: {{W-|liv|arm}}
* {{Z|khb}}: {{W-|khb|ᦉᦳᧅᦉᦱᧈ}}
* {{Z|mk}}: {{W-|mk|мир|n}}
* {{Z|ml}}: {{W+|ml|സമാധാനം}}
* {{Z|ms}}: {{W+|ms|damai}}
* {{Z|gv}}: {{W-|gv|shee}}
* {{Z|mi}}: {{W-|mi|rokihau}}, {{W-|mi|rongomau}}, {{W-|mi|maungārongo}}, {{W-|mi|houhanga a rongo}}, {{W-|mi|whakaaio}}
* {{Z|mr}}: {{W-|mr|शांति}}
* {{Z|hu}}: {{W+|hu|béke}}
* {{Z|mn}}:
*: Kirîlî: {{W-|mn|энх тайван}}
* {{Z|nv}}: {{W-|nv|hodéezyéél}}
* {{Z|nds}}:
*: {{Z|nds-de}}: {{W-|nds-de|Freden|n}}, {{W-|nds-de|Freed|n}}, {{W-|nds-de|Fräden|n}}, {{W-|nds-de|Frääd|n}}
* {{Z|ne}}: {{W-|ne|शान्ति}}
* {{Z|no}}:
*: {{Z|nb}}: {{W+|nb|fred|n}}
*: {{Z|nn}}: {{W-|nn|fred|n}}
* {{Z|oj}}: {{W-|oj|bizaani'iwewin}}, {{W-|oj|bizaanendamowin}}
* {{Z|oc}}: {{W+|oc|patz|m}}
* {{Z|ug}}: {{W-|ug|سۈلھ}}
* {{Z|uz}}: {{W+|uz|tinchlik}}, {{W+|uz|sulh}}
* {{Z|pi}}: {{W-|pi|sāma}}, {{W-|pi|santi|m}}
* {{Z|pag}}: {{W-|pag|kareenan}}
* {{Z|ps}}: {{W+|ps|صلح|m|tr=sólha}}
* {{Z|pl}}: {{W+|pl|pokój|m-in}}, {{W+|pl|mir}}
* {{Z|pt}}: {{W+|pt|paz|m}}
* {{Z|pa}}: {{W+|pa|ਅਮਨ}}, {{W+|pa|ਸ਼ਾਂਤੀ}}
* {{Z|kk}}: {{W+|kk|бейбітшілік}}, {{W-|kk|тыныштық}}
* {{Z|ro}}: {{W+|ro|pace|m}}
* {{Z|ru}}: {{W+|ru|мир|n}}
* {{Z|rue}}: {{W-|rue|мір|n}}
* Samî:
*: {{Z|sjd}}: {{W-|sjd|мырр}}, {{W-|sjd|а̄ййв}}
* {{Z|sma}}: {{W-|sma|raeffie}}
* {{Z|sa}}: {{W+|sa|शान्ति|m}}, {{W+|sa|अयुद्ध|nt}}
* {{Z|scn}}: {{W+|scn|paci|m}}
* {{Z|sh}}:
*: Kirîlî: {{W-|sh|ми̑р|n}}
*: Latînî: {{W+|sh|mȋr|n}}
* {{Z|cu}}:
*: Kirîlî: {{W-|cu|миръ|n}}
*: Glagolîtîk: {{W-|cu|ⰿⰹⱃⱏ|n}}
* {{Z|orv}}: {{W-|orv|покои|n}}, {{W-|orv|миръ|n}}
* {{Z|sk}}: {{W-|sk|mier|n}}
* {{Z|sl}}: {{W+|sl|mir|n}}
* {{Z|st}}: {{W+|st|kgotso}}, {{W+|st|khotso}}
* {{Z|es}}: {{W+|es|paz|m}}
* {{Z|sw}}: {{W+|sw|amani}}
* {{Z|sv}}: {{W+|sv|fred}}
* {{Z|zdj}}: {{W-|zdj|amani|c9|c10}}
* {{Z|tg}}: {{W+|tg|сулҳ}}, {{W-|tg|оштӣ}}
* {{Z|tl}}: {{W-|tl|kapayapaan}}
* {{Z|ta}}: {{W+|ta|அமைதி}}, {{W+|ta|சமாதானம்}}
* {{Z|th}}: {{W+|th|สันติภาพ}}, {{W+|th|สันติ}}
* {{Z|te}}: {{W+|te|శాంతి}}
* {{Z|crh}}: {{W-|crh|sulh}}
* {{Z|tt}}: {{W+|tt|тынычлык}}
* {{Z|ti}}: {{W-|ti|ሰላም}}
* {{Z|tr}}: {{W+|tr|barış}}, {{W+|tr|sulh}}
* {{Z|tk}}: {{W-|tk|parahatçylyk}}, {{W-|tk|rahatlyk}}, {{W-|tk|dyynçlyk}}
* {{Z|bo}}: {{W-|bo|ཞི་བདེ}}
* {{Z|tpi}}: {{W-|tpi|gutpela taim}}
* {{Z|tn}}: {{W-|tn|kagiso}}
* {{Z|ur}}: {{W-|ur|امن|n|tr=aman}}
* {{Z|uk}}: {{W+|uk|мир|n}}
* {{Z|vec}}: {{W-|vec|paxe|m}}
* {{Z|vi}}: {{W+|vi|hòa bình}}, {{W+|vi|hoà bình}}
* {{Z|vo}}: {{W+|vo|püd}}, {{W-|vo|lupüd}}
* {{Z|wa}}: {{W+|wa|påye|m}}
* {{Z|cy}}: {{W-|cy|heddwch}}
* {{Z|km}}: {{W+|km|សន្តិភាព}}, {{W-|km|សន្តិកាល}}
* {{Z|yi}}: {{W-|yi|פֿרידן|n}}, {{W-|yi|שלום|n|tr=sholem}}
* {{Z|el}}: {{W+|el|ειρήνη|m}}
*: {{Z|grc}}: {{W-|grc|εἰρήνη|m}}
{{werger-bin}}
:{{werger çavkanî|en|peace|beş=Ev qismê Wergerê|oldid=75872495}}
n9r8tlbkjzrerdb724f4g8yg3cbnp0u
6342663
6342662
2026-08-26T09:57:19Z
Wikihez
7344
ok?
6342663
wikitext
text/x-wiki
{{bnr-h|Aştî}}
== {{ziman|ku}} ==
=== Formên alternatîv ===
{{kol3|ku
| {{alt|ku|aşitî}}
| {{alt|ku|aşîtî}}
| {{alt|ku|haşitî}}
}}
=== Etîmolojî ===
Ji {{paş|ku|aşt|-î}}. Taliyê ji {{mîr|iir-pro|ku|*Hakştî}} ji {{mîr|ine-pro|ku|*he-ksti-|w=[[pergal]], [[sîstem]], [[nîzam]], [[rêz]]}} ji {{jinûvesazî|ine-pro|kes-|w=[[rêz]] kirin, dirist kirin, danîn}}.
Hevreha {{hv|ae||axştî|sc=Latn}}, {{hv|pal||aştî|sc=Latn}}, {{hv|fa|آشتی|tr=aştî}},
=== Bilêvkirin ===
* {{ku-IPA}}
* {{deng|ku|LL-Q36368 (kur)-Dildadil-aştî.wav|dever=Amed}}
** {{deng|ku|LL-Q36163 (kmr)-Ebulfîda-aştî.wav|dever=Bidlîs}}
* {{ku-kîte}}
=== Navdêr ===
[[Wêne:Peace dove.svg|thumb|[[kevok|Kevok]]ên spî wek [[sembol]]a '''aştiyê''' tên nasîn.]]
{{navdêr|ku|z=m}}
# [[aramî]], [[tenahî]], [[hêminî]], [[hêwirî]], [[rehetî]]
#: {{dijmane|ku|ceng|şer}}
#* {{bêmînak|ku}}
# [[rewş]]a bê [[ceng]] û [[şer]] û [[pevçûn]]
#: {{dijmane|ku|heysûbeys|heytûhot|qerebalix}}
#* {{bêmînak|ku}}
# [[rewş]]a bê [[qerebalix]]
#* {{bêmînak|ku}}
==== Tewandin ====
{{ku-tewîn-nav/nû|mê}}
==== Bi alfabeyên din ====
* {{ku-ar|ئاشتی}}
* {{ku-kr|ашти}}
==== Jê ====
{{kol3|ku
|aştî kirin<crz:lêker>
|aştîkirin<crz:navdêr>
|aştiyane
|aştîhez
|aştîparêz
|aştîparêzî
|aştîxwaz
|aştîxwazî
}}
==== Werger ====
{{werger-ser}}
* {{Z|abe}}: {{W-|abe|wlakamigen}}
* {{Z|aa}}: {{W-|aa|wagari}}, {{W-|aa|amaan}}
* {{Z|af}}: {{W+|af|vrede}}
* {{Z|ak}}: {{W-|ak|asmondwoe}}
* {{Z|sq}}: {{W+|sq|paqe|m}}
* {{Z|de}}: {{W+|de|Frieden|n}}, {{W+|de|Friede|n}}, {{W-|de|Scheinfriede|n}}
* {{Z|am}}: {{W-|am|ሰላም}}
* {{Z|an}}: {{W-|an|paz}}
* {{Z|arc}}:
*: {{Z|aii}}: {{W-|aii|ܫܠܡܐ|n|tr=šlāmā}}
*: {{Z|syc}}: {{W-|syc|ܫܠܡܐ|n|tr=šəlāmā}}
*: {{Z|tmr}}: {{W-|arc|שְׁלָמָא|n|tr=šəlāmā}}
* {{Z|as}}: {{W-|as|শান্তি}}
* {{Z|ast}}: {{W-|ast|paz|m}}
* {{Z|ae}}: {{W-|ae|𐬁𐬑𐬱𐬙𐬌}}
* {{Z|az}}: {{W+|az|sülh}}, {{W-|az|barışıq}}
* {{Z|eu}}: {{W-|eu|bake}}
* {{Z|ba}}: {{W-|ba|тыныслыҡ}}
* {{Z|be}}: {{W-|be|мір|n}}
* {{Z|bn}}: {{W+|bn|শান্তি}}
* {{Z|bcl}}: {{W-|bcl|katoninongan}}
* {{Z|bg}}: {{W+|bg|мир|n}}
* {{Z|my}}: {{W+|my|ငြိမ်းချမ်းရေး}}
* {{Z|ce}}: {{W-|ce|машар}}
* {{Z|cs}}: {{W+|cs|mír|n}}
* {{Z|zh}}:
*: {{Z|yue}}: {{W-|yue|和平|tr=wo4 ping4}}
*: {{Z|dng}}: {{W-|dng|хәпин}}
*: {{Z|hak}}: {{W-|hak|和平|tr=fò-phìn}}
*: {{Z|cmn}}: {{W+|cmn|和平|tr=hépíng}}
*: {{Z|cdo}}: {{W-|cdo|和平|tr=huò-bìng}}
*: {{Z|nan}}: {{W+|nan|和平|tr=hô-pêng}}, {{W+|nan|和平|tr=hô͘-pêng}}
*: {{Z|wuu}}: {{W-|wuu|和平}}
* {{Z|ckt}}: {{W-|ckt|амаравкэгыргын|tr=amaravkėgyrgyn}}
* {{Z|da}}: {{W+|da|fred|g}}
* {{Z|id}}: {{W+|id|damai}}
* {{Z|ar}}: {{W+|ar|سَلَام|n}}, {{W+|ar|صُلْح|n}}, {{W+|ar|سِلْم|n}}
* {{Z|hy}}: {{W+|hy|խաղաղություն}}
* {{Z|eo}}: {{W+|eo|paco}}
* {{Z|et}}: {{W+|et|rahu}}
* {{Z|ext}}: {{W-|ext|pas}}
* {{Z|fa}}: {{W+|fa|آشتی|tr=âšti}}, {{W+|fa|صلح|tr=solh}}
* {{Z|fi}}: {{W+|fi|rauha}}
* {{Z|fr}}: {{W+|fr|paix|m}}
*: {{Z|fro}}: {{W-|fro|pais|m}}
* {{Z|fur}}: {{W-|fur|pâs|m}}
* {{Z|gd}}: {{W-|gd|sìth|m}}
* {{Z|gl}}: {{W+|gl|paz|m}}
* {{Z|gu}}: {{W+|gu|શાંતિ|m}}
* {{Z|ka}}: {{W-|ka|მშვიდობა}}
* {{Z|haw}}: {{W-|haw|maluhia}}
* {{Z|hi}}: {{W+|hi|शांति|m}}, {{W+|hi|अमन|n}}
* {{Z|nl}}: {{W+|nl|vrede|m}}, {{W+|nl|peis|m}}
* {{Z|he}}: {{W+|he|שָׁלוֹם|n|tr=shalóm|cuda=שלום \ שָׁלוֹם}}
* {{Z|io}}: {{W+|io|paco}}
* {{Z|ang}}: {{W-|ang|friþ|nt}}, {{W-|ang|griþ|nt}}
* {{Z|en}}: {{W+|en|peace}}
* {{Z|ia}}: {{W+|ia|pace}}
* {{Z|ga}}: {{W-|ga|síocháin|m}}
* {{Z|it}}: {{W+|it|pace|m}}
* {{Z|is}}: {{W+|is|friður|n}}, {{W-|is|friðartími|n}}
* {{Z|ja}}: {{W+|ja|平和|tr=へいわ, heiwa}}
* {{Z|kn}}: {{W+|kn|ಶಾಂತಿ}}
* {{Z|ca}}: {{W+|ca|pau|m}}
* {{Z|ky}}: {{W+|ky|тынчтык}}, {{W+|ky|татуулук}}
* {{Z|si}}: {{W-|si|සාමය}}
* {{Z|ko}}: {{W+|ko|평화}}
* {{Z|lad}}:
*: Latînî: {{W-|lad|paz|m}}
* {{Z|la}}: {{W+|la|pax|m}}
* {{Z|lv}}: {{W-|lv|miers|n}}
* {{Z|lo}}: {{W+|lo|ສັນຕິພາບ}}
* {{Z|lt}}: {{W+|lt|taika|m}}
* {{Z|liv}}: {{W-|liv|arm}}
* {{Z|khb}}: {{W-|khb|ᦉᦳᧅᦉᦱᧈ}}
* {{Z|mk}}: {{W-|mk|мир|n}}
* {{Z|ml}}: {{W+|ml|സമാധാനം}}
* {{Z|ms}}: {{W+|ms|damai}}
* {{Z|gv}}: {{W-|gv|shee}}
* {{Z|mi}}: {{W-|mi|rokihau}}, {{W-|mi|rongomau}}, {{W-|mi|maungārongo}}, {{W-|mi|houhanga a rongo}}, {{W-|mi|whakaaio}}
* {{Z|mr}}: {{W-|mr|शांति}}
* {{Z|hu}}: {{W+|hu|béke}}
* {{Z|mn}}:
*: Kirîlî: {{W-|mn|энх тайван}}
* {{Z|nv}}: {{W-|nv|hodéezyéél}}
* {{Z|nds}}:
*: {{Z|nds-de}}: {{W-|nds-de|Freden|n}}, {{W-|nds-de|Freed|n}}, {{W-|nds-de|Fräden|n}}, {{W-|nds-de|Frääd|n}}
* {{Z|ne}}: {{W-|ne|शान्ति}}
* {{Z|no}}:
*: {{Z|nb}}: {{W+|nb|fred|n}}
*: {{Z|nn}}: {{W-|nn|fred|n}}
* {{Z|oj}}: {{W-|oj|bizaani'iwewin}}, {{W-|oj|bizaanendamowin}}
* {{Z|oc}}: {{W+|oc|patz|m}}
* {{Z|ug}}: {{W-|ug|سۈلھ}}
* {{Z|uz}}: {{W+|uz|tinchlik}}, {{W+|uz|sulh}}
* {{Z|pi}}: {{W-|pi|sāma}}, {{W-|pi|santi|m}}
* {{Z|pag}}: {{W-|pag|kareenan}}
* {{Z|ps}}: {{W+|ps|صلح|m|tr=sólha}}
* {{Z|pl}}: {{W+|pl|pokój|m-in}}, {{W+|pl|mir}}
* {{Z|pt}}: {{W+|pt|paz|m}}
* {{Z|pa}}: {{W+|pa|ਅਮਨ}}, {{W+|pa|ਸ਼ਾਂਤੀ}}
* {{Z|kk}}: {{W+|kk|бейбітшілік}}, {{W-|kk|тыныштық}}
* {{Z|ro}}: {{W+|ro|pace|m}}
* {{Z|ru}}: {{W+|ru|мир|n}}
* {{Z|rue}}: {{W-|rue|мір|n}}
* Samî:
*: {{Z|sjd}}: {{W-|sjd|мырр}}, {{W-|sjd|а̄ййв}}
* {{Z|sma}}: {{W-|sma|raeffie}}
* {{Z|sa}}: {{W+|sa|शान्ति|m}}, {{W+|sa|अयुद्ध|nt}}
* {{Z|scn}}: {{W+|scn|paci|m}}
* {{Z|sh}}:
*: Kirîlî: {{W-|sh|ми̑р|n}}
*: Latînî: {{W+|sh|mȋr|n}}
* {{Z|cu}}:
*: Kirîlî: {{W-|cu|миръ|n}}
*: Glagolîtîk: {{W-|cu|ⰿⰹⱃⱏ|n}}
* {{Z|orv}}: {{W-|orv|покои|n}}, {{W-|orv|миръ|n}}
* {{Z|sk}}: {{W-|sk|mier|n}}
* {{Z|sl}}: {{W+|sl|mir|n}}
* {{Z|st}}: {{W+|st|kgotso}}, {{W+|st|khotso}}
* {{Z|es}}: {{W+|es|paz|m}}
* {{Z|sw}}: {{W+|sw|amani}}
* {{Z|sv}}: {{W+|sv|fred}}
* {{Z|zdj}}: {{W-|zdj|amani|c9|c10}}
* {{Z|tg}}: {{W+|tg|сулҳ}}, {{W-|tg|оштӣ}}
* {{Z|tl}}: {{W-|tl|kapayapaan}}
* {{Z|ta}}: {{W+|ta|அமைதி}}, {{W+|ta|சமாதானம்}}
* {{Z|th}}: {{W+|th|สันติภาพ}}, {{W+|th|สันติ}}
* {{Z|te}}: {{W+|te|శాంతి}}
* {{Z|crh}}: {{W-|crh|sulh}}
* {{Z|tt}}: {{W+|tt|тынычлык}}
* {{Z|ti}}: {{W-|ti|ሰላም}}
* {{Z|tr}}: {{W+|tr|barış}}, {{W+|tr|sulh}}
* {{Z|tk}}: {{W-|tk|parahatçylyk}}, {{W-|tk|rahatlyk}}, {{W-|tk|dyynçlyk}}
* {{Z|bo}}: {{W-|bo|ཞི་བདེ}}
* {{Z|tpi}}: {{W-|tpi|gutpela taim}}
* {{Z|tn}}: {{W-|tn|kagiso}}
* {{Z|ur}}: {{W-|ur|امن|n|tr=aman}}
* {{Z|uk}}: {{W+|uk|мир|n}}
* {{Z|vec}}: {{W-|vec|paxe|m}}
* {{Z|vi}}: {{W+|vi|hòa bình}}, {{W+|vi|hoà bình}}
* {{Z|vo}}: {{W+|vo|püd}}, {{W-|vo|lupüd}}
* {{Z|wa}}: {{W+|wa|påye|m}}
* {{Z|cy}}: {{W-|cy|heddwch}}
* {{Z|km}}: {{W+|km|សន្តិភាព}}, {{W-|km|សន្តិកាល}}
* {{Z|yi}}: {{W-|yi|פֿרידן|n}}, {{W-|yi|שלום|n|tr=sholem}}
* {{Z|el}}: {{W+|el|ειρήνη|m}}
*: {{Z|grc}}: {{W-|grc|εἰρήνη|m}}
{{werger-bin}}
:{{werger çavkanî|en|peace|beş=Ev qismê Wergerê|oldid=75872495}}
o9jnqblhieoeqiou2iblcdfc9hj8goe
6342692
6342663
2026-08-26T11:12:07Z
Balyozbot
7867
Bot: Paqijiyên kozmetîk (Lînk paqij kir, --Valahiyên nehewce.)
6342692
wikitext
text/x-wiki
{{bnr-h|Aştî}}
== {{ziman|ku}} ==
=== Formên alternatîv ===
{{kol3|ku
| {{alt|ku|aşitî}}
| {{alt|ku|aşîtî}}
| {{alt|ku|haşitî}}
}}
=== Etîmolojî ===
Ji {{paş|ku|aşt|-î}}. Taliyê ji {{mîr|iir-pro|ku|*Hakştî}} ji {{mîr|ine-pro|ku|*he-ksti-|w=[[pergal]], [[sîstem]], [[nîzam]], [[rêz]]}} ji {{jinûvesazî|ine-pro|kes-|w=[[rêz]] kirin, dirist kirin, danîn}}.
Hevreha {{hv|ae||axştî|sc=Latn}}, {{hv|pal||aştî|sc=Latn}}, {{hv|fa|آشتی|tr=aştî}},
=== Bilêvkirin ===
* {{ku-IPA}}
* {{deng|ku|LL-Q36368 (kur)-Dildadil-aştî.wav|dever=Amed}}
** {{deng|ku|LL-Q36163 (kmr)-Ebulfîda-aştî.wav|dever=Bidlîs}}
* {{ku-kîte}}
=== Navdêr ===
[[Wêne:Peace dove.svg|thumb|[[kevok|Kevokên]] spî wek [[sembol]]a '''aştiyê''' tên nasîn.]]
{{navdêr|ku|z=m}}
# [[aramî]], [[tenahî]], [[hêminî]], [[hêwirî]], [[rehetî]]
#: {{dijmane|ku|ceng|şer}}
#* {{bêmînak|ku}}
# [[rewş]]a bê [[ceng]] û [[şer]] û [[pevçûn]]
#: {{dijmane|ku|heysûbeys|heytûhot|qerebalix}}
#* {{bêmînak|ku}}
# [[rewş]]a bê [[qerebalix]]
#* {{bêmînak|ku}}
==== Tewandin ====
{{ku-tewîn-nav/nû|mê}}
==== Bi alfabeyên din ====
* {{ku-ar|ئاشتی}}
* {{ku-kr|ашти}}
==== Jê ====
{{kol3|ku
|aştî kirin<crz:lêker>
|aştîkirin<crz:navdêr>
|aştiyane
|aştîhez
|aştîparêz
|aştîparêzî
|aştîxwaz
|aştîxwazî
}}
==== Werger ====
{{werger-ser}}
* {{Z|abe}}: {{W-|abe|wlakamigen}}
* {{Z|aa}}: {{W-|aa|wagari}}, {{W-|aa|amaan}}
* {{Z|af}}: {{W+|af|vrede}}
* {{Z|ak}}: {{W-|ak|asmondwoe}}
* {{Z|sq}}: {{W+|sq|paqe|m}}
* {{Z|de}}: {{W+|de|Frieden|n}}, {{W+|de|Friede|n}}, {{W-|de|Scheinfriede|n}}
* {{Z|am}}: {{W-|am|ሰላም}}
* {{Z|an}}: {{W-|an|paz}}
* {{Z|arc}}:
*: {{Z|aii}}: {{W-|aii|ܫܠܡܐ|n|tr=šlāmā}}
*: {{Z|syc}}: {{W-|syc|ܫܠܡܐ|n|tr=šəlāmā}}
*: {{Z|tmr}}: {{W-|arc|שְׁלָמָא|n|tr=šəlāmā}}
* {{Z|as}}: {{W-|as|শান্তি}}
* {{Z|ast}}: {{W-|ast|paz|m}}
* {{Z|ae}}: {{W-|ae|𐬁𐬑𐬱𐬙𐬌}}
* {{Z|az}}: {{W+|az|sülh}}, {{W-|az|barışıq}}
* {{Z|eu}}: {{W-|eu|bake}}
* {{Z|ba}}: {{W-|ba|тыныслыҡ}}
* {{Z|be}}: {{W-|be|мір|n}}
* {{Z|bn}}: {{W+|bn|শান্তি}}
* {{Z|bcl}}: {{W-|bcl|katoninongan}}
* {{Z|bg}}: {{W+|bg|мир|n}}
* {{Z|my}}: {{W+|my|ငြိမ်းချမ်းရေး}}
* {{Z|ce}}: {{W-|ce|машар}}
* {{Z|cs}}: {{W+|cs|mír|n}}
* {{Z|zh}}:
*: {{Z|yue}}: {{W-|yue|和平|tr=wo4 ping4}}
*: {{Z|dng}}: {{W-|dng|хәпин}}
*: {{Z|hak}}: {{W-|hak|和平|tr=fò-phìn}}
*: {{Z|cmn}}: {{W+|cmn|和平|tr=hépíng}}
*: {{Z|cdo}}: {{W-|cdo|和平|tr=huò-bìng}}
*: {{Z|nan}}: {{W+|nan|和平|tr=hô-pêng}}, {{W+|nan|和平|tr=hô͘-pêng}}
*: {{Z|wuu}}: {{W-|wuu|和平}}
* {{Z|ckt}}: {{W-|ckt|амаравкэгыргын|tr=amaravkėgyrgyn}}
* {{Z|da}}: {{W+|da|fred|g}}
* {{Z|id}}: {{W+|id|damai}}
* {{Z|ar}}: {{W+|ar|سَلَام|n}}, {{W+|ar|صُلْح|n}}, {{W+|ar|سِلْم|n}}
* {{Z|hy}}: {{W+|hy|խաղաղություն}}
* {{Z|eo}}: {{W+|eo|paco}}
* {{Z|et}}: {{W+|et|rahu}}
* {{Z|ext}}: {{W-|ext|pas}}
* {{Z|fa}}: {{W+|fa|آشتی|tr=âšti}}, {{W+|fa|صلح|tr=solh}}
* {{Z|fi}}: {{W+|fi|rauha}}
* {{Z|fr}}: {{W+|fr|paix|m}}
*: {{Z|fro}}: {{W-|fro|pais|m}}
* {{Z|fur}}: {{W-|fur|pâs|m}}
* {{Z|gd}}: {{W-|gd|sìth|m}}
* {{Z|gl}}: {{W+|gl|paz|m}}
* {{Z|gu}}: {{W+|gu|શાંતિ|m}}
* {{Z|ka}}: {{W-|ka|მშვიდობა}}
* {{Z|haw}}: {{W-|haw|maluhia}}
* {{Z|hi}}: {{W+|hi|शांति|m}}, {{W+|hi|अमन|n}}
* {{Z|nl}}: {{W+|nl|vrede|m}}, {{W+|nl|peis|m}}
* {{Z|he}}: {{W+|he|שָׁלוֹם|n|tr=shalóm|cuda=שלום \ שָׁלוֹם}}
* {{Z|io}}: {{W+|io|paco}}
* {{Z|ang}}: {{W-|ang|friþ|nt}}, {{W-|ang|griþ|nt}}
* {{Z|en}}: {{W+|en|peace}}
* {{Z|ia}}: {{W+|ia|pace}}
* {{Z|ga}}: {{W-|ga|síocháin|m}}
* {{Z|it}}: {{W+|it|pace|m}}
* {{Z|is}}: {{W+|is|friður|n}}, {{W-|is|friðartími|n}}
* {{Z|ja}}: {{W+|ja|平和|tr=へいわ, heiwa}}
* {{Z|kn}}: {{W+|kn|ಶಾಂತಿ}}
* {{Z|ca}}: {{W+|ca|pau|m}}
* {{Z|ky}}: {{W+|ky|тынчтык}}, {{W+|ky|татуулук}}
* {{Z|si}}: {{W-|si|සාමය}}
* {{Z|ko}}: {{W+|ko|평화}}
* {{Z|lad}}:
*: Latînî: {{W-|lad|paz|m}}
* {{Z|la}}: {{W+|la|pax|m}}
* {{Z|lv}}: {{W-|lv|miers|n}}
* {{Z|lo}}: {{W+|lo|ສັນຕິພາບ}}
* {{Z|lt}}: {{W+|lt|taika|m}}
* {{Z|liv}}: {{W-|liv|arm}}
* {{Z|khb}}: {{W-|khb|ᦉᦳᧅᦉᦱᧈ}}
* {{Z|mk}}: {{W-|mk|мир|n}}
* {{Z|ml}}: {{W+|ml|സമാധാനം}}
* {{Z|ms}}: {{W+|ms|damai}}
* {{Z|gv}}: {{W-|gv|shee}}
* {{Z|mi}}: {{W-|mi|rokihau}}, {{W-|mi|rongomau}}, {{W-|mi|maungārongo}}, {{W-|mi|houhanga a rongo}}, {{W-|mi|whakaaio}}
* {{Z|mr}}: {{W-|mr|शांति}}
* {{Z|hu}}: {{W+|hu|béke}}
* {{Z|mn}}:
*: Kirîlî: {{W-|mn|энх тайван}}
* {{Z|nv}}: {{W-|nv|hodéezyéél}}
* {{Z|nds}}:
*: {{Z|nds-de}}: {{W-|nds-de|Freden|n}}, {{W-|nds-de|Freed|n}}, {{W-|nds-de|Fräden|n}}, {{W-|nds-de|Frääd|n}}
* {{Z|ne}}: {{W-|ne|शान्ति}}
* {{Z|no}}:
*: {{Z|nb}}: {{W+|nb|fred|n}}
*: {{Z|nn}}: {{W-|nn|fred|n}}
* {{Z|oj}}: {{W-|oj|bizaani'iwewin}}, {{W-|oj|bizaanendamowin}}
* {{Z|oc}}: {{W+|oc|patz|m}}
* {{Z|ug}}: {{W-|ug|سۈلھ}}
* {{Z|uz}}: {{W+|uz|tinchlik}}, {{W+|uz|sulh}}
* {{Z|pi}}: {{W-|pi|sāma}}, {{W-|pi|santi|m}}
* {{Z|pag}}: {{W-|pag|kareenan}}
* {{Z|ps}}: {{W+|ps|صلح|m|tr=sólha}}
* {{Z|pl}}: {{W+|pl|pokój|m-in}}, {{W+|pl|mir}}
* {{Z|pt}}: {{W+|pt|paz|m}}
* {{Z|pa}}: {{W+|pa|ਅਮਨ}}, {{W+|pa|ਸ਼ਾਂਤੀ}}
* {{Z|kk}}: {{W+|kk|бейбітшілік}}, {{W-|kk|тыныштық}}
* {{Z|ro}}: {{W+|ro|pace|m}}
* {{Z|ru}}: {{W+|ru|мир|n}}
* {{Z|rue}}: {{W-|rue|мір|n}}
* Samî:
*: {{Z|sjd}}: {{W-|sjd|мырр}}, {{W-|sjd|а̄ййв}}
* {{Z|sma}}: {{W-|sma|raeffie}}
* {{Z|sa}}: {{W+|sa|शान्ति|m}}, {{W+|sa|अयुद्ध|nt}}
* {{Z|scn}}: {{W+|scn|paci|m}}
* {{Z|sh}}:
*: Kirîlî: {{W-|sh|ми̑р|n}}
*: Latînî: {{W+|sh|mȋr|n}}
* {{Z|cu}}:
*: Kirîlî: {{W-|cu|миръ|n}}
*: Glagolîtîk: {{W-|cu|ⰿⰹⱃⱏ|n}}
* {{Z|orv}}: {{W-|orv|покои|n}}, {{W-|orv|миръ|n}}
* {{Z|sk}}: {{W-|sk|mier|n}}
* {{Z|sl}}: {{W+|sl|mir|n}}
* {{Z|st}}: {{W+|st|kgotso}}, {{W+|st|khotso}}
* {{Z|es}}: {{W+|es|paz|m}}
* {{Z|sw}}: {{W+|sw|amani}}
* {{Z|sv}}: {{W+|sv|fred}}
* {{Z|zdj}}: {{W-|zdj|amani|c9|c10}}
* {{Z|tg}}: {{W+|tg|сулҳ}}, {{W-|tg|оштӣ}}
* {{Z|tl}}: {{W-|tl|kapayapaan}}
* {{Z|ta}}: {{W+|ta|அமைதி}}, {{W+|ta|சமாதானம்}}
* {{Z|th}}: {{W+|th|สันติภาพ}}, {{W+|th|สันติ}}
* {{Z|te}}: {{W+|te|శాంతి}}
* {{Z|crh}}: {{W-|crh|sulh}}
* {{Z|tt}}: {{W+|tt|тынычлык}}
* {{Z|ti}}: {{W-|ti|ሰላም}}
* {{Z|tr}}: {{W+|tr|barış}}, {{W+|tr|sulh}}
* {{Z|tk}}: {{W-|tk|parahatçylyk}}, {{W-|tk|rahatlyk}}, {{W-|tk|dyynçlyk}}
* {{Z|bo}}: {{W-|bo|ཞི་བདེ}}
* {{Z|tpi}}: {{W-|tpi|gutpela taim}}
* {{Z|tn}}: {{W-|tn|kagiso}}
* {{Z|ur}}: {{W-|ur|امن|n|tr=aman}}
* {{Z|uk}}: {{W+|uk|мир|n}}
* {{Z|vec}}: {{W-|vec|paxe|m}}
* {{Z|vi}}: {{W+|vi|hòa bình}}, {{W+|vi|hoà bình}}
* {{Z|vo}}: {{W+|vo|püd}}, {{W-|vo|lupüd}}
* {{Z|wa}}: {{W+|wa|påye|m}}
* {{Z|cy}}: {{W-|cy|heddwch}}
* {{Z|km}}: {{W+|km|សន្តិភាព}}, {{W-|km|សន្តិកាល}}
* {{Z|yi}}: {{W-|yi|פֿרידן|n}}, {{W-|yi|שלום|n|tr=sholem}}
* {{Z|el}}: {{W+|el|ειρήνη|m}}
*: {{Z|grc}}: {{W-|grc|εἰρήνη|m}}
{{werger-bin}}
:{{werger çavkanî|en|peace|beş=Ev qismê Wergerê|oldid=75872495}}
n3qr0crtg6c19353k9efrmrs7pwpja4
ma
0
8111
6342614
6338921
2026-08-25T13:16:37Z
Wikihez
7344
/* Cînav */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342614
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Hoker 1 ===
{{hoker|ku}}
# [[peyvik|Peyvikeke]] [[pirsîn]]ê ye.
#: {{mk|ku|Ma tu dê biçî?}}
#: {{mk|ku|Ma ew ne birayê te ye?}}
#* {{J:Feqiyê Teyran|jêgirtin='''Ma''' ez dibêm vê gotinê</br>Bêy te ziban bê gotin e}}
==== Notên bikaranînê ====
{{agahdarî}} Pirsên peyvika ''ma'' yan ya ''qey'' tenê bi wî awayî tên kirin ku ger pirs [[erênî]] ([[pozîtîv]]) be, pirsker bersivek [[ne-erênî]] ([[negatîv]]) [[pan|dipê]]:
''Ma tu dê biçî?''(= Neçe. / Naxwazim tu biçî. / Min bawer nedikir ku tu dê biçî."
Heke pirs [[ne-erênî]] be, pirser dixwaze bersivek dijî wê wergire:
''Ma tu naçî?'' (= Here. / Divê tu biçî. / Diviyabû tu biçûyayî. / Min bawer dikir ku tu dê biçî.)
==== Bi alfabeyên din ====
* {{ku-ar|ما}}
* {{ku-kr|ма}}
==== Formên alternatîv ====
* {{g|ku|mo}}
==== Hevmane ====
* {{g|ku|qey}} (1)
* {{g|ku|ma qey}} (1)
==== Jê ====
* {{g|ku|-ma}}
* {{g|ku|-ra}}
* {{g|ku|-re}}
==== Etîmolojî ====
Ji {{ji|ira}}, hevreha {{hv|pal||me|sc=Latn}} (wek di "me heker = me [[heke]]" de >farisî {{q|fa|مگر|tr=meger}} >kurdî [[meger]]), têkilî [[na]] û [[me-]] (ji ber ku bi hevoka "ma" jî negatîvkirina pirsê ye.) Hevreha [[nê]].
==== Bide ber ====
* {{g|ku|gelo}}
* {{g|ku|aya}}
* {{g|ku|erê}} (2)
==== Herwiha binêre ====
* {{g|ku|pa}}
==== Werger ====
{{werger-ser}}
{{werger-bin}}
=== Hoker 2 ===
{{hoker|ku}}
# Herwiha [[bila]].
#: {{mk|ku|Ma bi xêr be.}}
==== Etîmolojî ====
Binêre [[mila]].
=== Formeke lêkerê ===
{{lêker|ku|form=erê}}
# formek ji lêkera [[man]] / [[mayîn]]
#* {{mk|ku|ew '''ma''', neçû}}
==== Werger ====
{{werger-ser}}
{{werger-bin}}
=== Formeke navdêrê ===
{{navdêr|ku|form=erê}}
# {{f|ku|devokî}} {{pirjimar|ku|meh}}
#: {{mk|ku|du '''ma'''|du mehan, du heyvan|birêz=1}}
== {{ziman|zza}} ==
=== Cînav ===
{{cînav|zza}}
# [[me]], [[em]]
#* {{jêder|zza|jêgirtin=ziwanê '''ma'''|werger=zimanê me|[http://www.tavlioren.com/arsiv/arsiv-wene/ecewid-tirsatato/ecewid-tirsatato.html Tirsa Tato Ecewîd Yildirim], 10/11/2010}}
== {{ziman|ace}} ==
=== Navdêr ===
{{navdêr|ace}}
# {{f|ace|malbat}} [[dayik#ku|dayik]], [[dê#ku|dê]]
== {{ziman|af}} ==
=== Navdêr ===
{{navdêr|af}}
# {{f|af|malbat}} [[dayik#ku|dayik]], [[dê#ku|dê]]
== {{ziman|ast}} ==
=== Bilêvkirin ===
* {{deng|ast|LL-Q29507 (ast)-Limotecariu-ma (sustantivu).wav|Deng|dever=Uviéu, Spanya}}
=== Navdêr ===
{{navdêr|ast|z=m}}
# {{f|ast|malbat}} [[dayik#ku|dayik]], [[dê#ku|dê]]
== {{ziman|br}} ==
=== Girêdek ===
{{girêdek|br}}
# [[eger#ku|eger]], [[heke#ku|heke]]
== {{ziman|bin}} ==
=== Cînav ===
{{cînav|bin}}
# [[em#ku|em]] (wek [[biker]])
== {{ziman|et}} ==
=== Cînav ===
{{cînav|et}}
# [[ez#ku|ez]] (wek [[biker]])
== {{ziman|fi}} ==
=== Cînav ===
{{cînav|fi}}
# [[ez#ku|ez]] (wek [[biker]])
== {{ziman|gd}} ==
=== Girêdek ===
{{girêdek|gd}}
# [[eger#ku|eger]], [[heke#ku|heke]]
== {{ziman|yuf}} ==
=== Cînav ===
{{cînav|yuf}}
# [[tu#ku|tu]] (wek [[biker]])
== {{ziman|haw}} ==
=== Girêdek ===
{{girêdek|haw}}
# [[çimkî#ku|çimkî]], [[çunkî#ku|çunkî]], [[ji ber ku#ku|ji ber ku]]
== {{ziman|io}} ==
=== Girêdek ===
{{girêdek|io}}
# [[lê#ku|lê]] ([[feqet#ku|feqet]], [[ema#ku|ema]], [[lakin#ku|lakin]])
== {{ziman|it}} ==
=== Girêdek ===
{{girêdek|it}}
# [[lê#ku|lê]] ([[feqet#ku|feqet]], [[ema#ku|ema]], [[lakin#ku|lakin]])
== {{ziman|xeu}} ==
=== Navdêr ===
{{navdêr|xeu}}
# {{mijar|xeu|vexwarin}} {{g|ku|av}}
=== Çavkanî ===
{{rûpela wergerê|xeu|av/Werger1}}
== {{ziman|lij}} ==
=== Girêdek ===
{{girêdek|lij}}
# [[lê#ku|lê]] ([[feqet#ku|feqet]], [[ema#ku|ema]], [[lakin#ku|lakin]])
== {{ziman|mt}} ==
=== Navdêr ===
{{navdêr|mt}}
# {{f|mt|malbat}} [[dayik#ku|dayik]], [[dê#ku|dê]]
== {{ziman|mrc}} ==
=== Navdêr ===
{{navdêr|mrc}}
# {{f|mrc|vexwarin}} {{g|ku|şîr}}
== {{ziman|mh}} ==
=== Girêdek ===
{{girêdek|mh}}
# [[lê#ku|lê]] ([[feqet#ku|feqet]], [[ema#ku|ema]], [[lakin#ku|lakin]])
== {{ziman|hu}} ==
=== Hoker ===
{{hoker|hu}}
# {{f|hu|dem}} [[îro#ku|îro]]
== {{ziman|opo}} ==
=== Navdêr ===
{{navdêr|opo}}
# {{mijar|opo|vexwarin}} {{g|ku|av}}
=== Çavkanî ===
{{rûpela wergerê|opo|av/Werger2}}
== {{ziman|oro}} ==
=== Navdêr ===
{{navdêr|oro}}
# {{mijar|oro|vexwarin}} {{g|ku|av}}
=== Çavkanî ===
{{rûpela wergerê|oro|av/Werger2}}
== {{ziman|pac}} ==
=== Girêdek ===
{{girêdek|pac}}
# [[lê#ku|lê]] ([[feqet#ku|feqet]], [[ema#ku|ema]], [[lakin#ku|lakin]])
== {{ziman|sid}} ==
=== Cînav ===
{{cînav|sid}}
# [[çi#ku|çi]]
== {{ziman|suq}} ==
=== Navdêr ===
{{navdêr|suq}}
# {{mijar|suq|vexwarin}} {{g|ku|av}}
=== Çavkanî ===
{{rûpela wergerê|suq|av/Werger3}}
== {{ziman|tqo}} ==
=== Navdêr ===
{{navdêr|tqo}}
# {{mijar|tqo|vexwarin}} {{g|ku|av}}
=== Çavkanî ===
{{rûpela wergerê|tqo|av/Werger3}}
== {{ziman|vil}} ==
=== Navdêr ===
{{navdêr|vil}}
# {{mijar|vil|vexwarin}} {{g|ku|av}}
=== Çavkanî ===
{{rûpela wergerê|vil|av/Werger3}}
== {{ziman|yo}} ==
=== Cînav ===
{{cînav|yo|mà}}
# [[ez#ku|ez]] (wek [[biker]])
== {{ziman|za}} ==
=== Navdêr ===
{{navdêr|za}}
# {{f|za|heywan}} [[kûçik#ku|kûçik]], [[se#ku|se]]
d7bco66t5hic25ycxcpkqapc4swwr8w
agahî
0
10161
6342640
6296203
2026-08-25T13:57:15Z
Wikihez
7344
6342640
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{deng|ku|LL-Q36163 (kmr)-Ebulfîda-agahî.wav|dever=Bidlîs}}
* {{ku-kîte}}
=== Navdêr ===
{{wp}}
{{navdêr|ku|z=m}}
# [[zanîn|Zanîn]]a ku bi rêya [[tedqîqkirin]], [[xebitîn]] an [[ceribandin]]ê tê bidestxistin; tiştên ku derbarê [[mesele]]yeke de tên [[zanîn]], an karin werin zanîn.
#: {{hevmane|ku|malûmat|enformasyon|zanyarî|hay|zanîn}}
#* {{jêder-malper|ku|jêgirtin=Rêveberê ofîsa rizgar kirina rewandiyên êzdî li Duhokê Husên Kuru îro 08.07.2019ê ragehand, derbarê rewşa rizgarbûyên êzdî de '''agahî''' ji '''Yekitiya Ewropa''' (YE) re hate dayîn.|websîte=Kurmancî Bas |sernav= Derbarê rewşa rizgarbûyên êzdî de agahî ji YE re hate dayîn! |url= https://www.basnews.com/kr/babat/532326|dîrok=07.08.2019}}
#* {{jêder-malper|ku|jêgirtin=Hejmara duyemîn a kovara Temaşeyê derket. Kovar bi awayekî online derdikeve û bi giştî sînemayê, bi taybetî jî der barê sînemaya kurdî de nivîs û '''agahiyan''' parve dike.|nivîskar= Amed |sernav= Hejmara duyemîn a ‘Temaşe’yê derket|url= https://xwebun.org/hejmara-duyemin-a-temaseye-derket|websîte=xwebun.org}}
#* {{jêder-kovar|ku|jêgirtin=Ev pirseke, ko bersiva wê pir zor e û pêdiviye bersivdêr agah li hemen hemen hemî cureyên nivîsîna kurdî û bihemî zaraveyan hebe û ez vê idîayê nakim, lê li gor '''agahiyên''' min, lêkolînerên kurd di warê edeba kurdî ya kilasîkî de, hebûn û hene...|kovar=Pênûsa Nû|sernav=Hevpeyvînek zindî biTengezarê Marînî re|nivîskar=Tengezarê Marînî|hejmar=17|sal=2013|rûpel=20}}
==== Tewandin ====
{{ku-tewîn-nav/nû|mê}}
==== Bi alfabeyên din ====
* {{ku-ar|ئاگاهی}}
* {{ku-kr|агаһи}}
==== Formên alternatîv ====
* [[agehî]]
==== Etîmolojî ====
Ji {{qertaf|ku|agah|-î}}.
==== Werger ====
{{werger-ser}}
* {{Z|ar}}: {{W+|ar|معلومات}}, {{W-|ar|المعرفه}}
* {{Z|fa}}: {{W+|fa|دانش}}, {{W+|fa|اطلاعات}}
* {{Z|en}}: {{W+|en|notice}}, {{W+|en|notification}}, {{W+|en|information}}, {{W+|en|knowledge}}
* {{Z|tr}}: {{W+|tr|bilgi}}
{{werger-bin}}
mijw6x5tzhsnvs0ysajnp4dt23jw57c
6342643
6342640
2026-08-25T15:12:07Z
Balyozbot
7867
Bot: Paqijiyên kozmetîk (Lînk paqij kir.)
6342643
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{deng|ku|LL-Q36163 (kmr)-Ebulfîda-agahî.wav|dever=Bidlîs}}
* {{ku-kîte}}
=== Navdêr ===
{{wp}}
{{navdêr|ku|z=m}}
# [[zanîn|Zanîna]] ku bi rêya [[tedqîqkirin]], [[xebitîn]] an [[ceribandin]]ê tê bidestxistin; tiştên ku derbarê [[mesele]]yeke de tên [[zanîn]], an karin werin zanîn.
#: {{hevmane|ku|malûmat|enformasyon|zanyarî|hay|zanîn}}
#* {{jêder-malper|ku|jêgirtin=Rêveberê ofîsa rizgar kirina rewandiyên êzdî li Duhokê Husên Kuru îro 08.07.2019ê ragehand, derbarê rewşa rizgarbûyên êzdî de '''agahî''' ji '''Yekitiya Ewropa''' (YE) re hate dayîn.|websîte=Kurmancî Bas |sernav= Derbarê rewşa rizgarbûyên êzdî de agahî ji YE re hate dayîn! |url= https://www.basnews.com/kr/babat/532326|dîrok=07.08.2019}}
#* {{jêder-malper|ku|jêgirtin=Hejmara duyemîn a kovara Temaşeyê derket. Kovar bi awayekî online derdikeve û bi giştî sînemayê, bi taybetî jî der barê sînemaya kurdî de nivîs û '''agahiyan''' parve dike.|nivîskar= Amed |sernav= Hejmara duyemîn a ‘Temaşe’yê derket|url= https://xwebun.org/hejmara-duyemin-a-temaseye-derket|websîte=xwebun.org}}
#* {{jêder-kovar|ku|jêgirtin=Ev pirseke, ko bersiva wê pir zor e û pêdiviye bersivdêr agah li hemen hemen hemî cureyên nivîsîna kurdî û bihemî zaraveyan hebe û ez vê idîayê nakim, lê li gor '''agahiyên''' min, lêkolînerên kurd di warê edeba kurdî ya kilasîkî de, hebûn û hene...|kovar=Pênûsa Nû|sernav=Hevpeyvînek zindî biTengezarê Marînî re|nivîskar=Tengezarê Marînî|hejmar=17|sal=2013|rûpel=20}}
==== Tewandin ====
{{ku-tewîn-nav/nû|mê}}
==== Bi alfabeyên din ====
* {{ku-ar|ئاگاهی}}
* {{ku-kr|агаһи}}
==== Formên alternatîv ====
* [[agehî]]
==== Etîmolojî ====
Ji {{qertaf|ku|agah|-î}}.
==== Werger ====
{{werger-ser}}
* {{Z|ar}}: {{W+|ar|معلومات}}, {{W-|ar|المعرفه}}
* {{Z|fa}}: {{W+|fa|دانش}}, {{W+|fa|اطلاعات}}
* {{Z|en}}: {{W+|en|notice}}, {{W+|en|notification}}, {{W+|en|information}}, {{W+|en|knowledge}}
* {{Z|tr}}: {{W+|tr|bilgi}}
{{werger-bin}}
cf37vsqx7082clrjsu9g5p78uja63b5
ey
0
10623
6342611
6338260
2026-08-25T13:14:21Z
Wikihez
7344
/* Cînav */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342611
wikitext
text/x-wiki
{{bnr-h|ey|êy|-ey|-êy}}
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-kîte}}
=== Hoker ===
{{hoker|ku}}
# [[gelî]], [[-o]], [[-ê]], [[-no]], [[-ino]], [[-îno]], <br>[[gazî|gaziyek]] e [[balkişandin]]a [[guhdar]]an
#: ''Ey kurdên welatparêz, zimanê we biparêzin!''
# [[peyvik]]ek [[nifirandin]]ê anku [[nifrîn]]kirinê ye
#: ''Ey tu nemînî!'' (Tu bimirî!)
# [[ax]], [[ox]], [[of]], [[wax]], [[hey]], [[eywax]], [[heywax]], [[weyla]], [[weylê]], [[weylo]], <br>[[gazî|gaziyeke]] mirov dike dema [[hest]] bi [[xweşî|xweşiyekê]] yan [[nexweşî|nexweşiyekê]] dike
#* {{bênimûne|ku}}
==== Jê ====
* [[weyandin]]
* [[weye-wey]]
* [[weye-weyî]]
* [[weye-weykî]]
* [[weyên]]
* [[weyênî]]
* [[weyênkî]]
* [[weyîn]]
* [[weyînî]]
* [[weyînkî]]
==== Etîmolojî ====
{{bêetîmolojî|ku}}
==== Werger ====
{{werger-ser}}
* {{Z|fa}}: {{W|fa|حرف ندا|guman=erê}}, {{W|fa|های|guman=erê}}
* {{Z|tr}}:{{W|tr|kaka|guman=erê}}, {{W|tr|pis|guman=erê}}, {{W|tr|pöf|guman=erê}}, {{W|tr|tu kaka|guman=erê}}, {{W|tr|ulan|guman=erê}}
{{werger-bin}}
== {{ziman|zza}} ==
=== Cînav ===
{{cînav|zza}}
# [[wî]]
#* {{jêder|zza|jêgirtin=[[ap|Ap]] [[heş|Heş]], çend rojî [[miyan|mîyanê]] [[dewe]] de xo [[rê]] [[geyreno]]. [[dewij|Dewijan]] [[reyde]] suhbet [[keno]]. Keyfê [[hemî]]ne bi Ap Heşî [[yeno]]. Keyfê [[ey]] zî zaf bi hemeyê dewijan yeno.|Roşan Lezgîn: ''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
== {{ziman|enm}} ==
=== Navdêr ===
{{navdêr|enm}}
# {{g|ku|hêk}}
#* {{bênimûne|enm}}
=== Çavkanî ===
{{rûpela wergerê|enm|hêk}}
== {{ziman|is}} ==
=== Navdêr ===
{{navdêr|is|z=m}}
# {{mijar|is|erdnîgarî}} {{g|ku|girav}}
#* {{bênimûne|is}}
=== Çavkanî ===
{{rûpela wergerê|is|girav}}
== {{ziman|so}} ==
=== Navdêr ===
{{navdêr|so}}
# {{f|so|heywan}} [[kûçik#ku|kûçik]], [[se#ku|se]]
#* {{bênimûne|so}}
== {{ziman|tr}} ==
==== Mane ====
# [[hê]], [[wa]]
#: {{mk|tr|'''Ey''' arkadaş.|rêz=1|Hê hevalo.}}
# [[gelî]]
#: {{mk|tr|'''Ey''' köylüler.|rêz=1|Gelî gundiyan.}}
# [[hey]]
#: {{mk|tr|'''Ey''' bu topraklar için toprağa düşmüş insanlar|Hey mirovên ku ji bo van axan serê xwe danîne ser axa sar''}}
# [[êh]], oh ji bo acizbûnê
#: {{mk|tr|'''Ey''', yeter be.|rêz=1|Êh, de êdî bes e.}}
# [[hê]]
#: {{mk|tr|'''Ey''', bu tezgah burada ne arıyor?|rêz=1|Hê, ev dezgeh çi dike li virê?.}}
cw0mprehztq1oliyodfu3x8bmiln2ml
rew
0
15694
6342627
6327091
2026-08-25T13:25:58Z
Wikihez
7344
/* Hoker */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342627
wikitext
text/x-wiki
{{bnr-h|rêw}}
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-kîte}}
=== Navdêr 1 ===
{{navdêr|ku|z=m}}
# [[deng]]ê [[se]]yan, [[deng]]ê [[kûçik]]an
#* {{bênimûne|ku}}
==== Formên alternatîv ====
* [[rey]] (2)
==== Jê ====
{{stûn|
* [[rewandin]] (1)
* [[rewî]] (1)
* [[rewîn]] (1)
* [[rewok]]
* [[rewoke]]
* [[rewokî]]
}}
==== Etîmolojî ====
{{bêetîmolojî|ku}}
==== Bide ber ====
* [[raw]]
* [[rev]]
* [[rêv]]
==== Werger ====
{{werger-ser}}
* {{Z|de}}: {{W+|de|Lage}} {{mê}}
* {{Z|en}}: {{W+|en|in order|guman=erê}}
{{werger-bin}}
=== Navdêr 2 ===
{{navdêr|ku|z=m}}
# [[meş]], [[birêveçûn]], [[birêketin]], [[meşîn]], [[çûn]]
#* {{bênimûne|ku}}
==== Jê ====
* [[rewandin]] (2)
* [[rewî]] (2)
* [[rewîn]] (2)
* [[rewok]]
* [[rewoke]]
* [[rewokî]]
==== Têkildar ====
* [[rev]]
==== Bide ber ====
* [[raw]]
* [[rêv]]
* [[rêwî]]
==== Werger ====
{{werger-ser}}
{{werger-bin}}
== {{ziman|zza}} ==
=== Hoker ===
{{hoker|zza}}
# [[zû]]
#* {{jêder|zza|2=Şaban Şenateş, ''Ferhenga Zazakî'', Nûbihar, 2022|jêgirtin='''Rew''' bêrî, ma şirê.|werger=Zû were, em biçin.}}
==== Dijmane ====
* {{g|zza|erey}}
* {{g|zza|berey}}
jqrx82tpixirvmrje7y8bdr78yw46y9
ramedîn
0
17721
6342597
6336455
2026-08-25T12:53:21Z
Wikihez
7344
+nimûneya bikaranînê bi amûra « [[Mediawiki:Gadget-wikt.add-examples|Nimûne zêde bike]] » (v2.0).
6342597
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-kîte}}
=== Lêker ===
{{lêker|ku|c=ngh}}
# [[veketin]], [[pal dan]] [[erd]]ê, xwe li [[erd]]ê [[dirêj]] kirin, <br>[[dirêj]] bûn ji bo [[razan]]ê an [[bêhnvedan]]ê
#* {{J:Robert Louis Stevenson:Meseleya Seyr a Dr. Jekyll û Mr. Hyde|r=20|jêgirtin=...bes hinga ku di tariya req a şevê û odaye perdekirî de '''ramediyabû'''}}
#* {{jêder|ku|jêgirtin=Mirin jî li welatê me xwediya bandoreke kûr e! Yê bi nexweşiyeke giran dikeve, '''radimede''', yên li dora xwe nerihet dike û hêdî-hêdî ber bi mirina tahl dihere, ta ku rojekê Izraîl tê, ruhê wî ji bedena wî dikişîne û wan her du melekên ku ta nuha rindî û xirabiyên wî dinivîsandin bêkar dihêle, yan dibe egera wê yekê ku deftereke nû ji bo wan bihêt dayîn. Gelo melekên bêkar jî hebin?! Bêyî guman na. Heke hebûna me dê di derheqê sendîgehên wan de tiştek bihîstibûya.|Şahînê Bekirê Soreklî: ''Wendabûn'', roman, çavkanî: Kovara Mehname, hj. 72}}
#: {{mk|ku|lawo serê sibê bû hevalê çar yawriyê mi, ji xwu ra digeriyan li ser xaniya li ber deriya / çar heb berxê mi bê serî di nava ciya da ji xwu ra '''ramediya'''}}<ref>Dengbêj Kazoyê Garisya, Kilama Seyîd Betal: https://www.youtube.com/watch?v=nEEw8lzEv84</ref>
#* {{jêder-vîdeo|ku|hunermend=Dengbêj Kazoyê Garisya|platform=w:Youtube|sernav=Kilama Seyîd Betal:|tarîx=2021-03-10|url=https://www.youtube.com/watch?v=nEEw8lzEv84|jêgirtin=lawo serê sibê bû hevalê çar yawriyê mi, ji xwu ra digeriyan li ser xaniya li ber deriya / çar heb berxê mi bê serî di nava ciya da ji xwu ra '''ramediya'''}}
# [[razandin]], [[veberanîn]], [[mewduat]], [[plasman]], <br>[[pare]]yê ku mirov dide kesekî yan [[dezgeh]]ekê daku [[qezenc]]ê jê bike
#* {{bênimûne|ku}}
==== Tewandin ====
* ra-med-
==== Bi alfabeyên din ====
* {{ku-ar|ڕامهدین}}
==== Formên alternatîv ====
* [[ramedan]]
* [[ramediyan]]
* [[ramedîyan]]
* [[ramedyan]]
==== Jê ====
* [[ramediyayî]]
* [[ramedî]]
* [[ramedok]]
==== Têkildar ====
* [[ramedandin]]
==== Etîmolojî ====
{{bêetîmolojî|ku}}
==== Werger ====
{{werger-ser}}
* {{Z|de}}: {{W+|de|liegen}}, {{W-|de|schlafen gehen}}, {{W-|de|sich hinlegen}}, {{W-|de|sich niederlegen}}, {{W+|de|neigen}}, {{W+|de|geneigt}}, {{W+|de|Liegen}} {{n}}, {{W+|de|bettlägerig|guman=erê}}
* {{Z|fa}}: {{W+|fa|دراز کشیدن}}, {{W+|fa|دراز کردن}}, {{W+|fa|خواباندن}}, {{W-|fa|زمین گذاشتن}}, {{W+|fa|خوابیدن}}, {{W+|fa|استراحت کردن}}, {{W+|fa|خوسیدن}}
* {{Z|fi}}: [[maata]], [[käydä pitkäksi]]
* {{Z|fr}}: [[être]] [[couché]], [[coucher]], [[gésir]]
* {{Z|en}}: {{W+|en|acock}}, {{W+|en|resting}}, [[lie]] (lay, lain)
* {{Z|it}}: [[giacere]], [[essere]] [[disteso]], [[stare]] [[disteso]]
* {{Z|ru}}: [[лежать]]
* {{Z|es}}: [[estar]] [[acostado]], [[estar]] [[tendido]], [[estar]] [[tumbado]], [[estar]] [[echado]]
* {{Z|sv}}: [[ligga]] (-er, låg, legat)
* {{Z|tr}}: {{W+|tr|serilme}}, {{W+|tr|serilmek}}, {{W+|tr|uzanmak}}, {{W+|tr|yatma}}, {{W+|tr|uzanma}}, {{W+|tr|yatık}}, {{W+|tr|serili}}, {{W+|tr|yatkın}}, {{W+|tr|serilip yatmak}}
{{werger-bin}}
=== Navdêr ===
{{navdêr|ku|z=m}}
# {{mane?|ku}}
#* {{bênimûne|ku}}
==== Tewandin ====
{{ku-tewîn-nav/nû|mê}}
==== Etîmolojî ====
{{bêetîmolojî|ku}}
==== Werger ====
{{werger-ser}}
{{werger-bin}}
cyuoufzoomerhu22d79ahq7ltqa89e0
6342598
6342597
2026-08-25T12:53:50Z
Wikihez
7344
/* Lêker */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342598
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-kîte}}
=== Lêker ===
{{lêker|ku|c=ngh}}
# [[veketin]], [[pal dan]] [[erd]]ê, xwe li [[erd]]ê [[dirêj]] kirin, <br>[[dirêj]] bûn ji bo [[razan]]ê an [[bêhnvedan]]ê
#* {{J:Robert Louis Stevenson:Meseleya Seyr a Dr. Jekyll û Mr. Hyde|r=20|jêgirtin=...bes hinga ku di tariya req a şevê û odaye perdekirî de '''ramediyabû'''}}
#* {{jêder|ku|jêgirtin=Mirin jî li welatê me xwediya bandoreke kûr e! Yê bi nexweşiyeke giran dikeve, '''radimede''', yên li dora xwe nerihet dike û hêdî-hêdî ber bi mirina tahl dihere, ta ku rojekê Izraîl tê, ruhê wî ji bedena wî dikişîne û wan her du melekên ku ta nuha rindî û xirabiyên wî dinivîsandin bêkar dihêle, yan dibe egera wê yekê ku deftereke nû ji bo wan bihêt dayîn. Gelo melekên bêkar jî hebin?! Bêyî guman na. Heke hebûna me dê di derheqê sendîgehên wan de tiştek bihîstibûya.|Şahînê Bekirê Soreklî: ''Wendabûn'', roman, çavkanî: Kovara Mehname, hj. 72}}
#* {{jêder-vîdeo|ku|hunermend=Dengbêj Kazoyê Garisya|platform=w:YouTube|sernav=Kilama Seyîd Betal|tarîx=2021-03-10|url=https://www.youtube.com/watch?v=nEEw8lzEv84|jêgirtin=lawo serê sibê bû hevalê çar yawriyê mi, ji xwu ra digeriyan li ser xaniya li ber deriya / çar heb berxê mi bê serî di nava ciya da ji xwu ra '''ramediya'''}}
# [[razandin]], [[veberanîn]], [[mewduat]], [[plasman]], <br>[[pare]]yê ku mirov dide kesekî yan [[dezgeh]]ekê daku [[qezenc]]ê jê bike
#* {{bênimûne|ku}}
==== Tewandin ====
* ra-med-
==== Bi alfabeyên din ====
* {{ku-ar|ڕامهدین}}
==== Formên alternatîv ====
* [[ramedan]]
* [[ramediyan]]
* [[ramedîyan]]
* [[ramedyan]]
==== Jê ====
* [[ramediyayî]]
* [[ramedî]]
* [[ramedok]]
==== Têkildar ====
* [[ramedandin]]
==== Etîmolojî ====
{{bêetîmolojî|ku}}
==== Werger ====
{{werger-ser}}
* {{Z|de}}: {{W+|de|liegen}}, {{W-|de|schlafen gehen}}, {{W-|de|sich hinlegen}}, {{W-|de|sich niederlegen}}, {{W+|de|neigen}}, {{W+|de|geneigt}}, {{W+|de|Liegen}} {{n}}, {{W+|de|bettlägerig|guman=erê}}
* {{Z|fa}}: {{W+|fa|دراز کشیدن}}, {{W+|fa|دراز کردن}}, {{W+|fa|خواباندن}}, {{W-|fa|زمین گذاشتن}}, {{W+|fa|خوابیدن}}, {{W+|fa|استراحت کردن}}, {{W+|fa|خوسیدن}}
* {{Z|fi}}: [[maata]], [[käydä pitkäksi]]
* {{Z|fr}}: [[être]] [[couché]], [[coucher]], [[gésir]]
* {{Z|en}}: {{W+|en|acock}}, {{W+|en|resting}}, [[lie]] (lay, lain)
* {{Z|it}}: [[giacere]], [[essere]] [[disteso]], [[stare]] [[disteso]]
* {{Z|ru}}: [[лежать]]
* {{Z|es}}: [[estar]] [[acostado]], [[estar]] [[tendido]], [[estar]] [[tumbado]], [[estar]] [[echado]]
* {{Z|sv}}: [[ligga]] (-er, låg, legat)
* {{Z|tr}}: {{W+|tr|serilme}}, {{W+|tr|serilmek}}, {{W+|tr|uzanmak}}, {{W+|tr|yatma}}, {{W+|tr|uzanma}}, {{W+|tr|yatık}}, {{W+|tr|serili}}, {{W+|tr|yatkın}}, {{W+|tr|serilip yatmak}}
{{werger-bin}}
=== Navdêr ===
{{navdêr|ku|z=m}}
# {{mane?|ku}}
#* {{bênimûne|ku}}
==== Tewandin ====
{{ku-tewîn-nav/nû|mê}}
==== Etîmolojî ====
{{bêetîmolojî|ku}}
==== Werger ====
{{werger-ser}}
{{werger-bin}}
c45g3sgaj6q40rwewdwsd59yz5z5ats
çêj
0
18107
6342648
6337097
2026-08-25T17:07:37Z
Wikihez
7344
/* Navdêr */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342648
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|z=m}}, {{ç-ya req}}
# [[hest|Hesta]] bi [[ziman]]î tê [[seh]]kirin (wek [[şîrînî]], [[talî]], [[tûjî]], [[sûrî]], [[bêxwêtî]] û [[tirşî]]).
#: {{hevmane|ku|tam|team|xwarin|lezet}}
#* {{jêder-pirtûk|ku|jêgirtin=Ez têra xwe jîme û min '''çêj''' û lezet ji fêkiyê demsalên jiyanê dîtiye.|ji-hêla=Xelîl Cibran|terciman=Husein Muhammed|sernav=Baskên Şkestî|orîjînal=Broken Wings|rûpel=58}}
#* {{J:Mîran Janbar:Qolyeya Cecileê|r=|jêgirtin=Bi dû re Cécile", lêvên xwe yên sor tevî bişirîna ku li ser wekî kulîlkekê xuya dibû, danîbûn ser lêvên Remezan û '''çêjeke''' xweş jê wergirtibû.}}
==== Tewandin ====
{{ku-tewîn-nav/nû|mê}}
==== Bi alfabeyên din ====
* {{ku-ar|چێژ}}
==== Jê ====
{{kol3|ku|cure=Jê
|çêj jê hatin<pos:lêker>
|çêj kirin<pos:lêker>
|çêj dan<pos:lêker>
|çêjjêhatin<pos:navdêr>
|çêjkirin<pos:navdêr>
|çêjdan<pos:navdêr>
|çêjjêhatî<pos:rengdêr>
|çêjkirî<pos:rengdêr>
|bêçêj
|bêçêjî
|bêçêjî
|bêçêjtî
|biçêj
|biçêjî
|biçêjî
|biçêjtî
|çêjandin
|çêjandî
|çêjdar
|çêjdarî
|çêjdarîtî
|çêjdartî
|çêjder
|çêjderî
|çêjderîtî
|çêjdertî
|çêjdêr
|çêjdêrî
|çêjdêrîtî
|çêjdêrtî
|çêjiyayî
|çêjî
|çêjîn
|çêjîner
|çêjînk
}}
==== Etîmolojî ====
Ji {{ji|ine-pro|ku}}. Hevreha [[çeşn]], [[çeşîd]], [[dost]]...
Hevreha {{hv|fa|چاشنى|tr=çaşnî}}, {{hv|pal||çeşnîk|sc=Latn}}, {{hv|sa|जोषति}} (coṣeti-), yûnanî [[γεύω]] (gêwo: tam kirin), [[gustare|gustāre]] (tam kirinê), îngilîzî [[choose]] ([[bijartin]]), {{hv|de|kisesen}} (bijartin), {{hv|sv|tjusa}} (dil [[bijandin]])...
==== Bide ber ====
{{kol3|ku
|-bêj
|gêj
|hêj
|-mêj
|-rêj
}}
==== Werger ====
{{werger-ser}}
* {{Z|af}}: {{W-|af|smaak}}
* {{Z|de}}: {{W+|de|Geschmack|m}}
* {{Z|zh}}: {{W-|zh|味道|tr=wèi.dào}}
* {{Z|ar}}: {{W+|ar|طعم|m}}, {{W+|ar|ذوق}}
* {{Z|fa}}: {{W+|fa|چشایی}}, {{W+|fa|ذائقه}}, {{W+|fa|سلیقه}}, {{W+|fa|طعم}}, {{W+|fa|لذت}}, {{W+|fa|مزه}}
* {{Z|fi}}: {{W+|fi|maku}}
* {{Z|fr}}: {{W+|fr|goût|m}}
* {{Z|fy}}: {{W-|fy|smaak}}
* {{Z|nl}}: {{W+|nl|smaak}}
* {{Z|en}}: {{W+|en|taste}}, {{W+|en|flavor}}, {{W+|en|sapidity}}, {{W+|en|sapidness}}, {{W+|en|savor}}, {{W+|en|zest}}
* {{Z|it}}: {{W+|it|gusto|m}}
* {{Z|ja}}: {{W-|ja|味覚|tr=[[みかく]], [[mikaku]]}}, [[味]] ([[あじ]], [[aji]])
* {{Z|ko}}: {{W-|ko|맛|tr=mas}}
* {{Z|la}}: {{W-|la|gustus|m}}
* {{Z|hu}}: {{W+|hu|íz}}, {{W+|hu|ízlés}}
* {{Z|oc}}: {{W-|oc|tast}}
* {{Z|pt}}: {{W+|pt|gosto|m}}
* {{Z|ro}}: {{W+|ro|gust|n}}
* {{Z|ru}}: {{W-|ru|вкус|tr=vkus}}
* {{Z|scn}}: {{W+|scn|gustu}}
* {{Z|sl}}: {{W+|sl|okus}}
* {{Z|es}}: {{W+|es|gusto|m}}
* {{Z|sv}}: {{W+|sv|smak}}
* {{Z|tr}}: {{W+|tr|tat}}, {{W+|tr|çeşni}}, {{W+|tr|döl}}, {{W+|tr|yeme}}, {{W+|tr|zevk}}, {{W+|tr|çıkarmak}}, {{W+|tr|lezzet}}, {{W+|tr|tad}}, {{W+|tr|tadım|guman=erê}}
* {{Z|vo}}: {{W+|vo|smek}}
{{werger-bin}}
dzbndd40w5slwyxwze0oc86b7561jnk
reh
0
18500
6342661
6341807
2026-08-26T09:54:29Z
Mehmet1922
14058
/* Tewandin */
6342661
wikitext
text/x-wiki
{{bnr-h|Reh}}
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{ku-kîte}}
=== Navdêr 1 ===
[[Wêne:Primary and secondary cotton roots.jpg|thumb|'''Rehên''' darekê.]]
{{navdêr|ku|c1=m|c1etîk=devokên navendî|c2=n|c2etîk=devokên rojhilatî}}
# {{f|ku|riweknasî}} [[parçe|Parçeyên]] [[jêrîn]] yên [[riwek]]an (bi taybetî yên di [[bin]] [[ax]]ê ve).
#: {{hevmane|ku|kok|rewa|rîş|ripî|riç|cille}}
# [[binyat|Binyat]], [[bingeh]], [[serekanî]], [[esil]], [[esas]].
#* {{J:Albert Camus:Biyanî|jêgirtin=Min got ku kûçikê wî ji tuxmekî baş, ji '''reheke''' kûçikên xweşik bû.}}
# {{f|ku|zimannasî}} [[parçe|Parçeya]] [[peyv]]an ya herî [[biçûk]]
#* {{jêder-malper|ku|jêgirtin=Pêşpirtik pirtikên wisan in ku tên berî peyva xwerû yan '''rehê''' peyvê yan jî peyva ku ji xwe hin pirtikên din pê ve hene|nivîskar={{w|Husein Muhammed}}|sernav=Pirtikrêzî anku morfotaksî|url=https://zimannas.wordpress.com/2015/12/12/pirtikrezi-anku-morfotaksi/|malper=zimannas.wordpress.com|dîrok=12.12.2015}}
#* {{jêder-malper|ku|jêgirtin=Da-hat-û (da: paşdaçek, hat: '''rehê''' dema borî ya lêkera hatinê, û: gîhanek) Çi têkilîya vê bi dema bê ra heye? De were îca safî bike!|nivîskar=Ewdil Ararat|sernav=Ji bo weqfa Mezopotamyayê II|url=http://www.rojnameyakurdistan.com/ku/makale/Ji_bo_weqfa_Mezopotamyay%C3%AA_II|malper=Rojnameya Kurdistan|dîrok=21.05.2017}}
#* {{jêder-malper|ku|jêgirtin=Dema kirde diyar be jî, veşartî be jî bi paşgira kesane ya tê pey '''rehê''' lêkerê, xwe diyar dike û têgihîştinê dide çêkirin.|nivîskar=Hesen Huseyin Deniz|sernav=Di Zimanê Kurdî de Hevok û Erka Hevokan di Vegotinê de|url=http://www.pen-kurd.org/kurdi/hesen-deniz/di-zimane-kurdi-de-hevok-u-erka-hevokan.html|malper=pen-kurd.org}}
# {{f|ku|nivîsbarî}} [[birêveber]]a [[pergala xebatê|pergalên xebatê]] (bi gelemperî ya [[Linux]]ê)
#* {{bêmînak|ku}}
==== Ji wêjeya klasîk ====
* {{J:Melayê Cizîrî:Dîwana Melayê Cizîrî|jêgirtin=Dê du siyeh sirmeyê çehvên xwe kit<br />Xakê '''rehê''' yarê seba her sebah<br />Toz û xubara seherê ber çimen}}
==== Notên bikaranînê ====
* {{mj|lêker}} [[ji reh kirin]]: ji koka wê / wî [[birîn]] yan [[piçandin]]
* {{mj|navdêr}} [[jirehkirin]]
* {{mj|rengdêr}} [[jirehkirî]]
==== Jê ====
{{kol3|ku
| bêreh
| bêrehî
| bêrehîtî
| bêrehtî
| bireh
| birehî
| birehîtî
| birehtî
| rehandin
| rehandî
| rehdar
| rehdarî
| rehdarîtî
| rehdartî
| rehder
| rehderî
| rehderîtî
| rehdertî
| rehdêr
| rehdêrî
| rehdêrîtî
| rehdêrtî
| rehik
| rehiyayî
| rehî
| rehîn
| rehîner
| rehk
| rewik
}}
==== Etîmolojî ====
Ji {{ji|ine-pro|ku|-}} {{recons|ine-pro|wréh₂ds}} (reh), [[hevreh]]a soranî {{g|ckb|ڕهگ|tr=reg}}, farisî {{g|fa|ریشه|tr=rîşe}}, yûnaniya kevn [[ῥίζα]] (rihîza), latînî [[radix]], fransî [[racine]], îngilîzî [[root]] û [[wort]], swêdî [[rot]] û [[ört]], albanî [[rrënjë]]. Ji heman rehî: [[rih]] / [[rî]], [[rêv]].
==== Bi zaravayên din ====
* {{Z|ckb}}: [[reg]], [[rêşe]]
* Feylî/Kelhurî: rîşe, reg
* Zazakî: kok, ristim, rîşe, reya
==== Werger ====
{{werger-ser}}
* {{Z|ace}}: {{W-|ace|ukheue}}
* {{Z|aa}}: {{W-|aa|rimid}}
* {{Z|af}}: {{W+|af|wortel}}
* {{Z|akl}}: {{W-|akl|gamot}}
* {{Z|sq}}: {{W+|sq|rrënjë|m}}
* {{Z|de}}: {{W+|de|Wurzel|m}}, {{W+|de|Wurzeln|p}}
* {{Z|alt}}: {{W-|alt|тамыр}}, {{W-|alt|јылтыс}}
* {{Z|an}}: {{W+|an|radiz}}
* {{Z|rup}}: {{W-|rup|arãdãtsinã|m}}, {{W-|rup|zãrãtsinã|m}}, {{W-|rup|rãdãtsinã|m}}
* {{Z|aer}}: {{W-|aer|artekerre}}
* {{Z|as}}: {{W-|as|শিয়া}}, {{W-|as|শিপা}}
* {{Z|bno}}: {{W-|bno|gamot}}
* {{Z|ast}}: {{W+|ast|raíz|m}}
* {{Z|az}}: {{W+|az|kök}}
* {{Z|xkl}}: {{W-|xkl|lakat}}
* {{Z|ban}}: {{W-|ban|akah}}
* {{Z|eu}}: {{W-|eu|sustrai}}, {{W-|eu|zuztar}}, {{W-|eu|erro}}
* {{Z|ba}}: {{W-|ba|тамыр}}
* {{Z|be}}: {{W+|be|ко́рань|n}}
* {{Z|bn}}: {{W+|bn|মূল}}
* Berberî:
*: {{Z|shi}}: {{W-|shi|azɣwr|n}}
* {{Z|bpz}}: {{W-|bpz|oka}}
* {{Z|bny}}: {{W-|bny|waka}}
* {{Z|bg}}: {{W+|bg|ко́рен|n}}
* {{Z|my}}: {{W+|my|အမြစ်}}
* {{Z|ccc}}: {{W-|ccc|ijtishi}}
* {{Z|cjm}}: {{W-|cjm|ꨀꨉꨩ|tr=agha'}}, {{W-|cjm|ꨉꨩ|tr=gha'}}, {{W-|cjm|ꨂꨉꨩ|tr=ưgha'}}
* {{Z|ce}}: {{W-|ce|орам}}
* {{Z|cs}}: {{W+|cs|kořen|n}}
* {{Z|chr}}: {{W-|chr|ᎤᎿᏍᏕᏜ}}
* {{Z|ny}}: {{W-|ny|muzu}}
* {{Z|zh}}:
*: {{Z|cmn}}: {{W+|cmn|根|tr=gēn}}
* {{Z|cho}}: {{W-|cho|akshish}}
* {{Z|dlm}}: {{W-|dlm|radaica|m}}
* {{Z|da}}: {{W+|da|rod|g}}
* {{Z|duu}}: {{W-|duu|vng'reu}}, {{W-|duu|shing'reu}}
* {{Z|ovd}}: {{W-|ovd|ruota|m}}
* {{Z|id}}: {{W+|id|akar}}
* {{Z|ar}}: {{W+|ar|جَذْر|n}}
*: {{Z|arz}}: {{W-|arz|جدر|n|tr=gedr}}
*: {{Z|apc}}: {{W-|apc|شرش|n|tr=šereš}}
*: {{Z|acm}}: {{W-|acm|عرگ|n|tr=ʕereg}}
*: {{Z|ary}}: {{W-|ary|جدر|n|tr=ždər}}
*: {{Z|ajp}}: {{W-|ajp|شرش|n|tr=šorš}}
* {{Z|hy}}: {{W+|hy|արմատ}}
* {{Z|eo}}: {{W+|eo|radiko}}
* {{Z|et}}: {{W+|et|juur}}
* {{Z|gez}}: {{W-|gez|ሥርው}}
* {{Z|evn}}: {{W-|evn|ңиңтэ}}
* {{Z|fa}}: {{W+|fa|ریشه|tr=riše}}
* {{Z|fo}}: {{W+|fo|rót|m}}
* {{Z|fi}}: {{W+|fi|juuri}}, {{W-|fi|puunjuuri}}
* {{Z|fr}}: {{W+|fr|racine|m}}
* {{Z|fur}}: {{W-|fur|lidrîs}}
* {{Z|fy}}: {{W+|fy|woartel}}
* {{Z|gd}}: {{W-|gd|freumh|n}}
* {{Z|gl}}: {{W+|gl|raíz|m}}
* {{Z|got}}: {{W-|got|𐍅𐌰𐌿𐍂𐍄𐍃|m}}
* {{Z|ka}}: {{W-|ka|ფესვი}}, {{W-|ka|ძირი}}
* {{Z|gn}}: {{W-|gn|[[tapo]]}}
* {{Z|ht}}: {{W-|ht|rasin}}
* {{Z|haw}}: {{W-|haw|aʻa}}
* {{Z|mba}}: {{W-|mba|gamot}}
* {{Z|hi}}: {{W+|hi|जड़}}
* {{Z|mww}}: {{W-|mww|cag}}
* {{Z|nl}}: {{W+|nl|wortel|n}}
* {{Z|he}}: {{W+|he|שורש|n|tr=shóresh}}
* {{Z|ang}}: {{W-|ang|wyrttruma|n}}
* {{Z|enm}}: {{W-|enm|rote}}, {{W-|enm|more}}
* {{Z|en}}: {{W+|en|root}}
* {{Z|izh}}: {{W-|izh|juuri}}
* {{Z|ill}}: {{W-|ill|waged}}
* {{Z|ga}}: {{W-|ga|fréamh|m}}
* {{Z|isd}}: {{W-|isd|xamut}}
* {{Z|it}}: {{W+|it|radice|m}}
* {{Z|ium}}: {{W-|ium|nzungh}}
* {{Z|is}}: {{W+|is|rót|m}}
* {{Z|ja}}: {{W+|ja|根|tr=ね, ne}}
* {{Z|jv}}: {{W-|jv|oyot}}
* {{Z|kl}}: {{W-|kl|sorlak}}
* {{Z|kzx}}: {{W-|kzx|waar}}
* {{Z|xbr}}: {{W-|xbr|amu}}
* {{Z|kmc}}: {{W-|kmc|sangp}}
* {{Z|kn}}: {{W+|kn|ಬೇರು}}
* {{Z|csb}}: {{W-|csb|kòrzéń}}
* {{Z|ca}}: {{W+|ca|arrel|m}}
* {{Z|qu}}: {{W+|qu|machu}}, {{W-|qu|saphi}}, {{W+|qu|sapi}}
* {{Z|ky}}: {{W+|ky|тамыр}}
* {{Z|kg}}: {{W-|kg|mwanzi}}
* {{Z|kij}}: {{W-|kij|uula}}
* {{Z|kpv}}: {{W-|kpv|вуж}}
* {{Z|ko}}: {{W+|ko|뿌리}}
* {{Z|lbe}}: {{W-|lbe|бакӏ}}, {{W-|lbe|бакӏру}}
* {{Z|ltg}}: {{W-|ltg|sakne|m}}, {{W-|ltg|saknis|m-p}}
* {{Z|la}}: {{W-|la|rādīx|m}}
* {{Z|lv}}: {{W+|lv|sakne|m}}, {{W-|lv|saknes|m-p}}
* {{Z|lo}}: {{W-|lo|ຮາກ}}
* {{Z|lez}}: {{W-|lez|пун}}
* {{Z|lij}}: {{W-|lij|radiccia|m}}, {{W-|lij|reixe|m}}
* {{Z|lt}}: {{W+|lt|šaknis}}
* {{Z|liv}}: {{W-|liv|jūŗ}}
* {{Z|lmo}}: {{W-|lmo|radis|m}}
* {{Z|khb}}: {{W-|khb|ᦣᦱᧅ}}
* {{Z|luy}}: {{W-|luy|kumuzizi}}
* {{Z|lb}}: {{W-|lb|Wuerzel|m}}
* {{Z|mdh}}: {{W-|mdh|dalig}}, {{W-|mdh|bekaw}}
* Malay:
*: {{Z|ms}}: {{W-|ms|اکر}}
*: Rûmî: {{W+|ms|akar}}
* {{Z|mk}}: {{W-|mk|корен|n}}
* {{Z|ml}}: {{W+|ml|വേര്}}
* {{Z|mt}}: {{W-|mt|għerq|n}}
* {{Z|mnc}}: {{W-|mnc|ᡩᠠ}}
* {{Z|mns-nor}}: {{W-|mns-nor|та̄р}}
* {{Z|mi}}: {{W-|mi|aka}}, {{W-|mi|akaaka}}
* {{Z|mrw}}: {{W-|mrw|bekaw}}
* Marî:
*: {{Z|mhr}}: {{W-|mhr|вож}}
* {{Z|hu}}: {{W+|hu|gyökér}}
* {{Z|mel}}: {{W-|mel|akah}}
* {{Z|egy}}: {{W-egy|wꜣb|h=wA-A-b-Hn|n}}
* {{Z|min}}: {{W-|min|ure'}}
* {{Z|mn}}: {{W+|mn|үндэс}}
* {{Z|mnw}}: {{W-|mnw|ရိုဟ်}}
* {{Z|nci}}: {{W-|nci|nelhuatl}}
* {{Z|nah}}: {{W-|nah|nelhuatl}}
* {{Z|gld}}: {{W-|gld|дачан}}
* {{Z|nap}}: {{W-|nap|ràdeca|m}}
* {{Z|nv}}: {{W-|nv|akétłʼóól}}
* {{Z|nds}}: {{W-|nds|Wortel|m}}
* {{Z|ne}}: {{W+|ne|जरा}}
* {{Z|nia}}: {{W-|nia|wa'a}}
* {{Z|nrf}}: {{W-|nrf|raichinne}}, {{W-|nrf|réchinne}}
* {{Z|no}}:
*: {{Z|nb}}: {{W+|nb|rot|n|m}}
*: {{Z|nn}}: {{W+|nn|rot|m}}
* {{Z|oj}}: {{W-|oj|ojiibik}}
* {{Z|ryu}}: {{W-|ryu|根|tr=にー, nī}}
* {{Z|oc}}: {{W+|oc|raiç|m}}, {{W+|oc|rasic|m}}
* {{Z|or}}: {{W-|or|ଜଡି}}
* {{Z|om}}: {{W-|om|hidda}}, {{W-|om|hundee}}
* {{Z|ug}}: {{W-|ug|يىلتىز}}
* {{Z|uz}}: {{W+|uz|ildiz}}
* {{Z|pac}}: {{W-|pac|reaih}}, {{W-|pac|riêih}}
* {{Z|ple}}: {{W-|ple|waka}}
* {{Z|pap}}: {{W-|pap|rais}}
* {{Z|ps}}: {{W+|ps|جذر|n|tr=ǰazr}}, {{W+|ps|جرړه|m|tr=ǰárṛa}}
* {{Z|pms}}: {{W-|pms|rèis|m}}, {{W-|pms|radis|m}}
* {{Z|ppl}}: {{W-|ppl|nelwat}}
* {{Z|pl}}: {{W+|pl|korzeń|n}}
* {{Z|pt}}: {{W+|pt|raiz|m}}
* {{Z|kk}}: {{W-|kk|тамыр}}, {{W-|kk|түбір}}
* {{Z|rap}}: {{W-|rap|aka}}
* {{Z|rhg}}: {{W-|rhg|cém}}
* {{Z|rgn}}: {{W-|rgn|radìșa|m}}, {{W-|rgn|ràdga|m}}
* {{Z|rm}}: {{W-|rm|ragisch|m}}, {{W-|rm|risch|m}}, {{W-|rm|rieisch|m}}
* {{Z|ro}}: {{W+|ro|rădăcină|m}}
* {{Z|ru}}: {{W+|ru|ко́рень|n}}, {{W+|ru|ко́рни|n-p}}, {{W+|ru|коре́нья|p}}
* {{Z|ksw}}: {{W-|ksw|အဂံၢ်}}
* {{Z|skb}}: {{W-|skb|ร̄าก}}
* {{Z|se}}: {{W-|se|ruohtas}}
* {{Z|sc}}: {{W-|sc|radichina|m}}, {{W-|sc|arraighina}}, {{W-|sc|raichina}}
* {{Z|sas}}: {{W-|sas|akah}}
* {{Z|ceb}}: {{W-|ceb|gamot}}
* {{Z|scn}}: {{W+|scn|ràdica|m}}, {{W+|scn|ràdiga|m}}, {{W+|scn|ràrica|m}}
* {{Z|sh}}:
*: Kirîlî: {{W-|sh|ко̏ре̄н|n}}, {{W-|sh|ко̏рије̄н|n}}
*: Latînî: {{W+|sh|kȍrēn|n}}, {{W+|sh|kȍrijēn|n}}
* {{Z|cu}}:
*: Kirîlî: {{W-|cu|корєнь|n}}
* {{Z|sk}}: {{W-|sk|koreň|n}}
* {{Z|sl}}: {{W+|sl|korenina|m}}
* {{Z|so}}: {{W+|so|xiddid}}
* Sorbî:
*: {{Z|dsb}}: {{W-|dsb|kórjeń|n}}
*: {{Z|hsb}}: {{W-|hsb|korjeń|n}}
* {{Z|es}}: {{W+|es|raíz|m}}
* {{Z|sw}}: {{W+|sw|mzizi}}
* {{Z|sv}}: {{W+|sv|rot|g}}
* {{Z|shn}}: {{W-|shn|ႁၢၵ်ႈ}}
* {{Z|tg}}: {{W+|tg|реша}}
* {{Z|mvv}}: {{W-|mvv|bakat}}
* {{Z|tl}}: {{W-|tl|urat}}, {{W+|tl|ugat}}
* {{Z|ty}}: {{W-|ty|aʻa}}
* {{Z|ta}}: {{W+|ta|வேர்}}
* {{Z|rif}}: {{W-|rif|aẓwar|n}}
* {{Z|tsg}}: {{W-|tsg|gamut}}
* {{Z|nod}}: {{W-|nod|ᩁᩣ᩠ᨠ}}
* {{Z|th}}: {{W+|th|ราก}}
* {{Z|te}}: {{W+|te|వేరు}}
* {{Z|tft}}: {{W-|tft|utu}}
* {{Z|tt}}: {{W+|tt|тамыр}}
* {{Z|tet}}: {{W-|tet|abut}}
* {{Z|tr}}: {{W+|tr|kök}}
* {{Z|tk}}: {{W-|tk|kök}}
* {{Z|bo}}: {{W-|bo|རྩ་བ}}
* {{Z|tkl}}: {{W-|tkl|aka}}
* {{Z|to}}: {{W-|to|aka}}
* {{Z|txb}}: {{W-|txb|witsako}}
* {{Z|udi}}: {{W-|udi|тум}}
* {{Z|udm}}: {{W-|udm|выжы}}
* {{Z|uga}}: {{W-|uga|𐎌𐎗𐎌}}
* {{Z|ur}}: {{W-|ur|جڑ|tr=jaṛ}}
* {{Z|uk}}: {{W+|uk|ко́рінь|n}}, {{W-|uk|корі́ння|nt}}
* {{Z|vec}}: {{W+|vec|raixa|m}}, {{W-|vec|rais}}
* {{Z|vi}}: {{W+|vi|rễ}}
* {{Z|vo}}: {{W+|vo|vul}}
* {{Z|wa}}: {{W+|wa|raecene|m}}
* {{Z|cy}}: {{W+|cy|gwraidd|n}}
* {{Z|km}}: {{W+|km|ឫស|tr=rɨh}}
* {{Z|yai}}: {{W-|yai|риша}}
* {{Z|yka}}: {{W-|yka|gamut}}
* {{Z|sah}}: {{W-|sah|силис}}
* {{Z|jmd}}: {{W-|jmd|wakar}}
* {{Z|yi}}: {{W-|yi|וואָרצל|n}}
* {{Z|ii}}: {{W-|ii|ꐴ}}
* {{Z|grk-mar}}: {{W-|grk-mar|ри́за|m}}
* {{Z|el}}: {{W+|el|ρίζα|m}}
*: Kevn: {{W-|grc|ῥίζα|m}}
* {{Z|zea}}: {{W-|zea|wortel|n}}
* {{Z|za}}: {{W-|za|rag}}
* {{Z|zu}}: {{W-|zu|impande|c9|c10}}
* {{Z|khi-kun}}: {{W-|khi-kun|daŋ}}
* {{Z|nmn}}: {{W-|nmn|ǃkʻqái}}
{{werger-bin}}
:{{werger çavkanî|en|root|beş=Ev qismê Wergerê|oldid=75944632}}
=== Navdêr 2 ===
[[Wêne:Vein art rotating.gif|thumb|Reh]]
{{navdêr|ku|z=n}}
# [[reh]]ên [[xwîn]]ê, [[pişk]]ên [[dirêj]] yên [[leş]]î yên ku [[xwîn]] tê re [[meşîn|dimeşe]].
#* {{jêder-pirtûk|ku|sal=2004|jêgirtin=Lenfên hêla zik madeyên weki rûn û protein, yên ku paşi xwarinê ji rûvî digêhêjîn nav '''reh'''ê lenf, dibin ber bi jor ti di sîng da diherikînin hindûrê şîn'''reh'''ê xwînê.|nivîskar=[[w:Huseyin Bektaş|Huseyin Bektaş]]|sernav={{w|Anatomiya Bedena Mirovan}}|weşanxane=Weşanên Deng}}
==== Tewandin ====
{{ku-tewîn-nav/nû|mê}}
==== Werger ====
{{werger-ser}}
* {{Z|de}}: {{W+|de|Ader}}
* {{Z|en}}: {{W+|en|vein}}
* {{Z|tr}}: {{W+|tr|damar}}
{{werger-bin}}
4aulxqm7p2itit95irapwsfbxbgpgh1
haf
0
40822
6342599
6307920
2026-08-25T12:54:30Z
Wikihez
7344
/* Çavkanî */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342599
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|z=m}}
# cihê ku dîmen, [[kes]], lê baş tê dîtin, [[hêsî]], bilindcî ''Derketibû 'haf'a gund û li gund temaşe dikir.''
#* {{bênimûne|ku}}
# [[hizûr]], [[pêşî]], [[bal]] ''Roja heşirmîzanê, dema ku însan derdikeve hafa Xwedê, ji hemû kiryarên xwe yên pîs, şerm dike.''
#* {{bênimûne|ku}}
==== Ji wêjeyê ====
'''Ji wêjeya nivîskî'''
:Beîvan kulîlk vekir da dîlber were 'haf'ê
:Di bin per û baskên xwe dil bigihîne tewafê
:(''Ji helbesta Rojen Barnas; Beîvno'')
'''Ji wêjeya devkî'''
:''Seyranê, îro min li hafa [[Elajgir]]ê temaşe kir...''
:''Dengbêj Keremê Kor - Seyrana Mele Mûsa''<ref>https://www.youtube.com/watch?v=Yw2HgwnF7Ec Dengbêj Keremê Kor - Seyrana Mele Mûsa</ref>
==== Tewandin ====
{{ku-tewîn-nav/nû|mê}}
==== Etîmolojî ====
{{bêetîmolojî|ku}}
==== Werger ====
{{werger-ser}}
* {{Z|de}}: {{W|de|Dach|n}}
* {{Z|tr}}: {{W+|tr|huzur}}, {{W+|tr|karşı}}, {{W+|tr|yukarı}}, {{W+|tr|kat}}, {{W+|tr|nezd}}
{{werger-bin}}
== {{ziman|non}} ==
=== Navdêr ===
{{navdêr|non|z=nt}}
# {{f|non|erdnîgarî}} {{g|ku|derya}}, {{g|ku|behr}}, {{g|ku|dengiz}}
#* {{bênimûne|non}}
=== Çavkanî ===
{{rûpela wergerê|non|derya}}
== {{ziman|is}} ==
=== Navdêr ===
{{navdêr|is|z=nt}}
# {{f|is|erdnîgarî}} {{g|ku|derya}}, {{g|ku|behr}}, {{g|ku|dengiz}}
#* {{bênimûne|is}}
=== Çavkanî ===
{{rûpela wergerê|is|derya}}
3rvbrdz5az6xrws24rtsprt9mn0nip5
6342601
6342599
2026-08-25T12:58:48Z
Wikihez
7344
[[Bikarhêner:Wikihez/templateScript2.js|TS]]: sererastkirin
6342601
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|z=m}}
# cihê ku dîmen, [[kes]], lê baş tê dîtin, [[hêsî]], bilindcî
#: {{nimûne|ku|Derketibû '''hafa''' gund û li gund temaşe dikir.}}
#* {{jêder-vîdeo|jêgirtin=Seyranê, îro min li '''hafa''' [[Elajgir]]ê temaşe kir...|hunermend=Dengbêj Keremê Kor|sernav=Seyrana Mele Mûsa|url=https://www.youtube.com/watch?v=Yw2HgwnF7Ec|platform=w:YouTube}}
# [[hizûr]], [[pêşî]], [[bal]]
#: {{nimûne|ku|Roja heşirmîzanê, dema ku însan derdikeve hafa Xwedê, ji hemû kiryarên xwe yên pîs, şerm dike.}}
#* {{jêder|ku|jêgirtin=Beîvan kulîlk vekir da dîlber were '''hafê'''<br>Di bin per û baskên xwe dil bigihîne tewafê|Ji helbesta Rojen Barnas; Beîvno}}
==== Tewandin ====
{{ku-tewîn-nav/nû|mê}}
==== Etîmolojî ====
{{bêetîmolojî|ku}}
==== Werger ====
{{werger-ser}}
* {{Z|de}}: {{W|de|Dach|n}}
* {{Z|tr}}: {{W+|tr|huzur}}, {{W+|tr|karşı}}, {{W+|tr|yukarı}}, {{W+|tr|kat}}, {{W+|tr|nezd}}
{{werger-bin}}
== {{ziman|non}} ==
=== Navdêr ===
{{navdêr|non|z=nt}}
# {{f|non|erdnîgarî}} {{g|ku|derya}}, {{g|ku|behr}}, {{g|ku|dengiz}}
#* {{bênimûne|non}}
=== Çavkanî ===
{{rûpela wergerê|non|derya}}
== {{ziman|is}} ==
=== Navdêr ===
{{navdêr|is|z=nt}}
# {{f|is|erdnîgarî}} {{g|ku|derya}}, {{g|ku|behr}}, {{g|ku|dengiz}}
#* {{bênimûne|is}}
=== Çavkanî ===
{{rûpela wergerê|is|derya}}
pgfdpxzwtsy6gcjizs9x6b0fhzh8ei0
6342602
6342601
2026-08-25T12:58:58Z
Wikihez
7344
/* Navdêr */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342602
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|z=m}}
# cihê ku dîmen, [[kes]], lê baş tê dîtin, [[hêsî]], bilindcî
#: {{nimûne|ku|Derketibû '''hafa''' gund û li gund temaşe dikir.}}
#* {{jêder-vîdeo|ku|jêgirtin=Seyranê, îro min li '''hafa''' [[Elajgir]]ê temaşe kir...|hunermend=Dengbêj Keremê Kor|sernav=Seyrana Mele Mûsa|url=https://www.youtube.com/watch?v=Yw2HgwnF7Ec|platform=w:YouTube}}
# [[hizûr]], [[pêşî]], [[bal]]
#: {{nimûne|ku|Roja heşirmîzanê, dema ku însan derdikeve hafa Xwedê, ji hemû kiryarên xwe yên pîs, şerm dike.}}
#* {{jêder|ku|jêgirtin=Beîvan kulîlk vekir da dîlber were '''hafê'''<br>Di bin per û baskên xwe dil bigihîne tewafê|Ji helbesta Rojen Barnas; Beîvno}}
==== Tewandin ====
{{ku-tewîn-nav/nû|mê}}
==== Etîmolojî ====
{{bêetîmolojî|ku}}
==== Werger ====
{{werger-ser}}
* {{Z|de}}: {{W|de|Dach|n}}
* {{Z|tr}}: {{W+|tr|huzur}}, {{W+|tr|karşı}}, {{W+|tr|yukarı}}, {{W+|tr|kat}}, {{W+|tr|nezd}}
{{werger-bin}}
== {{ziman|non}} ==
=== Navdêr ===
{{navdêr|non|z=nt}}
# {{f|non|erdnîgarî}} {{g|ku|derya}}, {{g|ku|behr}}, {{g|ku|dengiz}}
#* {{bênimûne|non}}
=== Çavkanî ===
{{rûpela wergerê|non|derya}}
== {{ziman|is}} ==
=== Navdêr ===
{{navdêr|is|z=nt}}
# {{f|is|erdnîgarî}} {{g|ku|derya}}, {{g|ku|behr}}, {{g|ku|dengiz}}
#* {{bênimûne|is}}
=== Çavkanî ===
{{rûpela wergerê|is|derya}}
pt4e6vzty74glffofwgp8r0933xryk4
waştene
0
47296
6342620
6289077
2026-08-25T13:22:22Z
Wikihez
7344
/* Lêker */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342620
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Lêker ===
{{zza-tewîn-reh|form=gh|niha=waz'''en'''-|borî=waşt-|bilanî=-waz-}}
{{lêker|zza|c=x-gh}}
# [[xwestin]], [[viyan]], [[daxwaz kirin]]
#* {{jêder|zza|jêgirtin=Ap Hes, Xal Hus, Dat Mih meremêne! Ez destê xo nêkena şima ra. Willey ez vengê xo şima ra nêkena. Ez '''wazena''' biba dewijê şima. Ez wazena biba cîranê şima. Ez zî sey însanan bicuya...|Roşan Lezgîn: ''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
==== Têkildar ====
{{kol3|zza
|waştiş
|waştox
}}
==== Etîmolojî ====
{{bêetîmolojî|zza}}
tgoy71uz8x64x3p4r6px4bgvn2hldas
mendê
0
51825
6342615
6137092
2026-08-25T13:18:33Z
Wikihez
7344
6342615
wikitext
text/x-wiki
{{h-bnr|Mendê}}
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|z=m}}
# {{f|ku|riwek}} [[nebat|Nebat]]ek e.
#* {{jêder|ku|jêgirtin=Tika û ricayek jibo hemû Kurdên ku bi gîya û pincaran re eleqeder dibin û beşê xebata wan e, bila ji kerema xwe li kelepora bav û bapîrên xwe xwedî derkevin. Li ser pincarên wek Sîyabo, '''Mendê''', [[alo|Alo]], [[birîndar|Brîndar]], [[sping|Spingê]], [[guhbizing|Guhbizingê]], [[kereng|Kerengê]] û hwd lêkolînan li ser bikin. Kî dizane belkû ev [[pincar]] bibin dermanên çareserkirina nexweşiyên wek Adis, penceşêr, şekir, tansiyon û nexweşiyên dil û hw.|Bavê Jîndar, Lotikxane.com, 4/2009}}
==== Etîmolojî ====
{{bêetîmolojî}}
==== Werger ====
{{werger-ser}}
{{werger-bin}}
== {{ziman|zza}} ==
=== Formeke lêkerê ===
{{lêker|zza|form=erê}}
# [[mane]]
#* {{jêder|zza|jêgirtin=Hulya Yetîşen: Kurdî demêko derg binê hegemonyaya dewletanê cîya-cîyayan de '''mendê'''.
|werger=Kurd demekî dirêj di bin [[hegemonî|hegemoniya]] dewletên cuda-cuda de mane.|Di hevpeyivînekê de li gel ''Gilberte Favre Zaza'', wergerandina li zazakî: Roşan Lezgîn bo Zazaki.net, wergerandina li kurmancî bo Wîkîferhengê: Husein Muhammed}}
fvfiplmeuctt2nex6y9tqzj6skzjsq1
6342642
6342615
2026-08-25T14:46:07Z
Balyozbot
7867
Bot: Sererastkirina şablonan û koda zimên
6342642
wikitext
text/x-wiki
{{h-bnr|Mendê}}
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|z=m}}
# {{f|ku|riwek}} [[nebat|Nebat]]ek e.
#* {{jêder|ku|jêgirtin=Tika û ricayek jibo hemû Kurdên ku bi gîya û pincaran re eleqeder dibin û beşê xebata wan e, bila ji kerema xwe li kelepora bav û bapîrên xwe xwedî derkevin. Li ser pincarên wek Sîyabo, '''Mendê''', [[alo|Alo]], [[birîndar|Brîndar]], [[sping|Spingê]], [[guhbizing|Guhbizingê]], [[kereng|Kerengê]] û hwd lêkolînan li ser bikin. Kî dizane belkû ev [[pincar]] bibin dermanên çareserkirina nexweşiyên wek Adis, penceşêr, şekir, tansiyon û nexweşiyên dil û hw.|Bavê Jîndar, Lotikxane.com, 4/2009}}
==== Etîmolojî ====
{{bêetîmolojî|ku}}
==== Werger ====
{{werger-ser}}
{{werger-bin}}
== {{ziman|zza}} ==
=== Formeke lêkerê ===
{{lêker|zza|form=erê}}
# [[mane]]
#* {{jêder|zza|jêgirtin=Hulya Yetîşen: Kurdî demêko derg binê hegemonyaya dewletanê cîya-cîyayan de '''mendê'''.
|werger=Kurd demekî dirêj di bin [[hegemonî|hegemoniya]] dewletên cuda-cuda de mane.|Di hevpeyivînekê de li gel ''Gilberte Favre Zaza'', wergerandina li zazakî: Roşan Lezgîn bo Zazaki.net, wergerandina li kurmancî bo Wîkîferhengê: Husein Muhammed}}
3exp7ccsngwg4ehb32cbzlzqmre1ach
6342646
6342642
2026-08-25T15:12:16Z
Balyozbot
7867
Bot: Paqijiyên kozmetîk (Lînk paqij kir.)
6342646
wikitext
text/x-wiki
{{h-bnr|Mendê}}
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|z=m}}
# {{f|ku|riwek}} [[nebat|Nebatek]] e.
#* {{jêder|ku|jêgirtin=Tika û ricayek jibo hemû Kurdên ku bi gîya û pincaran re eleqeder dibin û beşê xebata wan e, bila ji kerema xwe li kelepora bav û bapîrên xwe xwedî derkevin. Li ser pincarên wek Sîyabo, '''Mendê''', [[alo|Alo]], [[birîndar|Brîndar]], [[sping|Spingê]], [[guhbizing|Guhbizingê]], [[kereng|Kerengê]] û hwd lêkolînan li ser bikin. Kî dizane belkû ev [[pincar]] bibin dermanên çareserkirina nexweşiyên wek Adis, penceşêr, şekir, tansiyon û nexweşiyên dil û hw.|Bavê Jîndar, Lotikxane.com, 4/2009}}
==== Etîmolojî ====
{{bêetîmolojî|ku}}
==== Werger ====
{{werger-ser}}
{{werger-bin}}
== {{ziman|zza}} ==
=== Formeke lêkerê ===
{{lêker|zza|form=erê}}
# [[mane]]
#* {{jêder|zza|jêgirtin=Hulya Yetîşen: Kurdî demêko derg binê hegemonyaya dewletanê cîya-cîyayan de '''mendê'''.
|werger=Kurd demekî dirêj di bin [[hegemonî|hegemoniya]] dewletên cuda-cuda de mane.|Di hevpeyivînekê de li gel ''Gilberte Favre Zaza'', wergerandina li zazakî: Roşan Lezgîn bo Zazaki.net, wergerandina li kurmancî bo Wîkîferhengê: Husein Muhammed}}
ge7izxfb6a4wkl8t8jxtvzfzlmhmyxg
vêşêr
0
53524
6342622
6010676
2026-08-25T13:22:45Z
Wikihez
7344
/* Rengdêr */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342622
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Rengdêr ===
{{rengdêr|zza}}
# [[bêhtir]], [[pirtir]], [[zêdetir]]
#* {{jêder|zza|jêgirtin=Heş beno aşiqê însanan. Êdî her roje yeno corê dewe de peyê yew zinarî de xo nimneno û temaşe keno ke hela însanî se kenê, senî qisey kenê. Roje bi roje hîna vêşêr însanan şinasneno.|Roşan Lezgîn: ''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
knoj66sr2mau8uxtjuyp069z05dde3b
musayene
0
53525
6342604
5846564
2026-08-25T13:05:59Z
Wikihez
7344
/* Lêker */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342604
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Lêker ===
{{lêker|zza}}
# [[evisîn]], [[belidîn]], [[serwextbûn]], [[hûbûn]], [[hîn]] bûn, [[fêr]] bûn, [[elimîn]]
#* {{jêder|zza|jêgirtin=Heş beno aşiqê însanan. Êdî her roje yeno corê dewe de peyê yew zinarî de xo nimneno û temaşe keno ke hela însanî se kenê, senî qisey kenê. Roje bi roje hîna vêşêr însanan şinasneno. Her roje yew di çekuyan fekê însanan ra '''museno'''. Êdî nameyê heme dewijan museno.|[[w:Roşan Lezgîn|Roşan Lezgîn]]: ''''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
==== Tewandin ====
* Dema niha: mus'''en'''-
taixumun8lkchi36j8ot4astght2br0
6342605
6342604
2026-08-25T13:06:20Z
Wikihez
7344
6342605
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Lêker ===
{{lêker|zza}}
# [[evisîn]], [[belidîn]], [[serwextbûn]], [[hûbûn]], [[hîn]] bûn, [[fêr]] bûn, [[elimîn]]
#* {{jêder|zza|jêgirtin=Heş beno aşiqê însanan. Êdî her roje yeno corê dewe de peyê yew zinarî de xo nimneno û temaşe keno ke hela însanî se kenê, senî qisey kenê. Roje bi roje hîna vêşêr însanan şinasneno. Her roje yew di çekuyan fekê însanan ra '''museno'''. Êdî nameyê heme dewijan museno.|[[w:Roşan Lezgîn|Roşan Lezgîn]]: ''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
==== Tewandin ====
* Dema niha: mus'''en'''-
fi94znr9r55tkjcadtl5yxnas9gl6i3
vano
0
53526
6342624
5021934
2026-08-25T13:23:21Z
Wikihez
7344
/* Formeke lêkerê */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342624
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Formeke lêkerê ===
{{lêker|zza|form=erê}}
# [[gotin|dibêje]]
#* {{jêder|zza|jêgirtin=Rojêk qerarê xo [[dano]], xo [[rê]] [[vano]], ez zî [[ha]] [[eynî]] [[sey]] însanan [[qisey]] [[kena]], ez êdî hemeyê [[dewij]]an şinasnena, ez nameyê hemîne [[zana]], [[willey]] ez [[şina]] xo [[rê]] [[bena]] [[dewij]]. Û dano piro [[şino]] [[miyan]]ê [[dewe]].|Roşan Lezgîn: ''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
3b8dwa55nj6hpzj4880adrzakoir18t
dano
0
53527
6342609
5607018
2026-08-25T13:09:27Z
Wikihez
7344
/* Formeke lêkerê */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342609
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Formeke lêkerê ===
{{lêker|zza|form=erê}}
# [[dan|dide]]
#* {{jêder|zza|jêgirtin=Rojêk qerarê xo [[dano]], xo [[rê]] [[vano]], ez zî [[ha]] [[eynî]] [[sey]] însanan [[qisey]] [[kena]], ez êdî hemeyê [[dewij]]an şinasnena, ez nameyê hemîne [[zana]], [[willey]] ez [[şina]] xo [[rê]] [[bena]] [[dewij]]. Û dano piro [[şino]] [[miyan]]ê [[dewe]].|Roşan Lezgîn: ''''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
== {{ziman|gl}} ==
=== Navdêr ===
{{navdêr|gl|z=n}}
# {{g|ku|ziyan}}, {{g|ku|ziyan}}
=== Çavkanî ===
{{rûpela wergerê|gl|ziyan}}
== {{ziman|pt}} ==
=== Bilêvkirin ===
* {{deng|pt|LL-Q5146 (por)-MedK1-dano.wav|Deng|dever=}}
=== Navdêr ===
{{navdêr|pt|z=n}}
# {{g|ku|ziyan}}, {{g|ku|ziyan}}
=== Çavkanî ===
{{rûpela wergerê|pt|ziyan}}
43pi8vxwye3hbmf1wfvx7c2lrcjh68k
6342610
6342609
2026-08-25T13:09:33Z
Wikihez
7344
/* Formeke lêkerê */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342610
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Formeke lêkerê ===
{{lêker|zza|form=erê}}
# [[dan|dide]]
#* {{jêder|zza|jêgirtin=Rojêk qerarê xo [[dano]], xo [[rê]] [[vano]], ez zî [[ha]] [[eynî]] [[sey]] însanan [[qisey]] [[kena]], ez êdî hemeyê [[dewij]]an şinasnena, ez nameyê hemîne [[zana]], [[willey]] ez [[şina]] xo [[rê]] [[bena]] [[dewij]]. Û dano piro [[şino]] [[miyan]]ê [[dewe]].|Roşan Lezgîn: ''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
== {{ziman|gl}} ==
=== Navdêr ===
{{navdêr|gl|z=n}}
# {{g|ku|ziyan}}, {{g|ku|ziyan}}
=== Çavkanî ===
{{rûpela wergerê|gl|ziyan}}
== {{ziman|pt}} ==
=== Bilêvkirin ===
* {{deng|pt|LL-Q5146 (por)-MedK1-dano.wav|Deng|dever=}}
=== Navdêr ===
{{navdêr|pt|z=n}}
# {{g|ku|ziyan}}, {{g|ku|ziyan}}
=== Çavkanî ===
{{rûpela wergerê|pt|ziyan}}
i2i19y1qeamdzmuj12i3q3r5socdssq
qisey
0
53528
6342629
5021920
2026-08-25T13:26:34Z
Wikihez
7344
/* Navdêr */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342629
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Navdêr ===
{{navdêr|zza}}
# [[qise]], [[gotin]], [[suhbet]], [[axivîn]], [[peyivîn]]
#* {{jêder|zza|jêgirtin=Rojêk qerarê xo [[dano]], xo [[rê]] [[vano]], ez zî [[ha]] [[eynî]] [[sey]] însanan [[qisey]] [[kena]], ez êdî hemeyê [[dewij]]an şinasnena, ez nameyê hemîne [[zana]], [[willey]] ez [[şina]] xo [[rê]] [[bena]] [[dewij]]. Û dano piro [[şino]] [[miyan]]ê [[dewe]].|Roşan Lezgîn: ''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
0nzx0ic86pdn3v7i9d709hu4n0gpq6a
willey
0
53529
6342618
5021955
2026-08-25T13:21:33Z
Wikihez
7344
/* Hoker */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342618
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Hoker ===
{{hoker|zza}}
# [[bi Xwedê]], [[welle]], [[wellehî]]
#* {{jêder|zza|jêgirtin=Rojêk qerarê xo [[dano]], xo [[rê]] [[vano]], ez zî [[ha]] [[eynî]] [[sey]] însanan [[qisey]] [[kena]], ez êdî hemeyê [[dewij]]an şinasnena, ez nameyê hemîne [[zana]], [[willey]] ez [[şina]] xo [[rê]] [[bena]] [[dewij]]. Û dano piro [[şino]] [[miyan]]ê [[dewe]].|Roşan Lezgîn: ''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
mm1v9ryxfr3i3kzkjb92y8ay9nf16iu
bena
0
53530
6342607
5919893
2026-08-25T13:08:04Z
Wikihez
7344
/* Lêker */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342607
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Lêker ===
{{lêker|zza}}
# [[bûn|dibim]]
#* {{bêmînak|zza}}
# [[bûn|bim]], [[bûn|bibim]]
#* {{jêder|zza|jêgirtin=Rojêk qerarê xo [[dano]], xo [[rê]] [[vano]], ez zî [[ha]] [[eynî]] [[sey]] însanan [[qisey]] [[kena]], ez êdî hemeyê [[dewij]]an şinasnena, ez nameyê hemîne [[zana]], [[willey]] ez [[şina]] xo [[rê]] [[bena]] [[dewij]]. Û dano piro [[şino]] [[miyan]]ê [[dewe]].|[[w:Roşan Lezgîn|Roşan Lezgîn]]: ''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
== {{ziman|et}} ==
=== Navdêr ===
{{navdêr|et}}
# {{g|ku|benzîn}}
#* {{bêmînak|et}}
=== Çavkanî ===
{{rûpela wergerê|et|benzîn}}
== {{ziman|ms}} ==
=== Navdêr ===
{{navdêr|ms}}
# {{g|ku|pêl}}
#* {{bêmînak|ms}}
=== Çavkanî ===
{{rûpela wergerê|ms|pêl}}
== {{ziman|mt}} ==
=== Lêker ===
{{lêker|mt}}
# {{g|ku|ava kirin}}
#* {{bêmînak|mt}}
=== Çavkanî ===
{{rûpela wergerê|mt|ava kirin}}
== {{ziman|sc}} ==
=== Navdêr ===
{{navdêr|sc|z=m}}
# {{mijar|sc|anatomî}} {{g|ku|demar}}
#* {{bêmînak|sc}}
=== Çavkanî ===
{{rûpela wergerê|sc|demar}}
== {{ziman|tl}} ==
=== Navdêr ===
{{navdêr|tl}}
# {{mijar|tl|anatomî}} {{g|ku|demar}}
#* {{bêmînak|tl}}
=== Çavkanî ===
{{rûpela wergerê|tl|demar}}
r61z2lncze8u78wz89ftmgz4oj1p0tk
şino
0
53531
6342625
5021965
2026-08-25T13:23:31Z
Wikihez
7344
/* Formeke lêkerê */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342625
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Formeke lêkerê ===
{{lêker|zza|form=erê}}
# [[çûn|diçe]]
#* {{jêder|zza|jêgirtin=Rojêk qerarê xo [[dano]], xo [[rê]] [[vano]], ez zî [[ha]] [[eynî]] [[sey]] însanan [[qisey]] [[kena]], ez êdî hemeyê [[dewij]]an şinasnena, ez nameyê hemîne [[zana]], [[willey]] ez [[şina]] xo [[rê]] [[bena]] [[dewij]]. Û dano piro [[şino]] [[miyan]]ê [[dewe]].|Roşan Lezgîn: ''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
naop57mpa0xchvx8aqclpknz109rakt
hênî
0
53534
6342613
6308958
2026-08-25T13:15:09Z
Wikihez
7344
/* Navdêr */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342613
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{IPA|ku|/heːˈniː/}}
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|z=m}}
# [[fênik]], [[hênikî]], [[hînî]], [[hênbûn]], [[hênikbûn]], [[fênikbûn]]
#* {{bênimûne|ku}}
==== Tewandin ====
{{ku-tewîn-nav/nû|mê}}
==== Formên alternatîv ====
* [[hênikî]]
* [[hênikîtî]]
* [[hêniktî]]
* [[hênîtî]]
* [[hêntî]]
==== Etîmolojî ====
{{bêetîmolojî|ku}}
==== Werger ====
{{werger-ser}}
* {{Z|en}}:{{W|en|freshness|guman=erê}}
{{werger-bin}}
== {{ziman|zza}} ==
=== Navdêr ===
{{navdêr|zza}}
# [[kanî]], [[kehnî]]
#* {{jêder|zza|jêgirtin=Heş şino serê hênî. Cinîyê ke serê hênî de kincan şuwenê, ê ke şîyê xo rê awe biyarê keye, senî ke çim ginenê ra heşî, her yewe hetêk ser remena.|Roşan Lezgîn: ''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
dsuna79y8rfi8jmk8qq6q6ju29n4oq1
geyreno
0
53555
6342612
6339519
2026-08-25T13:14:46Z
Wikihez
7344
/* Lêker */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342612
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Lêker ===
{{lêker|zza}}
# [[gerîn|digere]]
#* {{jêder|zza|jêgirtin=[[ap|Ap]] [[heş|Heş]], çend rojî [[miyan|mîyanê]] [[dewe]] de xo [[rê]] [[geyreno]]. [[dewij|Dewijan]] [[reyde]] suhbet [[keno]]. Keyfê [[hemî]]ne bi Ap Heşî [[yeno]]. Keyfê [[ey]] zî zaf bi hemeyê dewijan yeno.|Roşan Lezgîn: ''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
3ahisgils9g4rsg81x2zoihlnb68oqe
remeno
0
53556
6342628
5021923
2026-08-25T13:26:13Z
Wikihez
7344
/* Formeke lêkerê */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342628
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Formeke lêkerê ===
{{lêker|zza|form=erê}}
# [[revîn|direve]]
#* {{jêder|zza|jêgirtin=[[dewij|Dewijî]] [[senî]] [[vînenî]] ke Ap Heş ha goştê bizanê înan [[weno]], hema her [[yew]] cayê xo ra [[kenê]] qîrî û hawar; o ke kerra erzeno ey, o ke dar gêno [[şino]] ser de, o ke pê çu dano piro. Û Ap Heş [[çirp]] û [[remeno]].|Roşan Lezgîn: ''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
mzhn2kon6fqpjknid0rx5ubpta00a1e
weno
0
53557
6342619
5021951
2026-08-25T13:22:01Z
Wikihez
7344
/* Formeke lêkerê */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342619
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Formeke lêkerê ===
{{lêker|zza|form=erê}}
# [[xwarin|dixwe]]
#* {{jêder|zza|jêgirtin=[[dewij|Dewijî]] [[senî]] [[vînenî]] ke Ap Heş ha goştê bizanê înan [[weno]], hema her [[yew]] cayê xo ra [[kenê]] qîrî û hawar; o ke kerra erzeno ey, o ke dar gêno [[şino]] ser de, o ke pê çu dano piro. Û Ap Heş [[çirp]] û [[remeno]].|Roşan Lezgîn: ''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
n69h98g5wuv8hjbz7v3pc4av0e9xniv
viyartene
0
53558
6342621
5021943
2026-08-25T13:22:34Z
Wikihez
7344
/* Lêker */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342621
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Lêker ===
{{lêker|zza}}
# [[borîn]], [[derbas]] bûn
#* {{jêder|zza|jêgirtin=- [[dat|Dato]], [[to]] [[nêdî]] ke [[yew]] [[heş]] [[tiya|tîya]] [[ra]] vîyart?|[[w:Roşan Lezgîn|Roşan Lezgîn]]: ''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
cajyqrraqwvty4ehoj7shdzwr0z9ce4
acêr
0
53559
6342606
5021818
2026-08-25T13:07:13Z
Wikihez
7344
/* Hoker */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342606
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Hoker ===
{{hoker|zza}}
# [[jêrve]], [[ber bi jêr]]
#* {{jêder|zza|jêgirtin=- Ez hewn de bîya, şima ra ver terpî û repî ameye, ez bîya haya. Mi ewnîya ke yew heş mîyanê ereqî de mendibi. No dere ro acêr vazda [[şi]].|[[w:Roşan Lezgîn|Roşan Lezgîn]]: ''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
959ujlkm8yoo5q0e2sz07sfnly86poe
şi
0
53560
6342626
5919904
2026-08-25T13:23:49Z
Wikihez
7344
/* Lêker */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342626
wikitext
text/x-wiki
== {{ziman|ku}} ==
{{bnr|ji}}
== {{ziman|zza}} ==
=== Lêker ===
{{lêker|zza}}
# [[çûn|çû]]
#* {{jêder|zza|jêgirtin=- Ez hewn de bîya, şima ra ver terpî û repî ameye, ez bîya haya. Mi ewnîya ke yew heş mîyanê ereqî de mendibi. No dere ro acêr vazda [[şi]].|Roşan Lezgîn: ''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
== {{ziman|tr}} ==
=== Navdêr ===
{{navdêr|tr}}
# [[şiî]]
#* {{bêmînak|tr}}
t7idmevyzcp020whbbhna08efsq9h7o
vazda
0
53562
6342623
6339520
2026-08-25T13:23:10Z
Wikihez
7344
/* Formeke lêkerê */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342623
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Formeke lêkerê ===
{{lêker|zza|form=erê}}
# [[bazdan|bazda]], [[revîn|revî]], [[bezîn|bezî]]
#* {{jêder|zza|jêgirtin=- Ez [[hewn]] de bîya, şima ra ver terpî û repî ameye, ez bîya [[haya]]. Mi [[ewniya|ewnîya]] ke [[yew]] [[heş]] [[miyan|mîyanê]] [[ereq]]î de [[mendene|mendibi]]. [[no dere ro|No dere ro]] [[acêr]] [[vazda]] [[şi]].|Roşan Lezgîn: ''Sanikanê Dîyarbekirî ra Guldesteyêk'', Enstîtuya Kelepûrê Kurdî, Hewlêr, 2009, r. 68-71}}
== {{ziman|sh}} ==
=== Hoker ===
{{hoker|sh}}
# [[herdem#ku|herdem]], [[hertim#ku|hertim]], [[hergav#ku|hergav]], [[tim#ku|tim]]
laescogl02u97uz7go6xysad3gixx9g
Wîkîferheng:Peyva hefteyê/32
4
59926
6342636
4866036
2026-08-25T13:46:59Z
Wikihez
7344
6342636
wikitext
text/x-wiki
{{PH
| Peyv = qencî
| Kat. rêzimanî = ''[[navdêr]]'', ''[[mê]]''
| Xwendin = {{IPA|ku|/qɜnˈd͡ʒiː/}}
| Jihevqetandin = qen·cî
| Wêne =
| Wate =
# [[alîkarî|Alîkariya]] ku [[bêyî|bê]][[beramber]] tê kirin, [[xêr]], tişta/ê [[baş]] yê ku mirov bo kesekî dike yan dide kesekî [[bêyî]] ku bi xwe ti [[bedel]]ekê jê [[wergirtin|werbigire]]
# ne [[guneh]], (li gor hin [[dîn]] û [[ol]]an) kirinên ku mirov dikare pê biçe [[biheşt]]ê û xwe ji [[dûjeh]]ê [[parastin|biparêze]]
#* {{memûzîn|jêgirtin=Bi-l-cumle bikin ji bo me tehsîn<br />Bêjin ko »bi '''qencî''' hate tedwîn«<br />Xelqê ji »yuhibbuhum« digergûn}}
}}<noinclude>
== Peyvên berê ==
* {{g|ku|heval}}
</noinclude>
3us3zmrozqroqw15v2snrcl94wb4bvb
Wîkîferheng:Peyva hefteyê/33
4
59927
6342637
5048990
2026-08-25T13:47:29Z
Wikihez
7344
6342637
wikitext
text/x-wiki
{{PH
| Peyv = reng
| Kat. rêzimanî = ''[[navdêr]]'', ''[[nêr]]''
| Xwendin = {{IPA|ku|/rɜŋɡ/}}
| Jihevqetandin = reng
| Wêne = [[Wêne:Colouring pencils.jpg|160px]]
| Wate =
# [[kesk|Kesk]] û [[sor]] û [[zer]] û [[spî]] û [[reş]] û [[taybetî|taybetiyên]] din yên [[ronahî|ronahiyê]].
#: {{hevmaneyên peyvê|ku|lewn|elwan|gon|boyax|sibox}}
# [[cûn]], [[cor]], [[gûn]]
#* {{dîwanacizirî|jg=Kişand axir bi bednamî<br />Ji '''reng'''ê Se'dî û Camî<br />Ji şuhret pê hisîn 'amî}}
}}<noinclude>
== Peyvên berê ==
* {{g|ku|birinc}}
</noinclude>
8yu2ot6hadfdvpuhhsqqh2wy4fnasib
Wîkîferheng:Peyva hefteyê/35
4
59929
6342635
6122897
2026-08-25T13:44:36Z
Wikihez
7344
6342635
wikitext
text/x-wiki
{{PH
| Peyv = bêhn
| Kat. rêzimanî = ''[[navdêr]]'', ''[[mê]]''
| Xwendin = {{IPA|ku|/beːhn/}}
| Deng = {{deng|ku|LL-Q36368 (kur)-Dildadil-bêhn.wav|Deng|Amed}}
| Jihevqetandin = bêhn
| Wêne = [[Wêne:John William Waterhouse - The Soul of the Rose, 1903.jpg|150px|Jinikek qesta bêhna gulê dike.]]
| Wate =
# Tişta/ê mirov bi [[difin]]ê pê [[hesîn|dihese]].
#* {{Jêgirtin/Ehmedê Xanî/Mem û Zîn|jêgirtin=Ahûwê sipî ii çav di reşbûn<br>Biskên di sîyah û '''bêhnê''' xweşbûn}}
#* {{jêder-malper|ku|jêgirtin=Em vegerin ser nîrê zêrîn Zankoya Zaxo û çima min '''bêhna''' serxwebûna jê kiriye?|nivîskar=Konê Reş|sernav=Min bêhna serxwebûna Kurdistanê ji Zankoya Zaxo kir|url= https://www.basnews.com/kr/babat/523185|dîrok=20.05.2019|malper=basnews.com}}
#* {{jêder-malper|ku|jêgirtin=Li Almanyayê, kûçikên leşkerî yên taybet li ser '''bêhna''' koronayê hatine perwerdekirin. Ew niha bi rêjeyeke zêde, bi rêya '''bêhnê''' dikarin nexweşên koronayê nas bikin.|nivîskar=rûdaw|sernav=Li Almanyayê kûçikên leşkerî bi bêhna koronayê hatin perwerdekirin|url=https://www.rudaw.net/kurmanci/world/260720205|dîrok=27.07.2020|malper=rudaw.net}}
# [[hewa|Hewa]]ya mirov di [[dev]] û [[difin]]a xwe re tîne û dibe.
#* {{jêder-malper|ku|jêgirtin=Dem derbas dibû. Ji dûr ve dengê hewtehewta kûçikên gund dihat. Û xalê Cemîl hêdî hêdî ber bi dawiya çîroka xwe ve dihat. Bîstek din wek her tiştî ev çîrok jî bi dawî bibû. Xalê Cemîl gava '''bêhneke''' kûr kişand û got; 'Ev çîroka me çû deştê, dê û bavên guhdaran jî cih bihiştî' ev dihat wateya ku ev çîrok jî xelas û bi dawî bûye.|nivîskar= Mem Farqînî|sernav= Ristemê Zal kî ye?|malper=xwebun.org|url=https://xwebun.org/nu-risteme-zal-ki-ye|dîrok=07.09.2020}}
# [[dem|Dem]]ek [[kurt]] anku [[kin]].
#* {{jêder-malper|ku|jêgirtin=Şêx Ubeydullah rojeke ji rojên zor û zehmet, li civateke mezin wiha dibêje: 'Bêhêvî nebin, xwe bernedin, hevdu bigirin. Ji bîr nekin ku wexta reştariya şevê '''bêhnek''' beriya berbangê ye'.|nivîskar=Abdurahman Sever|sernav=Berhemên ruhê xwebûnê-4: Şêx Ubeydullahê Nehrî|url=https://xwebun.org/berhemen-ruhe-xwebune-4-sex-ubeydullahe-nehri|dîrok=18.11.2020|malper=xwebun.org}}
}}<noinclude>
== Peyvên berê ==
* {{g|ku|ken}}
</noinclude>
i7sney2i91x5whhw0lx9k5aoijasgtn
Wîkîferheng:Peyva hefteyê/36
4
59930
6342638
4866041
2026-08-25T13:48:07Z
Wikihez
7344
6342638
wikitext
text/x-wiki
{{PH
| Peyv = xwê
| Kat. rêzimanî = ''[[navdêr]], [[mê]]''
| Xwendin = {{IPA|ku|/xʷeː/}}
| Jihevqetandin = xwê
| Wêne = [[Wêne:Table salt with salt shaker V1.jpg|160px|Xwê]]
| Wate =
# Kereseya [[sûr]]kirinê, madeya [[şor]]kirinê.
#* {{dîwanacizirî|jg=Min dî b' xewab ew mahitab da dil kulab cohtê xurab<br />Dil şewwişand '''xwê''' lê reşand xweş herişand têk hûr-i bû}}
}}<noinclude>
== Peyvên berê ==
*
</noinclude>
eb3222i0wef9mirw97iyg317vkfgzy5
nuseno
0
61374
6342616
5021894
2026-08-25T13:19:50Z
Wikihez
7344
/* Formeke lêkerê */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342616
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Formeke lêkerê ===
{{lêker|zza|form=erê}}
# [[dinivîse]]
#* {{jêder|zza|jêgirtin=Nika ma bêrîn şima ser. Vanê, to duwêsserrîya xo de dest bi nuştiş kerdo. Gîlberte Xanime, merdim çira nuseno? Waştişê nuştişî kamca ra yeno? Ti şêna no ruh ma rê tarîf bikî? Tebaxa 2011î de yew romanê to vejêno. Ti nê romanê xo de qalê çî kena, ti şêna biney qalê mewzû û qehremananê romanê xo bikî?
|werger=Niha em werin se Te. Dibêjin, te di diwanzdehsaliya xwe de dest bi nivîsînê kiriye. Gulberte xanim, mirov çima dinivîse? Xwesteka nivîsînê ji çi tê? Tu dikarî wê ruhê ji me re vebêjî? Tebaxa 2011ê romaneke te diweşe. Tu di vê romanê de behsa çi dikî, tu dikarî qala mijar û lehengên romana xwe bikî?|Hülya Yetişen di hevpeyivînekê de li gel ''Gilberte Favre Zaza'', wergerandina li zazakî: Roşan Lezgîn bo Zazaki.net, wergerandina li kurmancî bo Wîkîferhengê: Husein Muhammed}}
psbm42tq97v0idjbks2qjhgjvinxt5a
bieşnawo
0
61379
6342608
5021841
2026-08-25T13:08:49Z
Wikihez
7344
/* Formeke lêkerê */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342608
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Formeke lêkerê ===
{{lêker|zza|form=erê}}
# [[bihîstin|bibihîze]], [[guh lê bûn|guh lê bibe]]
#* {{jêder|zza|jêgirtin=Gelo çira dinya nêwazena kurdan bivîno û bieşnawo?
|werger=Gelo çima dinya naxwaze kurdan bibîne û bibihîze?|Hülya Yetişen di hevpeyivînekê de li gel ''Gilberte Favre Zaza'', wergerandina li zazakî: Roşan Lezgîn bo Zazaki.net, wergerandina li kurmancî bo Wîkîferhengê: Husein Muhammed}}
iw22c6cbwma1a499nq1gu3o7r7fitnq
cîtî
0
376790
6342660
6167281
2026-08-26T09:26:36Z
Wikihez
7344
/* Etîmolojî */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342660
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|z=m}}
# [[tike]], [[cî]], [[çênî]], [[penêr]]
==== Etîmolojî ====
{{ji?}}
==== Werger ====
{{werger-ser}}
* {{Z|en}}: {{W+|en|masticated|guman=erê}}
* {{Z|tr}}: {{W+|tr|tike}}
{{werger-bin}}
ol2xw6vav4n617b4m19xrhcj5gurbp9
navbêjî
0
439714
6342669
6177074
2026-08-26T10:20:54Z
Wikihez
7344
6342669
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|z=m}}
# {{e|ku|nadir|tenê çend ferhengan de}} [[navçîtî]]
==== Etîmolojî ====
Ji {{qertaf|ku|nav|-bêjî}}.
==== Werger ====
{{werger-ser}}
* {{Z|en}}: {{W+|en|mediation}}, {{W+|en|intermediation}}, {{W+|en|intercession}}
{{werger-bin}}
==== Çavkanî ====
* {{gewranî|r=373}}
* {{ferhenga ronak|r=510}}
* {{Ferhenga Saadallah|r=582}}
t1y70gs8zj8cqtx9u13u2pgy3i6fakh
6342670
6342669
2026-08-26T10:21:10Z
Wikihez
7344
/* Çavkanî */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342670
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|z=m}}
# {{e|ku|nadir|tenê çend ferhengan de}} [[navçîtî]]
==== Etîmolojî ====
Ji {{qertaf|ku|nav|-bêjî}}.
==== Werger ====
{{werger-ser}}
* {{Z|en}}: {{W+|en|mediation}}, {{W+|en|intermediation}}, {{W+|en|intercession}}
{{werger-bin}}
==== Çavkanî ====
* {{Ç:Gewranî|r=373}}
* {{ferhenga ronak|r=510}}
* {{Ferhenga Saadallah|r=582}}
jyghsu24mjhqy9ik46pkpki8cvejnzh
6342681
6342670
2026-08-26T10:42:09Z
Wikihez
7344
/* Çavkanî */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342681
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|z=m}}
# {{e|ku|nadir|tenê çend ferhengan de}} [[navçîtî]]
==== Etîmolojî ====
Ji {{qertaf|ku|nav|-bêjî}}.
==== Werger ====
{{werger-ser}}
* {{Z|en}}: {{W+|en|mediation}}, {{W+|en|intermediation}}, {{W+|en|intercession}}
{{werger-bin}}
==== Çavkanî ====
* {{Ç:Gewranî|r=373}}
* {{Ferhenga Saadallah|r=582}}
* {{ferhenga ronak|r=510}}
hdx9ba5pbs0enmjytkfk23a9q9un33a
'aride
0
466775
6342630
5847997
2026-08-25T13:33:28Z
Wikihez
7344
6342630
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{deng|ku|LL-Q36163_(kmr)-Key Mîrza-'aride.wav|Deng|Wan}}
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|c=}}
# [[hinarik|Hinarikên]] [[rûyî|rûyî]].
#* {{J:Melayê Cizîrî:Dîwana Melayê Cizîrî|jêgirtin=Ya ten-i sîmînber est ya gewherê wala 'sti în<br>''''Aride''' est în ya şu'a'ê şems-i ya bedrê munîr<br>Lale ya nisrîn û gul ya badeê hemre 'sti în]}}
==== Etîmolojî ====
Ji {{deyn|ar|ku|عَارِض}}.
==== Werger ====
{{werger-ser}}
{{werger-bin}}
r2og3uic6mage9r2pgl0jjgqoodzcnx
6342631
6342630
2026-08-25T13:33:39Z
Wikihez
7344
/* Navdêr */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342631
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{deng|ku|LL-Q36163_(kmr)-Key Mîrza-'aride.wav|Deng|Wan}}
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|c=}}
# [[hinarik|Hinarikên]] [[rûyî|rûyî]].
#* {{J:Melayê Cizîrî:Dîwana Melayê Cizîrî|jêgirtin=Ya ten-i sîmînber est ya gewherê wala 'sti în<br>''''Aride''' est în ya şu'a'ê şems-i ya bedrê munîr<br>Lale ya nisrîn û gul ya badeê hemre 'sti în}}
==== Etîmolojî ====
Ji {{deyn|ar|ku|عَارِض}}.
==== Werger ====
{{werger-ser}}
{{werger-bin}}
4fek99axwlcktsv4e5rh0thr65a99hj
6342641
6342631
2026-08-25T14:29:07Z
Balyozbot
7867
[[Bikarhêner:Wikihez/skrîpt/py/dengbot.py|Bot]]: Formata parametreya "dever" hat guhartin
6342641
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{deng|ku|LL-Q36163_(kmr)-Key Mîrza-'aride.wav|dever=Wan}}
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|c=}}
# [[hinarik|Hinarikên]] [[rûyî|rûyî]].
#* {{J:Melayê Cizîrî:Dîwana Melayê Cizîrî|jêgirtin=Ya ten-i sîmînber est ya gewherê wala 'sti în<br>''''Aride''' est în ya şu'a'ê şems-i ya bedrê munîr<br>Lale ya nisrîn û gul ya badeê hemre 'sti în}}
==== Etîmolojî ====
Ji {{deyn|ar|ku|عَارِض}}.
==== Werger ====
{{werger-ser}}
{{werger-bin}}
1y1q0xz8dkxnywwtk4bkamni7a8a78i
6342644
6342641
2026-08-25T15:12:10Z
Balyozbot
7867
Bot: Paqijiyên kozmetîk (Lînk paqij kir.)
6342644
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{deng|ku|LL-Q36163_(kmr)-Key Mîrza-'aride.wav|dever=Wan}}
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|c=}}
# [[hinarik|Hinarikên]] [[rûyî]].
#* {{J:Melayê Cizîrî:Dîwana Melayê Cizîrî|jêgirtin=Ya ten-i sîmînber est ya gewherê wala 'sti în<br>''''Aride''' est în ya şu'a'ê şems-i ya bedrê munîr<br>Lale ya nisrîn û gul ya badeê hemre 'sti în}}
==== Etîmolojî ====
Ji {{deyn|ar|ku|عَارِض}}.
==== Werger ====
{{werger-ser}}
{{werger-bin}}
mizyblcz3fk7w3a6dzez182pem0gc81
navçîtî
0
536050
6342655
6247279
2026-08-26T09:17:31Z
Wikihez
7344
/* Mane */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342655
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Navdêr ===
{{Navdêr|ku|c=m}}
# [[navbeynkarî]], [[qencnavbêjî]], [[navbêjî]], [[nav bêjî]], [[berhengarî]]
==== Formên alternatîv ====
* [[navcîtî]]
==== Etîmolojî ====
Ji {{qertaf|ku|nav|çîtî}}.
==== Werger ====
{{werger-ser}}
* {{Z|fa}}: {{W+|fa|وساطت}}
* {{Z|en}}: {{W+|en|good office}}, {{W+|en|good offices}}, {{W+|en|intercession}}
{{werger-bin}}
{{kontrol}}
gn1cs2uarp0lnfsk90dsdddrxwr5i6n
6342656
6342655
2026-08-26T09:17:37Z
Wikihez
7344
/* Navdêr */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342656
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Navdêr ===
{{navdêr|ku|c=m}}
# [[navbeynkarî]], [[qencnavbêjî]], [[navbêjî]], [[nav bêjî]], [[berhengarî]]
==== Formên alternatîv ====
* [[navcîtî]]
==== Etîmolojî ====
Ji {{qertaf|ku|nav|çîtî}}.
==== Werger ====
{{werger-ser}}
* {{Z|fa}}: {{W+|fa|وساطت}}
* {{Z|en}}: {{W+|en|good office}}, {{W+|en|good offices}}, {{W+|en|intercession}}
{{werger-bin}}
{{kontrol}}
lg48x4084knsy0el4f3sbkbkigrqdkm
6342657
6342656
2026-08-26T09:20:58Z
Wikihez
7344
+nimûneya bikaranînê bi amûra « [[Mediawiki:Gadget-wikt.add-examples|Nimûne zêde bike]] » (v2.0).
6342657
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Navdêr ===
{{navdêr|ku|c=m}}
# [[navbeynkarî]], [[qencnavbêjî]], [[navbêjî]], [[nav bêjî]], [[berhengarî]]
#* {{jêder-kovar|ku|nivîskar=Şahîn Mistefa Şahîn|weşanxane=Çapxana Tereqî|sernav=Yeqîtîya Qurdan|kovar=Hawar|hejmar=12|sal=1932|rûpel=3|jêgirtin=Divîya bû qo {{j-wesf|beriya guhartina Q-K}} hon herin biqevin nav wan û ji wan re '''navçîtî''' biqin, ne qo tevda li yeqî xin.}}
==== Formên alternatîv ====
* [[navcîtî]]
==== Etîmolojî ====
Ji {{qertaf|ku|nav|çîtî}}.
==== Werger ====
{{werger-ser}}
* {{Z|fa}}: {{W+|fa|وساطت}}
* {{Z|en}}: {{W+|en|good office}}, {{W+|en|good offices}}, {{W+|en|intercession}}
{{werger-bin}}
{{kontrol}}
46evky79x9u0hytr2s15pgeh6c5yltz
6342658
6342657
2026-08-26T09:24:23Z
Wikihez
7344
6342658
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Navdêr ===
{{navdêr|ku|c=m}}
# [[navbeynkarî]], [[qencnavbêjî]], [[navbêjî]], [[nav bêjî]], [[berhengarî]]
#* {{jêder-kovar|ku|nivîskar=Şahîn Mistefa Şahîn|weşanxane=Çapxana Tereqî|sernav=Yeqîtîya Qurdan|kovar=Hawar|hejmar=12|sal=1932|rûpel=3|jêgirtin=Divîya bû qo {{j-wesf|beriya guhartina Q-K}} hon herin biqevin nav wan û ji wan re '''navçîtî''' biqin, ne qo tevda li yeqî xin.}}
==== Formên alternatîv ====
* [[navcîtî]]
==== Jê ====
{{kol3|ku
|navçîtî kirin<crz:fiîl>
}}
==== Etîmolojî ====
Ji {{qertaf|ku|nav|-çî|-tî}}.
==== Werger ====
{{werger-ser}}
* {{Z|fa}}: {{W+|fa|وساطت}}
* {{Z|en}}: {{W+|en|mediation}}, {{W+|en|intermediation}}, {{W+|en|intercession}}
{{werger-bin}}
mtwmy71ygf5h21zo6ubb2yh0mpa2su7
6342672
6342658
2026-08-26T10:25:24Z
Wikihez
7344
/* Navdêr */ bêçavkanî (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342672
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Navdêr ===
{{navdêr|ku|c=m}}
# [[navbeynkarî]], [[navbêjî]]
#* {{jêder-kovar|ku|nivîskar=Şahîn Mistefa Şahîn|weşanxane=Çapxana Tereqî|sernav=Yeqîtîya Qurdan|kovar=Hawar|hejmar=12|sal=1932|rûpel=3|jêgirtin=Divîya bû qo {{j-wesf|beriya guhartina Q-K}} hon herin biqevin nav wan û ji wan re '''navçîtî''' biqin, ne qo tevda li yeqî xin.}}
==== Formên alternatîv ====
* [[navcîtî]]
==== Jê ====
{{kol3|ku
|navçîtî kirin<crz:fiîl>
}}
==== Etîmolojî ====
Ji {{qertaf|ku|nav|-çî|-tî}}.
==== Werger ====
{{werger-ser}}
* {{Z|fa}}: {{W+|fa|وساطت}}
* {{Z|en}}: {{W+|en|mediation}}, {{W+|en|intermediation}}, {{W+|en|intercession}}
{{werger-bin}}
6q0kwdajyjpe0c6l2b7spis10ytvpft
6342673
6342672
2026-08-26T10:26:27Z
Wikihez
7344
+{{ku-tewîn-nav|
6342673
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Formên alternatîv ===
* {{alt|ku|navcîtî}}
=== Etîmolojî ===
Ji {{qertaf|ku|nav|-çî|-tî}}.
=== Navdêr ===
{{navdêr|ku|c=m}}
# [[navbeynkarî]], [[navbêjî]]
#* {{jêder-kovar|ku|nivîskar=Şahîn Mistefa Şahîn|weşanxane=Çapxana Tereqî|sernav=Yeqîtîya Qurdan|kovar=Hawar|hejmar=12|sal=1932|rûpel=3|jêgirtin=Divîya bû qo {{j-wesf|beriya guhartina Q-K}} hon herin biqevin nav wan û ji wan re '''navçîtî''' biqin, ne qo tevda li yeqî xin.}}
==== Tewandin ====
{{ku-tewîn-nav|mê}}
==== Jê ====
{{kol3|ku
|navçîtî kirin<crz:fiîl>
}}
==== Werger ====
{{werger-ser}}
* {{Z|fa}}: {{W+|fa|وساطت}}
* {{Z|en}}: {{W+|en|mediation}}, {{W+|en|intermediation}}, {{W+|en|intercession}}
{{werger-bin}}
lca44hj6k538z8zkcofbeq785qfgt6t
navçîtî kirin
0
539321
6342659
5055897
2026-08-26T09:25:57Z
Wikihez
7344
+nimûneya bikaranînê bi amûra « [[Mediawiki:Gadget-wikt.add-examples|Nimûne zêde bike]] » (v2.0).
6342659
wikitext
text/x-wiki
{{bnr-n|navçîtîkirin}}
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{ku-kîte}}
=== Lêker ===
{{ku-tewîn-lk|navçîtî kirin|form=gerguhêz|niha=k|borî=kir|pêşgir=navçîtî|valahî=erê}}
{{lêker|ku|c=h-gh}}
# [[haş kirin]], [[sulh danîn]], [[navbeynkarî kirin]]
#* {{jêder-kovar|ku|nivîskar=Şahîn Mistefa Şahîn|weşanxane=Çapxana Tereqî|sernav=Yeqîtîya Qurdan|kovar=Hawar|hejmar=12|sal=1932|rûpel=3|jêgirtin=Divîya bû qo {{j-wesf|beriya guhartina Q-K}} hon herin biqevin nav wan û ji wan re '''navçîtî biqin''', ne qo tevda li yeqî xin.}}
==== Etîmolojî ====
Ji {{heve|ku|navçîtî|kirin}}.
==== Werger ====
{{werger-ser}}
* {{Z|en}}: {{W+|en|reconcile}}
{{werger-bin}}
{{kontrol}}
k0x989p23qxvyhzwzj35vn0jmf2i497
Şablon:Ç:Farqînî:2005
10
837058
6342686
4266116
2026-08-26T11:07:05Z
Wikihez
7344
6342686
wikitext
text/x-wiki
{{#invoke:quote|call_template
|template=cite-book
|last=Farqînî
|first=Zana
|authorlink=Zana Farqînî
|title={{w|Ferhenga kurdî-tirkî (Farqînî, 2004)|Ferhenga Kurdî - Tirkî}}
|entry={{{1|{{pagename}}}}}
|url=https://archive.org/details/ABD2007KUAR/mode/2up
|location=w:Stenbol
|publisher=w:Enstîtuya Kurdî ya Stenbolê
|serî=Rêzeya Ferhengsaziyê 2
|year=2005
|çap=2
|pageparam=r,rûpel
|pageurl=https://archive.org/details/ferhenga-mezin-ya-kurdi-tirki-ya-zana-farqini/page/{{#invoke:string/templates|match|{{{rûpel|{{{r|}}}}}}|[0-9]+|}}/mode/2up
|allowparams=1,r,rûpel
}}<noinclude>{{refcat|ku|tr}}</noinclude>
7wxh3uop44m84fzpc232nc0ospgmrjc
6342687
6342686
2026-08-26T11:07:34Z
Wikihez
7344
Wikihezî/ê navê [[Şablon:Zana Farqînî]] weke [[Şablon:Farqînî:2005]] guhart
6342686
wikitext
text/x-wiki
{{#invoke:quote|call_template
|template=cite-book
|last=Farqînî
|first=Zana
|authorlink=Zana Farqînî
|title={{w|Ferhenga kurdî-tirkî (Farqînî, 2004)|Ferhenga Kurdî - Tirkî}}
|entry={{{1|{{pagename}}}}}
|url=https://archive.org/details/ABD2007KUAR/mode/2up
|location=w:Stenbol
|publisher=w:Enstîtuya Kurdî ya Stenbolê
|serî=Rêzeya Ferhengsaziyê 2
|year=2005
|çap=2
|pageparam=r,rûpel
|pageurl=https://archive.org/details/ferhenga-mezin-ya-kurdi-tirki-ya-zana-farqini/page/{{#invoke:string/templates|match|{{{rûpel|{{{r|}}}}}}|[0-9]+|}}/mode/2up
|allowparams=1,r,rûpel
}}<noinclude>{{refcat|ku|tr}}</noinclude>
7wxh3uop44m84fzpc232nc0ospgmrjc
6342689
6342687
2026-08-26T11:07:45Z
Wikihez
7344
Wikihezî/ê navê [[Şablon:Farqînî:2005]] weke [[Şablon:Ç:Farqînî:2005]] guhart
6342686
wikitext
text/x-wiki
{{#invoke:quote|call_template
|template=cite-book
|last=Farqînî
|first=Zana
|authorlink=Zana Farqînî
|title={{w|Ferhenga kurdî-tirkî (Farqînî, 2004)|Ferhenga Kurdî - Tirkî}}
|entry={{{1|{{pagename}}}}}
|url=https://archive.org/details/ABD2007KUAR/mode/2up
|location=w:Stenbol
|publisher=w:Enstîtuya Kurdî ya Stenbolê
|serî=Rêzeya Ferhengsaziyê 2
|year=2005
|çap=2
|pageparam=r,rûpel
|pageurl=https://archive.org/details/ferhenga-mezin-ya-kurdi-tirki-ya-zana-farqini/page/{{#invoke:string/templates|match|{{{rûpel|{{{r|}}}}}}|[0-9]+|}}/mode/2up
|allowparams=1,r,rûpel
}}<noinclude>{{refcat|ku|tr}}</noinclude>
7wxh3uop44m84fzpc232nc0ospgmrjc
navcîtî
0
844589
6342671
6329886
2026-08-26T10:24:06Z
Wikihez
7344
6342671
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku}}
# [[navbeynkarî]], [[navbêjî]]
#* {{jêder-malper|ku|jêgirtin=Îran amade ye jibo kêmkirina kêşeyê navbera Ermenistan û Komara Azerbaycanê '''navcîtiyê''' bike.|url=https://kurmanci.sahartv.ir/news/%C3%8Eran-i317801|malper=kurmanci.sahartv.ir|dîrok=2020-07-18}}
==== Formên alternatîv ====
* [[navçîtî]]
==== Etîmolojî ====
Ji {{qertaf|ku|nav|cîtî}}.
==== Werger ====
{{werger-ser}}
* {{Z|fa}}: {{W+|fa|وساطت}}
* {{Z|en}}: {{W+|en|good office}}, {{W+|en|good offices}}, {{W+|en|intercession}}
* {{Z|tr}}: {{W|tr|ara buluculuk}}
{{werger-bin}}
byomalldlsfwxsjaaer226n0f4ywtp1
Şablon:Ç:Sêfidîn Ehmed
10
873568
6342674
6114764
2026-08-26T10:30:35Z
Wikihez
7344
6342674
wikitext
text/x-wiki
{{#invoke:quote|call_template
|template=cite-book
|last=Ebdo
|first=Sêfidîn Ehmed
|authorlink=
|title=Ferhenga Ronak: Ferhenga Kurdî-Erebî bi Zarava Kurmancî
|entry={{{1|{{pagename}}}}}
|url=https://archive.org/details/ABD2007KUAR/mode/2up
|location=w:Dimeşq
|publisher=Daru’z-Zeman
|year=2007
|pageparam=r,rûpel
|pageurl=https://archive.org/details/ABD2007KUAR/page/n{{#invoke:string/templates|match|{{{rûpel|{{{r|}}}}}}|[0-9]+|}}/mode/2up
|allowparams=1,r,rûpel
}}<noinclude>{{refcat|ku|ar}}</noinclude>
4ov0ehw3v60p8svjc2dzzdpwd5oz94i
6342676
6342674
2026-08-26T10:33:21Z
Wikihez
7344
Wikihezî/ê navê [[Şablon:ferhenga ronak]] weke [[Şablon:Ç:Sêfidîn Ehmed]] guhart
6342674
wikitext
text/x-wiki
{{#invoke:quote|call_template
|template=cite-book
|last=Ebdo
|first=Sêfidîn Ehmed
|authorlink=
|title=Ferhenga Ronak: Ferhenga Kurdî-Erebî bi Zarava Kurmancî
|entry={{{1|{{pagename}}}}}
|url=https://archive.org/details/ABD2007KUAR/mode/2up
|location=w:Dimeşq
|publisher=Daru’z-Zeman
|year=2007
|pageparam=r,rûpel
|pageurl=https://archive.org/details/ABD2007KUAR/page/n{{#invoke:string/templates|match|{{{rûpel|{{{r|}}}}}}|[0-9]+|}}/mode/2up
|allowparams=1,r,rûpel
}}<noinclude>{{refcat|ku|ar}}</noinclude>
4ov0ehw3v60p8svjc2dzzdpwd5oz94i
Modul:dara kategoriyan/ferhengokkatbike/dane/ferhengok
828
876257
6342682
6328001
2026-08-26T10:53:17Z
Wikihez
7344
[[Bikarhêner:Balyozxane/etîket-çêke.js|Etîket-çêke]]: +tenê di çend ferhengan de
6342682
Scribunto
text/plain
local labels = {}
-- bnr. [[Modul:dara kategoriyan/ferhengokkatbike/dane/rêzimanî]]
labels["agir"] = {
display = "[[agir]]",
topical_categories = true,
description = "default",
parents = {"şewat", "çavkaniyên ronahiyê"},
interwiki = {"fire"},
aliases = {"fire"},
}
labels["ajal"] = {
display = "[[ajal]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} li ser heywanên kedîkirî. [[File:Domestic animals livestock.jpg|thumb|ajal]]",
parents = {"heywan"},
interwiki = {"livestock"},
aliases = {"livestock"},
}
labels["aman"] = {
display = "[[aman]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[aman]]an.",
parents = {"amûr", "mitfax", "alavên malê"},
interwiki = {"kitchenware"},
aliases = {"kitchenware"},
}
labels["amûr"] = {
display = "[[amûr]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[amûr]]an.",
parents = {"teknolojî"},
umbrella = true,
interwiki = {"tools"},
aliases = {"tools"},
}
labels["anatomî"] = {
display = "[[anatomî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[anatomî|anatomiyê]].",
parents = {"biyolojî"},
interwiki = {"anatomy"},
aliases = {"anatomy"},
}
labels["antropolojî"] = {
display = "[[antropolojî]]",
topical_categories = true,
description = "default",
parents = {"zoolojî"},
interwiki = {"anthropology"},
aliases = {"mirovnasî", "anthropology"},
}
labels["astrolojî"] = {
display = "[[astrolojî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[astrolojî|astrolojî]].",
parents = {"remldarî"},
interwiki = {"astrology"},
aliases = {"astrology"},
}
labels["avjenî"] = {
display = "[[avjenî]]",
topical_categories = true,
description = "default",
parents = { "spor"},
interwiki = {"swimming"},
aliases = {"swimming"},
}
labels["astronomî"] = {
display = "[[astronomî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[astronomî|astronomiyê]].",
parents = {"zanist"},
interwiki = {"astronomy"},
aliases = {"stêrnasî", "astronomy"},
}
labels["avahî û pêkhate"] = {
display = "[[avahî]] û [[pêkhate]]",
topical_categories = true,
description = "default",
parents = {"mîmarî"},
umbrella = true,
interwiki = {"Buildings and structures"},
aliases = {"Buildings and structures"},
}
labels["avahî"] = {
display = "[[avahî]]",
topical_categories = true,
description = "default",
parents = {"avahî û pêkhate"},
interwiki = {"Buildings"},
aliases = {"bîna", "Buildings"},
}
labels["alavên malê"] = {
display = "[[alav]]ên [[malê]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[alav]]ên [[mal]]ê.",
parents = {"makîne", "mal"},
interwiki = {"home appliances"},
aliases = {"home appliances"},
}
labels["atmosfer"] = {
display = "[[atmosfer]]",
topical_categories = true,
description = "default",
parents = {"xweza"},
interwiki = {"Atmosphere"},
aliases = {"Atmosphere"},
}
labels["alavên muzîkê"] = {
display = "[[muzîk|alava muzîkê]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[alav]]ên [[muzîk]]ê.",
parents = {"amûr", "muzîk"},
interwiki = {"Musical instruments"},
aliases = {"amûrên muzîkê", "amûra muzîkê", "alava muzîkê", "Musical instruments"},
}
labels["astronotîk"] = {
display = "[[astronotîk]]",
topical_categories = true,
description = "default",
parents = {"zanistên sepandî"},
interwiki = {"Astronautics"},
aliases = {"Astronautics"},
}
labels["ba"] = {
display = "[[ba]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[ba]]yê.",
parents = {"hewa"},
interwiki = {"wind"},
aliases = {"wind"},
}
labels["berhemên behrê"] = {
display = "berhemên behrê",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[berhem]]ên [[behr]]ê.",
parents = {"xwarin"},
interwiki = {"seafood"},
aliases = {"seafood"},
}
labels["bajar"] = {
display = "[[bajar]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[bajar]]an.",
parents = {"erdnîgarî", "serenav"},
interwiki = {"cities"},
aliases = {"cities"},
}
labels["basketbol"] = {
display = "[[basketbol]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[basketbol]]ê.",
parents = {"spor"},
interwiki = {"basketball"},
aliases = {"basketball"},
}
labels["bijîşkî"] = {
display = "[[bijîşkî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[bijîşkî|bijîşkiyê]].",
parents = {"zanist"},
interwiki = {"medicine"},
aliases = {"tib", "tibb", "medicine"},
}
labels["biyolojî"] = {
display = "[[biyolojî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[biyolojî|biyolojiyê]].",
umbrella = true,
parents = {"zanist"},
interwiki = {"biology"},
aliases = {"biology"},
}
labels["boks"] = {
display = "[[boks]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên têkildarî [[boks|boksê]].",
parents = {"spor"},
interwiki = {"boxing"},
aliases = {"boxing"},
}
labels["buxik"] = {
display = "[[mêşûmor]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} li ser [[candar]]ên biçûk yên mîna [[mêş]]an yan jê mezintir in lê [[firîn|nafirin]]. [[Wêne:Insekter.jpg|thumb|Hin buxik]]",
parents = {"heywan"},
interwiki = {"insects"},
aliases = {"insects"},
}
labels["behr"] = {
display = "[[behr]]",
topical_categories = true,
description = "default",
parents = {"erdnîgarî"},
interwiki = {"seas"},
aliases = {"derya", "seas"},
}
labels["berf"] = {
display = "[[berf]]",
topical_categories = true,
description = "default",
parents = {"hewa"},
interwiki = {"snow"},
aliases = {"snow"},
}
labels["bazarkarî"] = {
display = "[[bazarkarî]]",
topical_categories = true,
description = "default",
parents = {"karsazî"},
interwiki = {"marketing"},
aliases = {"bazarkerî", "bazarvanî", "marketing"},
}
labels["bac"] = {
display = "[[bac]]",
topical_categories = true,
description = "default",
parents = {"hikûmet", "hiqûq", "pere"},
interwiki = {"taxation"},
aliases = {"backirin", "taxation"},
}
labels["cihûtî"] = {
display = "[[Cihûtî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên dînê [[cihûtî|cihûtiyê]].",
parents = {"dîn"},
interwiki = {"judaism"},
aliases = {"Cihûtî", "judaism"},
}
labels["cilûberg"] = {
display = "[[cilûberg]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[cilûberg]]an.",
parents = {"mirov"},
interwiki = {"clothing"},
aliases = {"clothing"},
}
labels["civak"] = {
display = "[[civak]]",
topical_categories = true,
description = "default",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"society"},
aliases = {"society"},
}
labels["cih"] = {
display = "[[cih]]",
topical_categories = true,
description = "default",
parents = {"nav"},
interwiki = {"places"},
aliases = {"places"},
}
labels["cografya"] = {
display = "[[cografya]]",
topical_categories = "Erdnîgarî",
aliases = {"geography"},
}
labels["çavkaniyên ronahiyê"] = {
display = "[[çavkanî|çavkaniyên]] [[ronahî|ronahiyê]]",
topical_categories = true,
description = "default",
umbrella = true,
parents = {"ronahî"},
interwiki = {"Light sources"},
aliases = {"Light sources"},
}
labels["çandinî"] = {
display = "[[çandinî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[çandinî|çandiniyê]]",
parents = {"lîsteya ferhengan", "kultur"},
interwiki = {"agriculture"},
aliases = {"cotyarî", "agriculture"},
}
labels["çek"] = {
display = "[[çek]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[çek]]an.",
parents = {"leşkerî"},
interwiki = {"weapons"},
aliases = {"weapons"},
}
labels["çiya"] = {
display = "[[çiya]]",
topical_categories = true,
description = "Navên [[çiya]]yan bi zimanê {{{langname}}}.",
parents = {"erdnîgarî"},
interwiki = {"mountains"},
aliases = {"mountains"},
}
labels["Çîn"] = {
display = "[[Çîn]]",
topical_categories = true,
description = "default",
parents = {"dewletên Asyayê", "dewlet"},
interwiki = {"China"},
aliases = {"China"},
}
labels["dinya"] = {
display = "[[dinya]]",
topical_categories = true,
description = "default",
parents = {"xweza"},
interwiki = {"Earth"},
aliases = {"erd", "cîhan", "Earth"},
}
labels["devkî"] = {
display = "[[devkî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} yên ji zimanê standard cuda ne.",
parents = {"zimannasî"},
}
labels["devokî"] = {
display = "[[devokî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} yên [[devokî]] ne.",
parents = {"zimannasî"},
}
labels["dewletên Ewropayê"] = {
display = "[[dewlet]]a [[Ewropa]]yê",
topical_categories = true,
description = "default",
parents = {{name = "dewlet", sort = "Ewropa"}},
interwiki = {"countries in Europe"},
aliases = {"dûgelên Ewropayê", "dûgela Ewropayê", "welata Ewropayê", "welatên Ewropayê", "dewleta Ewropayê", "countries in Europe"},
}
labels["dewletên Asyayê"] = {
display = "[[dewlet]]a [[Asya]]yê",
topical_categories = true,
description = "default",
parents = {{name = "dewlet", sort = "Asya"}},
interwiki = {"countries in Asia"},
aliases = {"dûgelên Asyayê", "dûgela Asyayê", "welata Asyayê", "welatên Asyayê", "dewleta Asyayê", "countries in Asia"},
}
labels["dewletên Afrîkayê"] = {
display = "[[dewlet]]a [[Afrîka]]yê",
topical_categories = true,
description = "default",
parents = {{name = "dewlet", sort = "Afrîka"}},
interwiki = {"countries in Africa"},
aliases = {"dûgelên Afrîkayê", "dûgela Afrîkayê", "welata Afrîkayê", "welatên Afrîkayê", "dewleta Afrîkayê", "countries in Africa"},
}
labels["dar"] = {
display = "[[dar]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[dar]]an.",
parents = {"riwek"},
interwiki = {"trees"},
aliases = {"trees"},
}
labels["dîn"] = {
display = "[[dîn]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[dîn]]î.",
umbrella = true,
parents = {"kultur"},
interwiki = {"religion"},
aliases = {"ol", "olî", "bawerî", "religion"},
}
labels["dîrok"] = {
display = "[[dîrok]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo termên [[tarîx]]ê.",
parents = {"zanist"},
interwiki = {"history"},
}
labels["dewlet"] = {
display = "[[dewlet]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[dewlet]]ên dinyayê.",
parents = {"erdnîgarî", "serenav"},
umbrella = true,
interwiki = {"countries"},
aliases = {"dûgel", "welat", "countries"},
}
labels["dehsal"] = {
display = "[[dehsal]]",
topical_categories = true,
description = "default",
parents = {"termên teqwîmê"},
interwiki = {"Decades"},
aliases = {"Decades"},
}
labels["dewletên Amerîkaya Başûr"] = {
display = "[[dewlet]]a [[Amerîkaya Başûr]]",
topical_categories = true,
description = "default",
parents = {"dewlet"},
interwiki = {"Countries in South America"},
aliases = {"Countries in South America"},
}
labels["deryagerî"] = {
display = "[[deryagerî]]",
topical_categories = true,
description = "default",
parents = {"neqliyat"},
interwiki = {"Nautical"},
aliases = {"Nautical"},
}
labels["demsal"] = {
display = "[[demsal]]",
topical_categories = true,
description = "default",
parents = {"zeman"},
interwiki = {"Seasons"},
aliases = {"Seasons"},
}
labels["drama"] = {
display = "[[drama]]",
topical_categories = true,
description = "default",
parents = {"edebiyat", "tiyatro"},
interwiki = {"drama"},
umbrella = true,
}
labels["enerjî"] = {
display = "[[enerjî]]",
topical_categories = true,
description = "default",
umbrella = true,
parents = {"xweza", "fizîk"},
interwiki = {"energy"},
aliases = {"wize", "energy"},
}
labels["ekonomî"] = {
display = "[[ekonomî]]",
topical_categories = true,
description = "default",
parents = {"zanist"},
interwiki = {"economics"},
aliases = {"fînans", "aborî", "economics"},
}
labels["evîn"] = {
display = "[[evîn]]",
topical_categories = true,
description = "default",
parents = {"hest"},
interwiki = {"love"},
aliases = {"love"},
}
labels["element"] = {
display = "[[element]]",
topical_categories = true,
description = "Navên [[element]]an bi zimanê {{{langname}}}.",
parents = {"kîmya"},
interwiki = {"chemical elements"},
aliases = {"chemical elements"},
}
labels["erdnîgarî"] = {
display = "[[erdnîgarî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[cografya|cografyayê]].",
umbrella = true,
parents = {"zanist"},
interwiki = {"geography"},
}
labels["emir"] = {
display = "[[emir]]",
topical_categories = true,
description = "default",
parents = {"leş"},
umbrella = true,
interwiki = {"age"},
aliases = {"age"},
}
labels["elektrîk"] = {
display = "[[elektrîk]]",
topical_categories = true,
description = "default",
parents = {"fizîk"},
interwiki = {"electricity"},
aliases = {"kareba", "kehreba", "electricity"},
}
labels["edebiyat"] = {
display = "[[edebiyat]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[edebiyat|edebiyatê]].",
umbrella = true,
parents = {"kultur"},
interwiki = {"literature"},
aliases = {"wêje", "literature"},
}
labels["formên kevnbûyî"] = {
display = "[[formên kevnbûyî]]",
topical_categories = true,
description = "Formên kevnbûyî yên kelîmeyên {{{langname}}}.",
parents = {"zimannasî"},
}
labels["fêkî"] = {
display = "[[fêkî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[fêkî|fêkiyan]].",
parents = {"riwek"},
interwiki = {"fruits"},
aliases = {"fruits"},
}
labels["felsefe"] = {
display = "[[felsefe]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[felsefe|felsefeyê]].",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"philosophy"},
aliases = {"philosophy"},
}
labels["femînîzm"] = {
display = "[[femînîzm]]",
topical_categories = true,
description = "default",
parents = {"siyaset"},
interwiki = {"feminism"},
aliases = {"feminism"},
}
labels["fizîk"] = {
display = "[[fizîk]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[fizîk|fizîkê]].",
umbrella = true,
parents = {"zanist"},
interwiki = {"physics"},
aliases = {"fîzîk", "physics"},
}
labels["futbol"] = {
display = "[[futbol]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[futbol|futbolê]].",
parents = {"spor"},
interwiki = {"football"},
aliases = {"football"},
}
labels["fîzyolojî"] = {
display = "[[fîzyolojî]]",
topical_categories = true,
description = "default",
parents = {"biyolojî"},
interwiki = {"Physiology"},
aliases = {"fizyolojî", "Physiology"},
}
labels["fîlm"] = {
display = "[[fîlm]]",
topical_categories = true,
description = "default",
parents = {"huner"},
interwiki = {"Film"},
aliases = {"film", "sînema", "Film"},
}
labels["folklor"] = {
display = "[[folklor]]",
topical_categories = true,
description = "default",
parents = {"kultur"},
interwiki = {"folklore"},
aliases = {"folklore", "zargotin"},
}
labels["guhandar"] = {
display = "[[guhandar]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} li ser [[candar]]ên guhanên wan hene. [[Wêne:Goat kid feeding on mothers milk.jpg|thumb|Hin heywanên guhandar]]",
parents = {"heywan"},
interwiki = {"mammals"},
aliases = {"mammals"},
}
labels["gund"] = {
display = "[[gund]]",
topical_categories = true,
description = "Navên [[gund]]an bi zimanê {{{langname}}}.",
parents = {"erdnîgarî", "serenav"},
interwiki = {"villages"},
aliases = {"villages"},
}
labels["hest"] = {
display = "[[hest]]",
topical_categories = true,
description = "default",
parents = {"hiş"},
interwiki = {"emotions"},
aliases = {"emotions"},
}
labels["hiş"] = {
display = "[[hiş]]",
topical_categories = true,
description = "default",
parents = {"leş"},
interwiki = {"mind"},
aliases = {"mind"},
}
labels["hemû mijar"] = {
description = "Hemû mijarên zimanê {{{langname}}}.",
parents = {{name = "lîsteya ferhengan", sort = " "}},
umbrella = true,
interwiki = {"list of topics"},
aliases = {"list of topics"},
}
labels["herêm"] = {
display = "[[herêm]]",
topical_categories = true,
description = "Navên [[herêm]]an bi zimanê {{{langname}}}.",
parents = {"erdnîgarî"},
}
labels["hevdeng"] = {
description = "Kelîmeyên {{{langname}}} yên wek hev bên gotin.",
parents = {"zimannasî"},
}
labels["hewa"] = {
display = "[[hewa]]",
topical_categories = true,
description = "default",
parents = {"atmosfer"},
umbrella = true,
interwiki = {"weather"},
aliases = {"rewşa hewayê", "weather"},
}
labels["hiqûq"] = {
display = "[[hiqûq]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[hiqûq]]ê.",
parents = {"civak"},
interwiki = {"law"},
aliases = {"qanûn", "qanûnî", "dad", "legal", "yasayî", "dadnasî", "law"},
}
labels["hewavanî"] = {
display = "[[hewavanî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[hewavanî|hewavaniyê]].",
parents = {"zanist"},
interwiki = {"aviation"},
aliases = {"hewagerî", "aviation"},
}
labels["heywan"] = {
display = "[[heywan]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[heywan]]an.",
umbrella = true,
parents = {"jîndar"},
interwiki = {"animals"},
aliases = {"animals"},
}
labels["hinduîzm"] = {
display = "[[Hinduîzm]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên dînê [[Hinduîzm|Hinduîzmê]].",
parents = {"dîn"},
interwiki = {"hinduism"},
aliases = {"Hinduîzm", "hinduism"},
}
labels["huner"] = {
display = "[[huner]]",
topical_categories = true,
description = "default",
parents = {"kultur"},
interwiki = {"art"},
aliases = {"art"},
}
labels["hunera şiîrê"] = {
display = "[[huner]]a [[şiîr]]ê",
topical_categories = true,
description = "default",
interwiki = {"Poetry"},
parents = {"edebiyat"},
aliases = {"şiîr", "şi'r", "poetry", "helbest", "helbestvanî", "nezm"},
}
labels["hikûmet"] = {
display = "[[hikûmet]]",
topical_categories = true,
description = "default",
parents = {"civak", "siyaset"},
umbrella = true,
interwiki = {"Government"},
aliases = {"hikumet", "Government"},
}
labels["informatîk"] = {
display = "[[enformatîk]]",
topical_categories = true, --informatîk beralî dike enformatîk??
description = "Kelîmeyên {{{langname}}} ji bo terimên [[informatîk|informatîkê]].",
umbrella = true,
parents = {"teknolojî"},
aliases = {"enformatîk"},
}
labels["Israîl"] = {
display = "[[Israîl]]",
topical_categories = true,
description = "default",
parents = {"dewletên Asyayê", "dewlet"},
interwiki = {"Israel"},
aliases = {"Îsraêl", "Israel"},
}
labels["înternet"] = {
display = "[[înternet]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[înternet|înternetê]].",
parents = {"kompûternasî"},
interwiki = {"internet"},
aliases = {"internet"},
}
labels["îslam"] = {
display = "[[Îslam]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên dînê [[Îslam|Îslamê]].",
umbrella = true,
parents = {"dîn"},
interwiki = {"islam"},
aliases = {"Îslam", "islam"},
}
labels["îdeolojî"] = {
display = "[[îdeolojî]]",
topical_categories = true,
description = "default",
parents = {"civak"},
interwiki = {"ideologies"},
aliases = {"ideologies"},
}
labels["jîndar"] = {
display = "[[jîndar]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[jîndar]]an.",
umbrella = true,
parents = {"xweza"},
interwiki = {"lifeforms"},
aliases = {"lifeforms"},
}
labels["jeolojî"] = {
display = "[[jeolojî]]",
topical_categories = true,
description = "default",
parents = {"zanist"},
interwiki = {"geology"},
aliases = {"geology"},
}
labels["japonî"] = {
display = "[[japonî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî zimanê [[japonî]].",
parents = {"ziman"},
interwiki = {"japanese"},
aliases = {"japanese"},
}
labels["kultur"] = {
display = "[[kultur]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ên eleqadarî [[kultur|kultura]] mirovahiyê.",
umbrella = true,
parents = {"civak"},
interwiki = {"culture"},
aliases = {"çande", "çand", "culture"},
}
labels["kar"] = {
display = "[[kar]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[kar|karî]].",
umbrella = true,
parents = {"lîsteya ferhengan"},
}
labels["karsazî"] = {
display = "[[karsazî]]",
topical_categories = true,
description = "default",
umbrella = true,
parents = {{name = "ekonomî", sort = " "}},
interwiki = {"business"},
aliases = {"business"},
}
labels["kîmya"] = {
display = "[[kîmya]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[kîmya|kîmyayê]].",
umbrella = true,
parents = {"zanist"},
interwiki = {"chemistry"},
aliases = {"chemistry"},
}
labels["kişik"] = {
display = "[[kişik]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[kişik|kişikê]].",
parents = {"lîstik"},
interwiki = {"chess"},
aliases = {"setrenc", "setranc", "şetrenc", "satranc", "chess"},
}
labels["kompûternasî"] = {
display = "[[kompûternasî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[kompûternasî|kompûternasiyê]].",
parents = {"teknolojî", "zanist"},
interwiki = {"computing"},
aliases = {"komputer", "kompûter", "computing"},
}
labels["kulîlk"] = {
display = "[[kulîlk]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[kulîlk]]an.",
parents = {"riwek"},
interwiki = {"flowers"},
aliases = {"flowers"},
}
labels["kes"] = {
display = "[[kes]]",
topical_categories = true,
description = "default",
parents = {"mirov"},
interwiki = {"people"},
aliases = {"people"},
}
labels["kitêb"] = {
display = "[[kitêb]]",
topical_categories = true,
description = "default",
parents = {"edebiyat"},
interwiki = {"Books"},
aliases = {"pirtûk"},
}
labels["lîsteya ferhengan"] = {
--alltopics
description = "Kelîmeyên {{{langname}}} li gorî mijarên mîna \"Xwarin\" an \"Zanist\".",
parents = {{template = "zimankatbike", sort = "ferhengok"}},
umbrella = true,
inSerkategori = true,
interwiki = {"All topics"},
aliases = {"All topics"},
}
labels["leşkerî"] = {
display = "[[leşkerî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[leşkerî|leşkeriyê]].",
umbrella = true,
parents = {"civak"},
interwiki = {"military"},
aliases = {"military"},
}
labels["lîstik"] = {
display = "[[lîstik]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[lîstik|lîstikan]].",
umbrella = true,
parents = {"lîsteya ferhengan", "kultur"},
interwiki = {"games"},
aliases = {"games"},
}
labels["lîstikên vîdeoyî"] = {
display = "[[lîstik]]ên [[vîdeo]]yî",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[lîstik]]ên [[vîdeo]]yî.",
parents = {{name = "lîstik", sort = "vîdeoyî"}, "informatîk"},
interwiki = {"video games"},
aliases = {"video games"},
}
labels["lîstikên zarokan"] = {
display = "[[lîstik]]a [[zarok]]an",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[lîstik|lîstik]]ên [[zarok]]an.",
parents = {{name = "lîstik", sort = "zarok"}},
interwiki = {"children's games"},
aliases = {"lîstika zarokan", "children's games"},
}
labels["leş"] = {
display = "[[leş]]",
topical_categories = true,
description = "default",
parents = {"lîsteya ferhengan"},
umbrella = true,
interwiki = {"body"},
aliases = {"wicûd", "body"},
}
labels["meteorolojî"] = {
display = "[[meteorolojî]]",
topical_categories = true,
description = "default",
parents = {"zanist", "atmosfer"},
interwiki = {"Meteorology"},
aliases = {"hewanasî", "Meteorology"},
}
labels["metonîm"] = {
display = "[[metonîm]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} yên ku bi eslê xwe ve tê gotin ku tiştek an têgihek ne bi navê xwe, lê bi navê tiştekî ku ji nêz ve bi wî tişt an têgihê re têkildar e.",
parents = {"etîmolojî", "zimannasî"},
}
labels["mitfax"] = {
display = "[[mitfax]]",
topical_categories = true,
description = "default",
parents = {"ode"},
interwiki = {"kitchen"},
aliases = {"kulîn", "metbex", "kitchen"},
}
labels["mal"] = {
display = "[[mal]]",
topical_categories = true,
description = "default",
umbrella = true,
parents = {"civak"},
interwiki = {"home"},
aliases = {"home"},
}
labels["malbat"] = {
display = "[[malbat]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo endamên [[malbat]]ê.",
parents = {"mirov"},
interwiki = {"family"},
aliases = {"family"},
}
labels["masî"] = {
display = "[[masî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} li ser [[heywan]]ên [[avî]] yên ku [[karîn|nikarin]] li [[ziwayî|ziwayiyan]] bi[[jîn]]. [[Wêne:Gullfiskur.jpg|thumb|Masiyek]]",
parents = {"heywan"},
interwiki = {"fish"},
aliases = {"fish"},
}
labels["matematîk"] = {
display = "[[matematîk]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[matematîk]]ê.",
parents = {"zanist"},
interwiki = {"mathematics"},
aliases = {"geometrî", "bîrkarî", "mathematics"},
}
labels["mehên salê"] = {
display = "[[mehên salê]]",
topical_categories = true,
description = "Navên mehên salê bi zimanê {{{langname}}}.",
umbrella = true,
parents = {"zeman"},
interwiki = {"months"},
aliases = {"months"},
}
labels["mekanîk"] = {
display = "[[mekanîk]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[mekanîk|mekanîkê]].",
parents = {"fizîk"},
interwiki = {"mechanics"},
aliases = {"mechanics"},
}
labels["mesîhî"] = {
display = "[[Mesîhî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên dînê [[Mesîhî|Mesîhiyê]].",
parents = {"dîn"},
interwiki = {"christianity"},
aliases = {"filetî", "Mesîhî", "Xiristiyanî", "xiristiyanî", "christianity"},
}
labels["meslek"] = {
display = "[[meslek]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[pîşe|pîşeyan]].",
parents = {"kar"},
umbrella = true,
interwiki = {"occupations"},
aliases = {"pîşe", "occupations"},
}
labels["metrolojî"] = {
display = "[[metrolojî]]",
topical_categories = true,
description = "default",
umbrella = true,
parents = {"zanist"},
interwiki = {"metrology"},
aliases = {"metrology"},
}
labels["mîtolojî"] = {
display = "[[mîtolojî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[mîtolojî|mîtolojiyê]].",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"mythology"},
aliases = {"mythology"},
}
labels["mîtolojiya ermenî"] = {
display = "[[mîtolojî|mîtolojiya]] [[ermenî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[mîtolojî|mîtolojiya]] [[ermenî]].",
parents = {{name = "mîtolojî", sort = "ermenî"}},
interwiki = {"Armenian mythology"},
aliases = {"Armenian mythology"},
}
labels["mîtolojiya îranî"] = {
display = "[[mîtolojî|mîtolojiya]] [[îranî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[mîtolojî|mîtolojiya]] [[îranî]].",
umbrella = true,
parents = {{name = "mîtolojî", sort = "îranî"}},
interwiki = {"Iranian mythology"},
aliases = {"Iranian mythology"},
}
labels["mîtolojiya kurdî"] = {
display = "[[mîtolojî|mîtolojiya]] [[kurdî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[mîtolojî|mîtolojiya]] [[kurdî]].",
parents = {{name = "mîtolojî", sort = "kurdî"}},
}
labels["mîtolojiya misrî"] = {
display = "[[mîtolojî|mîtolojiya]] [[misrî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[mîtolojî|mîtolojiya]] [[misrî]].",
parents = {{name = "mîtolojî", sort = "misrî"}},
interwiki = {"Egyptian mythology"},
aliases = {"Egyptian mythology"},
}
labels["mîtolojiya yûnanî"] = {
display = "[[mîtolojî|mîtolojiya]] [[yûnanî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[mîtolojî|mîtolojiya]] [[yûnanî]].",
parents = {{name = "mîtolojî", sort = "yûnanî"}},
interwiki = {"Greek mythology"},
aliases = {"Greek mythology"},
}
labels["mobîlya"] = {
display = "[[mobîlya]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[mobîlya|mobîlyayan]].",
parents = {"mal"},
interwiki = {"furniture"},
aliases = {"furniture"},
}
labels["mode"] = {
display = "[[mode]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[mode|modeyê]].",
parents = {"kultur"},
interwiki = {"fashion"},
aliases = {"fashion"},
}
labels["muzîk"] = {
display = "[[muzîk]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[muzîk]]ê.",
parents = {"lîsteya ferhengan"},
interwiki = {"music"},
aliases = {"mûzîk", "music"},
}
labels["mirov"] = {
display = "[[mirov]]",
topical_categories = true,
description = "default",
parents = {"lîsteya ferhengan"},
umbrella = true,
interwiki = {"human"},
aliases = {"însan", "human"},
}
labels["makîne"] = {
display = "[[makîne]]",
topical_categories = true,
description = "default",
parents = {"teknolojî"},
interwiki = {"machines"},
aliases = {"machines"},
}
labels["mîmarî"] = {
display = "[[mîmarî]]",
topical_categories = true,
description = "default",
parents = {"zanistên sepandî"},
umbrella = true,
interwiki = {"architecture"},
aliases = {"avahîsazî", "architecture"},
}
labels["malper"] = {
display = "[[malper]]",
topical_categories = true,
description = "default",
parents = {"world Wide Web"},
interwiki = {"Websites"},
aliases = {"Websites"},
}
labels["mirin"] = {
display = "[[mirin]]",
topical_categories = true,
description = "default",
parents = {"leş"},
interwiki = {"death"},
aliases = {"death"},
}
labels["muzîsyen"] = {
display = "[[muzîsyen]]",
topical_categories = true,
description = "default",
parents = {"meslek"},
interwiki = {"musicians"},
aliases = {"muzîkvan", "mûzîkvan", "mûzîsyen", "musicians"},
}
labels["miliyet"] = {
display = "[[miliyet]]",
topical_categories = true,
description = "default",
parents = {"kes"},
interwiki = {"Nationalities"},
aliases = {"netewe", "gel", "milet", "milliyet"},
}
labels["nimûne"] = {
-- display = "[[devkî]]",
-- topical_categories = {"devkî"},
description = "Madeyên {{{langname}}} yên ku nimûneya emilandin hatiye dayîn.",
parents = {"zimannasî"},
}
labels["nifş"] = {
display = "[[nifş]]",
topical_categories = true,
description = "default",
parents = {"emir"},
interwiki = {"generations"},
aliases = {"jenerasyon", "generations"},
}
labels["nifir"] = {
display = "[[nifir]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} bi maneya [[nifir|nifirê]].",
parents = {"zimannasî"},
}
labels["neolojîzm"] = {
display = "[[neolojîzm]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} yên bi [[neolojîzm]]ê hatine çêkirin.",
parents = {"etîmolojî", "zimannasî"},
}
labels["navçe"] = {
display = "[[navçe]]",
topical_categories = true,
description = "Navên [[navçe]]yan bi zimanê {{{langname}}}.",
parents = {"erdnîgarî", "serenav"},
interwiki = {"districts"},
aliases = {"districts"},
}
labels["niqteşanî"] = {
display = "[[niqteşanî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[niqteşanî|niqteşaniyê]].",
parents = {{ name = "ziman", sort = " "}},
interwiki = {"punctuation marks"},
aliases = {"punctuation marks"},
}
labels["navgîn"] = {
display = "[[navgîn]]",
topical_categories = true,
description = "default",
parents = {"makîne"},
interwiki = {"vehicles"},
aliases = {"vehicles"},
}
labels["nav"] = {
display = "[[na]]",
topical_categories = true,
description = "default",
parents = {"lîsteya ferhengan"},
interwiki = {"names"},
aliases = {"names"},
}
labels["nivîsîn"] = {
display = "[[nivîsîn]]",
topical_categories = true,
description = "default",
parents = {"ziman"},
umbrella = true,
interwiki = {"writing"},
aliases = {"writing"},
}
labels["nexweşî"] = {
display = "[[nexweşî]]",
topical_categories = true,
description = "default",
parents = {"bijîşkî"},
interwiki = {"diseases"},
aliases = {"êş", "diseases"},
}
labels["neqliyat"] = {
display = "[[neqliyat]]",
topical_categories = true,
description = "default",
parents = {"lîsteya ferhengan"},
interwiki = {"Transport"},
aliases = {"Transport"},
}
labels["ode"] = {
display = "[[ode]]",
topical_categories = true,
description = "default",
parents = {"avahî û pêkhate"},
interwiki = {"rooms"},
aliases = {"jûr", "rooms"},
}
labels["optîk"] = {
display = "[[optîk]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[optîk|optîkê]].",
parents = {"fizîk"},
interwiki = {"optics"},
aliases = {"optics"},
}
labels["okyanûs"] = {
display = "[[okyanûs]]",
topical_categories = true,
description = "Navên [[okyanûs]]yan bi zimanê {{{langname}}}.",
parents = {"erdnîgarî"},
interwiki = {"oceans"},
aliases = {"oceans"},
}
labels["otomotîv"] = {
display = "[[otomotîv]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[otomotîv]]ê.",
parents = {"teknolojî"},
interwiki = {"automotive"},
aliases = {"seyare", "ereba", "automotive"},
}
labels["parzemîn"] = {
display = "[[parzemîn]]",
topical_categories = true,
description = "default",
parents = {"erdnîgarî"},
interwiki = {"continents"},
aliases = {"qita", "continents"},
}
labels["parêzgeh"] = {
display = "[[parêzgeh]]",
topical_categories = true,
description = "Navên parêzgehan bi zimanê {{{langname}}}.",
parents = {"erdnîgarî"},
interwiki = {"Provinces"},
aliases = {"Provinces"},
}
labels["perwerde"] = {
display = "[[perwerde]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[perwerde|perwerdeyê]].",
parents = {"civak"},
interwiki = {"Education"},
aliases = {"pedagogî", "pedagojî", "Education"},
}
labels["psîkolojî"] = {
display = "[[psîkolojî]]",
topical_categories = true,
description = "default",
parents = {"zanist"},
interwiki = {"psychology"},
aliases = {"derûnnasî", "psychology"},
}
labels["psîkyatrî"] = {
display = "[[psîkyatrî]]",
topical_categories = true,
description = "default",
parents = {"bijîşkî"},
interwiki = {"psychiatry"},
aliases = {"psychiatry"},
}
labels["por"] = {
display = "[[por]]",
topical_categories = true,
description = "default",
parents = {"leş"},
interwiki = {"hair"},
aliases = {"hair"},
}
labels["programkirin"] = {
display = "[[programkirin]]",
topical_categories = true,
description = "default",
parents = {"kompûternasî"},
interwiki = {"programming"},
aliases = {"programming"},
}
labels["pêxemberên Îslamê"] = {
display = "[[pêxember|Pêxemberên]] [[Îslam]]ê",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên pêxemberên [[Îslam|Îslamê]].",
parents = {"Îslam"},
interwiki = {"islamic prophets"},
aliases = {"Pêxemberên Îslamê", "islamic prophets"},
}
labels["purîzm"] = {
display = "[[Nimînok:Ferhengok#purîzm|purîzm]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} bi armanca [[:w:Purîzma zimanî|purîzma zimanî]] tên bikaranîn.",
parents = {"zimannasî"},
aliases = {"pûrizm", "pûrîzm"},
}
labels["patolojî"] = {
display = "[[patolojî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} yên di [[patolojî|patolojiyê]], lêkolîna nexweşiyan, de tê bikaranîn",
parents = {"bijîşkî"},
interwiki = {"Pathology"},
aliases = {"Pathology"},
}
labels["pere"] = {
display = "[[pere]]",
topical_categories = true,
description = "default",
parents = {"karsazî"},
interwiki = {"Money"},
aliases = {"dirav", "Money"},
}
labels["proseyên kîmyewî"] = {
display = "[[prose]]yên [[kîmyewî]]",
topical_categories = true,
description = "default",
parents = {"xweza", "kîmya"},
interwiki = {"Chemical processes"},
aliases = {"proseya kîmyewî", "pêvajoyên kîmyewî", "Chemical processes"},
}
labels["ronahî"] = {
display = "[[ronahî]]",
topical_categories = true,
description = "default",
parents = {"enerjî"},
interwiki = {"light"},
aliases = {"light"},
}
labels["rêzimanî"] = {
display = "[[rêzimanî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[rêziman|rêzimanê]].",
parents = {"zimannasî"},
aliases = {"gramer", "grammar"},
interwiki = {"grammar"},
}
labels["remldarî"] = {
display = "[[remldarî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[remldarî|remldariyê]].",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"divination"},
aliases = {"divination"},
}
labels["reng"] = {
display = "[[reng]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[reng|rengan]].",
parents = {"lîsteya ferhengan"},
interwiki = {"Colors"},
aliases = {"Colors"},
}
labels["riwek"] = {
display = "[[gulûgiya]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[gulûgiya]]yan.",
umbrella = true,
parents = {"riweknasî"},
interwiki = {"plants"},
aliases = {"plants", "nebat", "gulûgiya"},
}
labels["riweknasî"] = {
display = "[[riweknasî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[riweknasî|riweknasiyê]].",
umbrella = true,
parents = {"zanist"},
interwiki = {"Botany"},
aliases = {"botanîk", "Botany"},
}
labels["robar"] = {
display = "[[robar]]",
topical_categories = true,
description = "Navên [[robar]]an bi zimanê {{{langname}}}.",
parents = {"erdnîgarî"},
interwiki = {"rivers"},
aliases = {"çem", "rivers"},
}
labels["sosyolojî"] = {
display = "[[sosyolojî]]",
topical_categories = true,
description = "default",
parents = {"zanist"},
interwiki = {"sociology"},
aliases = {"civaknasî", "sociology"},
}
labels["salnameya koçî"] = {
display = "[[salnameya koçî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[salnameya koçî]].",
parents = {"zeman", "îslam"},
interwiki = {"Islamic months"},
aliases = {"Islamic months"},
}
labels["sebze"] = {
display = "[[sebze]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[sebze]]yan.",
parents = {"riwek"},
interwiki = {"Vegetables"},
aliases = {"Vegetables"},
}
labels["siyaset"] = {
display = "[[siyaset]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[siyaset|siyasetê]].",
parents = {"lîsteya ferhengan"},
interwiki = {"politics"},
aliases = {"polîtîka", "politics"},
}
labels["spor"] = {
display = "[[spor]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[spor|sporê]].",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"sports"},
aliases = {"werziş", "werzîş", "sports"},
}
labels["sal"] = {
display = "[[sal]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[sal]]ê.",
parents = {"zeman"},
interwiki = {"years"},
aliases = {"years"},
}
labels["sûc"] = {
display = "[[sûc]]",
topical_categories = true,
description = "default",
parents = {"civak"},
interwiki = {"crime"},
aliases = {"tawan", "crime"},
}
labels["sîstemên nivîsînê"] = {
display = "[[sîstem]]ên [[nivîsîn]]ê",
topical_categories = true,
description = "default",
parents = {"nivîsîn"},
interwiki = {"writing systems"},
aliases = {"writing systems"},
}
labels["şahname"] = {
display = "[[Şahname]]",
topical_categories = true,
description = "Karakter û terimên destana [[Şahname|Şahnameyê]] ya [[:w:Firdewsî|Firdewsî]] bi zimanê {{{langname}}}.",
parents = {"mîtolojiya îranî", "edebiyat", "hunera şiîrê"},
interwiki = {"shahnameh"},
aliases = {"Şahname", "shahnameh"},
}
labels["şîranî"] = {
display = "[[şîranî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[şîranî|şîraniyan]].",
parents = {"xwarin"},
interwiki = {"desserts"},
aliases = {"desserts"},
}
labels["şewat"] = {
display = "[[şewat]]",
topical_categories = true,
description = "default",
parents = {"proseyên kîmyewî"},
umbrella = true,
interwiki = {"Combustion"},
aliases = {"Combustion"},
}
labels["şexsiyet"] = {
display = "[[şexsiyet]]",
topical_categories = true,
description = "default",
parents = {"hiş"},
interwiki = {"personality"},
aliases = {"kesayet", "xû", "xûy", "personality"},
}
labels["tarîx"] = {
display = "[[tarîx]]",
topical_categories = "Dîrok",
aliases = {"history"},
}
labels["teyr"] = {
display = "[[teyr]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} li ser [[candar]]ên mîna [[baz]], [[silêmanê dunikil]] hwd. yên ku [[firîn|difirin]], [[hêk]]an dikin û [[per]] û [[bask]]ên wan hene. [[Wêne:Upupa epops 1 Luc Viatour.jpg|thumb|Teyrek]]",
parents = {"heywan"},
interwiki = {"birds"},
aliases = {"balinde", "birds"},
}
labels["teknolojî"] = {
display = "[[teknolojî]]",
topical_categories = true,
description = "default",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"technology"},
aliases = {"technology"},
}
labels["tenîs"] = {
display = "[[tenîs]]",
topical_categories = true,
description = "default",
parents = {"spor"},
interwiki = {"tennis"},
aliases = {"tennis"},
}
labels["teolojî"] = {
display = "[[teolojî]]",
topical_categories = true,
description = "default",
parents = {"felsefe"},
interwiki = {"theology"},
aliases = {"theology"},
}
labels["tilyak"] = {
display = "[[tilyak]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[cûn]]ên [[tilyak]]an.",
parents = {"lîsteya ferhengan"},
interwiki = {"drugs"},
aliases = {"drugs"},
}
labels["termên teqwîmê"] = {
display = "[[term]]ên [[teqwîm]]ê",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[term]]ên [[teqwîm]]ê.",
parents = {"zeman"},
interwiki = {"calendar terms"},
aliases = {"têgihên teqwîmê", "calendar terms"},
}
labels["toksîkolojî"] = {
display = "[[toksîkolojî]]",
topical_categories = true,
description = "default",
parents = {"bijîşkî"},
interwiki = {"toxicology"},
aliases = {"jehrnasî", "toxicology"},
}
labels["televizyon"] = {
display = "[[televizyon]]",
topical_categories = true,
description = "default",
parents = {"kultur"},
interwiki = {"television"},
aliases = {"television", "televîzyon"},
}
labels["tiyatro"] = {
display = "[[tiyatro]]",
topical_categories = true,
description = "default",
parents = {"huner"},
interwiki = {"Theater"},
aliases = {"şano", "theater"},
}
labels["tenê di çend ferhengan de"] = {
display = "[[tenê]] di çend [[ferheng]]an de",
topical_categories = true,
description = "default",
parents = {"zimannasî"},
aliases = {"tene ferheng", "tenê çend ferhengan de"},
}
labels["vexwarin"] = {
display = "[[vexwarin]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[vexwarin|vexwarinan]].",
parents = {"xwarin û vexwarin"},
interwiki = {"beverages"},
aliases = {"beverages"},
}
labels["vegotinnasî"] = {
display = "[[vegotinnasî]]",
topical_categories = true,
description = "default",
parents = {"edebiyat", "drama"},
interwiki = {"narratology"},
aliases = {"narratology", "vegêrannasî"},
}
labels["wênegirî"] = {
display = "[[wênegirî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[wênegirî|wênegiriyê]].",
parents = {"huner"},
interwiki = {"photography"},
aliases = {"wênekêşî", "photography"},
}
labels["world Wide Web"] = {
display = "[[www]]",
topical_categories = true,
description = "default",
parents = {"înternet"},
umbrella = true,
interwiki = {"World Wide Web"},
aliases = {"www", "World Wide Web", "WWW"},
}
labels["xweza"] = {
display = "[[xweza]]",
topical_categories = true,
description = "default",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"nature"},
aliases = {"sirişt", "sirûşt", "nature"},
}
labels["xwarin û vexwarin"] = {
display = "[[xwarin]] û [[vexwarin]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[xwarin]] û [[vexwarin|vexwarinan]].",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"food and drink"},
aliases = {"food and drink"},
}
labels["xişok"] = {
display = "[[xişok]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} li ser [[candar]]ên ku xwîn sar in, [[hêk]]an dikin, û xwe [[xişandin|dixişînin]] ji bo [[birêveçûn]]ê. [[Wêne:Peninsular Rock Agama (Psammophilus dorsalis) in Hyderabad W IMG 5666.jpg|thumb|Xişokek]]",
parents = {"heywan"},
interwiki = {"reptiles"},
aliases = {"reptiles"},
}
labels["xwarin"] = {
display = "[[xwarin]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[xwarin|xwarinan]].",
parents = {"xwarin û vexwarin"},
interwiki = {"foods"},
aliases = {"foods", "food"},
}
labels["xew"] = {
display = "[[xew]]",
topical_categories = true,
description = "default",
parents = {"leş"},
interwiki = {"Sleep"},
aliases = {"razan", "raketin", "sleep"},
}
labels["zanist"] = {
display = "[[zanist]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[zanist|zanistê]].",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"sciences"},
aliases = {"science", "sciences", "ilm", "îlm"},
}
labels["zeman"] = {
display = "[[zeman]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[zeman|zeman]].",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"time"},
aliases = {"wext", "dem", "time"},
}
labels["zerdeştî"] = {
display = "[[Zerdeştî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên dînê [[Zerdeştî|Zerdeştiyê]].",
parents = {"dîn"},
interwiki = {"Zoroastrianism"},
aliases = {"Zerdeştî", "Zoroastrianism"},
}
labels["ziman"] = {
display = "[[ziman]]",
topical_categories = true,
description = "Navên zimanan bi zimanê {{{langname}}}.",
parents = {"lîsteya ferhengan"},
interwiki = {"languages"},
aliases = {"language"},
}
labels["zimannasî"] = {
display = "[[zimannasî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[zimannasî|zimannasiyê]].",
umbrella = true,
parents = {"zanist"},
interwiki = {"linguistics"},
aliases = {"zimanzanî", "linguistics"},
}
labels["zoolojî"] = {
display = "[[zoolojî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[zoolojî|zoolojiyê]].",
umbrella = true,
parents = {"biyolojî", "zanist"},
interwiki = {"zoology"},
aliases = {"ajalnasî", "heywannasî", "zoology"},
}
labels["zanistên sepandî"] = {
display = "[[zanistên sepandî]]",
topical_categories = true,
description = "default",
parents = {"zanist"},
umbrella = true,
interwiki = {"applied sciences"},
aliases = {"zanista sepandî", "applied sciences"},
}
labels["deprecated label"] = {
aliases = {"emergency", "greekmyth", "industry", "morphology", "musici", "quantum", "vector"},
display = "<span style=\"color:red;\"><b>deprecated label</b></span>",
deprecated = true,
}
return require("Module:labels").finalize_data(labels)
oz3vmmc33fa31lx6dbxzc1eydwkercm
6342684
6342682
2026-08-26T10:55:14Z
Wikihez
7344
6342684
Scribunto
text/plain
local labels = {}
-- bnr. [[Modul:dara kategoriyan/ferhengokkatbike/dane/rêzimanî]]
labels["agir"] = {
display = "[[agir]]",
topical_categories = true,
description = "default",
parents = {"şewat", "çavkaniyên ronahiyê"},
interwiki = {"fire"},
aliases = {"fire"},
}
labels["ajal"] = {
display = "[[ajal]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} li ser heywanên kedîkirî. [[File:Domestic animals livestock.jpg|thumb|ajal]]",
parents = {"heywan"},
interwiki = {"livestock"},
aliases = {"livestock"},
}
labels["aman"] = {
display = "[[aman]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[aman]]an.",
parents = {"amûr", "mitfax", "alavên malê"},
interwiki = {"kitchenware"},
aliases = {"kitchenware"},
}
labels["amûr"] = {
display = "[[amûr]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[amûr]]an.",
parents = {"teknolojî"},
umbrella = true,
interwiki = {"tools"},
aliases = {"tools"},
}
labels["anatomî"] = {
display = "[[anatomî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[anatomî|anatomiyê]].",
parents = {"biyolojî"},
interwiki = {"anatomy"},
aliases = {"anatomy"},
}
labels["antropolojî"] = {
display = "[[antropolojî]]",
topical_categories = true,
description = "default",
parents = {"zoolojî"},
interwiki = {"anthropology"},
aliases = {"mirovnasî", "anthropology"},
}
labels["astrolojî"] = {
display = "[[astrolojî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[astrolojî|astrolojî]].",
parents = {"remldarî"},
interwiki = {"astrology"},
aliases = {"astrology"},
}
labels["avjenî"] = {
display = "[[avjenî]]",
topical_categories = true,
description = "default",
parents = { "spor"},
interwiki = {"swimming"},
aliases = {"swimming"},
}
labels["astronomî"] = {
display = "[[astronomî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[astronomî|astronomiyê]].",
parents = {"zanist"},
interwiki = {"astronomy"},
aliases = {"stêrnasî", "astronomy"},
}
labels["avahî û pêkhate"] = {
display = "[[avahî]] û [[pêkhate]]",
topical_categories = true,
description = "default",
parents = {"mîmarî"},
umbrella = true,
interwiki = {"Buildings and structures"},
aliases = {"Buildings and structures"},
}
labels["avahî"] = {
display = "[[avahî]]",
topical_categories = true,
description = "default",
parents = {"avahî û pêkhate"},
interwiki = {"Buildings"},
aliases = {"bîna", "Buildings"},
}
labels["alavên malê"] = {
display = "[[alav]]ên [[malê]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[alav]]ên [[mal]]ê.",
parents = {"makîne", "mal"},
interwiki = {"home appliances"},
aliases = {"home appliances"},
}
labels["atmosfer"] = {
display = "[[atmosfer]]",
topical_categories = true,
description = "default",
parents = {"xweza"},
interwiki = {"Atmosphere"},
aliases = {"Atmosphere"},
}
labels["alavên muzîkê"] = {
display = "[[muzîk|alava muzîkê]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[alav]]ên [[muzîk]]ê.",
parents = {"amûr", "muzîk"},
interwiki = {"Musical instruments"},
aliases = {"amûrên muzîkê", "amûra muzîkê", "alava muzîkê", "Musical instruments"},
}
labels["astronotîk"] = {
display = "[[astronotîk]]",
topical_categories = true,
description = "default",
parents = {"zanistên sepandî"},
interwiki = {"Astronautics"},
aliases = {"Astronautics"},
}
labels["ba"] = {
display = "[[ba]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[ba]]yê.",
parents = {"hewa"},
interwiki = {"wind"},
aliases = {"wind"},
}
labels["berhemên behrê"] = {
display = "berhemên behrê",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[berhem]]ên [[behr]]ê.",
parents = {"xwarin"},
interwiki = {"seafood"},
aliases = {"seafood"},
}
labels["bajar"] = {
display = "[[bajar]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[bajar]]an.",
parents = {"erdnîgarî", "serenav"},
interwiki = {"cities"},
aliases = {"cities"},
}
labels["basketbol"] = {
display = "[[basketbol]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[basketbol]]ê.",
parents = {"spor"},
interwiki = {"basketball"},
aliases = {"basketball"},
}
labels["bijîşkî"] = {
display = "[[bijîşkî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[bijîşkî|bijîşkiyê]].",
parents = {"zanist"},
interwiki = {"medicine"},
aliases = {"tib", "tibb", "medicine"},
}
labels["biyolojî"] = {
display = "[[biyolojî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[biyolojî|biyolojiyê]].",
umbrella = true,
parents = {"zanist"},
interwiki = {"biology"},
aliases = {"biology"},
}
labels["boks"] = {
display = "[[boks]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên têkildarî [[boks|boksê]].",
parents = {"spor"},
interwiki = {"boxing"},
aliases = {"boxing"},
}
labels["buxik"] = {
display = "[[mêşûmor]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} li ser [[candar]]ên biçûk yên mîna [[mêş]]an yan jê mezintir in lê [[firîn|nafirin]]. [[Wêne:Insekter.jpg|thumb|Hin buxik]]",
parents = {"heywan"},
interwiki = {"insects"},
aliases = {"insects"},
}
labels["behr"] = {
display = "[[behr]]",
topical_categories = true,
description = "default",
parents = {"erdnîgarî"},
interwiki = {"seas"},
aliases = {"derya", "seas"},
}
labels["berf"] = {
display = "[[berf]]",
topical_categories = true,
description = "default",
parents = {"hewa"},
interwiki = {"snow"},
aliases = {"snow"},
}
labels["bazarkarî"] = {
display = "[[bazarkarî]]",
topical_categories = true,
description = "default",
parents = {"karsazî"},
interwiki = {"marketing"},
aliases = {"bazarkerî", "bazarvanî", "marketing"},
}
labels["bac"] = {
display = "[[bac]]",
topical_categories = true,
description = "default",
parents = {"hikûmet", "hiqûq", "pere"},
interwiki = {"taxation"},
aliases = {"backirin", "taxation"},
}
labels["cihûtî"] = {
display = "[[Cihûtî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên dînê [[cihûtî|cihûtiyê]].",
parents = {"dîn"},
interwiki = {"judaism"},
aliases = {"Cihûtî", "judaism"},
}
labels["cilûberg"] = {
display = "[[cilûberg]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[cilûberg]]an.",
parents = {"mirov"},
interwiki = {"clothing"},
aliases = {"clothing"},
}
labels["civak"] = {
display = "[[civak]]",
topical_categories = true,
description = "default",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"society"},
aliases = {"society"},
}
labels["cih"] = {
display = "[[cih]]",
topical_categories = true,
description = "default",
parents = {"nav"},
interwiki = {"places"},
aliases = {"places"},
}
labels["cografya"] = {
display = "[[cografya]]",
topical_categories = "Erdnîgarî",
aliases = {"geography"},
}
labels["çavkaniyên ronahiyê"] = {
display = "[[çavkanî|çavkaniyên]] [[ronahî|ronahiyê]]",
topical_categories = true,
description = "default",
umbrella = true,
parents = {"ronahî"},
interwiki = {"Light sources"},
aliases = {"Light sources"},
}
labels["çandinî"] = {
display = "[[çandinî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[çandinî|çandiniyê]]",
parents = {"lîsteya ferhengan", "kultur"},
interwiki = {"agriculture"},
aliases = {"cotyarî", "agriculture"},
}
labels["çek"] = {
display = "[[çek]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[çek]]an.",
parents = {"leşkerî"},
interwiki = {"weapons"},
aliases = {"weapons"},
}
labels["çiya"] = {
display = "[[çiya]]",
topical_categories = true,
description = "Navên [[çiya]]yan bi zimanê {{{langname}}}.",
parents = {"erdnîgarî"},
interwiki = {"mountains"},
aliases = {"mountains"},
}
labels["Çîn"] = {
display = "[[Çîn]]",
topical_categories = true,
description = "default",
parents = {"dewletên Asyayê", "dewlet"},
interwiki = {"China"},
aliases = {"China"},
}
labels["dinya"] = {
display = "[[dinya]]",
topical_categories = true,
description = "default",
parents = {"xweza"},
interwiki = {"Earth"},
aliases = {"erd", "cîhan", "Earth"},
}
labels["devkî"] = {
display = "[[devkî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} yên ji zimanê standard cuda ne.",
parents = {"zimannasî"},
}
labels["devokî"] = {
display = "[[devokî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} yên [[devokî]] ne.",
parents = {"zimannasî"},
}
labels["dewletên Ewropayê"] = {
display = "[[dewlet]]a [[Ewropa]]yê",
topical_categories = true,
description = "default",
parents = {{name = "dewlet", sort = "Ewropa"}},
interwiki = {"countries in Europe"},
aliases = {"dûgelên Ewropayê", "dûgela Ewropayê", "welata Ewropayê", "welatên Ewropayê", "dewleta Ewropayê", "countries in Europe"},
}
labels["dewletên Asyayê"] = {
display = "[[dewlet]]a [[Asya]]yê",
topical_categories = true,
description = "default",
parents = {{name = "dewlet", sort = "Asya"}},
interwiki = {"countries in Asia"},
aliases = {"dûgelên Asyayê", "dûgela Asyayê", "welata Asyayê", "welatên Asyayê", "dewleta Asyayê", "countries in Asia"},
}
labels["dewletên Afrîkayê"] = {
display = "[[dewlet]]a [[Afrîka]]yê",
topical_categories = true,
description = "default",
parents = {{name = "dewlet", sort = "Afrîka"}},
interwiki = {"countries in Africa"},
aliases = {"dûgelên Afrîkayê", "dûgela Afrîkayê", "welata Afrîkayê", "welatên Afrîkayê", "dewleta Afrîkayê", "countries in Africa"},
}
labels["dar"] = {
display = "[[dar]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[dar]]an.",
parents = {"riwek"},
interwiki = {"trees"},
aliases = {"trees"},
}
labels["dîn"] = {
display = "[[dîn]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[dîn]]î.",
umbrella = true,
parents = {"kultur"},
interwiki = {"religion"},
aliases = {"ol", "olî", "bawerî", "religion"},
}
labels["dîrok"] = {
display = "[[dîrok]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo termên [[tarîx]]ê.",
parents = {"zanist"},
interwiki = {"history"},
}
labels["dewlet"] = {
display = "[[dewlet]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[dewlet]]ên dinyayê.",
parents = {"erdnîgarî", "serenav"},
umbrella = true,
interwiki = {"countries"},
aliases = {"dûgel", "welat", "countries"},
}
labels["dehsal"] = {
display = "[[dehsal]]",
topical_categories = true,
description = "default",
parents = {"termên teqwîmê"},
interwiki = {"Decades"},
aliases = {"Decades"},
}
labels["dewletên Amerîkaya Başûr"] = {
display = "[[dewlet]]a [[Amerîkaya Başûr]]",
topical_categories = true,
description = "default",
parents = {"dewlet"},
interwiki = {"Countries in South America"},
aliases = {"Countries in South America"},
}
labels["deryagerî"] = {
display = "[[deryagerî]]",
topical_categories = true,
description = "default",
parents = {"neqliyat"},
interwiki = {"Nautical"},
aliases = {"Nautical"},
}
labels["demsal"] = {
display = "[[demsal]]",
topical_categories = true,
description = "default",
parents = {"zeman"},
interwiki = {"Seasons"},
aliases = {"Seasons"},
}
labels["drama"] = {
display = "[[drama]]",
topical_categories = true,
description = "default",
parents = {"edebiyat", "tiyatro"},
interwiki = {"drama"},
umbrella = true,
}
labels["enerjî"] = {
display = "[[enerjî]]",
topical_categories = true,
description = "default",
umbrella = true,
parents = {"xweza", "fizîk"},
interwiki = {"energy"},
aliases = {"wize", "energy"},
}
labels["ekonomî"] = {
display = "[[ekonomî]]",
topical_categories = true,
description = "default",
parents = {"zanist"},
interwiki = {"economics"},
aliases = {"fînans", "aborî", "economics"},
}
labels["evîn"] = {
display = "[[evîn]]",
topical_categories = true,
description = "default",
parents = {"hest"},
interwiki = {"love"},
aliases = {"love"},
}
labels["element"] = {
display = "[[element]]",
topical_categories = true,
description = "Navên [[element]]an bi zimanê {{{langname}}}.",
parents = {"kîmya"},
interwiki = {"chemical elements"},
aliases = {"chemical elements"},
}
labels["erdnîgarî"] = {
display = "[[erdnîgarî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[cografya|cografyayê]].",
umbrella = true,
parents = {"zanist"},
interwiki = {"geography"},
}
labels["emir"] = {
display = "[[emir]]",
topical_categories = true,
description = "default",
parents = {"leş"},
umbrella = true,
interwiki = {"age"},
aliases = {"age"},
}
labels["elektrîk"] = {
display = "[[elektrîk]]",
topical_categories = true,
description = "default",
parents = {"fizîk"},
interwiki = {"electricity"},
aliases = {"kareba", "kehreba", "electricity"},
}
labels["edebiyat"] = {
display = "[[edebiyat]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[edebiyat|edebiyatê]].",
umbrella = true,
parents = {"kultur"},
interwiki = {"literature"},
aliases = {"wêje", "literature"},
}
labels["formên kevnbûyî"] = {
display = "[[formên kevnbûyî]]",
topical_categories = true,
description = "Formên kevnbûyî yên kelîmeyên {{{langname}}}.",
parents = {"zimannasî"},
}
labels["fêkî"] = {
display = "[[fêkî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[fêkî|fêkiyan]].",
parents = {"riwek"},
interwiki = {"fruits"},
aliases = {"fruits"},
}
labels["felsefe"] = {
display = "[[felsefe]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[felsefe|felsefeyê]].",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"philosophy"},
aliases = {"philosophy"},
}
labels["femînîzm"] = {
display = "[[femînîzm]]",
topical_categories = true,
description = "default",
parents = {"siyaset"},
interwiki = {"feminism"},
aliases = {"feminism"},
}
labels["fizîk"] = {
display = "[[fizîk]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[fizîk|fizîkê]].",
umbrella = true,
parents = {"zanist"},
interwiki = {"physics"},
aliases = {"fîzîk", "physics"},
}
labels["futbol"] = {
display = "[[futbol]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[futbol|futbolê]].",
parents = {"spor"},
interwiki = {"football"},
aliases = {"football"},
}
labels["fîzyolojî"] = {
display = "[[fîzyolojî]]",
topical_categories = true,
description = "default",
parents = {"biyolojî"},
interwiki = {"Physiology"},
aliases = {"fizyolojî", "Physiology"},
}
labels["fîlm"] = {
display = "[[fîlm]]",
topical_categories = true,
description = "default",
parents = {"huner"},
interwiki = {"Film"},
aliases = {"film", "sînema", "Film"},
}
labels["folklor"] = {
display = "[[folklor]]",
topical_categories = true,
description = "default",
parents = {"kultur"},
interwiki = {"folklore"},
aliases = {"folklore", "zargotin"},
}
labels["guhandar"] = {
display = "[[guhandar]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} li ser [[candar]]ên guhanên wan hene. [[Wêne:Goat kid feeding on mothers milk.jpg|thumb|Hin heywanên guhandar]]",
parents = {"heywan"},
interwiki = {"mammals"},
aliases = {"mammals"},
}
labels["gund"] = {
display = "[[gund]]",
topical_categories = true,
description = "Navên [[gund]]an bi zimanê {{{langname}}}.",
parents = {"erdnîgarî", "serenav"},
interwiki = {"villages"},
aliases = {"villages"},
}
labels["hest"] = {
display = "[[hest]]",
topical_categories = true,
description = "default",
parents = {"hiş"},
interwiki = {"emotions"},
aliases = {"emotions"},
}
labels["hiş"] = {
display = "[[hiş]]",
topical_categories = true,
description = "default",
parents = {"leş"},
interwiki = {"mind"},
aliases = {"mind"},
}
labels["hemû mijar"] = {
description = "Hemû mijarên zimanê {{{langname}}}.",
parents = {{name = "lîsteya ferhengan", sort = " "}},
umbrella = true,
interwiki = {"list of topics"},
aliases = {"list of topics"},
}
labels["herêm"] = {
display = "[[herêm]]",
topical_categories = true,
description = "Navên [[herêm]]an bi zimanê {{{langname}}}.",
parents = {"erdnîgarî"},
}
labels["hevdeng"] = {
description = "Kelîmeyên {{{langname}}} yên wek hev bên gotin.",
parents = {"zimannasî"},
}
labels["hewa"] = {
display = "[[hewa]]",
topical_categories = true,
description = "default",
parents = {"atmosfer"},
umbrella = true,
interwiki = {"weather"},
aliases = {"rewşa hewayê", "weather"},
}
labels["hiqûq"] = {
display = "[[hiqûq]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[hiqûq]]ê.",
parents = {"civak"},
interwiki = {"law"},
aliases = {"qanûn", "qanûnî", "dad", "legal", "yasayî", "dadnasî", "law"},
}
labels["hewavanî"] = {
display = "[[hewavanî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[hewavanî|hewavaniyê]].",
parents = {"zanist"},
interwiki = {"aviation"},
aliases = {"hewagerî", "aviation"},
}
labels["heywan"] = {
display = "[[heywan]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[heywan]]an.",
umbrella = true,
parents = {"jîndar"},
interwiki = {"animals"},
aliases = {"animals"},
}
labels["hinduîzm"] = {
display = "[[Hinduîzm]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên dînê [[Hinduîzm|Hinduîzmê]].",
parents = {"dîn"},
interwiki = {"hinduism"},
aliases = {"Hinduîzm", "hinduism"},
}
labels["huner"] = {
display = "[[huner]]",
topical_categories = true,
description = "default",
parents = {"kultur"},
interwiki = {"art"},
aliases = {"art"},
}
labels["hunera şiîrê"] = {
display = "[[huner]]a [[şiîr]]ê",
topical_categories = true,
description = "default",
interwiki = {"Poetry"},
parents = {"edebiyat"},
aliases = {"şiîr", "şi'r", "poetry", "helbest", "helbestvanî", "nezm"},
}
labels["hikûmet"] = {
display = "[[hikûmet]]",
topical_categories = true,
description = "default",
parents = {"civak", "siyaset"},
umbrella = true,
interwiki = {"Government"},
aliases = {"hikumet", "Government"},
}
labels["informatîk"] = {
display = "[[enformatîk]]",
topical_categories = true, --informatîk beralî dike enformatîk??
description = "Kelîmeyên {{{langname}}} ji bo terimên [[informatîk|informatîkê]].",
umbrella = true,
parents = {"teknolojî"},
aliases = {"enformatîk"},
}
labels["Israîl"] = {
display = "[[Israîl]]",
topical_categories = true,
description = "default",
parents = {"dewletên Asyayê", "dewlet"},
interwiki = {"Israel"},
aliases = {"Îsraêl", "Israel"},
}
labels["înternet"] = {
display = "[[înternet]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[înternet|înternetê]].",
parents = {"kompûternasî"},
interwiki = {"internet"},
aliases = {"internet"},
}
labels["îslam"] = {
display = "[[Îslam]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên dînê [[Îslam|Îslamê]].",
umbrella = true,
parents = {"dîn"},
interwiki = {"islam"},
aliases = {"Îslam", "islam"},
}
labels["îdeolojî"] = {
display = "[[îdeolojî]]",
topical_categories = true,
description = "default",
parents = {"civak"},
interwiki = {"ideologies"},
aliases = {"ideologies"},
}
labels["jîndar"] = {
display = "[[jîndar]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[jîndar]]an.",
umbrella = true,
parents = {"xweza"},
interwiki = {"lifeforms"},
aliases = {"lifeforms"},
}
labels["jeolojî"] = {
display = "[[jeolojî]]",
topical_categories = true,
description = "default",
parents = {"zanist"},
interwiki = {"geology"},
aliases = {"geology"},
}
labels["japonî"] = {
display = "[[japonî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî zimanê [[japonî]].",
parents = {"ziman"},
interwiki = {"japanese"},
aliases = {"japanese"},
}
labels["kultur"] = {
display = "[[kultur]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ên eleqadarî [[kultur|kultura]] mirovahiyê.",
umbrella = true,
parents = {"civak"},
interwiki = {"culture"},
aliases = {"çande", "çand", "culture"},
}
labels["kar"] = {
display = "[[kar]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[kar|karî]].",
umbrella = true,
parents = {"lîsteya ferhengan"},
}
labels["karsazî"] = {
display = "[[karsazî]]",
topical_categories = true,
description = "default",
umbrella = true,
parents = {{name = "ekonomî", sort = " "}},
interwiki = {"business"},
aliases = {"business"},
}
labels["kîmya"] = {
display = "[[kîmya]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[kîmya|kîmyayê]].",
umbrella = true,
parents = {"zanist"},
interwiki = {"chemistry"},
aliases = {"chemistry"},
}
labels["kişik"] = {
display = "[[kişik]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[kişik|kişikê]].",
parents = {"lîstik"},
interwiki = {"chess"},
aliases = {"setrenc", "setranc", "şetrenc", "satranc", "chess"},
}
labels["kompûternasî"] = {
display = "[[kompûternasî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[kompûternasî|kompûternasiyê]].",
parents = {"teknolojî", "zanist"},
interwiki = {"computing"},
aliases = {"komputer", "kompûter", "computing"},
}
labels["kulîlk"] = {
display = "[[kulîlk]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[kulîlk]]an.",
parents = {"riwek"},
interwiki = {"flowers"},
aliases = {"flowers"},
}
labels["kes"] = {
display = "[[kes]]",
topical_categories = true,
description = "default",
parents = {"mirov"},
interwiki = {"people"},
aliases = {"people"},
}
labels["kitêb"] = {
display = "[[kitêb]]",
topical_categories = true,
description = "default",
parents = {"edebiyat"},
interwiki = {"Books"},
aliases = {"pirtûk"},
}
labels["lîsteya ferhengan"] = {
--alltopics
description = "Kelîmeyên {{{langname}}} li gorî mijarên mîna \"Xwarin\" an \"Zanist\".",
parents = {{template = "zimankatbike", sort = "ferhengok"}},
umbrella = true,
inSerkategori = true,
interwiki = {"All topics"},
aliases = {"All topics"},
}
labels["leşkerî"] = {
display = "[[leşkerî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[leşkerî|leşkeriyê]].",
umbrella = true,
parents = {"civak"},
interwiki = {"military"},
aliases = {"military"},
}
labels["lîstik"] = {
display = "[[lîstik]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[lîstik|lîstikan]].",
umbrella = true,
parents = {"lîsteya ferhengan", "kultur"},
interwiki = {"games"},
aliases = {"games"},
}
labels["lîstikên vîdeoyî"] = {
display = "[[lîstik]]ên [[vîdeo]]yî",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[lîstik]]ên [[vîdeo]]yî.",
parents = {{name = "lîstik", sort = "vîdeoyî"}, "informatîk"},
interwiki = {"video games"},
aliases = {"video games"},
}
labels["lîstikên zarokan"] = {
display = "[[lîstik]]a [[zarok]]an",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[lîstik|lîstik]]ên [[zarok]]an.",
parents = {{name = "lîstik", sort = "zarok"}},
interwiki = {"children's games"},
aliases = {"lîstika zarokan", "children's games"},
}
labels["leş"] = {
display = "[[leş]]",
topical_categories = true,
description = "default",
parents = {"lîsteya ferhengan"},
umbrella = true,
interwiki = {"body"},
aliases = {"wicûd", "body"},
}
labels["meteorolojî"] = {
display = "[[meteorolojî]]",
topical_categories = true,
description = "default",
parents = {"zanist", "atmosfer"},
interwiki = {"Meteorology"},
aliases = {"hewanasî", "Meteorology"},
}
labels["metonîm"] = {
display = "[[metonîm]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} yên ku bi eslê xwe ve tê gotin ku tiştek an têgihek ne bi navê xwe, lê bi navê tiştekî ku ji nêz ve bi wî tişt an têgihê re têkildar e.",
parents = {"etîmolojî", "zimannasî"},
}
labels["mitfax"] = {
display = "[[mitfax]]",
topical_categories = true,
description = "default",
parents = {"ode"},
interwiki = {"kitchen"},
aliases = {"kulîn", "metbex", "kitchen"},
}
labels["mal"] = {
display = "[[mal]]",
topical_categories = true,
description = "default",
umbrella = true,
parents = {"civak"},
interwiki = {"home"},
aliases = {"home"},
}
labels["malbat"] = {
display = "[[malbat]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo endamên [[malbat]]ê.",
parents = {"mirov"},
interwiki = {"family"},
aliases = {"family"},
}
labels["masî"] = {
display = "[[masî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} li ser [[heywan]]ên [[avî]] yên ku [[karîn|nikarin]] li [[ziwayî|ziwayiyan]] bi[[jîn]]. [[Wêne:Gullfiskur.jpg|thumb|Masiyek]]",
parents = {"heywan"},
interwiki = {"fish"},
aliases = {"fish"},
}
labels["matematîk"] = {
display = "[[matematîk]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[matematîk]]ê.",
parents = {"zanist"},
interwiki = {"mathematics"},
aliases = {"geometrî", "bîrkarî", "mathematics"},
}
labels["mehên salê"] = {
display = "[[mehên salê]]",
topical_categories = true,
description = "Navên mehên salê bi zimanê {{{langname}}}.",
umbrella = true,
parents = {"zeman"},
interwiki = {"months"},
aliases = {"months"},
}
labels["mekanîk"] = {
display = "[[mekanîk]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[mekanîk|mekanîkê]].",
parents = {"fizîk"},
interwiki = {"mechanics"},
aliases = {"mechanics"},
}
labels["mesîhî"] = {
display = "[[Mesîhî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên dînê [[Mesîhî|Mesîhiyê]].",
parents = {"dîn"},
interwiki = {"christianity"},
aliases = {"filetî", "Mesîhî", "Xiristiyanî", "xiristiyanî", "christianity"},
}
labels["meslek"] = {
display = "[[meslek]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[pîşe|pîşeyan]].",
parents = {"kar"},
umbrella = true,
interwiki = {"occupations"},
aliases = {"pîşe", "occupations"},
}
labels["metrolojî"] = {
display = "[[metrolojî]]",
topical_categories = true,
description = "default",
umbrella = true,
parents = {"zanist"},
interwiki = {"metrology"},
aliases = {"metrology"},
}
labels["mîtolojî"] = {
display = "[[mîtolojî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[mîtolojî|mîtolojiyê]].",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"mythology"},
aliases = {"mythology"},
}
labels["mîtolojiya ermenî"] = {
display = "[[mîtolojî|mîtolojiya]] [[ermenî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[mîtolojî|mîtolojiya]] [[ermenî]].",
parents = {{name = "mîtolojî", sort = "ermenî"}},
interwiki = {"Armenian mythology"},
aliases = {"Armenian mythology"},
}
labels["mîtolojiya îranî"] = {
display = "[[mîtolojî|mîtolojiya]] [[îranî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[mîtolojî|mîtolojiya]] [[îranî]].",
umbrella = true,
parents = {{name = "mîtolojî", sort = "îranî"}},
interwiki = {"Iranian mythology"},
aliases = {"Iranian mythology"},
}
labels["mîtolojiya kurdî"] = {
display = "[[mîtolojî|mîtolojiya]] [[kurdî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[mîtolojî|mîtolojiya]] [[kurdî]].",
parents = {{name = "mîtolojî", sort = "kurdî"}},
}
labels["mîtolojiya misrî"] = {
display = "[[mîtolojî|mîtolojiya]] [[misrî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[mîtolojî|mîtolojiya]] [[misrî]].",
parents = {{name = "mîtolojî", sort = "misrî"}},
interwiki = {"Egyptian mythology"},
aliases = {"Egyptian mythology"},
}
labels["mîtolojiya yûnanî"] = {
display = "[[mîtolojî|mîtolojiya]] [[yûnanî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[mîtolojî|mîtolojiya]] [[yûnanî]].",
parents = {{name = "mîtolojî", sort = "yûnanî"}},
interwiki = {"Greek mythology"},
aliases = {"Greek mythology"},
}
labels["mobîlya"] = {
display = "[[mobîlya]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[mobîlya|mobîlyayan]].",
parents = {"mal"},
interwiki = {"furniture"},
aliases = {"furniture"},
}
labels["mode"] = {
display = "[[mode]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[mode|modeyê]].",
parents = {"kultur"},
interwiki = {"fashion"},
aliases = {"fashion"},
}
labels["muzîk"] = {
display = "[[muzîk]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[muzîk]]ê.",
parents = {"lîsteya ferhengan"},
interwiki = {"music"},
aliases = {"mûzîk", "music"},
}
labels["mirov"] = {
display = "[[mirov]]",
topical_categories = true,
description = "default",
parents = {"lîsteya ferhengan"},
umbrella = true,
interwiki = {"human"},
aliases = {"însan", "human"},
}
labels["makîne"] = {
display = "[[makîne]]",
topical_categories = true,
description = "default",
parents = {"teknolojî"},
interwiki = {"machines"},
aliases = {"machines"},
}
labels["mîmarî"] = {
display = "[[mîmarî]]",
topical_categories = true,
description = "default",
parents = {"zanistên sepandî"},
umbrella = true,
interwiki = {"architecture"},
aliases = {"avahîsazî", "architecture"},
}
labels["malper"] = {
display = "[[malper]]",
topical_categories = true,
description = "default",
parents = {"world Wide Web"},
interwiki = {"Websites"},
aliases = {"Websites"},
}
labels["mirin"] = {
display = "[[mirin]]",
topical_categories = true,
description = "default",
parents = {"leş"},
interwiki = {"death"},
aliases = {"death"},
}
labels["muzîsyen"] = {
display = "[[muzîsyen]]",
topical_categories = true,
description = "default",
parents = {"meslek"},
interwiki = {"musicians"},
aliases = {"muzîkvan", "mûzîkvan", "mûzîsyen", "musicians"},
}
labels["miliyet"] = {
display = "[[miliyet]]",
topical_categories = true,
description = "default",
parents = {"kes"},
interwiki = {"Nationalities"},
aliases = {"netewe", "gel", "milet", "milliyet"},
}
labels["nimûne"] = {
-- display = "[[devkî]]",
-- topical_categories = {"devkî"},
description = "Madeyên {{{langname}}} yên ku nimûneya emilandin hatiye dayîn.",
parents = {"zimannasî"},
}
labels["nifş"] = {
display = "[[nifş]]",
topical_categories = true,
description = "default",
parents = {"emir"},
interwiki = {"generations"},
aliases = {"jenerasyon", "generations"},
}
labels["nifir"] = {
display = "[[nifir]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} bi maneya [[nifir|nifirê]].",
parents = {"zimannasî"},
}
labels["neolojîzm"] = {
display = "[[neolojîzm]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} yên bi [[neolojîzm]]ê hatine çêkirin.",
parents = {"etîmolojî", "zimannasî"},
}
labels["navçe"] = {
display = "[[navçe]]",
topical_categories = true,
description = "Navên [[navçe]]yan bi zimanê {{{langname}}}.",
parents = {"erdnîgarî", "serenav"},
interwiki = {"districts"},
aliases = {"districts"},
}
labels["niqteşanî"] = {
display = "[[niqteşanî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[niqteşanî|niqteşaniyê]].",
parents = {{ name = "ziman", sort = " "}},
interwiki = {"punctuation marks"},
aliases = {"punctuation marks"},
}
labels["navgîn"] = {
display = "[[navgîn]]",
topical_categories = true,
description = "default",
parents = {"makîne"},
interwiki = {"vehicles"},
aliases = {"vehicles"},
}
labels["nav"] = {
display = "[[na]]",
topical_categories = true,
description = "default",
parents = {"lîsteya ferhengan"},
interwiki = {"names"},
aliases = {"names"},
}
labels["nivîsîn"] = {
display = "[[nivîsîn]]",
topical_categories = true,
description = "default",
parents = {"ziman"},
umbrella = true,
interwiki = {"writing"},
aliases = {"writing"},
}
labels["nexweşî"] = {
display = "[[nexweşî]]",
topical_categories = true,
description = "default",
parents = {"bijîşkî"},
interwiki = {"diseases"},
aliases = {"êş", "diseases"},
}
labels["neqliyat"] = {
display = "[[neqliyat]]",
topical_categories = true,
description = "default",
parents = {"lîsteya ferhengan"},
interwiki = {"Transport"},
aliases = {"Transport"},
}
labels["ode"] = {
display = "[[ode]]",
topical_categories = true,
description = "default",
parents = {"avahî û pêkhate"},
interwiki = {"rooms"},
aliases = {"jûr", "rooms"},
}
labels["optîk"] = {
display = "[[optîk]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[optîk|optîkê]].",
parents = {"fizîk"},
interwiki = {"optics"},
aliases = {"optics"},
}
labels["okyanûs"] = {
display = "[[okyanûs]]",
topical_categories = true,
description = "Navên [[okyanûs]]yan bi zimanê {{{langname}}}.",
parents = {"erdnîgarî"},
interwiki = {"oceans"},
aliases = {"oceans"},
}
labels["otomotîv"] = {
display = "[[otomotîv]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[otomotîv]]ê.",
parents = {"teknolojî"},
interwiki = {"automotive"},
aliases = {"seyare", "ereba", "automotive"},
}
labels["parzemîn"] = {
display = "[[parzemîn]]",
topical_categories = true,
description = "default",
parents = {"erdnîgarî"},
interwiki = {"continents"},
aliases = {"qita", "continents"},
}
labels["parêzgeh"] = {
display = "[[parêzgeh]]",
topical_categories = true,
description = "Navên parêzgehan bi zimanê {{{langname}}}.",
parents = {"erdnîgarî"},
interwiki = {"Provinces"},
aliases = {"Provinces"},
}
labels["perwerde"] = {
display = "[[perwerde]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[perwerde|perwerdeyê]].",
parents = {"civak"},
interwiki = {"Education"},
aliases = {"pedagogî", "pedagojî", "Education"},
}
labels["psîkolojî"] = {
display = "[[psîkolojî]]",
topical_categories = true,
description = "default",
parents = {"zanist"},
interwiki = {"psychology"},
aliases = {"derûnnasî", "psychology"},
}
labels["psîkyatrî"] = {
display = "[[psîkyatrî]]",
topical_categories = true,
description = "default",
parents = {"bijîşkî"},
interwiki = {"psychiatry"},
aliases = {"psychiatry"},
}
labels["por"] = {
display = "[[por]]",
topical_categories = true,
description = "default",
parents = {"leş"},
interwiki = {"hair"},
aliases = {"hair"},
}
labels["programkirin"] = {
display = "[[programkirin]]",
topical_categories = true,
description = "default",
parents = {"kompûternasî"},
interwiki = {"programming"},
aliases = {"programming"},
}
labels["pêxemberên Îslamê"] = {
display = "[[pêxember|Pêxemberên]] [[Îslam]]ê",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên pêxemberên [[Îslam|Îslamê]].",
parents = {"Îslam"},
interwiki = {"islamic prophets"},
aliases = {"Pêxemberên Îslamê", "islamic prophets"},
}
labels["purîzm"] = {
display = "[[Nimînok:Ferhengok#purîzm|purîzm]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} bi armanca [[:w:Purîzma zimanî|purîzma zimanî]] tên bikaranîn.",
parents = {"zimannasî"},
aliases = {"pûrizm", "pûrîzm"},
}
labels["patolojî"] = {
display = "[[patolojî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} yên di [[patolojî|patolojiyê]], lêkolîna nexweşiyan, de tê bikaranîn",
parents = {"bijîşkî"},
interwiki = {"Pathology"},
aliases = {"Pathology"},
}
labels["pere"] = {
display = "[[pere]]",
topical_categories = true,
description = "default",
parents = {"karsazî"},
interwiki = {"Money"},
aliases = {"dirav", "Money"},
}
labels["proseyên kîmyewî"] = {
display = "[[prose]]yên [[kîmyewî]]",
topical_categories = true,
description = "default",
parents = {"xweza", "kîmya"},
interwiki = {"Chemical processes"},
aliases = {"proseya kîmyewî", "pêvajoyên kîmyewî", "Chemical processes"},
}
labels["ronahî"] = {
display = "[[ronahî]]",
topical_categories = true,
description = "default",
parents = {"enerjî"},
interwiki = {"light"},
aliases = {"light"},
}
labels["rêzimanî"] = {
display = "[[rêzimanî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[rêziman|rêzimanê]].",
parents = {"zimannasî"},
aliases = {"gramer", "grammar"},
interwiki = {"grammar"},
}
labels["remldarî"] = {
display = "[[remldarî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[remldarî|remldariyê]].",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"divination"},
aliases = {"divination"},
}
labels["reng"] = {
display = "[[reng]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[reng|rengan]].",
parents = {"lîsteya ferhengan"},
interwiki = {"Colors"},
aliases = {"Colors"},
}
labels["riwek"] = {
display = "[[gulûgiya]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo navên [[gulûgiya]]yan.",
umbrella = true,
parents = {"riweknasî"},
interwiki = {"plants"},
aliases = {"plants", "nebat", "gulûgiya"},
}
labels["riweknasî"] = {
display = "[[riweknasî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[riweknasî|riweknasiyê]].",
umbrella = true,
parents = {"zanist"},
interwiki = {"Botany"},
aliases = {"botanîk", "Botany"},
}
labels["robar"] = {
display = "[[robar]]",
topical_categories = true,
description = "Navên [[robar]]an bi zimanê {{{langname}}}.",
parents = {"erdnîgarî"},
interwiki = {"rivers"},
aliases = {"çem", "rivers"},
}
labels["sosyolojî"] = {
display = "[[sosyolojî]]",
topical_categories = true,
description = "default",
parents = {"zanist"},
interwiki = {"sociology"},
aliases = {"civaknasî", "sociology"},
}
labels["salnameya koçî"] = {
display = "[[salnameya koçî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[salnameya koçî]].",
parents = {"zeman", "îslam"},
interwiki = {"Islamic months"},
aliases = {"Islamic months"},
}
labels["sebze"] = {
display = "[[sebze]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[sebze]]yan.",
parents = {"riwek"},
interwiki = {"Vegetables"},
aliases = {"Vegetables"},
}
labels["siyaset"] = {
display = "[[siyaset]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[siyaset|siyasetê]].",
parents = {"lîsteya ferhengan"},
interwiki = {"politics"},
aliases = {"polîtîka", "politics"},
}
labels["spor"] = {
display = "[[spor]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[spor|sporê]].",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"sports"},
aliases = {"werziş", "werzîş", "sports"},
}
labels["sal"] = {
display = "[[sal]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[sal]]ê.",
parents = {"zeman"},
interwiki = {"years"},
aliases = {"years"},
}
labels["sûc"] = {
display = "[[sûc]]",
topical_categories = true,
description = "default",
parents = {"civak"},
interwiki = {"crime"},
aliases = {"tawan", "crime"},
}
labels["sîstemên nivîsînê"] = {
display = "[[sîstem]]ên [[nivîsîn]]ê",
topical_categories = true,
description = "default",
parents = {"nivîsîn"},
interwiki = {"writing systems"},
aliases = {"writing systems"},
}
labels["şahname"] = {
display = "[[Şahname]]",
topical_categories = true,
description = "Karakter û terimên destana [[Şahname|Şahnameyê]] ya [[:w:Firdewsî|Firdewsî]] bi zimanê {{{langname}}}.",
parents = {"mîtolojiya îranî", "edebiyat", "hunera şiîrê"},
interwiki = {"shahnameh"},
aliases = {"Şahname", "shahnameh"},
}
labels["şîranî"] = {
display = "[[şîranî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[şîranî|şîraniyan]].",
parents = {"xwarin"},
interwiki = {"desserts"},
aliases = {"desserts"},
}
labels["şewat"] = {
display = "[[şewat]]",
topical_categories = true,
description = "default",
parents = {"proseyên kîmyewî"},
umbrella = true,
interwiki = {"Combustion"},
aliases = {"Combustion"},
}
labels["şexsiyet"] = {
display = "[[şexsiyet]]",
topical_categories = true,
description = "default",
parents = {"hiş"},
interwiki = {"personality"},
aliases = {"kesayet", "xû", "xûy", "personality"},
}
labels["tarîx"] = {
display = "[[tarîx]]",
topical_categories = "Dîrok",
aliases = {"history"},
}
labels["teyr"] = {
display = "[[teyr]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} li ser [[candar]]ên mîna [[baz]], [[silêmanê dunikil]] hwd. yên ku [[firîn|difirin]], [[hêk]]an dikin û [[per]] û [[bask]]ên wan hene. [[Wêne:Upupa epops 1 Luc Viatour.jpg|thumb|Teyrek]]",
parents = {"heywan"},
interwiki = {"birds"},
aliases = {"balinde", "birds"},
}
labels["teknolojî"] = {
display = "[[teknolojî]]",
topical_categories = true,
description = "default",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"technology"},
aliases = {"technology"},
}
labels["tenîs"] = {
display = "[[tenîs]]",
topical_categories = true,
description = "default",
parents = {"spor"},
interwiki = {"tennis"},
aliases = {"tennis"},
}
labels["teolojî"] = {
display = "[[teolojî]]",
topical_categories = true,
description = "default",
parents = {"felsefe"},
interwiki = {"theology"},
aliases = {"theology"},
}
labels["tilyak"] = {
display = "[[tilyak]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[cûn]]ên [[tilyak]]an.",
parents = {"lîsteya ferhengan"},
interwiki = {"drugs"},
aliases = {"drugs"},
}
labels["termên teqwîmê"] = {
display = "[[term]]ên [[teqwîm]]ê",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[term]]ên [[teqwîm]]ê.",
parents = {"zeman"},
interwiki = {"calendar terms"},
aliases = {"têgihên teqwîmê", "calendar terms"},
}
labels["toksîkolojî"] = {
display = "[[toksîkolojî]]",
topical_categories = true,
description = "default",
parents = {"bijîşkî"},
interwiki = {"toxicology"},
aliases = {"jehrnasî", "toxicology"},
}
labels["televizyon"] = {
display = "[[televizyon]]",
topical_categories = true,
description = "default",
parents = {"kultur"},
interwiki = {"television"},
aliases = {"television", "televîzyon"},
}
labels["tiyatro"] = {
display = "[[tiyatro]]",
topical_categories = true,
description = "default",
parents = {"huner"},
interwiki = {"Theater"},
aliases = {"şano", "theater"},
}
labels["tenê di çend ferhengan de"] = {
display = "[[tenê]] di çend [[ferheng]]an de",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} yên ku tenê di çend ferhengan de derbas dibin.",
parents = {"zimannasî"},
aliases = {"tene ferheng", "tenê çend ferhengan de"},
}
labels["vexwarin"] = {
display = "[[vexwarin]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[vexwarin|vexwarinan]].",
parents = {"xwarin û vexwarin"},
interwiki = {"beverages"},
aliases = {"beverages"},
}
labels["vegotinnasî"] = {
display = "[[vegotinnasî]]",
topical_categories = true,
description = "default",
parents = {"edebiyat", "drama"},
interwiki = {"narratology"},
aliases = {"narratology", "vegêrannasî"},
}
labels["wênegirî"] = {
display = "[[wênegirî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[wênegirî|wênegiriyê]].",
parents = {"huner"},
interwiki = {"photography"},
aliases = {"wênekêşî", "photography"},
}
labels["world Wide Web"] = {
display = "[[www]]",
topical_categories = true,
description = "default",
parents = {"înternet"},
umbrella = true,
interwiki = {"World Wide Web"},
aliases = {"www", "World Wide Web", "WWW"},
}
labels["xweza"] = {
display = "[[xweza]]",
topical_categories = true,
description = "default",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"nature"},
aliases = {"sirişt", "sirûşt", "nature"},
}
labels["xwarin û vexwarin"] = {
display = "[[xwarin]] û [[vexwarin]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[xwarin]] û [[vexwarin|vexwarinan]].",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"food and drink"},
aliases = {"food and drink"},
}
labels["xişok"] = {
display = "[[xişok]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} li ser [[candar]]ên ku xwîn sar in, [[hêk]]an dikin, û xwe [[xişandin|dixişînin]] ji bo [[birêveçûn]]ê. [[Wêne:Peninsular Rock Agama (Psammophilus dorsalis) in Hyderabad W IMG 5666.jpg|thumb|Xişokek]]",
parents = {"heywan"},
interwiki = {"reptiles"},
aliases = {"reptiles"},
}
labels["xwarin"] = {
display = "[[xwarin]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo [[xwarin|xwarinan]].",
parents = {"xwarin û vexwarin"},
interwiki = {"foods"},
aliases = {"foods", "food"},
}
labels["xew"] = {
display = "[[xew]]",
topical_categories = true,
description = "default",
parents = {"leş"},
interwiki = {"Sleep"},
aliases = {"razan", "raketin", "sleep"},
}
labels["zanist"] = {
display = "[[zanist]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[zanist|zanistê]].",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"sciences"},
aliases = {"science", "sciences", "ilm", "îlm"},
}
labels["zeman"] = {
display = "[[zeman]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[zeman|zeman]].",
umbrella = true,
parents = {"lîsteya ferhengan"},
interwiki = {"time"},
aliases = {"wext", "dem", "time"},
}
labels["zerdeştî"] = {
display = "[[Zerdeştî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên dînê [[Zerdeştî|Zerdeştiyê]].",
parents = {"dîn"},
interwiki = {"Zoroastrianism"},
aliases = {"Zerdeştî", "Zoroastrianism"},
}
labels["ziman"] = {
display = "[[ziman]]",
topical_categories = true,
description = "Navên zimanan bi zimanê {{{langname}}}.",
parents = {"lîsteya ferhengan"},
interwiki = {"languages"},
aliases = {"language"},
}
labels["zimannasî"] = {
display = "[[zimannasî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} ji bo terimên [[zimannasî|zimannasiyê]].",
umbrella = true,
parents = {"zanist"},
interwiki = {"linguistics"},
aliases = {"zimanzanî", "linguistics"},
}
labels["zoolojî"] = {
display = "[[zoolojî]]",
topical_categories = true,
description = "Kelîmeyên {{{langname}}} têkildarî [[zoolojî|zoolojiyê]].",
umbrella = true,
parents = {"biyolojî", "zanist"},
interwiki = {"zoology"},
aliases = {"ajalnasî", "heywannasî", "zoology"},
}
labels["zanistên sepandî"] = {
display = "[[zanistên sepandî]]",
topical_categories = true,
description = "default",
parents = {"zanist"},
umbrella = true,
interwiki = {"applied sciences"},
aliases = {"zanista sepandî", "applied sciences"},
}
labels["deprecated label"] = {
aliases = {"emergency", "greekmyth", "industry", "morphology", "musici", "quantum", "vector"},
display = "<span style=\"color:red;\"><b>deprecated label</b></span>",
deprecated = true,
}
return require("Module:labels").finalize_data(labels)
tmqcqe8auf1idp9s37jx08u2zi4oj23
joyride
0
970830
6342651
6341882
2026-08-26T06:01:34Z
Bikarhêner
3719
Xêra xwe kelîmeyan neguherîne.
6342651
wikitext
text/x-wiki
{{binêre herwiha|joy ride}}
== {{ziman|en}} ==
=== Bilêvkirin ===
* {{mj|KY|DYA}} {{IPA|en|/ˈdʒɔɪˌɹaɪd/}}
* {{deng|en|en-au-joyride.ogg|dever=Awistralya}}
* {{kîte|en|joy|ride}}
=== Navdêr ===
{{en-navdêr}}
# Dema ku kesek ji bo [[kêf]]ê, xisûsen bi [[wesayît]]eke [[dizîkirî]], bi lez û metirsîdar dajo.
#* {{nm|en|He took his grandmother's car for a ''joyride''.|Wî ji bo gereke kêfî erebeya dapîra xwe girt.}}
# [[ger|Gera]] bi ajotinê, ya ji bo [[kêf]]ê, bi [[tirimpêl]]ekê, bi taybetî yeka ku bêyî pirsîn hatiye birin û bi awayekî metirsîdar tê ajotin.
#* {{nm|en|Visits abroad can be taken by the public at large to be perks and a ''joyride''.|Zîyaretên derveyî welatê ji alîyê xelkê ve bi piranî wek îmtîyazek û gereke kêfî têne dîtin.}}
# {{f|en|kevnbûyî}} Ajotina erebeyê ji bo [[kêf]]ê.
==== Formên alternatîv ====
* {{herwiha|en|joy ride}}
=== Lêker ===
{{en-lêker|joyrides|joyriding|joyrode|joyridden}}
# Ji bo kêfê bi awayekî metirsîdar [[erebe]] [[ajotin]].
#* {{nm|en|The youths ''joyride'' through the streets before abandoning the vehicle.|Ciwan li kolanan bi erebeyê bi kêfî gerîyan, berî ku wesayîtê biterikînin.}}
=== Têkildar ===
* {{g|en|joyrider}}
* {{g|en|joyriding}}
=== Etîmolojî ===
Ji {{pêk|en|joy|ride}}.
4au58vnzitgel0eaz9vctrgca3lg33c
6342652
6342651
2026-08-26T06:02:09Z
Bikarhêner
3719
6342652
wikitext
text/x-wiki
{{binêre herwiha|joy ride}}
== {{ziman|en}} ==
=== Bilêvkirin ===
* {{mj|KY|DYA}} {{IPA|en|/ˈdʒɔɪˌɹaɪd/}}
* {{deng|en|en-au-joyride.ogg|dever=Awistralya}}
* {{kîte|en|joy|ride}}
=== Navdêr ===
{{en-navdêr}}
# Dema ku kesek ji bo [[kêf]]ê, xisûsen bi [[wesayît]]eke [[dizîkirî]], bi lez û metirsîdar dajo.
#* {{nm|en|He took his grandmother's car for a '''joyride'''.|Wî ji bo gereke kêfî erebeya dapîra xwe girt.}}
# [[ger|Gera]] bi ajotinê, ya ji bo [[kêf]]ê, bi [[tirimpêl]]ekê, bi taybetî yeka ku bêyî pirsîn hatiye birin û bi awayekî metirsîdar tê ajotin.
#* {{nm|en|Visits abroad can be taken by the public at large to be perks and a '''joyride'''.|Zîyaretên derveyî welatê ji alîyê xelkê ve bi piranî wek îmtîyazek û gereke kêfî têne dîtin.}}
# {{f|en|kevnbûyî}} Ajotina erebeyê ji bo [[kêf]]ê.
==== Formên alternatîv ====
* {{herwiha|en|joy ride}}
=== Lêker ===
{{en-lêker|joyrides|joyriding|joyrode|joyridden}}
# Ji bo kêfê bi awayekî metirsîdar [[erebe]] [[ajotin]].
#* {{nm|en|The youths '''joyride''' through the streets before abandoning the vehicle.|Ciwan li kolanan bi erebeyê bi kêfî gerîyan, berî ku wesayîtê biterikînin.}}
=== Têkildar ===
* {{g|en|joyrider}}
* {{g|en|joyriding}}
=== Etîmolojî ===
Ji {{pêk|en|joy|ride}}.
gyk5dttr3f3kic5lfpy3v7qfnsowwxe
پەژارە
0
975605
6342600
6342311
2026-08-25T12:58:40Z
Keyomerd
8814
/* Navdêr */
6342600
wikitext
text/x-wiki
== {{ziman|ckb}} ==
=== Navdêr ===
{{navdêr|ckb}}
# [[kovan]], [[xem]], [[keser]], [[kul]], [[pejarî]] (hesteke kûr a xemgînî, dilgiraniyê an êşa derûnî)
#: {{mînak|ckb|دڵی پڕ بوو لە پەژارە و خەم.|tr=Dillî pirr bû le pejare û xem.|werger=Dilê wî tijî xem û kovan bû.}}
#: {{mînak|ckb|گوێگرتن لە مۆسیقا پەژارەی دەروونی کەم دەکردەوە.|tr=Gwêgirtin le mosîqa pejarey derûnî kem dekirdewe.|werger=Guhdarkirina muzîkê kovana wî ya derûnî kêm dikir.}}
==== Hevmane ====
* {{g|ckb|خەم}}
* {{g|ckb|مەینەت}}
* {{g|ckb|کوڵ}}
==== Dijmane ====
* {{g|ckb|شادی}}
* {{g|ckb|دڵخۆشی}}
* {{g|ckb|کەیف}}
==== Têkildar ====
* {{g|ckb|پەژارەبار}}
* {{g|ckb|دڵگرانی}}
* {{g|ckb|ئازار}}
ga2fcpmjfdk5llin1czlugavnxrtsq0
qirşvan
0
1326788
6342632
6260451
2026-08-25T13:41:17Z
Wikihez
7344
+nimûneya bikaranînê bi amûra « [[Mediawiki:Gadget-wikt.add-examples|Nimûne zêde bike]] » (v2.0).
6342632
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|z=?}}
# [[kesê|Kesê]] ku [[qirşan]] [[kom dike]], [[diçe]] qirşan.
#: {{mk|ku|Mi dî '''qirşvanê''' gundê me karê xu kir, vê sibê çûne qirşan.}}<ref>https://www.youtube.com/watch?v=zmm7Nmmrn2w&list=RDzmm7Nmmrn2w&start_radio=1&t=71s</ref>
#* {{jêder-vîdeo|ku|hunermend=كوندى كندالي مجمع مهد|platform=w:Youtube|sernav=قبال دومو ولازكين سيدو فلكلورى شنكالي ره سن|tarîx=2021-06-21|dem=1:11|url=https://www.youtube.com/watch?v=zmm7Nmmrn2w&list=RDzmm7Nmmrn2w&start_radio=1&t=71s|jêgirtin=Mi dî '''qirşvanê''' gundê me karê xu kir, vê sibê çûne qirşan.}}
==== Formên alternatîv ====
* {{g|ku|qerşvan}}
==== Jê ====
* {{g|ku|qirşvanî}}
==== Etîmolojî ====
{{ji?|ku}}
==== Werger ====
{{werger-ser}}
{{werger-bin}}
00rg9k1gs461jw5k7xcxpy9i4k147bw
6342633
6342632
2026-08-25T13:41:47Z
Wikihez
7344
6342633
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|z=mn}}
# [[kes|Kesê]] ku [[qirş]]an [[kom kirin|kom dike]], [[çûn|diçe]] qirşan.
#* {{jêder-vîdeo|ku|Mi dî '''qirşvanê''' gundê me karê xu kir, vê sibê çûne qirşan.}}<ref>https://www.youtube.com/watch?v=zmm7Nmmrn2w&list=RDzmm7Nmmrn2w&start_radio=1&t=71s</ref>
#* {{jêder-vîdeo|ku|hunermend=كوندى كندالي مجمع مهد|platform=w:Youtube|sernav=قبال دومو ولازكين سيدو فلكلورى شنكالي ره سن|tarîx=2021-06-21|dem=1:11|url=https://www.youtube.com/watch?v=zmm7Nmmrn2w&list=RDzmm7Nmmrn2w&start_radio=1&t=71s|jêgirtin=Mi dî '''qirşvanê''' gundê me karê xu kir, vê sibê çûne qirşan.}}
==== Formên alternatîv ====
* {{g|ku|qerşvan}}
==== Jê ====
* {{g|ku|qirşvanî}}
==== Etîmolojî ====
{{ji?|ku}}
==== Werger ====
{{werger-ser}}
{{werger-bin}}
l1xexxicdgicuz6b3i2xqt1fj1f0qbz
6342634
6342633
2026-08-25T13:41:55Z
Wikihez
7344
/* Navdêr */ (bi [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]ê re)
6342634
wikitext
text/x-wiki
== {{ziman|ku}} ==
=== Bilêvkirin ===
* {{ku-IPA}}
* {{ku-kîte}}
=== Navdêr ===
{{navdêr|ku|z=mn}}
# [[kes|Kesê]] ku [[qirş]]an [[kom kirin|kom dike]], [[çûn|diçe]] qirşan.
#* {{jêder-vîdeo|ku|hunermend=كوندى كندالي مجمع مهد|platform=w:Youtube|sernav=قبال دومو ولازكين سيدو فلكلورى شنكالي ره سن|tarîx=2021-06-21|dem=1:11|url=https://www.youtube.com/watch?v=zmm7Nmmrn2w&list=RDzmm7Nmmrn2w&start_radio=1&t=71s|jêgirtin=Mi dî '''qirşvanê''' gundê me karê xu kir, vê sibê çûne qirşan.}}
==== Formên alternatîv ====
* {{g|ku|qerşvan}}
==== Jê ====
* {{g|ku|qirşvanî}}
==== Etîmolojî ====
{{ji?|ku}}
==== Werger ====
{{werger-ser}}
{{werger-bin}}
5jygoa173b5g2zbe9c6pbh4poldwprf
Bikarhêner:Wikihez/skrîpt/js/Gadget-citoid-helper.js
2
1357853
6342589
6342570
2026-08-25T12:36:25Z
Wikihez
7344
6342589
javascript
text/javascript
/**
* Gadget-citoid-helper.js
*
* Amûreke hevpar ji bo standina daneyên çavkaniyê ji Citoid û
* veguherandina wan bo qadên şablonên jêder-* (jêder-kitêb, jêder-kovar, jêder-websîte, jêder-vîdeo).
*
* BIKARANÎN JI SCRIPTEKE DIN:
*
* 1) Riya herî baş: vê rûpelê wek dependency lê zêde bike di eyarên
* gadgeta xwe de li ser [[Special:Gadgets]] (an jî MediaWiki:Gadgets-definition),
* paşê:
*
* mw.loader.using("ext.gadget.citoid-helper").then(function () {
* wikt.citoid.fetchJederFields(url).then(function (result) {
* console.log(result.jederKey, result.fields);
* });
* });
*
* 2) An jî, heke ne mimkun be gadget bi vî awayî were qeydkirin, fonksiyona
* alîkar a `wikt.citoidHelper.ensure()` a li jêr bikar bîne, ku bixweber
* vê rûpelê bar dike heke jixwe nehatibe barkirin:
*
* wikt.citoidHelper.ensure().then(function () {
* wikt.citoid.fetchJederFields(url).then(...);
* });
*
* NOTE: currently points at Bikarhêner:Wikihez/skrîpt/js/Gadget-citoid-helper.js (a user
* testing page) instead of this MediaWiki: page, since MediaWiki: isn't editable right now.
*
* API ya `window.wikihez.citoid`:
* - getRestUrl() → {string} URLya REST a Citoid a vê wîkiyê
* - yearFromDate(dateStr) → {string} sala (4 reqem) ji rêzikeke tarîxê
* - formatAuthors(authors) → {string} navên nivîskaran wek rêzikek yekane
* - typeToJederKey(itemType) → {string} "jêder-kitêb" / "jêder-kovar" / "jêder-websîte" / "jêder-vîdeo"
* - dataToJederFields(jederKey, data) → {Object<string,string>} merheleyên şablona jêder-*
* - fetchData(query) → {jQuery.Promise<Object>} daneya xam a Citoid
* - fetchJederFields(query) → {jQuery.Promise<{jederKey, fields, raw}>} hêsankirî
* - extractVideoTimestamp(urlStr) → {string} a video URL's "t=" start time, as "M:SS"/"H:MM:SS"
* - isYouTubeUrl(urlStr) → {boolean} whether the URL is a youtube.com/youtu.be link
* - websiteNameForUrl(urlStr) → {string} jêder-websîte "websîte" value: known-site wikilink, else the bare domain
* - TYPE_TO_JEDER → {Object} xerîteya itemType → jederKey
*/
window.wikihez = window.wikihez || {};
(function () {
"use strict";
// Heke jixwe hatibe barkirin, dubare neke.
if (window.wikihez.citoid) {
return;
}
// Xerîteya cureyên Citoid (itemType) li ser şablonên me yên jêder-*
var CITOID_TYPE_TO_JEDER = {
"book": "jêder-kitêb",
"bookSection": "jêder-kitêb",
"thesis": "jêder-kitêb",
"report": "jêder-kitêb",
"manuscript": "jêder-kitêb",
"journalArticle": "jêder-kovar",
"magazineArticle": "jêder-kovar",
"newspaperArticle": "jêder-kovar",
"webpage": "jêder-websîte",
"blogPost": "jêder-websîte",
"forumPost": "jêder-websîte",
"videoRecording": "jêder-vîdeo",
"podcast": "jêder-websîte",
"encyclopediaArticle": "jêder-websîte"
};
/**
* Ji mantiqa [[:en:w:User:BrandonXLF/Citoid.js]]
* Vedigere URLya REST a Citoid, li gorî eyarên vê wîkiyê.
* @return {string}
*/
function getRestUrl() {
var cfg = mw.config.get("wgCitoidConfig");
var vecfg = mw.config.get("wgVisualEditorConfig");
return (cfg && (cfg.fullRestbaseUrl || cfg.wbFullRestbaseUrl)) ? (cfg.fullRestbaseUrl || cfg.wbFullRestbaseUrl) + "v1/data/citation/mediawiki/"
: (vecfg && vecfg.fullRestbaseUrl) ? vecfg.fullRestbaseUrl + "v1/data/citation/mediawiki/"
: (cfg && cfg.citoidServiceUrl) ? cfg.citoidServiceUrl + "/mediawiki/"
: "https://ku.wiktionary.org/api/rest_v1/data/citation/mediawiki/";
}
/**
* Ji tarîxa Citoid (rêzik an tarîxeke ISO) sala wê (4 reqem) derdixe.
* @param dateStr {string}
* @return {string}
*/
function yearFromDate(dateStr) {
if (!dateStr) {
return "";
}
var match = /\d{4}/.exec(dateStr);
return match ? match[0] : "";
}
/**
* Navên nivîskaran ên Citoid (rêzek [pêşnav, paşnav]) dike rêzikek yekane.
* @param authors {Array<Array<string>>}
* @return {string}
*/
function formatAuthors(authors) {
if (!Array.isArray(authors)) {
return "";
}
return authors.map(function (pair) {
return (pair || []).filter(function (part) {
return !!part;
}).join(" ");
}).filter(function (name) {
return !!name;
}).join("; ");
}
function formatEditors(editors) {
if (!Array.isArray(editors)) {
return "";
}
return editors.map(function (pair) {
return (pair || []).filter(function (part) {
return !!part;
}).join(" ");
}).filter(function (name) {
return !!name;
}).join("; ");
}
/**
* Li gorî itemType a Citoid, navê şablona jêder-* a munasib vedigerîne.
* @param itemType {string}
* @return {string} Yek ji "jêder-kitêb", "jêder-kovar", "jêder-websîte" an "jêder-vîdeo".
*/
function typeToJederKey(itemType) {
return CITOID_TYPE_TO_JEDER[itemType] || "jêder-websîte";
}
/**
* Whether a URL is a youtube.com/youtu.be link -- used to force jêder-vîdeo regardless of
* Citoid's own itemType guess, and to pick the "w:Youtube" platform value.
* @param urlStr {string}
* @return {boolean}
*/
function isYouTubeUrl(urlStr) {
return /^https?:\/\/(www\.|m\.)?(youtube\.com|youtu\.be)\//i.test(urlStr || "");
}
// Known domains mapped to a nicer jêder-websîte "websîte" value (a wikilink where a Wikipedia article exists).
var KNOWN_WEBSITE_NAMES = {
"x.com": "w:Twitter",
"twitter.com": "w:Twitter",
"rudaw.net": "w:Rûdaw"
};
/**
* Bare domain of a URL (protocol and "www." stripped), e.g. "https://www.example.com/x" -> "example.com".
* @param urlStr {string}
* @return {string} Lowercased domain, or an empty string if urlStr isn't an absolute http(s) URL.
*/
function bareDomainFromUrl(urlStr) {
var match = /^https?:\/\/(?:www\.)?([^\/]+)/i.exec(urlStr || "");
return match ? match[1].toLowerCase() : "";
}
/**
* A jêder-websîte "websîte" value for a URL: a known-site wikilink (KNOWN_WEBSITE_NAMES) if the domain
* matches one, else the bare domain itself as a plain fallback name.
* @param urlStr {string}
* @return {string} The site name, or an empty string if urlStr isn't an absolute http(s) URL.
*/
function websiteNameForUrl(urlStr) {
var host = bareDomainFromUrl(urlStr);
return host ? (KNOWN_WEBSITE_NAMES[host] || host) : "";
}
/**
* Extracts a video's start time from its URL's "t=" param (YouTube-style: plain seconds like "137",
* or "2m17s"/"1h2m3s"). Reads the caller-supplied URL directly, since Citoid's own resolved data.url
* usually strips this param.
* @param urlStr {string}
* @return {string} "M:SS" or "H:MM:SS", or an empty string if absent/unrecognized.
*/
function extractVideoTimestamp(urlStr) {
if (!urlStr) {
return "";
}
var match = /[?&]t=([^&]+)/.exec(urlStr);
if (!match) {
return "";
}
var raw = decodeURIComponent(match[1]);
var seconds;
if (/^\d+s?$/.test(raw)) {
seconds = parseInt(raw, 10);
} else {
var parts = /^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/.exec(raw);
if (!parts || (!parts[1] && !parts[2] && !parts[3])) {
return "";
}
seconds = (parseInt(parts[1] || "0", 10) * 3600) + (parseInt(parts[2] || "0", 10) * 60) + parseInt(parts[3] || "0", 10);
}
var h = Math.floor(seconds / 3600);
var m = Math.floor((seconds % 3600) / 60);
var s = seconds % 60;
var ss = s < 10 ? "0" + s : String(s);
return h > 0 ? (h + ":" + (m < 10 ? "0" + m : m) + ":" + ss) : (m + ":" + ss);
}
/**
* Daneyên Citoid vediguherîne tabloyeke parametreyên şablona jêder-* (li gorî cureyê wê).
* @param jederKey {string} Yek ji "jêder-kitêb", "jêder-kovar", "jêder-websîte" an "jêder-vîdeo".
* @param data {Object} Netîceya Citoid.
* @return {Object<string, string>}
*/
function dataToJederFields(jederKey, data) {
var out = {};
var author = formatAuthors(data.author);
var editor = formatEditors(data.editor);
if (author) { out["nivîskar"] = author; }
if (editor) { out["amadekar"] = editor; }
if (data.title) { out["sernav"] = data.title; }
if (data.url) { out.url = data.url; }
if (jederKey === "jêder-kitêb") {
if (data.publisher) { out["weşanxane"] = data.publisher; }
if (data.place) { out.cih = data.place; }
if (data.date) { out.sal = yearFromDate(data.date); }
if (data.ISBN) { out.isbn = Array.isArray(data.ISBN) ? data.ISBN[0] : data.ISBN; }
if (data.edition) { out["çap"] = data.edition; }
if (data.pages) { out["rûpel"] = data.pages; }
} else if (jederKey === "jêder-kovar") {
if (data.publicationTitle) { out.kovar = data.publicationTitle; }
if (data.publisher) { out["weşanxane"] = data.publisher; }
if (data.volume) { out.cild = data.volume; }
if (data.issue) { out.hejmar = data.issue; }
if (data.pages) { out["rûpel"] = data.pages; }
if (data.date) { out.sal = yearFromDate(data.date); }
} else if (jederKey === "jêder-websîte") {
var websiteName = data.websiteTitle || websiteNameForUrl(data.url);
if (websiteName) { out["websîte"] = websiteName; }
if (data.date) {
out["tarîx"] = data.date;
}
} else if (jederKey === "jêder-vîdeo") {
delete out["nivîskar"]; // "hunermend" is jêder-vîdeo's own performer/artist field
if (author) { out.hunermend = author; }
var platform = isYouTubeUrl(data.url) ? "w:Youtube" : (data.libraryCatalog || "").toLowerCase();
if (platform) { out.platform = platform; }
if (data.date) {
out.tarîx = data.date;
out.sal = yearFromDate(data.date);
}
// Fallback only -- Citoid's own resolved data.url usually drops "t=" already (see extractVideoTimestamp's own comment); the live URL input is the reliable source (see add-examples.js's _autofillVideoTimestamp).
var dem = extractVideoTimestamp(data.url);
if (dem) { out.dem = dem; }
}
return out;
}
/**
* Ji Citoid daneyên çavkaniyekê tîne (li gorî URL, DOI an ISBNyê).
* @param query {string}
* @return {jQuery.Promise} Bi daneya ewil a Citoid (Object) tê safîkirin.
*/
function fetchData(query) {
var url;
try {
url = encodeURIComponent(decodeURIComponent(query));
} catch (e) {
url = encodeURIComponent(query);
}
return $.get(getRestUrl() + url).then(function (res) {
if (!res || !res[0]) {
return $.Deferred().reject("Netîceya ji Citoidê vala ye.").promise();
}
return res[0];
});
}
/**
* Fonksiyoneke hêsankirî: ji URL/DOI/ISBNyekê rasterast şablona jêder-* a munasib
* û merheleyên wê yên tijîkirî vedigerîne (fetchData + typeToJederKey + dataToJederFields
* bi hev re).
* @param query {string}
* @return {jQuery.Promise} Bi {jederKey: string, fields: Object<string,string>, raw: Object} tê safîkirin.
*/
function fetchJederFields(query) {
return fetchData(query).then(function (data) {
// YouTube links always use jêder-vîdeo, regardless of what itemType Citoid guessed.
var jederKey = (isYouTubeUrl(query) || isYouTubeUrl(data.url)) ? "jêder-vîdeo" : typeToJederKey(data.itemType);
return {
jederKey: jederKey,
fields: dataToJederFields(jederKey, data),
raw: data
};
});
}
window.wikihez.citoid = {
getRestUrl: getRestUrl,
yearFromDate: yearFromDate,
formatAuthors: formatAuthors,
typeToJederKey: typeToJederKey,
dataToJederFields: dataToJederFields,
fetchData: fetchData,
fetchJederFields: fetchJederFields,
extractVideoTimestamp: extractVideoTimestamp,
isYouTubeUrl: isYouTubeUrl,
websiteNameForUrl: websiteNameForUrl,
TYPE_TO_JEDER: CITOID_TYPE_TO_JEDER
};
/**
* Alîkar ji bo scriptên din: heke wikt.citoid hîn nehatibe barkirin,
* vê rûpelê bixweber bar dike û pey re "resolve" dibe.
* Bikaranîn: wikt.citoidHelper.ensure().then(function() { ... wikt.citoid ... });
*/
window.wikihez.citoidHelper = {
ensure: function () {
if (window.wikihez.citoid) {
return $.Deferred().resolve().promise();
}
var url = mw.util.getUrl("Bikarhêner:Wikihez/skrîpt/js/Gadget-citoid-helper.js", {
action: "raw",
ctype: "text/javascript"
});
return mw.loader.getScript(mw.config.get("wgServer") + url);
}
};
})();
nyis4hrdo9bgyrkp15qrt11y6b5vs8e
6342592
6342589
2026-08-25T12:46:40Z
Wikihez
7344
6342592
javascript
text/javascript
/**
* Gadget-citoid-helper.js
*
* Amûreke hevpar ji bo standina daneyên çavkaniyê ji Citoid û
* veguherandina wan bo qadên şablonên jêder-* (jêder-kitêb, jêder-kovar, jêder-websîte, jêder-vîdeo).
*
* BIKARANÎN JI SCRIPTEKE DIN:
*
* 1) Riya herî baş: vê rûpelê wek dependency lê zêde bike di eyarên
* gadgeta xwe de li ser [[Special:Gadgets]] (an jî MediaWiki:Gadgets-definition),
* paşê:
*
* mw.loader.using("ext.gadget.citoid-helper").then(function () {
* wikihez.citoid.fetchJederFields(url).then(function (result) {
* console.log(result.jederKey, result.fields);
* });
* });
*
* 2) An jî, heke ne mimkun be gadget bi vî awayî were qeydkirin, fonksiyona
* alîkar a `wikihez.citoidHelper.ensure()` a li jêr bikar bîne, ku bixweber
* vê rûpelê bar dike heke jixwe nehatibe barkirin:
*
* wikihez.citoidHelper.ensure().then(function () {
* wikihez.citoid.fetchJederFields(url).then(...);
* });
*
* NOTE: currently points at Bikarhêner:Wikihez/skrîpt/js/Gadget-citoid-helper.js (a user
* testing page) instead of this MediaWiki: page, since MediaWiki: isn't editable right now.
*
* API ya `window.wikihez.citoid`:
* - getRestUrl() → {string} URLya REST a Citoid a vê wîkiyê
* - yearFromDate(dateStr) → {string} sala (4 reqem) ji rêzikeke tarîxê
* - formatAuthors(authors) → {string} navên nivîskaran wek rêzikek yekane
* - typeToJederKey(itemType) → {string} "jêder-kitêb" / "jêder-kovar" / "jêder-websîte" / "jêder-vîdeo"
* - dataToJederFields(jederKey, data) → {Object<string,string>} merheleyên şablona jêder-*
* - fetchData(query) → {jQuery.Promise<Object>} daneya xam a Citoid
* - fetchJederFields(query) → {jQuery.Promise<{jederKey, fields, raw}>} hêsankirî
* - extractVideoTimestamp(urlStr) → {string} a video URL's "t=" start time, as "M:SS"/"H:MM:SS"
* - isYouTubeUrl(urlStr) → {boolean} whether the URL is a youtube.com/youtu.be link
* - websiteNameForUrl(urlStr) → {string} jêder-websîte "websîte" value: known-site wikilink, else the bare domain
* - TYPE_TO_JEDER → {Object} xerîteya itemType → jederKey
*/
window.wikihez = window.wikihez || {};
(function () {
"use strict";
// Heke jixwe hatibe barkirin, dubare neke.
if (window.wikihez.citoid) {
return;
}
// Xerîteya cureyên Citoid (itemType) li ser şablonên me yên jêder-*
var CITOID_TYPE_TO_JEDER = {
"book": "jêder-kitêb",
"bookSection": "jêder-kitêb",
"thesis": "jêder-kitêb",
"report": "jêder-kitêb",
"manuscript": "jêder-kitêb",
"journalArticle": "jêder-kovar",
"magazineArticle": "jêder-kovar",
"newspaperArticle": "jêder-kovar",
"webpage": "jêder-websîte",
"blogPost": "jêder-websîte",
"forumPost": "jêder-websîte",
"videoRecording": "jêder-vîdeo",
"podcast": "jêder-websîte",
"encyclopediaArticle": "jêder-websîte"
};
/**
* Ji mantiqa [[:en:w:User:BrandonXLF/Citoid.js]]
* Vedigere URLya REST a Citoid, li gorî eyarên vê wîkiyê.
* @return {string}
*/
function getRestUrl() {
var cfg = mw.config.get("wgCitoidConfig");
var vecfg = mw.config.get("wgVisualEditorConfig");
return (cfg && (cfg.fullRestbaseUrl || cfg.wbFullRestbaseUrl)) ? (cfg.fullRestbaseUrl || cfg.wbFullRestbaseUrl) + "v1/data/citation/mediawiki/"
: (vecfg && vecfg.fullRestbaseUrl) ? vecfg.fullRestbaseUrl + "v1/data/citation/mediawiki/"
: (cfg && cfg.citoidServiceUrl) ? cfg.citoidServiceUrl + "/mediawiki/"
: "https://ku.wiktionary.org/api/rest_v1/data/citation/mediawiki/";
}
/**
* Ji tarîxa Citoid (rêzik an tarîxeke ISO) sala wê (4 reqem) derdixe.
* @param dateStr {string}
* @return {string}
*/
function yearFromDate(dateStr) {
if (!dateStr) {
return "";
}
var match = /\d{4}/.exec(dateStr);
return match ? match[0] : "";
}
/**
* Navên nivîskaran ên Citoid (rêzek [pêşnav, paşnav]) dike rêzikek yekane.
* @param authors {Array<Array<string>>}
* @return {string}
*/
function formatAuthors(authors) {
if (!Array.isArray(authors)) {
return "";
}
return authors.map(function (pair) {
return (pair || []).filter(function (part) {
return !!part;
}).join(" ");
}).filter(function (name) {
return !!name;
}).join("; ");
}
function formatEditors(editors) {
if (!Array.isArray(editors)) {
return "";
}
return editors.map(function (pair) {
return (pair || []).filter(function (part) {
return !!part;
}).join(" ");
}).filter(function (name) {
return !!name;
}).join("; ");
}
/**
* Li gorî itemType a Citoid, navê şablona jêder-* a munasib vedigerîne.
* @param itemType {string}
* @return {string} Yek ji "jêder-kitêb", "jêder-kovar", "jêder-websîte" an "jêder-vîdeo".
*/
function typeToJederKey(itemType) {
return CITOID_TYPE_TO_JEDER[itemType] || "jêder-websîte";
}
/**
* Whether a URL is a youtube.com/youtu.be link -- used to force jêder-vîdeo regardless of
* Citoid's own itemType guess, and to pick the "w:Youtube" platform value.
* @param urlStr {string}
* @return {boolean}
*/
function isYouTubeUrl(urlStr) {
return /^https?:\/\/(www\.|m\.)?(youtube\.com|youtu\.be)\//i.test(urlStr || "");
}
// Known domains mapped to a nicer jêder-websîte "websîte" value (a wikilink where a Wikipedia article exists).
var KNOWN_WEBSITE_NAMES = {
"x.com": "w:Twitter",
"twitter.com": "w:Twitter",
"rudaw.net": "w:Rûdaw"
};
/**
* Bare domain of a URL (protocol and "www." stripped), e.g. "https://www.example.com/x" -> "example.com".
* @param urlStr {string}
* @return {string} Lowercased domain, or an empty string if urlStr isn't an absolute http(s) URL.
*/
function bareDomainFromUrl(urlStr) {
var match = /^https?:\/\/(?:www\.)?([^\/]+)/i.exec(urlStr || "");
return match ? match[1].toLowerCase() : "";
}
/**
* A jêder-websîte "websîte" value for a URL: a known-site wikilink (KNOWN_WEBSITE_NAMES) if the domain
* matches one, else the bare domain itself as a plain fallback name.
* @param urlStr {string}
* @return {string} The site name, or an empty string if urlStr isn't an absolute http(s) URL.
*/
function websiteNameForUrl(urlStr) {
var host = bareDomainFromUrl(urlStr);
return host ? (KNOWN_WEBSITE_NAMES[host] || host) : "";
}
/**
* Extracts a video's start time from its URL's "t=" param (YouTube-style: plain seconds like "137",
* or "2m17s"/"1h2m3s"). Reads the caller-supplied URL directly, since Citoid's own resolved data.url
* usually strips this param.
* @param urlStr {string}
* @return {string} "M:SS" or "H:MM:SS", or an empty string if absent/unrecognized.
*/
function extractVideoTimestamp(urlStr) {
if (!urlStr) {
return "";
}
var match = /[?&]t=([^&]+)/.exec(urlStr);
if (!match) {
return "";
}
var raw = decodeURIComponent(match[1]);
var seconds;
if (/^\d+s?$/.test(raw)) {
seconds = parseInt(raw, 10);
} else {
var parts = /^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/.exec(raw);
if (!parts || (!parts[1] && !parts[2] && !parts[3])) {
return "";
}
seconds = (parseInt(parts[1] || "0", 10) * 3600) + (parseInt(parts[2] || "0", 10) * 60) + parseInt(parts[3] || "0", 10);
}
var h = Math.floor(seconds / 3600);
var m = Math.floor((seconds % 3600) / 60);
var s = seconds % 60;
var ss = s < 10 ? "0" + s : String(s);
return h > 0 ? (h + ":" + (m < 10 ? "0" + m : m) + ":" + ss) : (m + ":" + ss);
}
/**
* Daneyên Citoid vediguherîne tabloyeke parametreyên şablona jêder-* (li gorî cureyê wê).
* @param jederKey {string} Yek ji "jêder-kitêb", "jêder-kovar", "jêder-websîte" an "jêder-vîdeo".
* @param data {Object} Netîceya Citoid.
* @return {Object<string, string>}
*/
function dataToJederFields(jederKey, data) {
var out = {};
var author = formatAuthors(data.author);
var editor = formatEditors(data.editor);
if (author) { out["nivîskar"] = author; }
if (editor) { out["amadekar"] = editor; }
if (data.title) { out["sernav"] = data.title; }
if (data.url) { out.url = data.url; }
if (jederKey === "jêder-kitêb") {
if (data.publisher) { out["weşanxane"] = data.publisher; }
if (data.place) { out.cih = data.place; }
if (data.date) { out.sal = yearFromDate(data.date); }
if (data.ISBN) { out.isbn = Array.isArray(data.ISBN) ? data.ISBN[0] : data.ISBN; }
if (data.edition) { out["çap"] = data.edition; }
if (data.pages) { out["rûpel"] = data.pages; }
} else if (jederKey === "jêder-kovar") {
if (data.publicationTitle) { out.kovar = data.publicationTitle; }
if (data.publisher) { out["weşanxane"] = data.publisher; }
if (data.volume) { out.cild = data.volume; }
if (data.issue) { out.hejmar = data.issue; }
if (data.pages) { out["rûpel"] = data.pages; }
if (data.date) { out.sal = yearFromDate(data.date); }
} else if (jederKey === "jêder-websîte") {
var websiteName = data.websiteTitle || websiteNameForUrl(data.url);
if (websiteName) { out["websîte"] = websiteName; }
if (data.date) {
out["tarîx"] = data.date;
}
} else if (jederKey === "jêder-vîdeo") {
delete out["nivîskar"]; // "hunermend" is jêder-vîdeo's own performer/artist field
if (author) { out.hunermend = author; }
var platform = isYouTubeUrl(data.url) ? "w:Youtube" : (data.libraryCatalog || "").toLowerCase();
if (platform) { out.platform = platform; }
// tarîx and sal are mutually exclusive -- prefer the full date, fall back to year-only otherwise.
if (data.date) {
out.tarîx = data.date;
} else {
var year = yearFromDate(data.date);
if (year) { out.sal = year; }
}
// Fallback only -- Citoid's own resolved data.url usually drops "t=" already (see extractVideoTimestamp's own comment); the live URL input is the reliable source (see add-examples.js's _autofillVideoTimestamp).
var dem = extractVideoTimestamp(data.url);
if (dem) { out.dem = dem; }
}
return out;
}
/**
* Ji Citoid daneyên çavkaniyekê tîne (li gorî URL, DOI an ISBNyê).
* @param query {string}
* @return {jQuery.Promise} Bi daneya ewil a Citoid (Object) tê safîkirin.
*/
function fetchData(query) {
var url;
try {
url = encodeURIComponent(decodeURIComponent(query));
} catch (e) {
url = encodeURIComponent(query);
}
return $.get(getRestUrl() + url).then(function (res) {
if (!res || !res[0]) {
return $.Deferred().reject("Netîceya ji Citoidê vala ye.").promise();
}
return res[0];
});
}
/**
* Fonksiyoneke hêsankirî: ji URL/DOI/ISBNyekê rasterast şablona jêder-* a munasib
* û merheleyên wê yên tijîkirî vedigerîne (fetchData + typeToJederKey + dataToJederFields
* bi hev re).
* @param query {string}
* @return {jQuery.Promise} Bi {jederKey: string, fields: Object<string,string>, raw: Object} tê safîkirin.
*/
function fetchJederFields(query) {
return fetchData(query).then(function (data) {
// YouTube links always use jêder-vîdeo, regardless of what itemType Citoid guessed.
var jederKey = (isYouTubeUrl(query) || isYouTubeUrl(data.url)) ? "jêder-vîdeo" : typeToJederKey(data.itemType);
return {
jederKey: jederKey,
fields: dataToJederFields(jederKey, data),
raw: data
};
});
}
window.wikihez.citoid = {
getRestUrl: getRestUrl,
yearFromDate: yearFromDate,
formatAuthors: formatAuthors,
typeToJederKey: typeToJederKey,
dataToJederFields: dataToJederFields,
fetchData: fetchData,
fetchJederFields: fetchJederFields,
extractVideoTimestamp: extractVideoTimestamp,
isYouTubeUrl: isYouTubeUrl,
websiteNameForUrl: websiteNameForUrl,
TYPE_TO_JEDER: CITOID_TYPE_TO_JEDER
};
/**
* Alîkar ji bo scriptên din: heke wikihez.citoid hîn nehatibe barkirin,
* vê rûpelê bixweber bar dike û pey re "resolve" dibe.
* Bikaranîn: wikihez.citoidHelper.ensure().then(function() { ... wikihez.citoid ... });
*/
window.wikihez.citoidHelper = {
ensure: function () {
if (window.wikihez.citoid) {
return $.Deferred().resolve().promise();
}
var url = mw.util.getUrl("Bikarhêner:Wikihez/skrîpt/js/Gadget-citoid-helper.js", {
action: "raw",
ctype: "text/javascript"
});
return mw.loader.getScript(mw.config.get("wgServer") + url);
}
};
})();
h8yo205t3tf5urxnb5ehpmddbv8b1gg
6342596
6342592
2026-08-25T12:49:21Z
Wikihez
7344
6342596
javascript
text/javascript
/**
* Gadget-citoid-helper.js
*
* Amûreke hevpar ji bo standina daneyên çavkaniyê ji Citoid û
* veguherandina wan bo qadên şablonên jêder-* (jêder-kitêb, jêder-kovar, jêder-websîte, jêder-vîdeo).
*
* BIKARANÎN JI SCRIPTEKE DIN:
*
* 1) Riya herî baş: vê rûpelê wek dependency lê zêde bike di eyarên
* gadgeta xwe de li ser [[Special:Gadgets]] (an jî MediaWiki:Gadgets-definition),
* paşê:
*
* mw.loader.using("ext.gadget.citoid-helper").then(function () {
* wikihez.citoid.fetchJederFields(url).then(function (result) {
* console.log(result.jederKey, result.fields);
* });
* });
*
* 2) An jî, heke ne mimkun be gadget bi vî awayî were qeydkirin, fonksiyona
* alîkar a `wikihez.citoidHelper.ensure()` a li jêr bikar bîne, ku bixweber
* vê rûpelê bar dike heke jixwe nehatibe barkirin:
*
* wikihez.citoidHelper.ensure().then(function () {
* wikihez.citoid.fetchJederFields(url).then(...);
* });
*
* NOTE: currently points at Bikarhêner:Wikihez/skrîpt/js/Gadget-citoid-helper.js (a user
* testing page) instead of this MediaWiki: page, since MediaWiki: isn't editable right now.
*
* API ya `window.wikihez.citoid`:
* - getRestUrl() → {string} URLya REST a Citoid a vê wîkiyê
* - yearFromDate(dateStr) → {string} sala (4 reqem) ji rêzikeke tarîxê
* - formatAuthors(authors) → {string} navên nivîskaran wek rêzikek yekane
* - typeToJederKey(itemType) → {string} "jêder-kitêb" / "jêder-kovar" / "jêder-websîte" / "jêder-vîdeo"
* - dataToJederFields(jederKey, data, originalUrl) → {Object<string,string>} merheleyên şablona jêder-*
* - fetchData(query) → {jQuery.Promise<Object>} daneya xam a Citoid
* - fetchJederFields(query) → {jQuery.Promise<{jederKey, fields, raw}>} hêsankirî
* - extractVideoTimestamp(urlStr) → {string} a video URL's "t=" start time, as "M:SS"/"H:MM:SS"
* - isYouTubeUrl(urlStr) → {boolean} whether the URL is a youtube.com/youtu.be link
* - websiteNameForUrl(urlStr) → {string} jêder-websîte "websîte" value: known-site wikilink, else the bare domain
* - TYPE_TO_JEDER → {Object} xerîteya itemType → jederKey
*/
window.wikihez = window.wikihez || {};
(function () {
"use strict";
// Heke jixwe hatibe barkirin, dubare neke.
if (window.wikihez.citoid) {
return;
}
// Xerîteya cureyên Citoid (itemType) li ser şablonên me yên jêder-*
var CITOID_TYPE_TO_JEDER = {
"book": "jêder-kitêb",
"bookSection": "jêder-kitêb",
"thesis": "jêder-kitêb",
"report": "jêder-kitêb",
"manuscript": "jêder-kitêb",
"journalArticle": "jêder-kovar",
"magazineArticle": "jêder-kovar",
"newspaperArticle": "jêder-kovar",
"webpage": "jêder-websîte",
"blogPost": "jêder-websîte",
"forumPost": "jêder-websîte",
"videoRecording": "jêder-vîdeo",
"podcast": "jêder-websîte",
"encyclopediaArticle": "jêder-websîte"
};
/**
* Ji mantiqa [[:en:w:User:BrandonXLF/Citoid.js]]
* Vedigere URLya REST a Citoid, li gorî eyarên vê wîkiyê.
* @return {string}
*/
function getRestUrl() {
var cfg = mw.config.get("wgCitoidConfig");
var vecfg = mw.config.get("wgVisualEditorConfig");
return (cfg && (cfg.fullRestbaseUrl || cfg.wbFullRestbaseUrl)) ? (cfg.fullRestbaseUrl || cfg.wbFullRestbaseUrl) + "v1/data/citation/mediawiki/"
: (vecfg && vecfg.fullRestbaseUrl) ? vecfg.fullRestbaseUrl + "v1/data/citation/mediawiki/"
: (cfg && cfg.citoidServiceUrl) ? cfg.citoidServiceUrl + "/mediawiki/"
: "https://ku.wiktionary.org/api/rest_v1/data/citation/mediawiki/";
}
/**
* Ji tarîxa Citoid (rêzik an tarîxeke ISO) sala wê (4 reqem) derdixe.
* @param dateStr {string}
* @return {string}
*/
function yearFromDate(dateStr) {
if (!dateStr) {
return "";
}
var match = /\d{4}/.exec(dateStr);
return match ? match[0] : "";
}
/**
* Navên nivîskaran ên Citoid (rêzek [pêşnav, paşnav]) dike rêzikek yekane.
* @param authors {Array<Array<string>>}
* @return {string}
*/
function formatAuthors(authors) {
if (!Array.isArray(authors)) {
return "";
}
return authors.map(function (pair) {
return (pair || []).filter(function (part) {
return !!part;
}).join(" ");
}).filter(function (name) {
return !!name;
}).join("; ");
}
function formatEditors(editors) {
if (!Array.isArray(editors)) {
return "";
}
return editors.map(function (pair) {
return (pair || []).filter(function (part) {
return !!part;
}).join(" ");
}).filter(function (name) {
return !!name;
}).join("; ");
}
/**
* Li gorî itemType a Citoid, navê şablona jêder-* a munasib vedigerîne.
* @param itemType {string}
* @return {string} Yek ji "jêder-kitêb", "jêder-kovar", "jêder-websîte" an "jêder-vîdeo".
*/
function typeToJederKey(itemType) {
return CITOID_TYPE_TO_JEDER[itemType] || "jêder-websîte";
}
/**
* Whether a URL is a youtube.com/youtu.be link -- used to force jêder-vîdeo regardless of
* Citoid's own itemType guess, and to pick the "w:Youtube" platform value.
* @param urlStr {string}
* @return {boolean}
*/
function isYouTubeUrl(urlStr) {
return /^https?:\/\/(www\.|m\.)?(youtube\.com|youtu\.be)\//i.test(urlStr || "");
}
// Known domains mapped to a nicer jêder-websîte "websîte" value (a wikilink where a Wikipedia article exists).
var KNOWN_WEBSITE_NAMES = {
"x.com": "w:Twitter",
"twitter.com": "w:Twitter",
"rudaw.net": "w:Rûdaw"
};
/**
* Bare domain of a URL (protocol and "www." stripped), e.g. "https://www.example.com/x" -> "example.com".
* @param urlStr {string}
* @return {string} Lowercased domain, or an empty string if urlStr isn't an absolute http(s) URL.
*/
function bareDomainFromUrl(urlStr) {
var match = /^https?:\/\/(?:www\.)?([^\/]+)/i.exec(urlStr || "");
return match ? match[1].toLowerCase() : "";
}
/**
* A jêder-websîte "websîte" value for a URL: a known-site wikilink (KNOWN_WEBSITE_NAMES) if the domain
* matches one, else the bare domain itself as a plain fallback name.
* @param urlStr {string}
* @return {string} The site name, or an empty string if urlStr isn't an absolute http(s) URL.
*/
function websiteNameForUrl(urlStr) {
var host = bareDomainFromUrl(urlStr);
return host ? (KNOWN_WEBSITE_NAMES[host] || host) : "";
}
/**
* Extracts a video's start time from its URL's "t=" param (YouTube-style: plain seconds like "137",
* or "2m17s"/"1h2m3s"). Reads the caller-supplied URL directly, since Citoid's own resolved data.url
* usually strips this param.
* @param urlStr {string}
* @return {string} "M:SS" or "H:MM:SS", or an empty string if absent/unrecognized.
*/
function extractVideoTimestamp(urlStr) {
if (!urlStr) {
return "";
}
var match = /[?&]t=([^&]+)/.exec(urlStr);
if (!match) {
return "";
}
var raw = decodeURIComponent(match[1]);
var seconds;
if (/^\d+s?$/.test(raw)) {
seconds = parseInt(raw, 10);
} else {
var parts = /^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/.exec(raw);
if (!parts || (!parts[1] && !parts[2] && !parts[3])) {
return "";
}
seconds = (parseInt(parts[1] || "0", 10) * 3600) + (parseInt(parts[2] || "0", 10) * 60) + parseInt(parts[3] || "0", 10);
}
var h = Math.floor(seconds / 3600);
var m = Math.floor((seconds % 3600) / 60);
var s = seconds % 60;
var ss = s < 10 ? "0" + s : String(s);
return h > 0 ? (h + ":" + (m < 10 ? "0" + m : m) + ":" + ss) : (m + ":" + ss);
}
/**
* Daneyên Citoid vediguherîne tabloyeke parametreyên şablona jêder-* (li gorî cureyê wê).
* @param jederKey {string} Yek ji "jêder-kitêb", "jêder-kovar", "jêder-websîte" an "jêder-vîdeo".
* @param data {Object} Netîceya Citoid.
* @param originalUrl {string} [optional] The URL/DOI/ISBN as originally typed/fetched -- preferred over
* data.url for the "url" field when it's an absolute http(s) URL, since Citoid's own resolved data.url
* strips query params (e.g. a video's "t=" timestamp) that the original URL still has.
* @return {Object<string, string>}
*/
function dataToJederFields(jederKey, data, originalUrl) {
var out = {};
var author = formatAuthors(data.author);
var editor = formatEditors(data.editor);
var url = (originalUrl && /^https?:\/\//i.test(originalUrl)) ? originalUrl : data.url;
if (author) { out["nivîskar"] = author; }
if (editor) { out["amadekar"] = editor; }
if (data.title) { out["sernav"] = data.title; }
if (url) { out.url = url; }
if (jederKey === "jêder-kitêb") {
if (data.publisher) { out["weşanxane"] = data.publisher; }
if (data.place) { out.cih = data.place; }
if (data.date) { out.sal = yearFromDate(data.date); }
if (data.ISBN) { out.isbn = Array.isArray(data.ISBN) ? data.ISBN[0] : data.ISBN; }
if (data.edition) { out["çap"] = data.edition; }
if (data.pages) { out["rûpel"] = data.pages; }
} else if (jederKey === "jêder-kovar") {
if (data.publicationTitle) { out.kovar = data.publicationTitle; }
if (data.publisher) { out["weşanxane"] = data.publisher; }
if (data.volume) { out.cild = data.volume; }
if (data.issue) { out.hejmar = data.issue; }
if (data.pages) { out["rûpel"] = data.pages; }
if (data.date) { out.sal = yearFromDate(data.date); }
} else if (jederKey === "jêder-websîte") {
var websiteName = data.websiteTitle || websiteNameForUrl(url);
if (websiteName) { out["websîte"] = websiteName; }
if (data.date) {
out["tarîx"] = data.date;
}
} else if (jederKey === "jêder-vîdeo") {
delete out["nivîskar"]; // "hunermend" is jêder-vîdeo's own performer/artist field
if (author) { out.hunermend = author; }
var platform = isYouTubeUrl(url) ? "w:Youtube" : (data.libraryCatalog || "").toLowerCase();
if (platform) { out.platform = platform; }
// tarîx and sal are mutually exclusive -- prefer the full date, fall back to year-only otherwise.
if (data.date) {
out.tarîx = data.date;
} else {
var year = yearFromDate(data.date);
if (year) { out.sal = year; }
}
var dem = extractVideoTimestamp(url);
if (dem) { out.dem = dem; }
}
return out;
}
/**
* Ji Citoid daneyên çavkaniyekê tîne (li gorî URL, DOI an ISBNyê).
* @param query {string}
* @return {jQuery.Promise} Bi daneya ewil a Citoid (Object) tê safîkirin.
*/
function fetchData(query) {
var url;
try {
url = encodeURIComponent(decodeURIComponent(query));
} catch (e) {
url = encodeURIComponent(query);
}
return $.get(getRestUrl() + url).then(function (res) {
if (!res || !res[0]) {
return $.Deferred().reject("Netîceya ji Citoidê vala ye.").promise();
}
return res[0];
});
}
/**
* Fonksiyoneke hêsankirî: ji URL/DOI/ISBNyekê rasterast şablona jêder-* a munasib
* û merheleyên wê yên tijîkirî vedigerîne (fetchData + typeToJederKey + dataToJederFields
* bi hev re).
* @param query {string}
* @return {jQuery.Promise} Bi {jederKey: string, fields: Object<string,string>, raw: Object} tê safîkirin.
*/
function fetchJederFields(query) {
return fetchData(query).then(function (data) {
// YouTube links always use jêder-vîdeo, regardless of what itemType Citoid guessed.
var jederKey = (isYouTubeUrl(query) || isYouTubeUrl(data.url)) ? "jêder-vîdeo" : typeToJederKey(data.itemType);
return {
jederKey: jederKey,
fields: dataToJederFields(jederKey, data, query),
raw: data
};
});
}
window.wikihez.citoid = {
getRestUrl: getRestUrl,
yearFromDate: yearFromDate,
formatAuthors: formatAuthors,
typeToJederKey: typeToJederKey,
dataToJederFields: dataToJederFields,
fetchData: fetchData,
fetchJederFields: fetchJederFields,
extractVideoTimestamp: extractVideoTimestamp,
isYouTubeUrl: isYouTubeUrl,
websiteNameForUrl: websiteNameForUrl,
TYPE_TO_JEDER: CITOID_TYPE_TO_JEDER
};
/**
* Alîkar ji bo scriptên din: heke wikihez.citoid hîn nehatibe barkirin,
* vê rûpelê bixweber bar dike û pey re "resolve" dibe.
* Bikaranîn: wikihez.citoidHelper.ensure().then(function() { ... wikihez.citoid ... });
*/
window.wikihez.citoidHelper = {
ensure: function () {
if (window.wikihez.citoid) {
return $.Deferred().resolve().promise();
}
var url = mw.util.getUrl("Bikarhêner:Wikihez/skrîpt/js/Gadget-citoid-helper.js", {
action: "raw",
ctype: "text/javascript"
});
return mw.loader.getScript(mw.config.get("wgServer") + url);
}
};
})();
k1lp47h0sfv3msb8pg8bfuyxiucye4h
Bikarhêner:Wikihez/Gadget-wikt.add-examples.js
2
1357893
6342588
6342568
2026-08-25T12:32:38Z
Wikihez
7344
6342588
javascript
text/javascript
// <nowiki>
// dependencies (declared in MediaWiki:Gadgets-definition): oojs, oojs-ui, ext.gadget.citoid-helper (wikt.citoid), ext.gadget.StorageUtils (ObjectStorage)
// Formats a string using {0}, {1}, ... placeholders.
if (!String.prototype.format) {
String.prototype.format = function(var_args) {
var args = arguments;
return this.replace(/{(\d+)}/g, function(match, number) {
return typeof args[number] !== "undefined" ? args[number] : match;
});
};
}
$(function() {
"use strict";
// Skip pages where this gadget shouldn't run.
if (
mw.config.get("wgPageName") !== "Wîkîferheng:ceribandin/nimûne" &&
mw.config.get("wgNamespaceNumber") !== 108 &&
mw.config.get("wgNamespaceNumber") !== 0 ||
mw.config.get("wgPageName") === "Destpêk" ||
mw.config.get("wgArticleId") === 0
) return;
console.log("Gadget-wikt.add-examples.js dest pê dike…");
var NAME = "[[Mediawiki:Gadget-wikt.add-examples|Nimûne zêde bike]]";
var VERSION = "2.0";
// Persists form drafts via MediaWiki:Gadget-StorageUtils.js (localStorage, falling back to a cookie) so unsaved text survives a failed submit.
var draftStorage = new ObjectStorage("add_examples_draft", 1);
// Citoid logic normally lives in MediaWiki:Gadget-citoid-helper.js as a registered gadget dependency; not
// currently editable, so ensureCitoid() (below) loads it from a user testing page on demand instead.
// "span" is the field's width in the 12-column grid the fields render in (see .add-example-jeder-fields
// in the CSS and _setSourceType below) -- field ORDER here is also the grid's reading order.
var jederDefs = {
"jêder-kitêb": {
"label": "Kitêb",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 3 },
{ "key": "terciman", "label": "Terciman", "span": 3 },
{ "key": "amadekar", "label": "Amadekar", "span": 3 },
{ "key": "weşanxane", "label": "Weşanxane", "span": 3 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "cih", "label": "Cih", "span": 2 },
{ "key": "sal", "label": "Sal", "span": 1 },
{ "key": "sala-weşandinê", "label": "Sala weşandinê", "span": 2 },
{ "key": "çap", "label": "Çap", "span": 1 },
{ "key": "rûpel", "label": "Rûpel", "span": 1 },
{ "key": "isbn", "label": "ISBN", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
},
"jêder-kovar": {
"label": "Kovar",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 3 },
{ "key": "terciman", "label": "Terciman", "span": 3 },
{ "key": "amadekar", "label": "Amadekar", "span": 3 },
{ "key": "weşanxane", "label": "Weşanxane", "span": 3 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "kovar", "label": "Kovar", "span": 4 },
{ "key": "cild", "label": "Cild", "span": 2 },
{ "key": "hejmar", "label": "Hejmar", "span": 2 },
{ "key": "sal", "label": "Sal", "span": 2 },
{ "key": "rûpel", "label": "Rûpel", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
},
"jêder-websîte": {
"label": "Websîte",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 4 },
{ "key": "terciman", "label": "Terciman", "span": 4 },
{ "key": "websîte", "label": "Websîte", "span": 4 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "url", "label": "URL", "span": 5 },
{ "key": "urlya-arşîvê", "label": "URLya Arşîvê", "span": 5 },
{ "key": "sal", "label": "Sal", "span": 1 },
{ "key": "tarîx", "label": "Tarîx", "span": 1 }
]
},
"jêder-vîdeo": {
"label": "Vîdeo",
"fields": [
{ "key": "hunermend", "label": "Hunermend", "span": 6 },
{ "key": "platform", "label": "Platform", "span": 6 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "sal", "label": "Sal", "span": 2 },
{ "key": "tarîx", "label": "Tarîx", "span": 3 },
{ "key": "dem", "label": "Dem", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
}
};
var sectionNames = {
"Navdêr": ["Navdêr"],
"Formeke navdêrê": ["Formeke navdêrê"],
"Lêker": ["Lêker"],
"Formeke lêkerê": ["Formeke lêkerê"],
"Rengdêr": ["Rengdêr"],
"Formeke rengdêrê": ["Formeke rengdêrê"],
"Hoker": ["Hoker"],
"Formeke hokerê": ["Formeke hokerê"],
"Serenav": ["Serenav"],
"Formeke serenavê": ["Formeke serenavê"],
"Artîkel": ["Artîkel"],
"Baneşan": ["Baneşan"],
"Bazinedaçek": ["Bazinedaçek"],
"Biwêj": ["Biwêj"],
"Cînav": ["Cînav"],
"Daçek": ["Daçek"],
"Girêdek": ["Girêdek"],
"Gotineke pêşiyan": ["Gotineke pêşiyan"],
"Hejmar": ["Hejmar"],
"Hevok": ["Hevok"],
"Îfade": ["Îfade"],
"Kurtenav": ["Kurtenav"],
"Navgir": ["Navgir"],
"Paşdaçek": ["Paşdaçek"],
"Paşgir": ["Paşgir"],
"Pêşdaçek": ["Pêşdaçek"],
"Pêşgir": ["Pêşgir"],
"Pirtik": ["Pirtik"],
"Reh": ["Reh"],
"Sembol": ["Sembol"],
"Tîp": ["Tîp"]
};
// Template names treated as "real examples" (an allow-list, not the old deny-list) so annotation templates like synonyms/antonyms/alt-forms aren't mistaken for examples.
var exampleTemplateNames = ["jêder", "nimûne"].concat(Object.keys(jederDefs));
// Returns the template name starting a "#:"/"#*" line (e.g. "jêder" from "#* {{jêder|ku|...}}"), or null if the line doesn't start with a template.
function getLineTemplateName(line) {
var m = /^#[:*]\s*\{\{\s*([^|}]+)/.exec(line);
return m ? m[1].trim() : null;
}
// Returns the index of the line where a (possibly multi-line) template block starting at startIndex closes its {{ }} braces, so multi-line templates are treated as one block.
function findBlockEnd(lines, startIndex) {
var depth = 0;
var i = startIndex;
for (; i < lines.length; i++) {
var opens = (lines[i].match(/\{\{/g) || []).length;
var closes = (lines[i].match(/\}\}/g) || []).length;
depth += opens - closes;
if (depth <= 0) {
break;
}
}
return i;
}
// Ported from start.js: converts literal line breaks typed/pasted into the example/translation/transcription boxes into wikitext <br> tags, since a raw newline would break the single-line "#*" wikitext structure.
function nlToBr(text) {
return text ? text.replace(/\r\n|\r|\n/g, "<br>") : text;
}
function escapeHtmlForBackdrop(str) {
return String(str)
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">");
}
// Mirrors a textarea's text with a small marker after each line that's followed by an actual typed/pasted linebreak, rendered into a transparent backdrop behind the textarea (see ensureLinebreakBackdrop()).
function buildLinebreakBackdropHtml(text) {
var lines = text.split(/\r\n|\r|\n/);
return $.map(lines, function(line, i) {
var isLast = i === lines.length - 1;
return escapeHtmlForBackdrop(line) +
(isLast ? "" : "<mark class='add-example-linebreak-mark'>↵</mark>\n");
}).join("");
}
// Copies the metrics that affect where text wraps/lands (font, line height, padding, border) from the real textarea onto its backdrop via computed style, since the backdrop is a plain <div>, not a themed OOUI input.
function syncLinebreakBackdropMetrics(textarea, backdrop) {
var cs = window.getComputedStyle(textarea[0]);
backdrop.css({
"box-sizing": cs.boxSizing,
"padding-top": cs.paddingTop,
"padding-right": cs.paddingRight,
"padding-bottom": cs.paddingBottom,
"padding-left": cs.paddingLeft,
"border-width": cs.borderWidth,
"border-style": "solid",
"font-family": cs.fontFamily,
"font-size": cs.fontSize,
"font-weight": cs.fontWeight,
"line-height": cs.lineHeight,
"letter-spacing": cs.letterSpacing
});
}
// Lazily inserts the transparent backdrop layer used to mark linebreaks, as a sibling of the textarea inside its existing OOUI input wrapper (which OOUI already positions relatively for icon overlays), rather than start.js's approach of wrapping the textarea in a new div — that would risk disturbing OOUI's own layout of the input. Safe to call more than once; the backdrop is cached.
function ensureLinebreakBackdrop(textarea) {
var existing = textarea.data("addExampleLinebreakBackdrop");
if (existing) {
return existing;
}
var $parent = textarea.parent();
if ($parent.css("position") === "static") {
$parent.css("position", "relative");
}
var backdrop = $("<div aria-hidden='true'></div>").addClass("add-example-linebreak-backdrop");
textarea.before(backdrop);
textarea.data("addExampleLinebreakBackdrop", backdrop);
textarea.on("scroll.addExampleLinebreak", function() {
backdrop.scrollTop(textarea.scrollTop()).scrollLeft(textarea.scrollLeft());
});
return backdrop;
}
// Flags a textarea (via CSS class, for the border tint + tooltip) while it contains a typed/pasted linebreak, so the user notices before it's silently turned into <br> on submit; marks only the exact point of the break via the mirrored backdrop.
function highlightLinebreak(el) {
var textarea = $(el);
var text = textarea.val();
var hasBreak = /\r|\n/.test(text);
textarea
.toggleClass("add-example-has-linebreak", hasBreak)
.attr("title", hasBreak ? "Xeta nû dê wek <br> bê nivîsandin" : "");
if (!hasBreak) {
var cached = textarea.data("addExampleLinebreakBackdrop");
if (cached) {
cached.hide();
}
textarea.removeClass("add-example-has-linebreak-source");
return;
}
var backdrop = ensureLinebreakBackdrop(textarea);
textarea.addClass("add-example-has-linebreak-source");
syncLinebreakBackdropMetrics(textarea, backdrop);
backdrop.html(buildLinebreakBackdropHtml(text)).show();
backdrop.scrollTop(textarea.scrollTop()).scrollLeft(textarea.scrollLeft());
}
// Wires linebreak detection onto an OOUI multiline widget, matching start.js's scope: only the quote/example text and its translation/transcription, not bibliographic fields. Uses OOUI's own "change" event rather than the raw <textarea> "input" event start.js listens to, since our fields can also be set programmatically (Clear button, draft restore) via setValue(), which doesn't fire a native DOM input event.
function watchForLinebreaks(widget) {
widget.on("change", function() {
highlightLinebreak(widget.$input[0]);
});
}
var api = new mw.Api();
// Loads wikt.citoid if it isn't already loaded, from Wikihez's testing page (MediaWiki: isn't editable
// right now) -- self-contained rather than calling wikt.citoidHelper.ensure() directly, since that
// function only exists once citoid-helper.js has already run once, which isn't guaranteed here.
function ensureCitoid() {
if (window.wikt && window.wikt.citoid) {
return $.Deferred().resolve().promise();
}
var url = mw.util.getUrl("Bikarhêner:Wikihez/skrîpt/js/Gadget-citoid-helper.js", {
action: "raw",
ctype: "text/javascript"
});
return mw.loader.getScript(mw.config.get("wgServer") + url);
}
// Language display name, read from the matching section's .besazimani link text.
function languageNameForCode(code) {
var $mark = $(".besazimani[id='" + code + "']").first();
return $mark.length ? $mark.text().trim() : null;
}
// Whether the page title itself (accented Kurdish Latin letters included) is written in Latin script.
var pageTitleIsLatin = !/[^\x00-\x7FÀ-ɏḀ-ỿ‘’]/.test(mw.config.get("wgTitle") || "");
// .example/.benimune = old Şablon:jêder hidden marker; .h-usage-example/.h-quotation = Modul:usex containers used directly by Şablon:nimûne; .citation-whole = Modul:quote's own wrapper, now used by jêder-* templates (Modul:quote nests .h-quotation inside .citation-whole > dl > dd instead of putting it directly under the <li>, so it needs its own entry here).
// Requiring "ul > li >" is what makes this only match an example that's grouped into its own <ul> -- a
// {{nimûne}} (or its "mk" redirect) with no jêder-family citation alongside it in the same definition
// renders straight under the definition's own content instead, with no such group; also reused below to
// tell whether the second pass still needs to handle a given definition.
var EXISTING_EXAMPLE_SELECTOR = "ul > li > .example, ul > li > .benimune, ul > li > .h-usage-example, ul > li > .h-quotation, ul > li > .citation-whole";
$(EXISTING_EXAMPLE_SELECTOR).each(function() {
var $element = $(this);
var $item = $element.parent();
if (!$item.next().length) {
// Get example’s language
// bdi[lang] = old hidden marker; .e-example[lang]/.e-quotation[lang] = Modul:usex/Modul:quote already put lang on the visible span.
// A jêder-* citation with no jêgirtin= (quotation text) yet renders no h-quotation/e-quotation at all
// (see get_quote() in Modul quote.lua) -- exactly the "bare citation" case this button exists to fill
// in, so this can't just crash: without the guard, [0] is undefined here and ".lang" throws, which
// (since $.each() has no try/catch) silently kills the button for every remaining match on the page.
var $langEl = $item.find(".e-example[lang], .e-quotation[lang], bdi[lang]")[0];
if (!$langEl) {
console.warn("Gadget-wikt.add-examples: nikaribe zimanê vê nimûneyê bibîne, valakirî hate derbaskirin.", $item);
return;
}
var language = $langEl.lang;
if (language === "ku-Latn") {
language = "ku";
}
console.log('Language:', language);
// Get section and indices of associated definition
var definitionLevel = [];
var $definitionItem = $item.parent().parent();
var $topItem;
do {
// Skip MediaWiki's empty <li class="mw-empty-elt"> placeholders so indices match the real "#" lines in wikitext (see submit()).
definitionLevel.splice(0, 0, $definitionItem.prevAll("li:not(.mw-empty-elt)").length);
$topItem = $definitionItem;
$definitionItem = $definitionItem.parent().parent();
} while ($definitionItem.prop("tagName") === "LI");
var $section = $($topItem.parent().prevAll(".mw-heading3, h3").get(0));
if ($section.length) {
definitionLevel.splice(0, 0, $section.find("h3").attr("id"));
} else {
console.warn("Gadget-wikt.add-examples: Section heading not found");
// TODO: why does this happen? mw.notify("Beş nehat dîtin. Jkx li WF:Dîwanê vê problemê ragihînin!");
return;
}
// Remove default edit link if present
var $defaultEditLink = $item.find("span.example > span.stubedit");
if ($defaultEditLink.length) {
$defaultEditLink.remove();
}
// Add a nice button to open the form. $group is the citation-group <ul> itself (parent of $item);
// the form panel is inserted AFTER it (see click handler below), not inside it, so the panel isn't
// squeezed into that <ul>'s narrow hanging-indent width on mobile -- only the button/title stays
// there, matching the "Form redesign for Kurdish example" mockup (title inside the bullet list,
// full-width panel below it).
var $group = $item.parent();
var $formItem = $("<li>");
var $button = $("<a href='#'>Nimûneyeke bikaranînê lê zêde bike</a>");
$button.css("color", "var( --color-subtle, #777777 )");
// Shown in the button's place once the form is open (see Form#setVisible).
var $title = $("<span class='add-example-form-title'></span>").hide();
$formItem.append($button).append($title);
$button.on("click", function() {
if (!$button.form) {
$title.text("Nimûneyeke bi " + (languageNameForCode(language) || "zimanekî nenas").toLowerCase() + " lê zêde dikî.");
var form = new Form($item, $button, $title, language, definitionLevel);
$group.after(form.$element);
}
$button.form.setVisible(true);
return false;
});
$item.after($formItem);
}
});
// Second pass: some definitions have no example the pass above could react to at all -- either genuinely
// zero examples, or one rendered via {{nimûne}} (or its "mk" redirect) with no jêder-family citation next
// to it, which (see the comment on EXISTING_EXAMPLE_SELECTOR above) renders with no "ul > li" group to
// match. This walks every recognized POS section's own definitions list directly instead of reacting to
// an existing example, and reads the language off the language section's own <h2> rather than off an
// example -- so it doesn't need one to already exist. Everything else (Form, submit()) is reused as-is.
// MediaWiki wraps each heading in a "mw-heading2"/"mw-heading3"/... div in current skin output; falls
// back to the bare heading element for older/other output that doesn't wrap it.
function headingOuter($h) {
var $wrap = $h.closest(".mw-heading2, .mw-heading3, .mw-heading4, .mw-heading5, .mw-heading6");
return $wrap.length ? $wrap : $h;
}
// Section's language code: nearest preceding .besazimani[id] by document order (not sibling-walking, which mobile's per-section wrapping breaks).
function languageCodeForOl($ol) {
var $marks = $(".besazimani[id]").add($ol);
var ol = $ol.get(0);
var idx = $marks.index(ol);
for (var i = idx - 1; i >= 0; i--) {
var el = $marks.get(i);
if (el.id) {
return el.id;
}
}
return null;
}
// A <li> whose OWN direct content (not counting a nested <ol>) is wrapped in ".form-of-definition" is
// MediaWiki's "form of" template system marking that content as generated by a template -- e.g.
// {{ku-tewîna-nav}}'s "Formeke heval:" wrapper together with its "rewşa îzafeyî"/"rewşa çemandî"/...
// readings underneath. That whole nested block is normally the ENTIRE expansion of a single "#"
// wikitext line, with no separate "##" line behind any individual reading -- recursing into it would
// hand out one button per reading, each trying to match a "##" line that doesn't exist, and submit()
// would fail to find where to insert every one of them. A <li> without that class whose nested <ol>
// holds real hand-typed prose (e.g. sîno-koreyî/Navdêr's two genuinely separate "##" sub-senses) has
// no such problem -- those really are individually addressable wikitext lines.
function isFormOfWrapper($li) {
return $li.children(".form-of-definition").length > 0;
}
// Recurse into a <li>'s own nested <ol> UNLESS it's a form-of-template wrapper (see isFormOfWrapper) --
// a wrapper <li> with its own nested <ol> isn't itself a sense with content of its own, only its real
// (non-generated) leaves are.
function eachLeafDefinition($ol, fn) {
$ol.children("li").each(function() {
var $li = $(this);
var $childOl = $li.children("ol");
if ($childOl.length && !isFormOfWrapper($li)) {
$childOl.each(function() {
eachLeafDefinition($(this), fn);
});
} else {
fn($li);
}
});
}
$("h3").each(function() {
var sectionType = $(this).text().trim();
if (!sectionNames[sectionType]) {
return; // not a recognized word-sense section (Bilêvkirin, Etîmolojî, Çavkanî, ...)
}
var h3Id = $(this).attr("id");
// Forward-walk siblings to the definitions <ol>, skipping over a declension table/TemplateStyles/the
// headword line; stop (nothing to attach to in this section) if another heading comes first instead.
var $ol = null;
for (var $cursor = headingOuter($(this)).next(); $cursor.length; $cursor = $cursor.next()) {
if ($cursor.is("ol")) {
$ol = $cursor;
break;
}
if ($cursor.is(".mw-heading2, .mw-heading3, .mw-heading4, .mw-heading5, .mw-heading6, h2, h3, h4, h5, h6")) {
break;
}
}
if (!$ol) {
return;
}
var language = languageCodeForOl($ol);
if (!language) {
console.warn("Gadget-wikt.add-examples: nikaribe koda zimanê vê beşê bibîne.", $ol);
return;
}
eachLeafDefinition($ol, function($li) {
// The pass above already added a button here (or will) -- an actual example already wrapped in
// its own "ul > li" group.
if ($li.find(EXISTING_EXAMPLE_SELECTOR).length) {
return;
}
var definitionLevel = [];
var $definitionItem = $li;
while ($definitionItem.prop("tagName") === "LI") {
// Skip MediaWiki's empty <li class="mw-empty-elt"> placeholders so indices match the real "#" lines in wikitext (see submit()).
definitionLevel.splice(0, 0, $definitionItem.prevAll("li:not(.mw-empty-elt)").length);
$definitionItem = $definitionItem.parent().parent();
}
definitionLevel.splice(0, 0, h3Id);
// A hidden, empty placeholder <li> so submit()'s existing "_$lastExample.after(newLi)" insertion
// (unchanged, same as the pass above) lands the first submitted example right before the button
// -- matching the existing convention of new examples going in before the button, not after it.
var $placeholder = $("<li style='display:none'></li>");
var $formItem = $("<li>");
var $button = $("<a href='#'>Nimûneyeke bikaranînê lê zêde bike</a>");
$button.css("color", "var( --color-subtle, #777777 )");
// Shown in the button's place once the form is open (see Form#setVisible).
var $title = $("<span class='add-example-form-title'></span>").hide();
$formItem.append($button).append($title);
// A "ul" nested directly under a definition "li" starts hidden here (see the HQToggle-controlled
// jêder-citation-group "ul", which only ever renders with an explicit "style="display: block""
// set on it) -- this one has no HQToggle to unhide it, so it needs the same explicit override or
// the button (and the placeholder above) never becomes visible at all.
var $ul = $("<ul>").css("display", "block").append($placeholder).append($formItem);
// The form panel is inserted AFTER $ul (not inside it) once opened -- same reasoning as the first
// pass above: keeps the full-width panel out of the tight bulleted-list indentation on mobile.
$button.on("click", function() {
if (!$button.form) {
$title.text("Nimûneyeke bi " + (languageNameForCode(language) || "zimanekî nenas").toLowerCase() + " lê zêde dikî.");
var form = new Form($placeholder, $button, $title, language, definitionLevel);
$ul.after(form.$element);
}
$button.form.setVisible(true);
return false;
});
$li.append($ul);
});
});
// Pulls the form panel flush with the page's own left/right edges, undoing whatever nested-list indent it inherited from sitting inside a deeply-nested definition.
function alignFormToPage($form) {
var $container = $form.closest(".mw-parser-output");
if (!$container.length) {
return;
}
var pad = parseFloat(window.getComputedStyle($container[0]).paddingLeft) || 0;
var containerLeft = $container.offset().left + pad;
var indent = $form.offset().left - containerLeft;
$form.css({
marginLeft: indent > 0 ? -indent : 0,
width: $container.width() + "px"
});
}
// Constructor for the edit form; lastExample/button/title/language/definitionLevel identify where the form attaches and what it edits.
function Form($lastExample, $button, $title, language, definitionLevel) {
var self = this;
this._language = language;
this._definitionLevel = definitionLevel;
this._$lastExample = $lastExample;
this._$button = $button;
this._$button.form = this;
this._$title = $title;
this._currentJederKey = "";
this._jederFieldWidgets = {};
this._textInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var textInputLayout = new OO.ui.FieldLayout(this._textInput, {
label: "Metna nimûneyê",
align: "top",
});
this._textInput.on("change", function(value) {
self._applyButton.setDisabled(!value);
self._updateReadyHint();
});
watchForLinebreaks(this._textInput);
// Source type dropdown: free text, a jêder-* template, or "citoid" (a pseudo key, not in jederDefs) meaning "not yet detected" — the default, switched automatically once a Citoid fetch succeeds (see _fillFromCitoid).
var sourceTypeMenuItems = [
new OO.ui.MenuOptionWidget({ data: "citoid", label: "Bi Citoidê otomatîk zêde bike" }),
new OO.ui.MenuOptionWidget({ data: "", label: "Bi destê xwe binivîsim" }),
];
for (var jederKey in jederDefs) {
if (jederDefs.hasOwnProperty(jederKey)) {
sourceTypeMenuItems.push(new OO.ui.MenuOptionWidget({
data: jederKey,
label: jederDefs[jederKey].label,
}));
}
}
this._sourceTypeDropdown = new OO.ui.DropdownWidget({
menu: { items: sourceTypeMenuItems },
label: "Bi Citoidê otomatîk zêde bike",
});
var sourceTypeLayout = new OO.ui.FieldLayout(this._sourceTypeDropdown, {
label: "Şablona çavkaniyê",
align: "top",
});
this._sourceTypeDropdown.getMenu().on("choose", function(menuOption) {
self._setSourceType(menuOption.getData());
});
this._sourceInput = new OO.ui.MultilineTextInputWidget();
this._sourceInput.on("change", function() {
self._updateReadyHint();
});
this._sourceInputLayout = new OO.ui.FieldLayout(this._sourceInput, {
label: "Çavkaniya nimûneyê",
align: "top",
});
// Always visible in every mode (free text included) — submit() reads this unconditionally as the "url=" parameter. The Citoid fetch button sits right next to it (not in a separate box) -- see _urlRowWidget below.
this._sourceURLInput = new OO.ui.TextInputWidget({
icon: "link",
placeholder: "https://… an jî DOI/ISBN",
});
this._citoidButton = new OO.ui.ButtonWidget({
label: "Bi otomatîk tijî bike",
icon: "download",
flags: ["progressive"],
title: "Li gorî URL, DOI an ISBNya jorîn, malûmatan ji Citoid tîne û qadên şablona jêder-* otomatîk tijî dike.",
classes: ["add-example-citoid-fetch"],
});
this._citoidButton.on("click", this._fillFromCitoid.bind(this));
this._sourceURLInput.on("change", function() {
self._updateReadyHint();
self._autofillVideoTimestamp();
});
// URL input + inline "auto-fill" button as one row (replaces the old separate framed Citoid box's
// button row) -- a plain OO.ui.Widget used purely as a flex-row container (same pattern as
// _loadingImage below: build it empty, then manually append its children's $elements). Disabling
// during submit() still goes through the individual _sourceURLInput/_citoidButton references, not
// through this wrapper.
this._urlRowWidget = new OO.ui.Widget({ classes: ["add-example-url-row"] });
this._urlRowWidget.$element.append(this._sourceURLInput.$element, this._citoidButton.$element);
this._sourceURLInputLayout = new OO.ui.FieldLayout(this._urlRowWidget, {
label: "Lînk, DOI an ISBNya çavkaniyê",
align: "top",
help: "Li qutiyê URL, DOI an ISBN binivîse û pê lê bike butona 'Bi otomatîk tijî bike' da ku otomatîk çavkanî were dagirtin.",
helpInline: true,
});
// Matches the wording just constructed above, so the initial _setSourceType("citoid") call at the end of this constructor doesn't needlessly recreate an identical layout.
this._urlFieldIsFreeTextWording = false;
// Shown right after a successful Citoid fetch (see _fillFromCitoid); hidden again on clear.
this._citoidSuccessMsg = $("<span class='add-example-citoid-success'>✓ Malûmat hatin dagirtin — li jêr kontrol bike.</span>").hide();
// Clears the URL field and any filled jêder-* fields without touching the example text/translation.
this._citoidClearButton = new OO.ui.ButtonWidget({
label: "Vala bike",
icon: "trash",
framed: false,
title: "Lînkê û qadên jêder-* yên vê beşê vala bike",
classes: ["add-example-citoid-clear"],
});
this._citoidClearButton.on("click", function() {
self._sourceURLInput.setValue("");
self._citoidSuccessMsg.hide();
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setValue("");
});
});
// Plain div (not OO.ui.FieldsetLayout) so the grid CSS class applies directly to the field items.
this._jederFieldsFieldset = $("<div class='add-example-jeder-fields'>");
// "Malûmatên çavkaniyê" header (+ the "Vala bike" clear button) sitting right above the fields grid,
// replacing the old framed "Ji Citoid an bi destan tijî bike:" box -- like this only makes sense once
// a real jêder-* template is active (there's nothing here to show for the "citoid: not yet detected"
// placeholder or for free text), so the whole section toggles together in _setSourceType().
this._jederSection = $("<div class='add-example-jeder-section'>").append(
$("<div class='add-example-jeder-header'>")
.append($("<span class='add-example-jeder-header-label'>Malûmatên çavkaniyê</span>"))
.append(this._citoidClearButton.$element),
this._jederFieldsFieldset
);
this._translationInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var translationInputLayout = new OO.ui.FieldLayout(this._translationInput, {
label: "Tercimeya kurmancî ya nimûneyê",
align: "top",
});
watchForLinebreaks(this._translationInput);
this._transcriptionInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var transcriptionInputLayout = new OO.ui.FieldLayout(this._transcriptionInput, {
label: "Translîterasyona nimûneyê",
align: "top",
help: "Tenê lê zêde bike eger metna di nimûneyê de bi alfabeya latînî nehatibe nivîsandin.",
helpInline: true,
});
watchForLinebreaks(this._transcriptionInput);
this._applyButton = new OO.ui.ButtonWidget({
label: "Biweşîne",
icon: "check",
title: "Nimûneyê ji bo vê tarîfê nimûneyê lê zêde bike",
flags: ["progressive", "primary"],
disabled: true,
});
this._applyButton.on("click", this.submit.bind(this));
// Reactive "ready to submit" hint next to Biweşîne: no text yet, text but no source (still submittable
// as a bare {{nimûne}}), or fully ready -- kept in sync by _updateReadyHint(), wired to every field below.
this._readyHint = $("<span class='add-example-ready-hint'></span>").text("Metna nimûneyê lazim e.");
// True while a Citoid-eligible URL/DOI/ISBN is typed in but not yet fetched (or fetched then edited away) and no jêder field has been filled by hand -- the "looks done but isn't" trap this exists to catch. Not applicable in free-text mode, where the fetch button isn't even offered.
this._citoidPending = function() {
return self._currentJederKey !== "" &&
!!self._sourceURLInput.getValue().trim() &&
!self._citoidSuccessMsg.is(":visible") &&
!Object.keys(self._jederFieldWidgets).some(function(key) {
return self._jederFieldWidgets[key].getValue().trim();
});
};
this._updateReadyHint = function() {
if (!self._textInput.getValue()) {
self._readyHint.text("Metna nimûneyê lazim e.");
return;
}
if (self._citoidPending()) {
self._readyHint.text("Pêşî 'Bi otomatîk tijî bike' bitikîne.");
return;
}
var hasSource = self._sourceInput.getValue().trim() || self._sourceURLInput.getValue().trim() ||
Object.keys(self._jederFieldWidgets).some(function(key) {
return self._jederFieldWidgets[key].getValue().trim();
});
self._readyHint.text(hasSource ? "Hazir e." : "Çavkanî nehatiye dayîn.");
};
// Prefills the Dem field from the typed URL's own "t=" (see wikt.citoid.extractVideoTimestamp) once jêder-vîdeo is active -- never overwrites a value the user already entered by hand.
this._autofillVideoTimestamp = function() {
var demWidget = self._jederFieldWidgets.dem;
if (self._currentJederKey !== "jêder-vîdeo" || !demWidget || demWidget.getValue().trim()) {
return;
}
ensureCitoid().then(function() {
var dem = wikt.citoid.extractVideoTimestamp(self._sourceURLInput.getValue().trim());
if (dem && !demWidget.getValue().trim()) {
demWidget.setValue(dem);
}
});
};
// framed:false (+ the "destructive" flag for the red text/hover) matches the mockup's borderless
// "Betal bike" -- a plain colored link rather than a boxed button, distinguishing it from Paqij bike.
this._cancelButton = new OO.ui.ButtonWidget({
label: "Betal bike",
icon: "close",
title: "Formê bigire",
flags: ["destructive"],
framed: false,
});
this._cancelButton.on("click", function() {
self.setVisible(false);
});
this._clearButton = new OO.ui.ButtonWidget({
label: "Paqij bike",
icon: "trash",
title: "Hemû qadan vala bike û pêşnûyisên hilanîbûyî jê bibe",
});
this._clearButton.on("click", function() {
self.clear();
self._clearDraft();
});
// Native CSS spinner (see Gadget-wikt.add-examples.css) instead of an external Commons GIF, so there's no network request and it matches dark/light mode.
this._loadingImage = new OO.ui.Widget({
classes: ["add-example-loading"],
});
this._loadingImage.$element.append($('<span class="add-example-spinner" aria-hidden="true"></span>'));
this._loadingImage.toggle(false);
// Two-column top section (see "Form redesign for Kurdish example/Nimûne zêde bike.dc.html"): example
// text (+ translation/transliteration for non-ku, right after it, not after the source fields) on the
// left; source-type + link/Citoid on the right. Built as plain <div>s, not an OOUI layout -- OOUI has
// no CSS-grid container -- so .add-example-top-grid in the CSS can lay them out as a real responsive
// 7fr/5fr grid (collapsing to one column on narrow screens).
var $topLeft = $("<div class='add-example-top-col'>").append(textInputLayout.$element);
if (language !== "ku") {
$topLeft.append(translationInputLayout.$element);
}
if (!pageTitleIsLatin) {
$topLeft.append(transcriptionInputLayout.$element);
}
var $topRight = $("<div class='add-example-top-col'>").append(
sourceTypeLayout.$element,
this._sourceInputLayout.$element,
this._sourceURLInputLayout.$element,
this._citoidSuccessMsg
);
var $topGrid = $("<div class='add-example-top-grid'>").append($topLeft, $topRight);
// Saved on the instance (not just a local var) so _setSourceType() can swap the URL field's label/help
// wording in and out of it when switching to/from free text (see the FieldLayout replaceWith() there).
this._fieldsLayout = $("<div class='add-example-fieldset'>").append($topGrid, this._jederSection);
// Bottom action row -- order/spacing matches the mockup: Biweşîne (+ spinner + ready hint), a spacer
// pushing the rest right, then Paqij bike (bordered/subtle) and Betal bike (borderless red text, via
// framed:false above). A plain flex <div>, not an OOUI HorizontalLayout, so the raw hint/spacer
// elements can sit alongside the real button widgets (same reasoning as the top grid above).
var $buttonsRow = $("<div class='add-example-main-buttons'>").append(
this._applyButton.$element,
this._loadingImage.$element,
this._readyHint,
$("<span class='add-example-buttons-spacer'></span>"),
this._clearButton.$element,
this._cancelButton.$element
);
this._frame = new OO.ui.PanelLayout({
id: "add-example-definition-{0}-form".format(this._definitionLevel.join("-")),
classes: ["add-example-form"],
expanded: false,
});
this._frame.$element.append(this._fieldsLayout, $buttonsRow);
// Default to "citoid" mode; selectItemByData() doesn't fire "choose" (that only fires for interactive selection), so _setSourceType() must also be called explicitly to set up the initial UI.
this._sourceTypeDropdown.getMenu().selectItemByData("citoid");
this._setSourceType("citoid");
}
Form.prototype = {
// Returns the jQuery object for this form.
get $element() {
return this._frame.$element;
},
// Switches the source section between free text, Citoid auto-detect (no template chosen yet), and a specific jêder-* template, rebuilding the field list to match. The URL field itself is always visible in every mode (see the constructor); only the free-text textarea, the Citoid fetch button, and the "Malûmatên çavkaniyê" fields section toggle here.
_setSourceType: function(jederKey) {
var self = this;
this._currentJederKey = jederKey;
this._jederFieldsFieldset.empty();
this._jederFieldWidgets = {};
var isRealJederKey = jederKey && jederDefs[jederKey];
if (isRealJederKey) {
var def = jederDefs[jederKey];
def.fields.forEach(function(field) {
var widget = field.multiline
? new OO.ui.MultilineTextInputWidget({ rows: 2, autosize: false })
: new OO.ui.TextInputWidget();
self._jederFieldWidgets[field.key] = widget;
widget.on("change", function() {
self._updateReadyHint();
});
var layout = new OO.ui.FieldLayout(widget, {
label: field.label,
align: "top",
classes: ["add-example-field-span-" + (field.span || 4)],
});
self._jederFieldsFieldset.append(layout.$element);
});
}
// "Malûmatên çavkaniyê" header + fields grid: only once a real template is chosen/detected --
// nothing to show yet for the plain "citoid: not yet detected" placeholder or for free text.
this._jederSection.toggle(!!isRealJederKey);
// Free text textarea only for "" (free text); hidden for "citoid" and any real jêder-* key.
this._sourceInputLayout.toggle(jederKey === "");
// Citoid fetch button: hidden for free text (nothing there for it to fill in), shown for "citoid" auto-detect and any real jêder-* key. The URL input itself next to it stays visible in every mode.
this._citoidButton.toggle(jederKey !== "");
// URL field wording: plain "attach a link" phrasing for free text, Citoid-oriented phrasing otherwise. Only recreated when actually crossing that boundary, not on every dropdown change (e.g. switching between two jêder-* types keeps the same wording, no need to touch the DOM).
var isFreeText = jederKey === "";
if (this._urlFieldIsFreeTextWording !== isFreeText) {
this._urlFieldIsFreeTextWording = isFreeText;
this._sourceURLInput.setPlaceholder(isFreeText ? "URLyeke wekî https://…" : "URLyek wekî https://… an jî DOI/ISBN");
var $oldLayout = this._sourceURLInputLayout.$element;
// Re-wraps the SAME _urlRowWidget (still holding _sourceURLInput + _citoidButton) in a new
// FieldLayout with the new label/help; the widget's $element moves along with it, same as the
// old addItems()/removeItems() swap did for the plain input before this redesign.
this._sourceURLInputLayout = new OO.ui.FieldLayout(this._urlRowWidget, isFreeText ? {
label: "Adresa webê ya nimûneyê",
align: "top",
help: "Tenê binivîse eger lînk jixwe di referansa çavkaniyê de tinebe.",
helpInline: true,
} : {
label: "Lînk, DOI an ISBNya çavkaniyê",
align: "top",
help: "Ev dibe lînka çavkaniyê (url=). Ji bo şablonên jêder-*, dikare bi Citoid an bi destan jî bên dagirtin.",
helpInline: true,
});
$oldLayout.replaceWith(this._sourceURLInputLayout.$element);
}
this._autofillVideoTimestamp();
this._updateReadyHint();
},
// Fetches data via wikt.citoid (loaded on demand by ensureCitoid() if needed), picks the matching jêder-* template, and fills its empty fields.
_fillFromCitoid: function() {
var self = this;
var query = this._sourceURLInput.getValue().trim();
if (!query) {
mw.notify("Ji kerema xwe re pêşî URL, DOI an ISBNyekê binivîse.");
return;
}
this._citoidButton.setDisabled(true);
this._loadingImage.toggle(true);
ensureCitoid().then(function() {
return wikt.citoid.fetchJederFields(query);
}).then(function(result) {
// Only let Citoid pick the template type when nothing's been chosen yet (the "citoid" auto-detect default). If the user already selected a specific jêder-* type (or free text), that choice is respected — e.g. picking "Websîte" and fetching a tweet must not silently switch to "Kovar" just because Citoid guessed differently.
var wasAutoDetect = self._currentJederKey === "citoid";
if (wasAutoDetect) {
var menu = self._sourceTypeDropdown.getMenu();
var item = menu.findItemFromData(result.jederKey);
if (item) {
menu.chooseItem(item); // this calls _setSourceType(jederKey) automatically
}
}
var targetJederKey = self._currentJederKey;
// Fields Citoid returned were shaped for its own detected type; if the active template differs (the case above where the user's choice was kept), re-derive fields for that template instead so e.g. "Websîte" still gets its own website-shaped fields (websîte, tarîx, ...) rather than leftover kovar-shaped ones.
var fields = targetJederKey === result.jederKey ? result.fields : wikt.citoid.dataToJederFields(targetJederKey, result.raw);
Object.keys(fields).forEach(function(key) {
var widget = self._jederFieldWidgets[key];
if (widget && !widget.getValue()) {
widget.setValue(fields[key]);
}
});
self._citoidSuccessMsg.show();
self._updateReadyHint();
mw.notify("Malûmat ji Citoid hatin barkirin.");
}, function(errorMsg) {
// wikt.citoid may still be missing here if ensureCitoid() itself failed to load the script (e.g. network error) -- fall back to the bare error notice in that case.
if (!window.wikt || !window.wikt.citoid) {
mw.notify("Nekarî citoid-helper.js bar bike.");
return;
}
// Citoid can't fetch some sites at all (e.g. x.com/twitter.com) -- fall back to jêder-websîte with a website name guessed from the URL itself, rather than just a bare error.
var fallbackSite = wikt.citoid.websiteNameForUrl(query);
if (fallbackSite) {
if (self._currentJederKey !== "jêder-websîte") {
var menu = self._sourceTypeDropdown.getMenu();
var item = menu.findItemFromData("jêder-websîte");
if (item) {
menu.chooseItem(item); // this calls _setSourceType("jêder-websîte") automatically
}
}
var websiteWidget = self._jederFieldWidgets["websîte"];
if (websiteWidget && !websiteWidget.getValue()) {
websiteWidget.setValue(fallbackSite);
}
mw.notify("Citoid nikare vê malperê bixwîne; şablona Websîte hate hilbijartin, ji kerema xwe mayî bi destan tijî bike.");
return;
}
mw.notify(typeof errorMsg === "string" ? errorMsg : "Nekarî malûmatan ji Citoid bistîne. Kontrol bike ka URL/DOI/ISBN rast e.");
}).always(function() {
self._citoidButton.setDisabled(false);
self._loadingImage.toggle(false);
});
},
// Toggles the visibility of this form and restores any saved draft when shown. The title text takes
// the button's place while open (see the "Form redesign for Kurdish example" mockup); the button
// itself stays put ready to reappear once the form is cancelled/closed.
setVisible: function(visible) {
this._$button.toggle(!visible);
this._$title.toggle(visible);
this._frame.toggle(visible);
if (visible) {
alignFormToPage(this._frame.$element);
var draft = draftStorage.Get() || {};
if (!this._textInput.getValue() && draft.text) {
this._textInput.setValue(draft.text);
}
if (!this._sourceInput.getValue() && draft.source) {
this._sourceInput.setValue(draft.source);
}
if (!this._sourceURLInput.getValue() && draft.sourceURL) {
this._sourceURLInput.setValue(draft.sourceURL);
}
if (!this._translationInput.getValue() && draft.translation) {
this._translationInput.setValue(draft.translation);
}
if (!this._transcriptionInput.getValue() && draft.transcription) {
this._transcriptionInput.setValue(draft.transcription);
}
}
},
// Removes any saved draft (localStorage/cookie via MediaWiki:Gadget-StorageUtils.js) so it can't resurface on other pages.
_clearDraft: function() {
draftStorage.Set({});
},
// Clears all fields in this form.
clear: function() {
this._textInput.setValue("");
this._sourceInput.setValue("");
this._sourceURLInput.setValue("");
this._translationInput.setValue("");
this._transcriptionInput.setValue("");
this._citoidSuccessMsg.hide();
this._sourceTypeDropdown.getMenu().selectItemByData("citoid");
this._setSourceType("citoid");
},
// Warns before submitting if a Citoid URL/DOI/ISBN was typed but never successfully fetched, then defers to _doSubmit.
submit: function() {
if (this._citoidPending() && !window.confirm("Te lînk, DOI an ISBN nivîsand lê hîn jê malûmat nehatine standin. Bêyî wan berdewam bikî?")) {
return;
}
this._doSubmit();
},
// Generates and submits the wikicode, then inserts the resulting HTML element if no errors occurred.
_doSubmit: function() {
var self = this;
self._textInput.setDisabled(true);
self._sourceInput.setDisabled(true);
self._sourceURLInput.setDisabled(true);
self._translationInput.setDisabled(true);
self._transcriptionInput.setDisabled(true);
self._sourceTypeDropdown.setDisabled(true);
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setDisabled(true);
});
// self._disableTranslationChk.setDisabled(true);
this._applyButton.setDisabled(true);
this._clearButton.setDisabled(true);
this._loadingImage.toggle(true);
var source = this._sourceInput.getValue().trim();
var sourceURL = this._sourceURLInput.getValue().trim();
var text = this._textInput.getValue().trim();
// If a jêder-* template is selected, collect its filled-in fields.
var jederParams = [];
if (this._currentJederKey && jederDefs[this._currentJederKey]) {
jederDefs[this._currentJederKey].fields.forEach(function(field) {
var widget = self._jederFieldWidgets[field.key];
var value = widget ? widget.getValue().trim() : "";
if (value) {
jederParams.push(field.key + "=" + value);
}
});
}
var usingJederTemplate = this._currentJederKey && jederParams.length > 0;
var minakAnNa, sablon;
if (usingJederTemplate) {
// The jêder-* template itself is used as the template, not as the "2=" content.
minakAnNa = "*";
sablon = this._currentJederKey;
} else if (source || sourceURL) {
minakAnNa = "*";
sablon = "jêder";
} else {
minakAnNa = ":";
sablon = "nimûne";
}
var listMarker = "".padStart(this._definitionLevel.length - 1, "#") + minakAnNa;
var title = mw.config.get('wgTitle');
// jêder-* template, jêder, or nimûne
var code = listMarker + " {{" + sablon;
// 1= language code
code += "|" + this._language;
if (usingJederTemplate) {
// Fields of the selected jêder-* template, passed straight through as its parameters.
jederParams.forEach(function(param) {
code += "|" + param;
});
} else {
// 2= source (free text)
if (source) {
code += "|2=" + source;
}
if (sourceURL) {
code += "|url=" + sourceURL;
}
}
// jêgirtin/nimûne (quotation text)
code += "|";
if (sablon !== "nimûne") {
code += "jêgirtin=";
}
// bold the page title, then convert any literal linebreak in the example text to <br> (see nlToBr) so it can't break the single-line "#*" wikitext
code += nlToBr(text.replace(new RegExp("(" + title + "([^( |,|;|?|.|!)]+)?)", "ig"), "'''$1'''"));
if (this._language !== "ku") {
var translation = nlToBr(this._translationInput.getValue().trim());
if (translation) {
code += "|tercime=" + translation;
}
}
var transcription = nlToBr(this._transcriptionInput.getValue().trim());
if (transcription) {
code += "|tr=" + transcription;
}
code += "}}";
// var escapedLangCode = languages[this._language].charAt(0).toUpperCase() + languages[this._language].slice(1);
// console.log("escapedLangCode: ", escapedLangCode);
var sectionIDPattern = new RegExp("^([\\wîêçş_]+?)_?(\\d+)?_?(\\d+)?$");
console.log("this._definitionLevel[0]: ", this._definitionLevel[0]);
var matchSectionID = sectionIDPattern.exec(this._definitionLevel[0]);
//var isInflection;
var sectionType = matchSectionID[1].replace(/_/, ' ');
sectionType = sectionType.replace(/_\d+$/, '');
console.log("sectionType: ", sectionType);
var sectionNum = matchSectionID[2] ? parseInt(matchSectionID[2]) : "";
console.log("Section Number:", sectionNum);
// Insert new example into page’s code
api.get({
action: "query",
titles: mw.config.get("wgPageName"),
prop: "revisions",
rvprop: "content",
rvslots: "main",
}).then(function(data) {
var pageContent;
for (var pageID in data.query.pages) {
if (data.query.pages.hasOwnProperty(pageID)) {
// noinspection JSUnresolvedVariable
pageContent = data.query.pages[pageID].revisions[0].slots.main["*"];
break;
}
}
// Look for correct language section
var langSectionRegex = new RegExp("==[ ]*{{ziman\\|{0}}}[ ]*==".format(self._language));
var langSectionIndex = pageContent.search(langSectionRegex);
console.log("langSectionIndex:", langSectionIndex);
if (langSectionIndex === -1) {
console.log("langSectionIndex === -1");
error("Xeletiyeke bi koda zimanî heye. Koda zimanî:" + self._language);
return;
}
// Look for correct word type section
var lines = pageContent.slice(langSectionIndex).split("\n");
var sectionNamesRegex = Object.keys(sectionNames).join('|');
var sectionRegex = new RegExp('^===[ ]*(' + sectionNamesRegex + ')\\s*(\\d+)?');
var targetLineIndex;
for (targetLineIndex = 0; targetLineIndex < lines.length; targetLineIndex++) {
var line = lines[targetLineIndex];
console.log("line:", line);
var matchSection = sectionRegex.exec(line);
if (matchSection) {
console.log("matchSection:", matchSection[1]);
// Extract section name and number from the matched result
var matchedSectionName = matchSection[1];
var matchedSectionNum = matchSection[2]; // It could be undefined
if (!sectionNames[sectionType]) {
error('Navê beşê xelet e. Di beşên "Ji wêjêyê" û "Ji wêjêya klasîk" ev amûr nayê bikaranîn.');
return; // Exit the function
}
// Check if the matched section name is in the expected list
if (sectionNames[sectionType].includes(matchedSectionName)) {
// Match only the specific numbered section the button was clicked in (e.g. "Navdêr 2",
// not just the first "===Navdêr...===" heading found) -- both sides are "" when the
// section has no number at all (a single unnumbered "===Navdêr===").
var matchedSectionNumValue = matchedSectionNum ? parseInt(matchedSectionNum, 10) : "";
if (matchedSectionNumValue === sectionNum) {
// Add more conditions if needed for inflection, e.g., (isInflection === line.includes("Formeke "))
break;
}
}
}
}
if (targetLineIndex === lines.length) {
console.log("targetLineIndex === lines.length");
error("Di navê beşê de xeletî heye. Îhtimalen bi vî navê beşê çend heb hene.");
return;
}
// Look for correct definition
var defIndex = -1;
var level = 1;
for (; targetLineIndex < lines.length; targetLineIndex++) {
var m = /^(#+)[^*#:]/.exec(lines[targetLineIndex]);
console.log("lines[targetLineIndex]:", lines[targetLineIndex]);
if (m) {
console.log("m:", m);
if (level === m[1].length) {
console.log("m[1]:", m[1]);
defIndex++;
console.log("defIndex:", defIndex);
if (self._definitionLevel[level] === defIndex) {
console.log("self._definitionLevel[level] === defIndex");
console.log("self._definitionLevel[level]", self._definitionLevel[level]);
if (level === self._definitionLevel.length - 1) {
console.log("level:", level);
break;
} else {
level++;
defIndex = -1;
}
}
}
}
}
// Find where to insert within this definition's "#:"/"#*" block: walk lines after the definition (findBlockEnd() tracks multi-line templates), and use exampleTemplateNames to tell real examples from annotations (synonyms, antonyms, alt-forms, etc.) rather than hard-blocking specific names.
var insertionFound = false;
var lastRelevantBlockEnd = -1;
var isJederFamily = (sablon === "jêder" || Object.prototype.hasOwnProperty.call(jederDefs, sablon));
var scanIndex = targetLineIndex + 1;
var emptyTemplate = false;
for (; scanIndex < lines.length; scanIndex++) {
var scanLine = lines[scanIndex];
if (!scanLine.startsWith("#:") && !scanLine.startsWith("#*")) {
// Left this definition's "#:"/"#*" block (e.g. a new definition or section starts).
break;
}
var blockEnd = findBlockEnd(lines, scanIndex);
var templateName = getLineTemplateName(scanLine);
var isExampleLine = templateName !== null &&
exampleTemplateNames.indexOf(templateName) !== -1;
if (isJederFamily) {
// jêder-family examples go after all "#:"/"#*" lines of this definition (both real examples and annotations).
lastRelevantBlockEnd = blockEnd;
insertionFound = true;
} else if (sablon === "nimûne") {
// "nimûne" examples go before any "#*" line, but after "#:" lines.
if (scanLine.startsWith("#*")) {
break;
}
lastRelevantBlockEnd = blockEnd;
insertionFound = true;
}
scanIndex = blockEnd; // Skip past the whole (possibly multi-line) block
}
var insertAt = lastRelevantBlockEnd >= 0 ? lastRelevantBlockEnd + 1 : scanIndex;
if (lastRelevantBlockEnd >= 0) {
emptyTemplate = /#+\*\s*{{[ ]*b?ê?(nimûne|mînak|jêgirtin)\??\s*\|\s*\|?\s*[^|}]+}}/.test(lines[lastRelevantBlockEnd]);
}
if (emptyTemplate) {
console.log("empty Template found", sablon);
// Replace empty template with new example
lines.splice(lastRelevantBlockEnd, 1, code);
} else {
console.log("empty Template not found", sablon);
// Insert the new example (right after the definition if it had no existing "#:"/"#*" lines yet, or after the relevant block otherwise).
lines.splice(insertAt, 0, code);
}
// Submit new page content
api.edit(mw.config.get("wgPageName"), function(_) {
return {
text: pageContent.slice(0, langSectionIndex) + lines.join("\n"),
summary: "+nimûneya bikaranînê bi amûra « {0} » (v{1}).".format(NAME, VERSION),
};
}).then(function() {
api.parse(code).done(function(data) {
var $renderedExample = $(data).find("ul > li").html();
var $item;
// Insert rendered example into page
if (emptyTemplate) {
self._$lastExample.html($renderedExample);
$item = self._$lastExample;
} else {
self._$lastExample.after($item = $("<li>").append($renderedExample));
}
$item.css("background-color", "lightgreen");
setTimeout(function() {
$item.css("background-color", "inherit");
}, 1000);
self._$lastExample = $item;
});
self.setVisible(false);
self.clear();
self._clearDraft();
reenable();
});
});
function error(errorMessage) {
mw.notify(errorMessage || "Nimûne nehat weşandin, îhtimalen rûpel hate guhartin. Ji kerema xwe re rûpelê dîsa bar bike û dîsa biceribîne.");
draftStorage.Set({
text: self._textInput.getValue(),
source: self._sourceInput.getValue(),
sourceURL: self._sourceURLInput.getValue(),
translation: self._translationInput.getValue(),
transcription: self._transcriptionInput.getValue(),
});
reenable();
}
function reenable() {
self._textInput.setDisabled(false);
self._sourceInput.setDisabled(false);
self._sourceURLInput.setDisabled(false);
self._translationInput.setDisabled(false);
self._transcriptionInput.setDisabled(false);
self._sourceTypeDropdown.setDisabled(false);
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setDisabled(false);
});
// self._disableTranslationChk.setDisabled(false);
self._applyButton.setDisabled(false);
self._cancelButton.setDisabled(false);
self._clearButton.setDisabled(false);
self._loadingImage.toggle(false);
}
},
};
});
// </nowiki>
dgcrfal24p2n2vyv2lm9bmwe2fgamx0
6342590
6342588
2026-08-25T12:36:51Z
Wikihez
7344
6342590
javascript
text/javascript
// <nowiki>
// dependencies (declared in MediaWiki:Gadgets-definition): oojs, oojs-ui, ext.gadget.citoid-helper (wikt.citoid), ext.gadget.StorageUtils (ObjectStorage)
// Formats a string using {0}, {1}, ... placeholders.
if (!String.prototype.format) {
String.prototype.format = function(var_args) {
var args = arguments;
return this.replace(/{(\d+)}/g, function(match, number) {
return typeof args[number] !== "undefined" ? args[number] : match;
});
};
}
$(function() {
"use strict";
// Skip pages where this gadget shouldn't run.
if (
mw.config.get("wgPageName") !== "Wîkîferheng:ceribandin/nimûne" &&
mw.config.get("wgNamespaceNumber") !== 108 &&
mw.config.get("wgNamespaceNumber") !== 0 ||
mw.config.get("wgPageName") === "Destpêk" ||
mw.config.get("wgArticleId") === 0
) return;
console.log("Gadget-wikt.add-examples.js dest pê dike…");
var NAME = "[[Mediawiki:Gadget-wikt.add-examples|Nimûne zêde bike]]";
var VERSION = "2.0";
// Persists form drafts via MediaWiki:Gadget-StorageUtils.js (localStorage, falling back to a cookie) so unsaved text survives a failed submit.
var draftStorage = new ObjectStorage("add_examples_draft", 1);
// Citoid logic normally lives in MediaWiki:Gadget-citoid-helper.js as a registered gadget dependency; not
// currently editable, so ensureCitoid() (below) loads it from a user testing page on demand instead.
// "span" is the field's width in the 12-column grid the fields render in (see .add-example-jeder-fields
// in the CSS and _setSourceType below) -- field ORDER here is also the grid's reading order.
var jederDefs = {
"jêder-kitêb": {
"label": "Kitêb",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 3 },
{ "key": "terciman", "label": "Terciman", "span": 3 },
{ "key": "amadekar", "label": "Amadekar", "span": 3 },
{ "key": "weşanxane", "label": "Weşanxane", "span": 3 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "cih", "label": "Cih", "span": 2 },
{ "key": "sal", "label": "Sal", "span": 1 },
{ "key": "sala-weşandinê", "label": "Sala weşandinê", "span": 2 },
{ "key": "çap", "label": "Çap", "span": 1 },
{ "key": "rûpel", "label": "Rûpel", "span": 1 },
{ "key": "isbn", "label": "ISBN", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
},
"jêder-kovar": {
"label": "Kovar",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 3 },
{ "key": "terciman", "label": "Terciman", "span": 3 },
{ "key": "amadekar", "label": "Amadekar", "span": 3 },
{ "key": "weşanxane", "label": "Weşanxane", "span": 3 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "kovar", "label": "Kovar", "span": 4 },
{ "key": "cild", "label": "Cild", "span": 2 },
{ "key": "hejmar", "label": "Hejmar", "span": 2 },
{ "key": "sal", "label": "Sal", "span": 2 },
{ "key": "rûpel", "label": "Rûpel", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
},
"jêder-websîte": {
"label": "Websîte",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 4 },
{ "key": "terciman", "label": "Terciman", "span": 4 },
{ "key": "websîte", "label": "Websîte", "span": 4 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "url", "label": "URL", "span": 5 },
{ "key": "urlya-arşîvê", "label": "URLya Arşîvê", "span": 5 },
{ "key": "sal", "label": "Sal", "span": 1 },
{ "key": "tarîx", "label": "Tarîx", "span": 1 }
]
},
"jêder-vîdeo": {
"label": "Vîdeo",
"fields": [
{ "key": "hunermend", "label": "Hunermend", "span": 6 },
{ "key": "platform", "label": "Platform", "span": 6 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "sal", "label": "Sal", "span": 2 },
{ "key": "tarîx", "label": "Tarîx", "span": 3 },
{ "key": "dem", "label": "Dem", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
}
};
var sectionNames = {
"Navdêr": ["Navdêr"],
"Formeke navdêrê": ["Formeke navdêrê"],
"Lêker": ["Lêker"],
"Formeke lêkerê": ["Formeke lêkerê"],
"Rengdêr": ["Rengdêr"],
"Formeke rengdêrê": ["Formeke rengdêrê"],
"Hoker": ["Hoker"],
"Formeke hokerê": ["Formeke hokerê"],
"Serenav": ["Serenav"],
"Formeke serenavê": ["Formeke serenavê"],
"Artîkel": ["Artîkel"],
"Baneşan": ["Baneşan"],
"Bazinedaçek": ["Bazinedaçek"],
"Biwêj": ["Biwêj"],
"Cînav": ["Cînav"],
"Daçek": ["Daçek"],
"Girêdek": ["Girêdek"],
"Gotineke pêşiyan": ["Gotineke pêşiyan"],
"Hejmar": ["Hejmar"],
"Hevok": ["Hevok"],
"Îfade": ["Îfade"],
"Kurtenav": ["Kurtenav"],
"Navgir": ["Navgir"],
"Paşdaçek": ["Paşdaçek"],
"Paşgir": ["Paşgir"],
"Pêşdaçek": ["Pêşdaçek"],
"Pêşgir": ["Pêşgir"],
"Pirtik": ["Pirtik"],
"Reh": ["Reh"],
"Sembol": ["Sembol"],
"Tîp": ["Tîp"]
};
// Template names treated as "real examples" (an allow-list, not the old deny-list) so annotation templates like synonyms/antonyms/alt-forms aren't mistaken for examples.
var exampleTemplateNames = ["jêder", "nimûne"].concat(Object.keys(jederDefs));
// Returns the template name starting a "#:"/"#*" line (e.g. "jêder" from "#* {{jêder|ku|...}}"), or null if the line doesn't start with a template.
function getLineTemplateName(line) {
var m = /^#[:*]\s*\{\{\s*([^|}]+)/.exec(line);
return m ? m[1].trim() : null;
}
// Returns the index of the line where a (possibly multi-line) template block starting at startIndex closes its {{ }} braces, so multi-line templates are treated as one block.
function findBlockEnd(lines, startIndex) {
var depth = 0;
var i = startIndex;
for (; i < lines.length; i++) {
var opens = (lines[i].match(/\{\{/g) || []).length;
var closes = (lines[i].match(/\}\}/g) || []).length;
depth += opens - closes;
if (depth <= 0) {
break;
}
}
return i;
}
// Ported from start.js: converts literal line breaks typed/pasted into the example/translation/transcription boxes into wikitext <br> tags, since a raw newline would break the single-line "#*" wikitext structure.
function nlToBr(text) {
return text ? text.replace(/\r\n|\r|\n/g, "<br>") : text;
}
function escapeHtmlForBackdrop(str) {
return String(str)
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">");
}
// Mirrors a textarea's text with a small marker after each line that's followed by an actual typed/pasted linebreak, rendered into a transparent backdrop behind the textarea (see ensureLinebreakBackdrop()).
function buildLinebreakBackdropHtml(text) {
var lines = text.split(/\r\n|\r|\n/);
return $.map(lines, function(line, i) {
var isLast = i === lines.length - 1;
return escapeHtmlForBackdrop(line) +
(isLast ? "" : "<mark class='add-example-linebreak-mark'>↵</mark>\n");
}).join("");
}
// Copies the metrics that affect where text wraps/lands (font, line height, padding, border) from the real textarea onto its backdrop via computed style, since the backdrop is a plain <div>, not a themed OOUI input.
function syncLinebreakBackdropMetrics(textarea, backdrop) {
var cs = window.getComputedStyle(textarea[0]);
backdrop.css({
"box-sizing": cs.boxSizing,
"padding-top": cs.paddingTop,
"padding-right": cs.paddingRight,
"padding-bottom": cs.paddingBottom,
"padding-left": cs.paddingLeft,
"border-width": cs.borderWidth,
"border-style": "solid",
"font-family": cs.fontFamily,
"font-size": cs.fontSize,
"font-weight": cs.fontWeight,
"line-height": cs.lineHeight,
"letter-spacing": cs.letterSpacing
});
}
// Lazily inserts the transparent backdrop layer used to mark linebreaks, as a sibling of the textarea inside its existing OOUI input wrapper (which OOUI already positions relatively for icon overlays), rather than start.js's approach of wrapping the textarea in a new div — that would risk disturbing OOUI's own layout of the input. Safe to call more than once; the backdrop is cached.
function ensureLinebreakBackdrop(textarea) {
var existing = textarea.data("addExampleLinebreakBackdrop");
if (existing) {
return existing;
}
var $parent = textarea.parent();
if ($parent.css("position") === "static") {
$parent.css("position", "relative");
}
var backdrop = $("<div aria-hidden='true'></div>").addClass("add-example-linebreak-backdrop");
textarea.before(backdrop);
textarea.data("addExampleLinebreakBackdrop", backdrop);
textarea.on("scroll.addExampleLinebreak", function() {
backdrop.scrollTop(textarea.scrollTop()).scrollLeft(textarea.scrollLeft());
});
return backdrop;
}
// Flags a textarea (via CSS class, for the border tint + tooltip) while it contains a typed/pasted linebreak, so the user notices before it's silently turned into <br> on submit; marks only the exact point of the break via the mirrored backdrop.
function highlightLinebreak(el) {
var textarea = $(el);
var text = textarea.val();
var hasBreak = /\r|\n/.test(text);
textarea
.toggleClass("add-example-has-linebreak", hasBreak)
.attr("title", hasBreak ? "Xeta nû dê wek <br> bê nivîsandin" : "");
if (!hasBreak) {
var cached = textarea.data("addExampleLinebreakBackdrop");
if (cached) {
cached.hide();
}
textarea.removeClass("add-example-has-linebreak-source");
return;
}
var backdrop = ensureLinebreakBackdrop(textarea);
textarea.addClass("add-example-has-linebreak-source");
syncLinebreakBackdropMetrics(textarea, backdrop);
backdrop.html(buildLinebreakBackdropHtml(text)).show();
backdrop.scrollTop(textarea.scrollTop()).scrollLeft(textarea.scrollLeft());
}
// Wires linebreak detection onto an OOUI multiline widget, matching start.js's scope: only the quote/example text and its translation/transcription, not bibliographic fields. Uses OOUI's own "change" event rather than the raw <textarea> "input" event start.js listens to, since our fields can also be set programmatically (Clear button, draft restore) via setValue(), which doesn't fire a native DOM input event.
function watchForLinebreaks(widget) {
widget.on("change", function() {
highlightLinebreak(widget.$input[0]);
});
}
var api = new mw.Api();
// Loads wikt.citoid if it isn't already loaded, from Wikihez's testing page (MediaWiki: isn't editable
// right now) -- self-contained rather than calling wikt.citoidHelper.ensure() directly, since that
// function only exists once citoid-helper.js has already run once, which isn't guaranteed here.
function ensureCitoid() {
if (window.wikihez && window.wikihez.citoid) {
return $.Deferred().resolve().promise();
}
var url = mw.util.getUrl("Bikarhêner:Wikihez/skrîpt/js/Gadget-citoid-helper.js", {
action: "raw",
ctype: "text/javascript"
});
return mw.loader.getScript(mw.config.get("wgServer") + url);
}
// Language display name, read from the matching section's .besazimani link text.
function languageNameForCode(code) {
var $mark = $(".besazimani[id='" + code + "']").first();
return $mark.length ? $mark.text().trim() : null;
}
// Whether the page title itself (accented Kurdish Latin letters included) is written in Latin script.
var pageTitleIsLatin = !/[^\x00-\x7FÀ-ɏḀ-ỿ‘’]/.test(mw.config.get("wgTitle") || "");
// .example/.benimune = old Şablon:jêder hidden marker; .h-usage-example/.h-quotation = Modul:usex containers used directly by Şablon:nimûne; .citation-whole = Modul:quote's own wrapper, now used by jêder-* templates (Modul:quote nests .h-quotation inside .citation-whole > dl > dd instead of putting it directly under the <li>, so it needs its own entry here).
// Requiring "ul > li >" is what makes this only match an example that's grouped into its own <ul> -- a
// {{nimûne}} (or its "mk" redirect) with no jêder-family citation alongside it in the same definition
// renders straight under the definition's own content instead, with no such group; also reused below to
// tell whether the second pass still needs to handle a given definition.
var EXISTING_EXAMPLE_SELECTOR = "ul > li > .example, ul > li > .benimune, ul > li > .h-usage-example, ul > li > .h-quotation, ul > li > .citation-whole";
$(EXISTING_EXAMPLE_SELECTOR).each(function() {
var $element = $(this);
var $item = $element.parent();
if (!$item.next().length) {
// Get example’s language
// bdi[lang] = old hidden marker; .e-example[lang]/.e-quotation[lang] = Modul:usex/Modul:quote already put lang on the visible span.
// A jêder-* citation with no jêgirtin= (quotation text) yet renders no h-quotation/e-quotation at all
// (see get_quote() in Modul quote.lua) -- exactly the "bare citation" case this button exists to fill
// in, so this can't just crash: without the guard, [0] is undefined here and ".lang" throws, which
// (since $.each() has no try/catch) silently kills the button for every remaining match on the page.
var $langEl = $item.find(".e-example[lang], .e-quotation[lang], bdi[lang]")[0];
if (!$langEl) {
console.warn("Gadget-wikt.add-examples: nikaribe zimanê vê nimûneyê bibîne, valakirî hate derbaskirin.", $item);
return;
}
var language = $langEl.lang;
if (language === "ku-Latn") {
language = "ku";
}
console.log('Language:', language);
// Get section and indices of associated definition
var definitionLevel = [];
var $definitionItem = $item.parent().parent();
var $topItem;
do {
// Skip MediaWiki's empty <li class="mw-empty-elt"> placeholders so indices match the real "#" lines in wikitext (see submit()).
definitionLevel.splice(0, 0, $definitionItem.prevAll("li:not(.mw-empty-elt)").length);
$topItem = $definitionItem;
$definitionItem = $definitionItem.parent().parent();
} while ($definitionItem.prop("tagName") === "LI");
var $section = $($topItem.parent().prevAll(".mw-heading3, h3").get(0));
if ($section.length) {
definitionLevel.splice(0, 0, $section.find("h3").attr("id"));
} else {
console.warn("Gadget-wikt.add-examples: Section heading not found");
// TODO: why does this happen? mw.notify("Beş nehat dîtin. Jkx li WF:Dîwanê vê problemê ragihînin!");
return;
}
// Remove default edit link if present
var $defaultEditLink = $item.find("span.example > span.stubedit");
if ($defaultEditLink.length) {
$defaultEditLink.remove();
}
// Add a nice button to open the form. $group is the citation-group <ul> itself (parent of $item);
// the form panel is inserted AFTER it (see click handler below), not inside it, so the panel isn't
// squeezed into that <ul>'s narrow hanging-indent width on mobile -- only the button/title stays
// there, matching the "Form redesign for Kurdish example" mockup (title inside the bullet list,
// full-width panel below it).
var $group = $item.parent();
var $formItem = $("<li>");
var $button = $("<a href='#'>Nimûneyeke bikaranînê lê zêde bike</a>");
$button.css("color", "var( --color-subtle, #777777 )");
// Shown in the button's place once the form is open (see Form#setVisible).
var $title = $("<span class='add-example-form-title'></span>").hide();
$formItem.append($button).append($title);
$button.on("click", function() {
if (!$button.form) {
$title.text("Nimûneyeke bi " + (languageNameForCode(language) || "zimanekî nenas").toLowerCase() + " lê zêde dikî.");
var form = new Form($item, $button, $title, language, definitionLevel);
$group.after(form.$element);
}
$button.form.setVisible(true);
return false;
});
$item.after($formItem);
}
});
// Second pass: some definitions have no example the pass above could react to at all -- either genuinely
// zero examples, or one rendered via {{nimûne}} (or its "mk" redirect) with no jêder-family citation next
// to it, which (see the comment on EXISTING_EXAMPLE_SELECTOR above) renders with no "ul > li" group to
// match. This walks every recognized POS section's own definitions list directly instead of reacting to
// an existing example, and reads the language off the language section's own <h2> rather than off an
// example -- so it doesn't need one to already exist. Everything else (Form, submit()) is reused as-is.
// MediaWiki wraps each heading in a "mw-heading2"/"mw-heading3"/... div in current skin output; falls
// back to the bare heading element for older/other output that doesn't wrap it.
function headingOuter($h) {
var $wrap = $h.closest(".mw-heading2, .mw-heading3, .mw-heading4, .mw-heading5, .mw-heading6");
return $wrap.length ? $wrap : $h;
}
// Section's language code: nearest preceding .besazimani[id] by document order (not sibling-walking, which mobile's per-section wrapping breaks).
function languageCodeForOl($ol) {
var $marks = $(".besazimani[id]").add($ol);
var ol = $ol.get(0);
var idx = $marks.index(ol);
for (var i = idx - 1; i >= 0; i--) {
var el = $marks.get(i);
if (el.id) {
return el.id;
}
}
return null;
}
// A <li> whose OWN direct content (not counting a nested <ol>) is wrapped in ".form-of-definition" is
// MediaWiki's "form of" template system marking that content as generated by a template -- e.g.
// {{ku-tewîna-nav}}'s "Formeke heval:" wrapper together with its "rewşa îzafeyî"/"rewşa çemandî"/...
// readings underneath. That whole nested block is normally the ENTIRE expansion of a single "#"
// wikitext line, with no separate "##" line behind any individual reading -- recursing into it would
// hand out one button per reading, each trying to match a "##" line that doesn't exist, and submit()
// would fail to find where to insert every one of them. A <li> without that class whose nested <ol>
// holds real hand-typed prose (e.g. sîno-koreyî/Navdêr's two genuinely separate "##" sub-senses) has
// no such problem -- those really are individually addressable wikitext lines.
function isFormOfWrapper($li) {
return $li.children(".form-of-definition").length > 0;
}
// Recurse into a <li>'s own nested <ol> UNLESS it's a form-of-template wrapper (see isFormOfWrapper) --
// a wrapper <li> with its own nested <ol> isn't itself a sense with content of its own, only its real
// (non-generated) leaves are.
function eachLeafDefinition($ol, fn) {
$ol.children("li").each(function() {
var $li = $(this);
var $childOl = $li.children("ol");
if ($childOl.length && !isFormOfWrapper($li)) {
$childOl.each(function() {
eachLeafDefinition($(this), fn);
});
} else {
fn($li);
}
});
}
$("h3").each(function() {
var sectionType = $(this).text().trim();
if (!sectionNames[sectionType]) {
return; // not a recognized word-sense section (Bilêvkirin, Etîmolojî, Çavkanî, ...)
}
var h3Id = $(this).attr("id");
// Forward-walk siblings to the definitions <ol>, skipping over a declension table/TemplateStyles/the
// headword line; stop (nothing to attach to in this section) if another heading comes first instead.
var $ol = null;
for (var $cursor = headingOuter($(this)).next(); $cursor.length; $cursor = $cursor.next()) {
if ($cursor.is("ol")) {
$ol = $cursor;
break;
}
if ($cursor.is(".mw-heading2, .mw-heading3, .mw-heading4, .mw-heading5, .mw-heading6, h2, h3, h4, h5, h6")) {
break;
}
}
if (!$ol) {
return;
}
var language = languageCodeForOl($ol);
if (!language) {
console.warn("Gadget-wikt.add-examples: nikaribe koda zimanê vê beşê bibîne.", $ol);
return;
}
eachLeafDefinition($ol, function($li) {
// The pass above already added a button here (or will) -- an actual example already wrapped in
// its own "ul > li" group.
if ($li.find(EXISTING_EXAMPLE_SELECTOR).length) {
return;
}
var definitionLevel = [];
var $definitionItem = $li;
while ($definitionItem.prop("tagName") === "LI") {
// Skip MediaWiki's empty <li class="mw-empty-elt"> placeholders so indices match the real "#" lines in wikitext (see submit()).
definitionLevel.splice(0, 0, $definitionItem.prevAll("li:not(.mw-empty-elt)").length);
$definitionItem = $definitionItem.parent().parent();
}
definitionLevel.splice(0, 0, h3Id);
// A hidden, empty placeholder <li> so submit()'s existing "_$lastExample.after(newLi)" insertion
// (unchanged, same as the pass above) lands the first submitted example right before the button
// -- matching the existing convention of new examples going in before the button, not after it.
var $placeholder = $("<li style='display:none'></li>");
var $formItem = $("<li>");
var $button = $("<a href='#'>Nimûneyeke bikaranînê lê zêde bike</a>");
$button.css("color", "var( --color-subtle, #777777 )");
// Shown in the button's place once the form is open (see Form#setVisible).
var $title = $("<span class='add-example-form-title'></span>").hide();
$formItem.append($button).append($title);
// A "ul" nested directly under a definition "li" starts hidden here (see the HQToggle-controlled
// jêder-citation-group "ul", which only ever renders with an explicit "style="display: block""
// set on it) -- this one has no HQToggle to unhide it, so it needs the same explicit override or
// the button (and the placeholder above) never becomes visible at all.
var $ul = $("<ul>").css("display", "block").append($placeholder).append($formItem);
// The form panel is inserted AFTER $ul (not inside it) once opened -- same reasoning as the first
// pass above: keeps the full-width panel out of the tight bulleted-list indentation on mobile.
$button.on("click", function() {
if (!$button.form) {
$title.text("Nimûneyeke bi " + (languageNameForCode(language) || "zimanekî nenas").toLowerCase() + " lê zêde dikî.");
var form = new Form($placeholder, $button, $title, language, definitionLevel);
$ul.after(form.$element);
}
$button.form.setVisible(true);
return false;
});
$li.append($ul);
});
});
// Pulls the form panel flush with the page's own left/right edges, undoing whatever nested-list indent it inherited from sitting inside a deeply-nested definition.
function alignFormToPage($form) {
var $container = $form.closest(".mw-parser-output");
if (!$container.length) {
return;
}
var pad = parseFloat(window.getComputedStyle($container[0]).paddingLeft) || 0;
var containerLeft = $container.offset().left + pad;
var indent = $form.offset().left - containerLeft;
$form.css({
marginLeft: indent > 0 ? -indent : 0,
width: $container.width() + "px"
});
}
// Constructor for the edit form; lastExample/button/title/language/definitionLevel identify where the form attaches and what it edits.
function Form($lastExample, $button, $title, language, definitionLevel) {
var self = this;
this._language = language;
this._definitionLevel = definitionLevel;
this._$lastExample = $lastExample;
this._$button = $button;
this._$button.form = this;
this._$title = $title;
this._currentJederKey = "";
this._jederFieldWidgets = {};
this._textInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var textInputLayout = new OO.ui.FieldLayout(this._textInput, {
label: "Metna nimûneyê",
align: "top",
});
this._textInput.on("change", function(value) {
self._applyButton.setDisabled(!value);
self._updateReadyHint();
});
watchForLinebreaks(this._textInput);
// Source type dropdown: free text, a jêder-* template, or "citoid" (a pseudo key, not in jederDefs) meaning "not yet detected" — the default, switched automatically once a Citoid fetch succeeds (see _fillFromCitoid).
var sourceTypeMenuItems = [
new OO.ui.MenuOptionWidget({ data: "citoid", label: "Bi Citoidê otomatîk zêde bike" }),
new OO.ui.MenuOptionWidget({ data: "", label: "Bi destê xwe binivîsim" }),
];
for (var jederKey in jederDefs) {
if (jederDefs.hasOwnProperty(jederKey)) {
sourceTypeMenuItems.push(new OO.ui.MenuOptionWidget({
data: jederKey,
label: jederDefs[jederKey].label,
}));
}
}
this._sourceTypeDropdown = new OO.ui.DropdownWidget({
menu: { items: sourceTypeMenuItems },
label: "Bi Citoidê otomatîk zêde bike",
});
var sourceTypeLayout = new OO.ui.FieldLayout(this._sourceTypeDropdown, {
label: "Şablona çavkaniyê",
align: "top",
});
this._sourceTypeDropdown.getMenu().on("choose", function(menuOption) {
self._setSourceType(menuOption.getData());
});
this._sourceInput = new OO.ui.MultilineTextInputWidget();
this._sourceInput.on("change", function() {
self._updateReadyHint();
});
this._sourceInputLayout = new OO.ui.FieldLayout(this._sourceInput, {
label: "Çavkaniya nimûneyê",
align: "top",
});
// Always visible in every mode (free text included) — submit() reads this unconditionally as the "url=" parameter. The Citoid fetch button sits right next to it (not in a separate box) -- see _urlRowWidget below.
this._sourceURLInput = new OO.ui.TextInputWidget({
icon: "link",
placeholder: "https://… an jî DOI/ISBN",
});
this._citoidButton = new OO.ui.ButtonWidget({
label: "Bi otomatîk tijî bike",
icon: "download",
flags: ["progressive"],
title: "Li gorî URL, DOI an ISBNya jorîn, malûmatan ji Citoid tîne û qadên şablona jêder-* otomatîk tijî dike.",
classes: ["add-example-citoid-fetch"],
});
this._citoidButton.on("click", this._fillFromCitoid.bind(this));
this._sourceURLInput.on("change", function() {
self._updateReadyHint();
self._autofillVideoTimestamp();
});
// URL input + inline "auto-fill" button as one row (replaces the old separate framed Citoid box's
// button row) -- a plain OO.ui.Widget used purely as a flex-row container (same pattern as
// _loadingImage below: build it empty, then manually append its children's $elements). Disabling
// during submit() still goes through the individual _sourceURLInput/_citoidButton references, not
// through this wrapper.
this._urlRowWidget = new OO.ui.Widget({ classes: ["add-example-url-row"] });
this._urlRowWidget.$element.append(this._sourceURLInput.$element, this._citoidButton.$element);
this._sourceURLInputLayout = new OO.ui.FieldLayout(this._urlRowWidget, {
label: "Lînk, DOI an ISBNya çavkaniyê",
align: "top",
help: "Li qutiyê URL, DOI an ISBN binivîse û pê lê bike butona 'Bi otomatîk tijî bike' da ku otomatîk çavkanî were dagirtin.",
helpInline: true,
});
// Matches the wording just constructed above, so the initial _setSourceType("citoid") call at the end of this constructor doesn't needlessly recreate an identical layout.
this._urlFieldIsFreeTextWording = false;
// Shown right after a successful Citoid fetch (see _fillFromCitoid); hidden again on clear.
this._citoidSuccessMsg = $("<span class='add-example-citoid-success'>✓ Malûmat hatin dagirtin — li jêr kontrol bike.</span>").hide();
// Clears the URL field and any filled jêder-* fields without touching the example text/translation.
this._citoidClearButton = new OO.ui.ButtonWidget({
label: "Vala bike",
icon: "trash",
framed: false,
title: "Lînkê û qadên jêder-* yên vê beşê vala bike",
classes: ["add-example-citoid-clear"],
});
this._citoidClearButton.on("click", function() {
self._sourceURLInput.setValue("");
self._citoidSuccessMsg.hide();
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setValue("");
});
});
// Plain div (not OO.ui.FieldsetLayout) so the grid CSS class applies directly to the field items.
this._jederFieldsFieldset = $("<div class='add-example-jeder-fields'>");
// "Malûmatên çavkaniyê" header (+ the "Vala bike" clear button) sitting right above the fields grid,
// replacing the old framed "Ji Citoid an bi destan tijî bike:" box -- like this only makes sense once
// a real jêder-* template is active (there's nothing here to show for the "citoid: not yet detected"
// placeholder or for free text), so the whole section toggles together in _setSourceType().
this._jederSection = $("<div class='add-example-jeder-section'>").append(
$("<div class='add-example-jeder-header'>")
.append($("<span class='add-example-jeder-header-label'>Malûmatên çavkaniyê</span>"))
.append(this._citoidClearButton.$element),
this._jederFieldsFieldset
);
this._translationInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var translationInputLayout = new OO.ui.FieldLayout(this._translationInput, {
label: "Tercimeya kurmancî ya nimûneyê",
align: "top",
});
watchForLinebreaks(this._translationInput);
this._transcriptionInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var transcriptionInputLayout = new OO.ui.FieldLayout(this._transcriptionInput, {
label: "Translîterasyona nimûneyê",
align: "top",
help: "Tenê lê zêde bike eger metna di nimûneyê de bi alfabeya latînî nehatibe nivîsandin.",
helpInline: true,
});
watchForLinebreaks(this._transcriptionInput);
this._applyButton = new OO.ui.ButtonWidget({
label: "Biweşîne",
icon: "check",
title: "Nimûneyê ji bo vê tarîfê nimûneyê lê zêde bike",
flags: ["progressive", "primary"],
disabled: true,
});
this._applyButton.on("click", this.submit.bind(this));
// Reactive "ready to submit" hint next to Biweşîne: no text yet, text but no source (still submittable
// as a bare {{nimûne}}), or fully ready -- kept in sync by _updateReadyHint(), wired to every field below.
this._readyHint = $("<span class='add-example-ready-hint'></span>").text("Metna nimûneyê lazim e.");
// True while a Citoid-eligible URL/DOI/ISBN is typed in but not yet fetched (or fetched then edited away) and no jêder field has been filled by hand -- the "looks done but isn't" trap this exists to catch. Not applicable in free-text mode, where the fetch button isn't even offered.
this._citoidPending = function() {
return self._currentJederKey !== "" &&
!!self._sourceURLInput.getValue().trim() &&
!self._citoidSuccessMsg.is(":visible") &&
!Object.keys(self._jederFieldWidgets).some(function(key) {
return self._jederFieldWidgets[key].getValue().trim();
});
};
this._updateReadyHint = function() {
if (!self._textInput.getValue()) {
self._readyHint.text("Metna nimûneyê lazim e.");
return;
}
if (self._citoidPending()) {
self._readyHint.text("Pêşî 'Bi otomatîk tijî bike' bitikîne.");
return;
}
var hasSource = self._sourceInput.getValue().trim() || self._sourceURLInput.getValue().trim() ||
Object.keys(self._jederFieldWidgets).some(function(key) {
return self._jederFieldWidgets[key].getValue().trim();
});
self._readyHint.text(hasSource ? "Hazir e." : "Çavkanî nehatiye dayîn.");
};
// Prefills the Dem field from the typed URL's own "t=" (see wikt.citoid.extractVideoTimestamp) once jêder-vîdeo is active -- never overwrites a value the user already entered by hand.
this._autofillVideoTimestamp = function() {
var demWidget = self._jederFieldWidgets.dem;
if (self._currentJederKey !== "jêder-vîdeo" || !demWidget || demWidget.getValue().trim()) {
return;
}
ensureCitoid().then(function() {
var dem = wikt.citoid.extractVideoTimestamp(self._sourceURLInput.getValue().trim());
if (dem && !demWidget.getValue().trim()) {
demWidget.setValue(dem);
}
});
};
// framed:false (+ the "destructive" flag for the red text/hover) matches the mockup's borderless
// "Betal bike" -- a plain colored link rather than a boxed button, distinguishing it from Paqij bike.
this._cancelButton = new OO.ui.ButtonWidget({
label: "Betal bike",
icon: "close",
title: "Formê bigire",
flags: ["destructive"],
framed: false,
});
this._cancelButton.on("click", function() {
self.setVisible(false);
});
this._clearButton = new OO.ui.ButtonWidget({
label: "Paqij bike",
icon: "trash",
title: "Hemû qadan vala bike û pêşnûyisên hilanîbûyî jê bibe",
});
this._clearButton.on("click", function() {
self.clear();
self._clearDraft();
});
// Native CSS spinner (see Gadget-wikt.add-examples.css) instead of an external Commons GIF, so there's no network request and it matches dark/light mode.
this._loadingImage = new OO.ui.Widget({
classes: ["add-example-loading"],
});
this._loadingImage.$element.append($('<span class="add-example-spinner" aria-hidden="true"></span>'));
this._loadingImage.toggle(false);
// Two-column top section (see "Form redesign for Kurdish example/Nimûne zêde bike.dc.html"): example
// text (+ translation/transliteration for non-ku, right after it, not after the source fields) on the
// left; source-type + link/Citoid on the right. Built as plain <div>s, not an OOUI layout -- OOUI has
// no CSS-grid container -- so .add-example-top-grid in the CSS can lay them out as a real responsive
// 7fr/5fr grid (collapsing to one column on narrow screens).
var $topLeft = $("<div class='add-example-top-col'>").append(textInputLayout.$element);
if (language !== "ku") {
$topLeft.append(translationInputLayout.$element);
}
if (!pageTitleIsLatin) {
$topLeft.append(transcriptionInputLayout.$element);
}
var $topRight = $("<div class='add-example-top-col'>").append(
sourceTypeLayout.$element,
this._sourceInputLayout.$element,
this._sourceURLInputLayout.$element,
this._citoidSuccessMsg
);
var $topGrid = $("<div class='add-example-top-grid'>").append($topLeft, $topRight);
// Saved on the instance (not just a local var) so _setSourceType() can swap the URL field's label/help
// wording in and out of it when switching to/from free text (see the FieldLayout replaceWith() there).
this._fieldsLayout = $("<div class='add-example-fieldset'>").append($topGrid, this._jederSection);
// Bottom action row -- order/spacing matches the mockup: Biweşîne (+ spinner + ready hint), a spacer
// pushing the rest right, then Paqij bike (bordered/subtle) and Betal bike (borderless red text, via
// framed:false above). A plain flex <div>, not an OOUI HorizontalLayout, so the raw hint/spacer
// elements can sit alongside the real button widgets (same reasoning as the top grid above).
var $buttonsRow = $("<div class='add-example-main-buttons'>").append(
this._applyButton.$element,
this._loadingImage.$element,
this._readyHint,
$("<span class='add-example-buttons-spacer'></span>"),
this._clearButton.$element,
this._cancelButton.$element
);
this._frame = new OO.ui.PanelLayout({
id: "add-example-definition-{0}-form".format(this._definitionLevel.join("-")),
classes: ["add-example-form"],
expanded: false,
});
this._frame.$element.append(this._fieldsLayout, $buttonsRow);
// Default to "citoid" mode; selectItemByData() doesn't fire "choose" (that only fires for interactive selection), so _setSourceType() must also be called explicitly to set up the initial UI.
this._sourceTypeDropdown.getMenu().selectItemByData("citoid");
this._setSourceType("citoid");
}
Form.prototype = {
// Returns the jQuery object for this form.
get $element() {
return this._frame.$element;
},
// Switches the source section between free text, Citoid auto-detect (no template chosen yet), and a specific jêder-* template, rebuilding the field list to match. The URL field itself is always visible in every mode (see the constructor); only the free-text textarea, the Citoid fetch button, and the "Malûmatên çavkaniyê" fields section toggle here.
_setSourceType: function(jederKey) {
var self = this;
this._currentJederKey = jederKey;
this._jederFieldsFieldset.empty();
this._jederFieldWidgets = {};
var isRealJederKey = jederKey && jederDefs[jederKey];
if (isRealJederKey) {
var def = jederDefs[jederKey];
def.fields.forEach(function(field) {
var widget = field.multiline
? new OO.ui.MultilineTextInputWidget({ rows: 2, autosize: false })
: new OO.ui.TextInputWidget();
self._jederFieldWidgets[field.key] = widget;
widget.on("change", function() {
self._updateReadyHint();
});
var layout = new OO.ui.FieldLayout(widget, {
label: field.label,
align: "top",
classes: ["add-example-field-span-" + (field.span || 4)],
});
self._jederFieldsFieldset.append(layout.$element);
});
}
// "Malûmatên çavkaniyê" header + fields grid: only once a real template is chosen/detected --
// nothing to show yet for the plain "citoid: not yet detected" placeholder or for free text.
this._jederSection.toggle(!!isRealJederKey);
// Free text textarea only for "" (free text); hidden for "citoid" and any real jêder-* key.
this._sourceInputLayout.toggle(jederKey === "");
// Citoid fetch button: hidden for free text (nothing there for it to fill in), shown for "citoid" auto-detect and any real jêder-* key. The URL input itself next to it stays visible in every mode.
this._citoidButton.toggle(jederKey !== "");
// URL field wording: plain "attach a link" phrasing for free text, Citoid-oriented phrasing otherwise. Only recreated when actually crossing that boundary, not on every dropdown change (e.g. switching between two jêder-* types keeps the same wording, no need to touch the DOM).
var isFreeText = jederKey === "";
if (this._urlFieldIsFreeTextWording !== isFreeText) {
this._urlFieldIsFreeTextWording = isFreeText;
this._sourceURLInput.setPlaceholder(isFreeText ? "URLyeke wekî https://…" : "URLyek wekî https://… an jî DOI/ISBN");
var $oldLayout = this._sourceURLInputLayout.$element;
// Re-wraps the SAME _urlRowWidget (still holding _sourceURLInput + _citoidButton) in a new
// FieldLayout with the new label/help; the widget's $element moves along with it, same as the
// old addItems()/removeItems() swap did for the plain input before this redesign.
this._sourceURLInputLayout = new OO.ui.FieldLayout(this._urlRowWidget, isFreeText ? {
label: "Adresa webê ya nimûneyê",
align: "top",
help: "Tenê binivîse eger lînk jixwe di referansa çavkaniyê de tinebe.",
helpInline: true,
} : {
label: "Lînk, DOI an ISBNya çavkaniyê",
align: "top",
help: "Ev dibe lînka çavkaniyê (url=). Ji bo şablonên jêder-*, dikare bi Citoid an bi destan jî bên dagirtin.",
helpInline: true,
});
$oldLayout.replaceWith(this._sourceURLInputLayout.$element);
}
this._autofillVideoTimestamp();
this._updateReadyHint();
},
// Fetches data via wikt.citoid (loaded on demand by ensureCitoid() if needed), picks the matching jêder-* template, and fills its empty fields.
_fillFromCitoid: function() {
var self = this;
var query = this._sourceURLInput.getValue().trim();
if (!query) {
mw.notify("Ji kerema xwe re pêşî URL, DOI an ISBNyekê binivîse.");
return;
}
this._citoidButton.setDisabled(true);
this._loadingImage.toggle(true);
ensureCitoid().then(function() {
return wikt.citoid.fetchJederFields(query);
}).then(function(result) {
// Only let Citoid pick the template type when nothing's been chosen yet (the "citoid" auto-detect default). If the user already selected a specific jêder-* type (or free text), that choice is respected — e.g. picking "Websîte" and fetching a tweet must not silently switch to "Kovar" just because Citoid guessed differently.
var wasAutoDetect = self._currentJederKey === "citoid";
if (wasAutoDetect) {
var menu = self._sourceTypeDropdown.getMenu();
var item = menu.findItemFromData(result.jederKey);
if (item) {
menu.chooseItem(item); // this calls _setSourceType(jederKey) automatically
}
}
var targetJederKey = self._currentJederKey;
// Fields Citoid returned were shaped for its own detected type; if the active template differs (the case above where the user's choice was kept), re-derive fields for that template instead so e.g. "Websîte" still gets its own website-shaped fields (websîte, tarîx, ...) rather than leftover kovar-shaped ones.
var fields = targetJederKey === result.jederKey ? result.fields : wikt.citoid.dataToJederFields(targetJederKey, result.raw);
Object.keys(fields).forEach(function(key) {
var widget = self._jederFieldWidgets[key];
if (widget && !widget.getValue()) {
widget.setValue(fields[key]);
}
});
self._citoidSuccessMsg.show();
self._updateReadyHint();
mw.notify("Malûmat ji Citoid hatin barkirin.");
}, function(errorMsg) {
// wikt.citoid may still be missing here if ensureCitoid() itself failed to load the script (e.g. network error) -- fall back to the bare error notice in that case.
if (!window.wikihez || !window.wikihez.citoid) {
mw.notify("Nekarî citoid-helper.js bar bike.");
return;
}
// Citoid can't fetch some sites at all (e.g. x.com/twitter.com) -- fall back to jêder-websîte with a website name guessed from the URL itself, rather than just a bare error.
var fallbackSite = wikt.citoid.websiteNameForUrl(query);
if (fallbackSite) {
if (self._currentJederKey !== "jêder-websîte") {
var menu = self._sourceTypeDropdown.getMenu();
var item = menu.findItemFromData("jêder-websîte");
if (item) {
menu.chooseItem(item); // this calls _setSourceType("jêder-websîte") automatically
}
}
var websiteWidget = self._jederFieldWidgets["websîte"];
if (websiteWidget && !websiteWidget.getValue()) {
websiteWidget.setValue(fallbackSite);
}
mw.notify("Citoid nikare vê malperê bixwîne; şablona Websîte hate hilbijartin, ji kerema xwe mayî bi destan tijî bike.");
return;
}
mw.notify(typeof errorMsg === "string" ? errorMsg : "Nekarî malûmatan ji Citoid bistîne. Kontrol bike ka URL/DOI/ISBN rast e.");
}).always(function() {
self._citoidButton.setDisabled(false);
self._loadingImage.toggle(false);
});
},
// Toggles the visibility of this form and restores any saved draft when shown. The title text takes
// the button's place while open (see the "Form redesign for Kurdish example" mockup); the button
// itself stays put ready to reappear once the form is cancelled/closed.
setVisible: function(visible) {
this._$button.toggle(!visible);
this._$title.toggle(visible);
this._frame.toggle(visible);
if (visible) {
alignFormToPage(this._frame.$element);
var draft = draftStorage.Get() || {};
if (!this._textInput.getValue() && draft.text) {
this._textInput.setValue(draft.text);
}
if (!this._sourceInput.getValue() && draft.source) {
this._sourceInput.setValue(draft.source);
}
if (!this._sourceURLInput.getValue() && draft.sourceURL) {
this._sourceURLInput.setValue(draft.sourceURL);
}
if (!this._translationInput.getValue() && draft.translation) {
this._translationInput.setValue(draft.translation);
}
if (!this._transcriptionInput.getValue() && draft.transcription) {
this._transcriptionInput.setValue(draft.transcription);
}
}
},
// Removes any saved draft (localStorage/cookie via MediaWiki:Gadget-StorageUtils.js) so it can't resurface on other pages.
_clearDraft: function() {
draftStorage.Set({});
},
// Clears all fields in this form.
clear: function() {
this._textInput.setValue("");
this._sourceInput.setValue("");
this._sourceURLInput.setValue("");
this._translationInput.setValue("");
this._transcriptionInput.setValue("");
this._citoidSuccessMsg.hide();
this._sourceTypeDropdown.getMenu().selectItemByData("citoid");
this._setSourceType("citoid");
},
// Warns before submitting if a Citoid URL/DOI/ISBN was typed but never successfully fetched, then defers to _doSubmit.
submit: function() {
if (this._citoidPending() && !window.confirm("Te lînk, DOI an ISBN nivîsand lê hîn jê malûmat nehatine standin. Bêyî wan berdewam bikî?")) {
return;
}
this._doSubmit();
},
// Generates and submits the wikicode, then inserts the resulting HTML element if no errors occurred.
_doSubmit: function() {
var self = this;
self._textInput.setDisabled(true);
self._sourceInput.setDisabled(true);
self._sourceURLInput.setDisabled(true);
self._translationInput.setDisabled(true);
self._transcriptionInput.setDisabled(true);
self._sourceTypeDropdown.setDisabled(true);
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setDisabled(true);
});
// self._disableTranslationChk.setDisabled(true);
this._applyButton.setDisabled(true);
this._clearButton.setDisabled(true);
this._loadingImage.toggle(true);
var source = this._sourceInput.getValue().trim();
var sourceURL = this._sourceURLInput.getValue().trim();
var text = this._textInput.getValue().trim();
// If a jêder-* template is selected, collect its filled-in fields.
var jederParams = [];
if (this._currentJederKey && jederDefs[this._currentJederKey]) {
jederDefs[this._currentJederKey].fields.forEach(function(field) {
var widget = self._jederFieldWidgets[field.key];
var value = widget ? widget.getValue().trim() : "";
if (value) {
jederParams.push(field.key + "=" + value);
}
});
}
var usingJederTemplate = this._currentJederKey && jederParams.length > 0;
var minakAnNa, sablon;
if (usingJederTemplate) {
// The jêder-* template itself is used as the template, not as the "2=" content.
minakAnNa = "*";
sablon = this._currentJederKey;
} else if (source || sourceURL) {
minakAnNa = "*";
sablon = "jêder";
} else {
minakAnNa = ":";
sablon = "nimûne";
}
var listMarker = "".padStart(this._definitionLevel.length - 1, "#") + minakAnNa;
var title = mw.config.get('wgTitle');
// jêder-* template, jêder, or nimûne
var code = listMarker + " {{" + sablon;
// 1= language code
code += "|" + this._language;
if (usingJederTemplate) {
// Fields of the selected jêder-* template, passed straight through as its parameters.
jederParams.forEach(function(param) {
code += "|" + param;
});
} else {
// 2= source (free text)
if (source) {
code += "|2=" + source;
}
if (sourceURL) {
code += "|url=" + sourceURL;
}
}
// jêgirtin/nimûne (quotation text)
code += "|";
if (sablon !== "nimûne") {
code += "jêgirtin=";
}
// bold the page title, then convert any literal linebreak in the example text to <br> (see nlToBr) so it can't break the single-line "#*" wikitext
code += nlToBr(text.replace(new RegExp("(" + title + "([^( |,|;|?|.|!)]+)?)", "ig"), "'''$1'''"));
if (this._language !== "ku") {
var translation = nlToBr(this._translationInput.getValue().trim());
if (translation) {
code += "|tercime=" + translation;
}
}
var transcription = nlToBr(this._transcriptionInput.getValue().trim());
if (transcription) {
code += "|tr=" + transcription;
}
code += "}}";
// var escapedLangCode = languages[this._language].charAt(0).toUpperCase() + languages[this._language].slice(1);
// console.log("escapedLangCode: ", escapedLangCode);
var sectionIDPattern = new RegExp("^([\\wîêçş_]+?)_?(\\d+)?_?(\\d+)?$");
console.log("this._definitionLevel[0]: ", this._definitionLevel[0]);
var matchSectionID = sectionIDPattern.exec(this._definitionLevel[0]);
//var isInflection;
var sectionType = matchSectionID[1].replace(/_/, ' ');
sectionType = sectionType.replace(/_\d+$/, '');
console.log("sectionType: ", sectionType);
var sectionNum = matchSectionID[2] ? parseInt(matchSectionID[2]) : "";
console.log("Section Number:", sectionNum);
// Insert new example into page’s code
api.get({
action: "query",
titles: mw.config.get("wgPageName"),
prop: "revisions",
rvprop: "content",
rvslots: "main",
}).then(function(data) {
var pageContent;
for (var pageID in data.query.pages) {
if (data.query.pages.hasOwnProperty(pageID)) {
// noinspection JSUnresolvedVariable
pageContent = data.query.pages[pageID].revisions[0].slots.main["*"];
break;
}
}
// Look for correct language section
var langSectionRegex = new RegExp("==[ ]*{{ziman\\|{0}}}[ ]*==".format(self._language));
var langSectionIndex = pageContent.search(langSectionRegex);
console.log("langSectionIndex:", langSectionIndex);
if (langSectionIndex === -1) {
console.log("langSectionIndex === -1");
error("Xeletiyeke bi koda zimanî heye. Koda zimanî:" + self._language);
return;
}
// Look for correct word type section
var lines = pageContent.slice(langSectionIndex).split("\n");
var sectionNamesRegex = Object.keys(sectionNames).join('|');
var sectionRegex = new RegExp('^===[ ]*(' + sectionNamesRegex + ')\\s*(\\d+)?');
var targetLineIndex;
for (targetLineIndex = 0; targetLineIndex < lines.length; targetLineIndex++) {
var line = lines[targetLineIndex];
console.log("line:", line);
var matchSection = sectionRegex.exec(line);
if (matchSection) {
console.log("matchSection:", matchSection[1]);
// Extract section name and number from the matched result
var matchedSectionName = matchSection[1];
var matchedSectionNum = matchSection[2]; // It could be undefined
if (!sectionNames[sectionType]) {
error('Navê beşê xelet e. Di beşên "Ji wêjêyê" û "Ji wêjêya klasîk" ev amûr nayê bikaranîn.');
return; // Exit the function
}
// Check if the matched section name is in the expected list
if (sectionNames[sectionType].includes(matchedSectionName)) {
// Match only the specific numbered section the button was clicked in (e.g. "Navdêr 2",
// not just the first "===Navdêr...===" heading found) -- both sides are "" when the
// section has no number at all (a single unnumbered "===Navdêr===").
var matchedSectionNumValue = matchedSectionNum ? parseInt(matchedSectionNum, 10) : "";
if (matchedSectionNumValue === sectionNum) {
// Add more conditions if needed for inflection, e.g., (isInflection === line.includes("Formeke "))
break;
}
}
}
}
if (targetLineIndex === lines.length) {
console.log("targetLineIndex === lines.length");
error("Di navê beşê de xeletî heye. Îhtimalen bi vî navê beşê çend heb hene.");
return;
}
// Look for correct definition
var defIndex = -1;
var level = 1;
for (; targetLineIndex < lines.length; targetLineIndex++) {
var m = /^(#+)[^*#:]/.exec(lines[targetLineIndex]);
console.log("lines[targetLineIndex]:", lines[targetLineIndex]);
if (m) {
console.log("m:", m);
if (level === m[1].length) {
console.log("m[1]:", m[1]);
defIndex++;
console.log("defIndex:", defIndex);
if (self._definitionLevel[level] === defIndex) {
console.log("self._definitionLevel[level] === defIndex");
console.log("self._definitionLevel[level]", self._definitionLevel[level]);
if (level === self._definitionLevel.length - 1) {
console.log("level:", level);
break;
} else {
level++;
defIndex = -1;
}
}
}
}
}
// Find where to insert within this definition's "#:"/"#*" block: walk lines after the definition (findBlockEnd() tracks multi-line templates), and use exampleTemplateNames to tell real examples from annotations (synonyms, antonyms, alt-forms, etc.) rather than hard-blocking specific names.
var insertionFound = false;
var lastRelevantBlockEnd = -1;
var isJederFamily = (sablon === "jêder" || Object.prototype.hasOwnProperty.call(jederDefs, sablon));
var scanIndex = targetLineIndex + 1;
var emptyTemplate = false;
for (; scanIndex < lines.length; scanIndex++) {
var scanLine = lines[scanIndex];
if (!scanLine.startsWith("#:") && !scanLine.startsWith("#*")) {
// Left this definition's "#:"/"#*" block (e.g. a new definition or section starts).
break;
}
var blockEnd = findBlockEnd(lines, scanIndex);
var templateName = getLineTemplateName(scanLine);
var isExampleLine = templateName !== null &&
exampleTemplateNames.indexOf(templateName) !== -1;
if (isJederFamily) {
// jêder-family examples go after all "#:"/"#*" lines of this definition (both real examples and annotations).
lastRelevantBlockEnd = blockEnd;
insertionFound = true;
} else if (sablon === "nimûne") {
// "nimûne" examples go before any "#*" line, but after "#:" lines.
if (scanLine.startsWith("#*")) {
break;
}
lastRelevantBlockEnd = blockEnd;
insertionFound = true;
}
scanIndex = blockEnd; // Skip past the whole (possibly multi-line) block
}
var insertAt = lastRelevantBlockEnd >= 0 ? lastRelevantBlockEnd + 1 : scanIndex;
if (lastRelevantBlockEnd >= 0) {
emptyTemplate = /#+\*\s*{{[ ]*b?ê?(nimûne|mînak|jêgirtin)\??\s*\|\s*\|?\s*[^|}]+}}/.test(lines[lastRelevantBlockEnd]);
}
if (emptyTemplate) {
console.log("empty Template found", sablon);
// Replace empty template with new example
lines.splice(lastRelevantBlockEnd, 1, code);
} else {
console.log("empty Template not found", sablon);
// Insert the new example (right after the definition if it had no existing "#:"/"#*" lines yet, or after the relevant block otherwise).
lines.splice(insertAt, 0, code);
}
// Submit new page content
api.edit(mw.config.get("wgPageName"), function(_) {
return {
text: pageContent.slice(0, langSectionIndex) + lines.join("\n"),
summary: "+nimûneya bikaranînê bi amûra « {0} » (v{1}).".format(NAME, VERSION),
};
}).then(function() {
api.parse(code).done(function(data) {
var $renderedExample = $(data).find("ul > li").html();
var $item;
// Insert rendered example into page
if (emptyTemplate) {
self._$lastExample.html($renderedExample);
$item = self._$lastExample;
} else {
self._$lastExample.after($item = $("<li>").append($renderedExample));
}
$item.css("background-color", "lightgreen");
setTimeout(function() {
$item.css("background-color", "inherit");
}, 1000);
self._$lastExample = $item;
});
self.setVisible(false);
self.clear();
self._clearDraft();
reenable();
});
});
function error(errorMessage) {
mw.notify(errorMessage || "Nimûne nehat weşandin, îhtimalen rûpel hate guhartin. Ji kerema xwe re rûpelê dîsa bar bike û dîsa biceribîne.");
draftStorage.Set({
text: self._textInput.getValue(),
source: self._sourceInput.getValue(),
sourceURL: self._sourceURLInput.getValue(),
translation: self._translationInput.getValue(),
transcription: self._transcriptionInput.getValue(),
});
reenable();
}
function reenable() {
self._textInput.setDisabled(false);
self._sourceInput.setDisabled(false);
self._sourceURLInput.setDisabled(false);
self._translationInput.setDisabled(false);
self._transcriptionInput.setDisabled(false);
self._sourceTypeDropdown.setDisabled(false);
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setDisabled(false);
});
// self._disableTranslationChk.setDisabled(false);
self._applyButton.setDisabled(false);
self._cancelButton.setDisabled(false);
self._clearButton.setDisabled(false);
self._loadingImage.toggle(false);
}
},
};
});
// </nowiki>
7mx8024tvb93sdjor2zv09vli3y4if7
6342591
6342590
2026-08-25T12:37:48Z
Wikihez
7344
6342591
javascript
text/javascript
// <nowiki>
// dependencies (declared in MediaWiki:Gadgets-definition): oojs, oojs-ui, ext.gadget.citoid-helper (wikt.citoid), ext.gadget.StorageUtils (ObjectStorage)
// Formats a string using {0}, {1}, ... placeholders.
if (!String.prototype.format) {
String.prototype.format = function(var_args) {
var args = arguments;
return this.replace(/{(\d+)}/g, function(match, number) {
return typeof args[number] !== "undefined" ? args[number] : match;
});
};
}
$(function() {
"use strict";
// Skip pages where this gadget shouldn't run.
if (
mw.config.get("wgPageName") !== "Wîkîferheng:ceribandin/nimûne" &&
mw.config.get("wgNamespaceNumber") !== 108 &&
mw.config.get("wgNamespaceNumber") !== 0 ||
mw.config.get("wgPageName") === "Destpêk" ||
mw.config.get("wgArticleId") === 0
) return;
console.log("Gadget-wikt.add-examples.js dest pê dike…");
var NAME = "[[Mediawiki:Gadget-wikt.add-examples|Nimûne zêde bike]]";
var VERSION = "2.0";
// Persists form drafts via MediaWiki:Gadget-StorageUtils.js (localStorage, falling back to a cookie) so unsaved text survives a failed submit.
var draftStorage = new ObjectStorage("add_examples_draft", 1);
// Citoid logic normally lives in MediaWiki:Gadget-citoid-helper.js as a registered gadget dependency; not
// currently editable, so ensureCitoid() (below) loads it from a user testing page on demand instead.
// "span" is the field's width in the 12-column grid the fields render in (see .add-example-jeder-fields
// in the CSS and _setSourceType below) -- field ORDER here is also the grid's reading order.
var jederDefs = {
"jêder-kitêb": {
"label": "Kitêb",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 3 },
{ "key": "terciman", "label": "Terciman", "span": 3 },
{ "key": "amadekar", "label": "Amadekar", "span": 3 },
{ "key": "weşanxane", "label": "Weşanxane", "span": 3 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "cih", "label": "Cih", "span": 2 },
{ "key": "sal", "label": "Sal", "span": 1 },
{ "key": "sala-weşandinê", "label": "Sala weşandinê", "span": 2 },
{ "key": "çap", "label": "Çap", "span": 1 },
{ "key": "rûpel", "label": "Rûpel", "span": 1 },
{ "key": "isbn", "label": "ISBN", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
},
"jêder-kovar": {
"label": "Kovar",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 3 },
{ "key": "terciman", "label": "Terciman", "span": 3 },
{ "key": "amadekar", "label": "Amadekar", "span": 3 },
{ "key": "weşanxane", "label": "Weşanxane", "span": 3 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "kovar", "label": "Kovar", "span": 4 },
{ "key": "cild", "label": "Cild", "span": 2 },
{ "key": "hejmar", "label": "Hejmar", "span": 2 },
{ "key": "sal", "label": "Sal", "span": 2 },
{ "key": "rûpel", "label": "Rûpel", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
},
"jêder-websîte": {
"label": "Websîte",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 4 },
{ "key": "terciman", "label": "Terciman", "span": 4 },
{ "key": "websîte", "label": "Websîte", "span": 4 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "url", "label": "URL", "span": 5 },
{ "key": "urlya-arşîvê", "label": "URLya Arşîvê", "span": 5 },
{ "key": "sal", "label": "Sal", "span": 1 },
{ "key": "tarîx", "label": "Tarîx", "span": 1 }
]
},
"jêder-vîdeo": {
"label": "Vîdeo",
"fields": [
{ "key": "hunermend", "label": "Hunermend", "span": 6 },
{ "key": "platform", "label": "Platform", "span": 6 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "sal", "label": "Sal", "span": 2 },
{ "key": "tarîx", "label": "Tarîx", "span": 3 },
{ "key": "dem", "label": "Dem", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
}
};
var sectionNames = {
"Navdêr": ["Navdêr"],
"Formeke navdêrê": ["Formeke navdêrê"],
"Lêker": ["Lêker"],
"Formeke lêkerê": ["Formeke lêkerê"],
"Rengdêr": ["Rengdêr"],
"Formeke rengdêrê": ["Formeke rengdêrê"],
"Hoker": ["Hoker"],
"Formeke hokerê": ["Formeke hokerê"],
"Serenav": ["Serenav"],
"Formeke serenavê": ["Formeke serenavê"],
"Artîkel": ["Artîkel"],
"Baneşan": ["Baneşan"],
"Bazinedaçek": ["Bazinedaçek"],
"Biwêj": ["Biwêj"],
"Cînav": ["Cînav"],
"Daçek": ["Daçek"],
"Girêdek": ["Girêdek"],
"Gotineke pêşiyan": ["Gotineke pêşiyan"],
"Hejmar": ["Hejmar"],
"Hevok": ["Hevok"],
"Îfade": ["Îfade"],
"Kurtenav": ["Kurtenav"],
"Navgir": ["Navgir"],
"Paşdaçek": ["Paşdaçek"],
"Paşgir": ["Paşgir"],
"Pêşdaçek": ["Pêşdaçek"],
"Pêşgir": ["Pêşgir"],
"Pirtik": ["Pirtik"],
"Reh": ["Reh"],
"Sembol": ["Sembol"],
"Tîp": ["Tîp"]
};
// Template names treated as "real examples" (an allow-list, not the old deny-list) so annotation templates like synonyms/antonyms/alt-forms aren't mistaken for examples.
var exampleTemplateNames = ["jêder", "nimûne"].concat(Object.keys(jederDefs));
// Returns the template name starting a "#:"/"#*" line (e.g. "jêder" from "#* {{jêder|ku|...}}"), or null if the line doesn't start with a template.
function getLineTemplateName(line) {
var m = /^#[:*]\s*\{\{\s*([^|}]+)/.exec(line);
return m ? m[1].trim() : null;
}
// Returns the index of the line where a (possibly multi-line) template block starting at startIndex closes its {{ }} braces, so multi-line templates are treated as one block.
function findBlockEnd(lines, startIndex) {
var depth = 0;
var i = startIndex;
for (; i < lines.length; i++) {
var opens = (lines[i].match(/\{\{/g) || []).length;
var closes = (lines[i].match(/\}\}/g) || []).length;
depth += opens - closes;
if (depth <= 0) {
break;
}
}
return i;
}
// Ported from start.js: converts literal line breaks typed/pasted into the example/translation/transcription boxes into wikitext <br> tags, since a raw newline would break the single-line "#*" wikitext structure.
function nlToBr(text) {
return text ? text.replace(/\r\n|\r|\n/g, "<br>") : text;
}
function escapeHtmlForBackdrop(str) {
return String(str)
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">");
}
// Mirrors a textarea's text with a small marker after each line that's followed by an actual typed/pasted linebreak, rendered into a transparent backdrop behind the textarea (see ensureLinebreakBackdrop()).
function buildLinebreakBackdropHtml(text) {
var lines = text.split(/\r\n|\r|\n/);
return $.map(lines, function(line, i) {
var isLast = i === lines.length - 1;
return escapeHtmlForBackdrop(line) +
(isLast ? "" : "<mark class='add-example-linebreak-mark'>↵</mark>\n");
}).join("");
}
// Copies the metrics that affect where text wraps/lands (font, line height, padding, border) from the real textarea onto its backdrop via computed style, since the backdrop is a plain <div>, not a themed OOUI input.
function syncLinebreakBackdropMetrics(textarea, backdrop) {
var cs = window.getComputedStyle(textarea[0]);
backdrop.css({
"box-sizing": cs.boxSizing,
"padding-top": cs.paddingTop,
"padding-right": cs.paddingRight,
"padding-bottom": cs.paddingBottom,
"padding-left": cs.paddingLeft,
"border-width": cs.borderWidth,
"border-style": "solid",
"font-family": cs.fontFamily,
"font-size": cs.fontSize,
"font-weight": cs.fontWeight,
"line-height": cs.lineHeight,
"letter-spacing": cs.letterSpacing
});
}
// Lazily inserts the transparent backdrop layer used to mark linebreaks, as a sibling of the textarea inside its existing OOUI input wrapper (which OOUI already positions relatively for icon overlays), rather than start.js's approach of wrapping the textarea in a new div — that would risk disturbing OOUI's own layout of the input. Safe to call more than once; the backdrop is cached.
function ensureLinebreakBackdrop(textarea) {
var existing = textarea.data("addExampleLinebreakBackdrop");
if (existing) {
return existing;
}
var $parent = textarea.parent();
if ($parent.css("position") === "static") {
$parent.css("position", "relative");
}
var backdrop = $("<div aria-hidden='true'></div>").addClass("add-example-linebreak-backdrop");
textarea.before(backdrop);
textarea.data("addExampleLinebreakBackdrop", backdrop);
textarea.on("scroll.addExampleLinebreak", function() {
backdrop.scrollTop(textarea.scrollTop()).scrollLeft(textarea.scrollLeft());
});
return backdrop;
}
// Flags a textarea (via CSS class, for the border tint + tooltip) while it contains a typed/pasted linebreak, so the user notices before it's silently turned into <br> on submit; marks only the exact point of the break via the mirrored backdrop.
function highlightLinebreak(el) {
var textarea = $(el);
var text = textarea.val();
var hasBreak = /\r|\n/.test(text);
textarea
.toggleClass("add-example-has-linebreak", hasBreak)
.attr("title", hasBreak ? "Xeta nû dê wek <br> bê nivîsandin" : "");
if (!hasBreak) {
var cached = textarea.data("addExampleLinebreakBackdrop");
if (cached) {
cached.hide();
}
textarea.removeClass("add-example-has-linebreak-source");
return;
}
var backdrop = ensureLinebreakBackdrop(textarea);
textarea.addClass("add-example-has-linebreak-source");
syncLinebreakBackdropMetrics(textarea, backdrop);
backdrop.html(buildLinebreakBackdropHtml(text)).show();
backdrop.scrollTop(textarea.scrollTop()).scrollLeft(textarea.scrollLeft());
}
// Wires linebreak detection onto an OOUI multiline widget, matching start.js's scope: only the quote/example text and its translation/transcription, not bibliographic fields. Uses OOUI's own "change" event rather than the raw <textarea> "input" event start.js listens to, since our fields can also be set programmatically (Clear button, draft restore) via setValue(), which doesn't fire a native DOM input event.
function watchForLinebreaks(widget) {
widget.on("change", function() {
highlightLinebreak(widget.$input[0]);
});
}
var api = new mw.Api();
// Loads wikt.citoid if it isn't already loaded, from Wikihez's testing page (MediaWiki: isn't editable
// right now) -- self-contained rather than calling wikt.citoidHelper.ensure() directly, since that
// function only exists once citoid-helper.js has already run once, which isn't guaranteed here.
function ensureCitoid() {
if (window.wikihez && window.wikihez.citoid) {
return $.Deferred().resolve().promise();
}
var url = mw.util.getUrl("Bikarhêner:Wikihez/skrîpt/js/Gadget-citoid-helper.js", {
action: "raw",
ctype: "text/javascript"
});
return mw.loader.getScript(mw.config.get("wgServer") + url);
}
// Language display name, read from the matching section's .besazimani link text.
function languageNameForCode(code) {
var $mark = $(".besazimani[id='" + code + "']").first();
return $mark.length ? $mark.text().trim() : null;
}
// Whether the page title itself (accented Kurdish Latin letters included) is written in Latin script.
var pageTitleIsLatin = !/[^\x00-\x7FÀ-ɏḀ-ỿ‘’]/.test(mw.config.get("wgTitle") || "");
// .example/.benimune = old Şablon:jêder hidden marker; .h-usage-example/.h-quotation = Modul:usex containers used directly by Şablon:nimûne; .citation-whole = Modul:quote's own wrapper, now used by jêder-* templates (Modul:quote nests .h-quotation inside .citation-whole > dl > dd instead of putting it directly under the <li>, so it needs its own entry here).
// Requiring "ul > li >" is what makes this only match an example that's grouped into its own <ul> -- a
// {{nimûne}} (or its "mk" redirect) with no jêder-family citation alongside it in the same definition
// renders straight under the definition's own content instead, with no such group; also reused below to
// tell whether the second pass still needs to handle a given definition.
var EXISTING_EXAMPLE_SELECTOR = "ul > li > .example, ul > li > .benimune, ul > li > .h-usage-example, ul > li > .h-quotation, ul > li > .citation-whole";
$(EXISTING_EXAMPLE_SELECTOR).each(function() {
var $element = $(this);
var $item = $element.parent();
if (!$item.next().length) {
// Get example’s language
// bdi[lang] = old hidden marker; .e-example[lang]/.e-quotation[lang] = Modul:usex/Modul:quote already put lang on the visible span.
// A jêder-* citation with no jêgirtin= (quotation text) yet renders no h-quotation/e-quotation at all
// (see get_quote() in Modul quote.lua) -- exactly the "bare citation" case this button exists to fill
// in, so this can't just crash: without the guard, [0] is undefined here and ".lang" throws, which
// (since $.each() has no try/catch) silently kills the button for every remaining match on the page.
var $langEl = $item.find(".e-example[lang], .e-quotation[lang], bdi[lang]")[0];
if (!$langEl) {
console.warn("Gadget-wikt.add-examples: nikaribe zimanê vê nimûneyê bibîne, valakirî hate derbaskirin.", $item);
return;
}
var language = $langEl.lang;
if (language === "ku-Latn") {
language = "ku";
}
console.log('Language:', language);
// Get section and indices of associated definition
var definitionLevel = [];
var $definitionItem = $item.parent().parent();
var $topItem;
do {
// Skip MediaWiki's empty <li class="mw-empty-elt"> placeholders so indices match the real "#" lines in wikitext (see submit()).
definitionLevel.splice(0, 0, $definitionItem.prevAll("li:not(.mw-empty-elt)").length);
$topItem = $definitionItem;
$definitionItem = $definitionItem.parent().parent();
} while ($definitionItem.prop("tagName") === "LI");
var $section = $($topItem.parent().prevAll(".mw-heading3, h3").get(0));
if ($section.length) {
definitionLevel.splice(0, 0, $section.find("h3").attr("id"));
} else {
console.warn("Gadget-wikt.add-examples: Section heading not found");
// TODO: why does this happen? mw.notify("Beş nehat dîtin. Jkx li WF:Dîwanê vê problemê ragihînin!");
return;
}
// Remove default edit link if present
var $defaultEditLink = $item.find("span.example > span.stubedit");
if ($defaultEditLink.length) {
$defaultEditLink.remove();
}
// Add a nice button to open the form. $group is the citation-group <ul> itself (parent of $item);
// the form panel is inserted AFTER it (see click handler below), not inside it, so the panel isn't
// squeezed into that <ul>'s narrow hanging-indent width on mobile -- only the button/title stays
// there, matching the "Form redesign for Kurdish example" mockup (title inside the bullet list,
// full-width panel below it).
var $group = $item.parent();
var $formItem = $("<li>");
var $button = $("<a href='#'>Nimûneyeke bikaranînê lê zêde bike</a>");
$button.css("color", "var( --color-subtle, #777777 )");
// Shown in the button's place once the form is open (see Form#setVisible).
var $title = $("<span class='add-example-form-title'></span>").hide();
$formItem.append($button).append($title);
$button.on("click", function() {
if (!$button.form) {
$title.text("Nimûneyeke bi " + (languageNameForCode(language) || "zimanekî nenas").toLowerCase() + " lê zêde dikî.");
var form = new Form($item, $button, $title, language, definitionLevel);
$group.after(form.$element);
}
$button.form.setVisible(true);
return false;
});
$item.after($formItem);
}
});
// Second pass: some definitions have no example the pass above could react to at all -- either genuinely
// zero examples, or one rendered via {{nimûne}} (or its "mk" redirect) with no jêder-family citation next
// to it, which (see the comment on EXISTING_EXAMPLE_SELECTOR above) renders with no "ul > li" group to
// match. This walks every recognized POS section's own definitions list directly instead of reacting to
// an existing example, and reads the language off the language section's own <h2> rather than off an
// example -- so it doesn't need one to already exist. Everything else (Form, submit()) is reused as-is.
// MediaWiki wraps each heading in a "mw-heading2"/"mw-heading3"/... div in current skin output; falls
// back to the bare heading element for older/other output that doesn't wrap it.
function headingOuter($h) {
var $wrap = $h.closest(".mw-heading2, .mw-heading3, .mw-heading4, .mw-heading5, .mw-heading6");
return $wrap.length ? $wrap : $h;
}
// Section's language code: nearest preceding .besazimani[id] by document order (not sibling-walking, which mobile's per-section wrapping breaks).
function languageCodeForOl($ol) {
var $marks = $(".besazimani[id]").add($ol);
var ol = $ol.get(0);
var idx = $marks.index(ol);
for (var i = idx - 1; i >= 0; i--) {
var el = $marks.get(i);
if (el.id) {
return el.id;
}
}
return null;
}
// A <li> whose OWN direct content (not counting a nested <ol>) is wrapped in ".form-of-definition" is
// MediaWiki's "form of" template system marking that content as generated by a template -- e.g.
// {{ku-tewîna-nav}}'s "Formeke heval:" wrapper together with its "rewşa îzafeyî"/"rewşa çemandî"/...
// readings underneath. That whole nested block is normally the ENTIRE expansion of a single "#"
// wikitext line, with no separate "##" line behind any individual reading -- recursing into it would
// hand out one button per reading, each trying to match a "##" line that doesn't exist, and submit()
// would fail to find where to insert every one of them. A <li> without that class whose nested <ol>
// holds real hand-typed prose (e.g. sîno-koreyî/Navdêr's two genuinely separate "##" sub-senses) has
// no such problem -- those really are individually addressable wikitext lines.
function isFormOfWrapper($li) {
return $li.children(".form-of-definition").length > 0;
}
// Recurse into a <li>'s own nested <ol> UNLESS it's a form-of-template wrapper (see isFormOfWrapper) --
// a wrapper <li> with its own nested <ol> isn't itself a sense with content of its own, only its real
// (non-generated) leaves are.
function eachLeafDefinition($ol, fn) {
$ol.children("li").each(function() {
var $li = $(this);
var $childOl = $li.children("ol");
if ($childOl.length && !isFormOfWrapper($li)) {
$childOl.each(function() {
eachLeafDefinition($(this), fn);
});
} else {
fn($li);
}
});
}
$("h3").each(function() {
var sectionType = $(this).text().trim();
if (!sectionNames[sectionType]) {
return; // not a recognized word-sense section (Bilêvkirin, Etîmolojî, Çavkanî, ...)
}
var h3Id = $(this).attr("id");
// Forward-walk siblings to the definitions <ol>, skipping over a declension table/TemplateStyles/the
// headword line; stop (nothing to attach to in this section) if another heading comes first instead.
var $ol = null;
for (var $cursor = headingOuter($(this)).next(); $cursor.length; $cursor = $cursor.next()) {
if ($cursor.is("ol")) {
$ol = $cursor;
break;
}
if ($cursor.is(".mw-heading2, .mw-heading3, .mw-heading4, .mw-heading5, .mw-heading6, h2, h3, h4, h5, h6")) {
break;
}
}
if (!$ol) {
return;
}
var language = languageCodeForOl($ol);
if (!language) {
console.warn("Gadget-wikt.add-examples: nikaribe koda zimanê vê beşê bibîne.", $ol);
return;
}
eachLeafDefinition($ol, function($li) {
// The pass above already added a button here (or will) -- an actual example already wrapped in
// its own "ul > li" group.
if ($li.find(EXISTING_EXAMPLE_SELECTOR).length) {
return;
}
var definitionLevel = [];
var $definitionItem = $li;
while ($definitionItem.prop("tagName") === "LI") {
// Skip MediaWiki's empty <li class="mw-empty-elt"> placeholders so indices match the real "#" lines in wikitext (see submit()).
definitionLevel.splice(0, 0, $definitionItem.prevAll("li:not(.mw-empty-elt)").length);
$definitionItem = $definitionItem.parent().parent();
}
definitionLevel.splice(0, 0, h3Id);
// A hidden, empty placeholder <li> so submit()'s existing "_$lastExample.after(newLi)" insertion
// (unchanged, same as the pass above) lands the first submitted example right before the button
// -- matching the existing convention of new examples going in before the button, not after it.
var $placeholder = $("<li style='display:none'></li>");
var $formItem = $("<li>");
var $button = $("<a href='#'>Nimûneyeke bikaranînê lê zêde bike</a>");
$button.css("color", "var( --color-subtle, #777777 )");
// Shown in the button's place once the form is open (see Form#setVisible).
var $title = $("<span class='add-example-form-title'></span>").hide();
$formItem.append($button).append($title);
// A "ul" nested directly under a definition "li" starts hidden here (see the HQToggle-controlled
// jêder-citation-group "ul", which only ever renders with an explicit "style="display: block""
// set on it) -- this one has no HQToggle to unhide it, so it needs the same explicit override or
// the button (and the placeholder above) never becomes visible at all.
var $ul = $("<ul>").css("display", "block").append($placeholder).append($formItem);
// The form panel is inserted AFTER $ul (not inside it) once opened -- same reasoning as the first
// pass above: keeps the full-width panel out of the tight bulleted-list indentation on mobile.
$button.on("click", function() {
if (!$button.form) {
$title.text("Nimûneyeke bi " + (languageNameForCode(language) || "zimanekî nenas").toLowerCase() + " lê zêde dikî.");
var form = new Form($placeholder, $button, $title, language, definitionLevel);
$ul.after(form.$element);
}
$button.form.setVisible(true);
return false;
});
$li.append($ul);
});
});
// Pulls the form panel flush with the page's own left/right edges, undoing whatever nested-list indent it inherited from sitting inside a deeply-nested definition.
function alignFormToPage($form) {
var $container = $form.closest(".mw-parser-output");
if (!$container.length) {
return;
}
var pad = parseFloat(window.getComputedStyle($container[0]).paddingLeft) || 0;
var containerLeft = $container.offset().left + pad;
var indent = $form.offset().left - containerLeft;
$form.css({
marginLeft: indent > 0 ? -indent : 0,
width: $container.width() + "px"
});
}
// Constructor for the edit form; lastExample/button/title/language/definitionLevel identify where the form attaches and what it edits.
function Form($lastExample, $button, $title, language, definitionLevel) {
var self = this;
this._language = language;
this._definitionLevel = definitionLevel;
this._$lastExample = $lastExample;
this._$button = $button;
this._$button.form = this;
this._$title = $title;
this._currentJederKey = "";
this._jederFieldWidgets = {};
this._textInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var textInputLayout = new OO.ui.FieldLayout(this._textInput, {
label: "Metna nimûneyê",
align: "top",
});
this._textInput.on("change", function(value) {
self._applyButton.setDisabled(!value);
self._updateReadyHint();
});
watchForLinebreaks(this._textInput);
// Source type dropdown: free text, a jêder-* template, or "citoid" (a pseudo key, not in jederDefs) meaning "not yet detected" — the default, switched automatically once a Citoid fetch succeeds (see _fillFromCitoid).
var sourceTypeMenuItems = [
new OO.ui.MenuOptionWidget({ data: "citoid", label: "Bi Citoidê otomatîk zêde bike" }),
new OO.ui.MenuOptionWidget({ data: "", label: "Bi destê xwe binivîsim" }),
];
for (var jederKey in jederDefs) {
if (jederDefs.hasOwnProperty(jederKey)) {
sourceTypeMenuItems.push(new OO.ui.MenuOptionWidget({
data: jederKey,
label: jederDefs[jederKey].label,
}));
}
}
this._sourceTypeDropdown = new OO.ui.DropdownWidget({
menu: { items: sourceTypeMenuItems },
label: "Bi Citoidê otomatîk zêde bike",
});
var sourceTypeLayout = new OO.ui.FieldLayout(this._sourceTypeDropdown, {
label: "Şablona çavkaniyê",
align: "top",
});
this._sourceTypeDropdown.getMenu().on("choose", function(menuOption) {
self._setSourceType(menuOption.getData());
});
this._sourceInput = new OO.ui.MultilineTextInputWidget();
this._sourceInput.on("change", function() {
self._updateReadyHint();
});
this._sourceInputLayout = new OO.ui.FieldLayout(this._sourceInput, {
label: "Çavkaniya nimûneyê",
align: "top",
});
// Always visible in every mode (free text included) — submit() reads this unconditionally as the "url=" parameter. The Citoid fetch button sits right next to it (not in a separate box) -- see _urlRowWidget below.
this._sourceURLInput = new OO.ui.TextInputWidget({
icon: "link",
placeholder: "https://… an jî DOI/ISBN",
});
this._citoidButton = new OO.ui.ButtonWidget({
label: "Bi otomatîk tijî bike",
icon: "download",
flags: ["progressive"],
title: "Li gorî URL, DOI an ISBNya jorîn, malûmatan ji Citoid tîne û qadên şablona jêder-* otomatîk tijî dike.",
classes: ["add-example-citoid-fetch"],
});
this._citoidButton.on("click", this._fillFromCitoid.bind(this));
this._sourceURLInput.on("change", function() {
self._updateReadyHint();
self._autofillVideoTimestamp();
});
// URL input + inline "auto-fill" button as one row (replaces the old separate framed Citoid box's
// button row) -- a plain OO.ui.Widget used purely as a flex-row container (same pattern as
// _loadingImage below: build it empty, then manually append its children's $elements). Disabling
// during submit() still goes through the individual _sourceURLInput/_citoidButton references, not
// through this wrapper.
this._urlRowWidget = new OO.ui.Widget({ classes: ["add-example-url-row"] });
this._urlRowWidget.$element.append(this._sourceURLInput.$element, this._citoidButton.$element);
this._sourceURLInputLayout = new OO.ui.FieldLayout(this._urlRowWidget, {
label: "Lînk, DOI an ISBNya çavkaniyê",
align: "top",
help: "Li qutiyê URL, DOI an ISBN binivîse û pê lê bike butona 'Bi otomatîk tijî bike' da ku otomatîk çavkanî were dagirtin.",
helpInline: true,
});
// Matches the wording just constructed above, so the initial _setSourceType("citoid") call at the end of this constructor doesn't needlessly recreate an identical layout.
this._urlFieldIsFreeTextWording = false;
// Shown right after a successful Citoid fetch (see _fillFromCitoid); hidden again on clear.
this._citoidSuccessMsg = $("<span class='add-example-citoid-success'>✓ Malûmat hatin dagirtin — li jêr kontrol bike.</span>").hide();
// Clears the URL field and any filled jêder-* fields without touching the example text/translation.
this._citoidClearButton = new OO.ui.ButtonWidget({
label: "Vala bike",
icon: "trash",
framed: false,
title: "Lînkê û qadên jêder-* yên vê beşê vala bike",
classes: ["add-example-citoid-clear"],
});
this._citoidClearButton.on("click", function() {
self._sourceURLInput.setValue("");
self._citoidSuccessMsg.hide();
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setValue("");
});
});
// Plain div (not OO.ui.FieldsetLayout) so the grid CSS class applies directly to the field items.
this._jederFieldsFieldset = $("<div class='add-example-jeder-fields'>");
// "Malûmatên çavkaniyê" header (+ the "Vala bike" clear button) sitting right above the fields grid,
// replacing the old framed "Ji Citoid an bi destan tijî bike:" box -- like this only makes sense once
// a real jêder-* template is active (there's nothing here to show for the "citoid: not yet detected"
// placeholder or for free text), so the whole section toggles together in _setSourceType().
this._jederSection = $("<div class='add-example-jeder-section'>").append(
$("<div class='add-example-jeder-header'>")
.append($("<span class='add-example-jeder-header-label'>Malûmatên çavkaniyê</span>"))
.append(this._citoidClearButton.$element),
this._jederFieldsFieldset
);
this._translationInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var translationInputLayout = new OO.ui.FieldLayout(this._translationInput, {
label: "Tercimeya kurmancî ya nimûneyê",
align: "top",
});
watchForLinebreaks(this._translationInput);
this._transcriptionInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var transcriptionInputLayout = new OO.ui.FieldLayout(this._transcriptionInput, {
label: "Translîterasyona nimûneyê",
align: "top",
help: "Tenê lê zêde bike eger metna di nimûneyê de bi alfabeya latînî nehatibe nivîsandin.",
helpInline: true,
});
watchForLinebreaks(this._transcriptionInput);
this._applyButton = new OO.ui.ButtonWidget({
label: "Biweşîne",
icon: "check",
title: "Nimûneyê ji bo vê tarîfê nimûneyê lê zêde bike",
flags: ["progressive", "primary"],
disabled: true,
});
this._applyButton.on("click", this.submit.bind(this));
// Reactive "ready to submit" hint next to Biweşîne: no text yet, text but no source (still submittable
// as a bare {{nimûne}}), or fully ready -- kept in sync by _updateReadyHint(), wired to every field below.
this._readyHint = $("<span class='add-example-ready-hint'></span>").text("Metna nimûneyê lazim e.");
// True while a Citoid-eligible URL/DOI/ISBN is typed in but not yet fetched (or fetched then edited away) and no jêder field has been filled by hand -- the "looks done but isn't" trap this exists to catch. Not applicable in free-text mode, where the fetch button isn't even offered.
this._citoidPending = function() {
return self._currentJederKey !== "" &&
!!self._sourceURLInput.getValue().trim() &&
!self._citoidSuccessMsg.is(":visible") &&
!Object.keys(self._jederFieldWidgets).some(function(key) {
return self._jederFieldWidgets[key].getValue().trim();
});
};
this._updateReadyHint = function() {
if (!self._textInput.getValue()) {
self._readyHint.text("Metna nimûneyê lazim e.");
return;
}
if (self._citoidPending()) {
self._readyHint.text("Pêşî 'Bi otomatîk tijî bike' bitikîne.");
return;
}
var hasSource = self._sourceInput.getValue().trim() || self._sourceURLInput.getValue().trim() ||
Object.keys(self._jederFieldWidgets).some(function(key) {
return self._jederFieldWidgets[key].getValue().trim();
});
self._readyHint.text(hasSource ? "Hazir e." : "Çavkanî nehatiye dayîn.");
};
// Prefills the Dem field from the typed URL's own "t=" (see wikt.citoid.extractVideoTimestamp) once jêder-vîdeo is active -- never overwrites a value the user already entered by hand.
this._autofillVideoTimestamp = function() {
var demWidget = self._jederFieldWidgets.dem;
if (self._currentJederKey !== "jêder-vîdeo" || !demWidget || demWidget.getValue().trim()) {
return;
}
ensureCitoid().then(function() {
var dem = wikihez.citoid.extractVideoTimestamp(self._sourceURLInput.getValue().trim());
if (dem && !demWidget.getValue().trim()) {
demWidget.setValue(dem);
}
});
};
// framed:false (+ the "destructive" flag for the red text/hover) matches the mockup's borderless
// "Betal bike" -- a plain colored link rather than a boxed button, distinguishing it from Paqij bike.
this._cancelButton = new OO.ui.ButtonWidget({
label: "Betal bike",
icon: "close",
title: "Formê bigire",
flags: ["destructive"],
framed: false,
});
this._cancelButton.on("click", function() {
self.setVisible(false);
});
this._clearButton = new OO.ui.ButtonWidget({
label: "Paqij bike",
icon: "trash",
title: "Hemû qadan vala bike û pêşnûyisên hilanîbûyî jê bibe",
});
this._clearButton.on("click", function() {
self.clear();
self._clearDraft();
});
// Native CSS spinner (see Gadget-wikt.add-examples.css) instead of an external Commons GIF, so there's no network request and it matches dark/light mode.
this._loadingImage = new OO.ui.Widget({
classes: ["add-example-loading"],
});
this._loadingImage.$element.append($('<span class="add-example-spinner" aria-hidden="true"></span>'));
this._loadingImage.toggle(false);
// Two-column top section (see "Form redesign for Kurdish example/Nimûne zêde bike.dc.html"): example
// text (+ translation/transliteration for non-ku, right after it, not after the source fields) on the
// left; source-type + link/Citoid on the right. Built as plain <div>s, not an OOUI layout -- OOUI has
// no CSS-grid container -- so .add-example-top-grid in the CSS can lay them out as a real responsive
// 7fr/5fr grid (collapsing to one column on narrow screens).
var $topLeft = $("<div class='add-example-top-col'>").append(textInputLayout.$element);
if (language !== "ku") {
$topLeft.append(translationInputLayout.$element);
}
if (!pageTitleIsLatin) {
$topLeft.append(transcriptionInputLayout.$element);
}
var $topRight = $("<div class='add-example-top-col'>").append(
sourceTypeLayout.$element,
this._sourceInputLayout.$element,
this._sourceURLInputLayout.$element,
this._citoidSuccessMsg
);
var $topGrid = $("<div class='add-example-top-grid'>").append($topLeft, $topRight);
// Saved on the instance (not just a local var) so _setSourceType() can swap the URL field's label/help
// wording in and out of it when switching to/from free text (see the FieldLayout replaceWith() there).
this._fieldsLayout = $("<div class='add-example-fieldset'>").append($topGrid, this._jederSection);
// Bottom action row -- order/spacing matches the mockup: Biweşîne (+ spinner + ready hint), a spacer
// pushing the rest right, then Paqij bike (bordered/subtle) and Betal bike (borderless red text, via
// framed:false above). A plain flex <div>, not an OOUI HorizontalLayout, so the raw hint/spacer
// elements can sit alongside the real button widgets (same reasoning as the top grid above).
var $buttonsRow = $("<div class='add-example-main-buttons'>").append(
this._applyButton.$element,
this._loadingImage.$element,
this._readyHint,
$("<span class='add-example-buttons-spacer'></span>"),
this._clearButton.$element,
this._cancelButton.$element
);
this._frame = new OO.ui.PanelLayout({
id: "add-example-definition-{0}-form".format(this._definitionLevel.join("-")),
classes: ["add-example-form"],
expanded: false,
});
this._frame.$element.append(this._fieldsLayout, $buttonsRow);
// Default to "citoid" mode; selectItemByData() doesn't fire "choose" (that only fires for interactive selection), so _setSourceType() must also be called explicitly to set up the initial UI.
this._sourceTypeDropdown.getMenu().selectItemByData("citoid");
this._setSourceType("citoid");
}
Form.prototype = {
// Returns the jQuery object for this form.
get $element() {
return this._frame.$element;
},
// Switches the source section between free text, Citoid auto-detect (no template chosen yet), and a specific jêder-* template, rebuilding the field list to match. The URL field itself is always visible in every mode (see the constructor); only the free-text textarea, the Citoid fetch button, and the "Malûmatên çavkaniyê" fields section toggle here.
_setSourceType: function(jederKey) {
var self = this;
this._currentJederKey = jederKey;
this._jederFieldsFieldset.empty();
this._jederFieldWidgets = {};
var isRealJederKey = jederKey && jederDefs[jederKey];
if (isRealJederKey) {
var def = jederDefs[jederKey];
def.fields.forEach(function(field) {
var widget = field.multiline
? new OO.ui.MultilineTextInputWidget({ rows: 2, autosize: false })
: new OO.ui.TextInputWidget();
self._jederFieldWidgets[field.key] = widget;
widget.on("change", function() {
self._updateReadyHint();
});
var layout = new OO.ui.FieldLayout(widget, {
label: field.label,
align: "top",
classes: ["add-example-field-span-" + (field.span || 4)],
});
self._jederFieldsFieldset.append(layout.$element);
});
}
// "Malûmatên çavkaniyê" header + fields grid: only once a real template is chosen/detected --
// nothing to show yet for the plain "citoid: not yet detected" placeholder or for free text.
this._jederSection.toggle(!!isRealJederKey);
// Free text textarea only for "" (free text); hidden for "citoid" and any real jêder-* key.
this._sourceInputLayout.toggle(jederKey === "");
// Citoid fetch button: hidden for free text (nothing there for it to fill in), shown for "citoid" auto-detect and any real jêder-* key. The URL input itself next to it stays visible in every mode.
this._citoidButton.toggle(jederKey !== "");
// URL field wording: plain "attach a link" phrasing for free text, Citoid-oriented phrasing otherwise. Only recreated when actually crossing that boundary, not on every dropdown change (e.g. switching between two jêder-* types keeps the same wording, no need to touch the DOM).
var isFreeText = jederKey === "";
if (this._urlFieldIsFreeTextWording !== isFreeText) {
this._urlFieldIsFreeTextWording = isFreeText;
this._sourceURLInput.setPlaceholder(isFreeText ? "URLyeke wekî https://…" : "URLyek wekî https://… an jî DOI/ISBN");
var $oldLayout = this._sourceURLInputLayout.$element;
// Re-wraps the SAME _urlRowWidget (still holding _sourceURLInput + _citoidButton) in a new
// FieldLayout with the new label/help; the widget's $element moves along with it, same as the
// old addItems()/removeItems() swap did for the plain input before this redesign.
this._sourceURLInputLayout = new OO.ui.FieldLayout(this._urlRowWidget, isFreeText ? {
label: "Adresa webê ya nimûneyê",
align: "top",
help: "Tenê binivîse eger lînk jixwe di referansa çavkaniyê de tinebe.",
helpInline: true,
} : {
label: "Lînk, DOI an ISBNya çavkaniyê",
align: "top",
help: "Ev dibe lînka çavkaniyê (url=). Ji bo şablonên jêder-*, dikare bi Citoid an bi destan jî bên dagirtin.",
helpInline: true,
});
$oldLayout.replaceWith(this._sourceURLInputLayout.$element);
}
this._autofillVideoTimestamp();
this._updateReadyHint();
},
// Fetches data via wikt.citoid (loaded on demand by ensureCitoid() if needed), picks the matching jêder-* template, and fills its empty fields.
_fillFromCitoid: function() {
var self = this;
var query = this._sourceURLInput.getValue().trim();
if (!query) {
mw.notify("Ji kerema xwe re pêşî URL, DOI an ISBNyekê binivîse.");
return;
}
this._citoidButton.setDisabled(true);
this._loadingImage.toggle(true);
ensureCitoid().then(function() {
return wikihez.citoid.fetchJederFields(query);
}).then(function(result) {
// Only let Citoid pick the template type when nothing's been chosen yet (the "citoid" auto-detect default). If the user already selected a specific jêder-* type (or free text), that choice is respected — e.g. picking "Websîte" and fetching a tweet must not silently switch to "Kovar" just because Citoid guessed differently.
var wasAutoDetect = self._currentJederKey === "citoid";
if (wasAutoDetect) {
var menu = self._sourceTypeDropdown.getMenu();
var item = menu.findItemFromData(result.jederKey);
if (item) {
menu.chooseItem(item); // this calls _setSourceType(jederKey) automatically
}
}
var targetJederKey = self._currentJederKey;
// Fields Citoid returned were shaped for its own detected type; if the active template differs (the case above where the user's choice was kept), re-derive fields for that template instead so e.g. "Websîte" still gets its own website-shaped fields (websîte, tarîx, ...) rather than leftover kovar-shaped ones.
var fields = targetJederKey === result.jederKey ? result.fields : wikihez.citoid.dataToJederFields(targetJederKey, result.raw);
Object.keys(fields).forEach(function(key) {
var widget = self._jederFieldWidgets[key];
if (widget && !widget.getValue()) {
widget.setValue(fields[key]);
}
});
self._citoidSuccessMsg.show();
self._updateReadyHint();
mw.notify("Malûmat ji Citoid hatin barkirin.");
}, function(errorMsg) {
// wikt.citoid may still be missing here if ensureCitoid() itself failed to load the script (e.g. network error) -- fall back to the bare error notice in that case.
if (!window.wikihez || !window.wikihez.citoid) {
mw.notify("Nekarî citoid-helper.js bar bike.");
return;
}
// Citoid can't fetch some sites at all (e.g. x.com/twitter.com) -- fall back to jêder-websîte with a website name guessed from the URL itself, rather than just a bare error.
var fallbackSite = wikihez.citoid.websiteNameForUrl(query);
if (fallbackSite) {
if (self._currentJederKey !== "jêder-websîte") {
var menu = self._sourceTypeDropdown.getMenu();
var item = menu.findItemFromData("jêder-websîte");
if (item) {
menu.chooseItem(item); // this calls _setSourceType("jêder-websîte") automatically
}
}
var websiteWidget = self._jederFieldWidgets["websîte"];
if (websiteWidget && !websiteWidget.getValue()) {
websiteWidget.setValue(fallbackSite);
}
mw.notify("Citoid nikare vê malperê bixwîne; şablona Websîte hate hilbijartin, ji kerema xwe mayî bi destan tijî bike.");
return;
}
mw.notify(typeof errorMsg === "string" ? errorMsg : "Nekarî malûmatan ji Citoid bistîne. Kontrol bike ka URL/DOI/ISBN rast e.");
}).always(function() {
self._citoidButton.setDisabled(false);
self._loadingImage.toggle(false);
});
},
// Toggles the visibility of this form and restores any saved draft when shown. The title text takes
// the button's place while open (see the "Form redesign for Kurdish example" mockup); the button
// itself stays put ready to reappear once the form is cancelled/closed.
setVisible: function(visible) {
this._$button.toggle(!visible);
this._$title.toggle(visible);
this._frame.toggle(visible);
if (visible) {
alignFormToPage(this._frame.$element);
var draft = draftStorage.Get() || {};
if (!this._textInput.getValue() && draft.text) {
this._textInput.setValue(draft.text);
}
if (!this._sourceInput.getValue() && draft.source) {
this._sourceInput.setValue(draft.source);
}
if (!this._sourceURLInput.getValue() && draft.sourceURL) {
this._sourceURLInput.setValue(draft.sourceURL);
}
if (!this._translationInput.getValue() && draft.translation) {
this._translationInput.setValue(draft.translation);
}
if (!this._transcriptionInput.getValue() && draft.transcription) {
this._transcriptionInput.setValue(draft.transcription);
}
}
},
// Removes any saved draft (localStorage/cookie via MediaWiki:Gadget-StorageUtils.js) so it can't resurface on other pages.
_clearDraft: function() {
draftStorage.Set({});
},
// Clears all fields in this form.
clear: function() {
this._textInput.setValue("");
this._sourceInput.setValue("");
this._sourceURLInput.setValue("");
this._translationInput.setValue("");
this._transcriptionInput.setValue("");
this._citoidSuccessMsg.hide();
this._sourceTypeDropdown.getMenu().selectItemByData("citoid");
this._setSourceType("citoid");
},
// Warns before submitting if a Citoid URL/DOI/ISBN was typed but never successfully fetched, then defers to _doSubmit.
submit: function() {
if (this._citoidPending() && !window.confirm("Te lînk, DOI an ISBN nivîsand lê hîn jê malûmat nehatine standin. Bêyî wan berdewam bikî?")) {
return;
}
this._doSubmit();
},
// Generates and submits the wikicode, then inserts the resulting HTML element if no errors occurred.
_doSubmit: function() {
var self = this;
self._textInput.setDisabled(true);
self._sourceInput.setDisabled(true);
self._sourceURLInput.setDisabled(true);
self._translationInput.setDisabled(true);
self._transcriptionInput.setDisabled(true);
self._sourceTypeDropdown.setDisabled(true);
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setDisabled(true);
});
// self._disableTranslationChk.setDisabled(true);
this._applyButton.setDisabled(true);
this._clearButton.setDisabled(true);
this._loadingImage.toggle(true);
var source = this._sourceInput.getValue().trim();
var sourceURL = this._sourceURLInput.getValue().trim();
var text = this._textInput.getValue().trim();
// If a jêder-* template is selected, collect its filled-in fields.
var jederParams = [];
if (this._currentJederKey && jederDefs[this._currentJederKey]) {
jederDefs[this._currentJederKey].fields.forEach(function(field) {
var widget = self._jederFieldWidgets[field.key];
var value = widget ? widget.getValue().trim() : "";
if (value) {
jederParams.push(field.key + "=" + value);
}
});
}
var usingJederTemplate = this._currentJederKey && jederParams.length > 0;
var minakAnNa, sablon;
if (usingJederTemplate) {
// The jêder-* template itself is used as the template, not as the "2=" content.
minakAnNa = "*";
sablon = this._currentJederKey;
} else if (source || sourceURL) {
minakAnNa = "*";
sablon = "jêder";
} else {
minakAnNa = ":";
sablon = "nimûne";
}
var listMarker = "".padStart(this._definitionLevel.length - 1, "#") + minakAnNa;
var title = mw.config.get('wgTitle');
// jêder-* template, jêder, or nimûne
var code = listMarker + " {{" + sablon;
// 1= language code
code += "|" + this._language;
if (usingJederTemplate) {
// Fields of the selected jêder-* template, passed straight through as its parameters.
jederParams.forEach(function(param) {
code += "|" + param;
});
} else {
// 2= source (free text)
if (source) {
code += "|2=" + source;
}
if (sourceURL) {
code += "|url=" + sourceURL;
}
}
// jêgirtin/nimûne (quotation text)
code += "|";
if (sablon !== "nimûne") {
code += "jêgirtin=";
}
// bold the page title, then convert any literal linebreak in the example text to <br> (see nlToBr) so it can't break the single-line "#*" wikitext
code += nlToBr(text.replace(new RegExp("(" + title + "([^( |,|;|?|.|!)]+)?)", "ig"), "'''$1'''"));
if (this._language !== "ku") {
var translation = nlToBr(this._translationInput.getValue().trim());
if (translation) {
code += "|tercime=" + translation;
}
}
var transcription = nlToBr(this._transcriptionInput.getValue().trim());
if (transcription) {
code += "|tr=" + transcription;
}
code += "}}";
// var escapedLangCode = languages[this._language].charAt(0).toUpperCase() + languages[this._language].slice(1);
// console.log("escapedLangCode: ", escapedLangCode);
var sectionIDPattern = new RegExp("^([\\wîêçş_]+?)_?(\\d+)?_?(\\d+)?$");
console.log("this._definitionLevel[0]: ", this._definitionLevel[0]);
var matchSectionID = sectionIDPattern.exec(this._definitionLevel[0]);
//var isInflection;
var sectionType = matchSectionID[1].replace(/_/, ' ');
sectionType = sectionType.replace(/_\d+$/, '');
console.log("sectionType: ", sectionType);
var sectionNum = matchSectionID[2] ? parseInt(matchSectionID[2]) : "";
console.log("Section Number:", sectionNum);
// Insert new example into page’s code
api.get({
action: "query",
titles: mw.config.get("wgPageName"),
prop: "revisions",
rvprop: "content",
rvslots: "main",
}).then(function(data) {
var pageContent;
for (var pageID in data.query.pages) {
if (data.query.pages.hasOwnProperty(pageID)) {
// noinspection JSUnresolvedVariable
pageContent = data.query.pages[pageID].revisions[0].slots.main["*"];
break;
}
}
// Look for correct language section
var langSectionRegex = new RegExp("==[ ]*{{ziman\\|{0}}}[ ]*==".format(self._language));
var langSectionIndex = pageContent.search(langSectionRegex);
console.log("langSectionIndex:", langSectionIndex);
if (langSectionIndex === -1) {
console.log("langSectionIndex === -1");
error("Xeletiyeke bi koda zimanî heye. Koda zimanî:" + self._language);
return;
}
// Look for correct word type section
var lines = pageContent.slice(langSectionIndex).split("\n");
var sectionNamesRegex = Object.keys(sectionNames).join('|');
var sectionRegex = new RegExp('^===[ ]*(' + sectionNamesRegex + ')\\s*(\\d+)?');
var targetLineIndex;
for (targetLineIndex = 0; targetLineIndex < lines.length; targetLineIndex++) {
var line = lines[targetLineIndex];
console.log("line:", line);
var matchSection = sectionRegex.exec(line);
if (matchSection) {
console.log("matchSection:", matchSection[1]);
// Extract section name and number from the matched result
var matchedSectionName = matchSection[1];
var matchedSectionNum = matchSection[2]; // It could be undefined
if (!sectionNames[sectionType]) {
error('Navê beşê xelet e. Di beşên "Ji wêjêyê" û "Ji wêjêya klasîk" ev amûr nayê bikaranîn.');
return; // Exit the function
}
// Check if the matched section name is in the expected list
if (sectionNames[sectionType].includes(matchedSectionName)) {
// Match only the specific numbered section the button was clicked in (e.g. "Navdêr 2",
// not just the first "===Navdêr...===" heading found) -- both sides are "" when the
// section has no number at all (a single unnumbered "===Navdêr===").
var matchedSectionNumValue = matchedSectionNum ? parseInt(matchedSectionNum, 10) : "";
if (matchedSectionNumValue === sectionNum) {
// Add more conditions if needed for inflection, e.g., (isInflection === line.includes("Formeke "))
break;
}
}
}
}
if (targetLineIndex === lines.length) {
console.log("targetLineIndex === lines.length");
error("Di navê beşê de xeletî heye. Îhtimalen bi vî navê beşê çend heb hene.");
return;
}
// Look for correct definition
var defIndex = -1;
var level = 1;
for (; targetLineIndex < lines.length; targetLineIndex++) {
var m = /^(#+)[^*#:]/.exec(lines[targetLineIndex]);
console.log("lines[targetLineIndex]:", lines[targetLineIndex]);
if (m) {
console.log("m:", m);
if (level === m[1].length) {
console.log("m[1]:", m[1]);
defIndex++;
console.log("defIndex:", defIndex);
if (self._definitionLevel[level] === defIndex) {
console.log("self._definitionLevel[level] === defIndex");
console.log("self._definitionLevel[level]", self._definitionLevel[level]);
if (level === self._definitionLevel.length - 1) {
console.log("level:", level);
break;
} else {
level++;
defIndex = -1;
}
}
}
}
}
// Find where to insert within this definition's "#:"/"#*" block: walk lines after the definition (findBlockEnd() tracks multi-line templates), and use exampleTemplateNames to tell real examples from annotations (synonyms, antonyms, alt-forms, etc.) rather than hard-blocking specific names.
var insertionFound = false;
var lastRelevantBlockEnd = -1;
var isJederFamily = (sablon === "jêder" || Object.prototype.hasOwnProperty.call(jederDefs, sablon));
var scanIndex = targetLineIndex + 1;
var emptyTemplate = false;
for (; scanIndex < lines.length; scanIndex++) {
var scanLine = lines[scanIndex];
if (!scanLine.startsWith("#:") && !scanLine.startsWith("#*")) {
// Left this definition's "#:"/"#*" block (e.g. a new definition or section starts).
break;
}
var blockEnd = findBlockEnd(lines, scanIndex);
var templateName = getLineTemplateName(scanLine);
var isExampleLine = templateName !== null &&
exampleTemplateNames.indexOf(templateName) !== -1;
if (isJederFamily) {
// jêder-family examples go after all "#:"/"#*" lines of this definition (both real examples and annotations).
lastRelevantBlockEnd = blockEnd;
insertionFound = true;
} else if (sablon === "nimûne") {
// "nimûne" examples go before any "#*" line, but after "#:" lines.
if (scanLine.startsWith("#*")) {
break;
}
lastRelevantBlockEnd = blockEnd;
insertionFound = true;
}
scanIndex = blockEnd; // Skip past the whole (possibly multi-line) block
}
var insertAt = lastRelevantBlockEnd >= 0 ? lastRelevantBlockEnd + 1 : scanIndex;
if (lastRelevantBlockEnd >= 0) {
emptyTemplate = /#+\*\s*{{[ ]*b?ê?(nimûne|mînak|jêgirtin)\??\s*\|\s*\|?\s*[^|}]+}}/.test(lines[lastRelevantBlockEnd]);
}
if (emptyTemplate) {
console.log("empty Template found", sablon);
// Replace empty template with new example
lines.splice(lastRelevantBlockEnd, 1, code);
} else {
console.log("empty Template not found", sablon);
// Insert the new example (right after the definition if it had no existing "#:"/"#*" lines yet, or after the relevant block otherwise).
lines.splice(insertAt, 0, code);
}
// Submit new page content
api.edit(mw.config.get("wgPageName"), function(_) {
return {
text: pageContent.slice(0, langSectionIndex) + lines.join("\n"),
summary: "+nimûneya bikaranînê bi amûra « {0} » (v{1}).".format(NAME, VERSION),
};
}).then(function() {
api.parse(code).done(function(data) {
var $renderedExample = $(data).find("ul > li").html();
var $item;
// Insert rendered example into page
if (emptyTemplate) {
self._$lastExample.html($renderedExample);
$item = self._$lastExample;
} else {
self._$lastExample.after($item = $("<li>").append($renderedExample));
}
$item.css("background-color", "lightgreen");
setTimeout(function() {
$item.css("background-color", "inherit");
}, 1000);
self._$lastExample = $item;
});
self.setVisible(false);
self.clear();
self._clearDraft();
reenable();
});
});
function error(errorMessage) {
mw.notify(errorMessage || "Nimûne nehat weşandin, îhtimalen rûpel hate guhartin. Ji kerema xwe re rûpelê dîsa bar bike û dîsa biceribîne.");
draftStorage.Set({
text: self._textInput.getValue(),
source: self._sourceInput.getValue(),
sourceURL: self._sourceURLInput.getValue(),
translation: self._translationInput.getValue(),
transcription: self._transcriptionInput.getValue(),
});
reenable();
}
function reenable() {
self._textInput.setDisabled(false);
self._sourceInput.setDisabled(false);
self._sourceURLInput.setDisabled(false);
self._translationInput.setDisabled(false);
self._transcriptionInput.setDisabled(false);
self._sourceTypeDropdown.setDisabled(false);
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setDisabled(false);
});
// self._disableTranslationChk.setDisabled(false);
self._applyButton.setDisabled(false);
self._cancelButton.setDisabled(false);
self._clearButton.setDisabled(false);
self._loadingImage.toggle(false);
}
},
};
});
// </nowiki>
oe0gbqnbgzj0r16pg9d0vmwtd5blids
6342603
6342591
2026-08-25T13:01:41Z
Wikihez
7344
6342603
javascript
text/javascript
// <nowiki>
// dependencies (declared in MediaWiki:Gadgets-definition): oojs, oojs-ui, ext.gadget.citoid-helper (wikihez.citoid), ext.gadget.StorageUtils (ObjectStorage)
// Formats a string using {0}, {1}, ... placeholders.
if (!String.prototype.format) {
String.prototype.format = function(var_args) {
var args = arguments;
return this.replace(/{(\d+)}/g, function(match, number) {
return typeof args[number] !== "undefined" ? args[number] : match;
});
};
}
$(function() {
"use strict";
// Skip pages where this gadget shouldn't run.
if (
mw.config.get("wgPageName") !== "Wîkîferheng:ceribandin/nimûne" &&
mw.config.get("wgNamespaceNumber") !== 108 &&
mw.config.get("wgNamespaceNumber") !== 0 ||
mw.config.get("wgPageName") === "Destpêk" ||
mw.config.get("wgArticleId") === 0
) return;
console.log("Gadget-wikt.add-examples.js dest pê dike…");
var NAME = "[[Mediawiki:Gadget-wikt.add-examples|Nimûne zêde bike]]";
var VERSION = "2.0";
// Persists form drafts via MediaWiki:Gadget-StorageUtils.js (localStorage, falling back to a cookie) so unsaved text survives a failed submit.
var draftStorage = new ObjectStorage("add_examples_draft", 1);
// Citoid logic normally lives in MediaWiki:Gadget-citoid-helper.js as a registered gadget dependency; not
// currently editable, so ensureCitoid() (below) loads it from a user testing page on demand instead.
// "span" is the field's width in the 12-column grid the fields render in (see .add-example-jeder-fields
// in the CSS and _setSourceType below) -- field ORDER here is also the grid's reading order.
var jederDefs = {
"jêder-kitêb": {
"label": "Kitêb",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 3 },
{ "key": "terciman", "label": "Terciman", "span": 3 },
{ "key": "amadekar", "label": "Amadekar", "span": 3 },
{ "key": "weşanxane", "label": "Weşanxane", "span": 3 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "cih", "label": "Cih", "span": 2 },
{ "key": "sal", "label": "Sal", "span": 1 },
{ "key": "sala-weşandinê", "label": "Sala weşandinê", "span": 2 },
{ "key": "çap", "label": "Çap", "span": 1 },
{ "key": "rûpel", "label": "Rûpel", "span": 1 },
{ "key": "isbn", "label": "ISBN", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
},
"jêder-kovar": {
"label": "Kovar",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 3 },
{ "key": "terciman", "label": "Terciman", "span": 3 },
{ "key": "amadekar", "label": "Amadekar", "span": 3 },
{ "key": "weşanxane", "label": "Weşanxane", "span": 3 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "kovar", "label": "Kovar", "span": 4 },
{ "key": "cild", "label": "Cild", "span": 2 },
{ "key": "hejmar", "label": "Hejmar", "span": 2 },
{ "key": "sal", "label": "Sal", "span": 2 },
{ "key": "rûpel", "label": "Rûpel", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
},
"jêder-websîte": {
"label": "Websîte",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 4 },
{ "key": "terciman", "label": "Terciman", "span": 4 },
{ "key": "websîte", "label": "Websîte", "span": 4 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "url", "label": "URL", "span": 5 },
{ "key": "urlya-arşîvê", "label": "URLya Arşîvê", "span": 5 },
{ "key": "sal", "label": "Sal", "span": 1 },
{ "key": "tarîx", "label": "Tarîx", "span": 1 }
]
},
"jêder-vîdeo": {
"label": "Vîdeo",
"fields": [
{ "key": "hunermend", "label": "Hunermend", "span": 6 },
{ "key": "platform", "label": "Platform", "span": 6 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "sal", "label": "Sal", "span": 2 },
{ "key": "tarîx", "label": "Tarîx", "span": 3 },
{ "key": "dem", "label": "Dem", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
}
};
var sectionNames = {
"Navdêr": ["Navdêr"],
"Formeke navdêrê": ["Formeke navdêrê"],
"Lêker": ["Lêker"],
"Formeke lêkerê": ["Formeke lêkerê"],
"Rengdêr": ["Rengdêr"],
"Formeke rengdêrê": ["Formeke rengdêrê"],
"Hoker": ["Hoker"],
"Formeke hokerê": ["Formeke hokerê"],
"Serenav": ["Serenav"],
"Formeke serenavê": ["Formeke serenavê"],
"Artîkel": ["Artîkel"],
"Baneşan": ["Baneşan"],
"Bazinedaçek": ["Bazinedaçek"],
"Biwêj": ["Biwêj"],
"Cînav": ["Cînav"],
"Daçek": ["Daçek"],
"Girêdek": ["Girêdek"],
"Gotineke pêşiyan": ["Gotineke pêşiyan"],
"Hejmar": ["Hejmar"],
"Hevok": ["Hevok"],
"Îfade": ["Îfade"],
"Kurtenav": ["Kurtenav"],
"Navgir": ["Navgir"],
"Paşdaçek": ["Paşdaçek"],
"Paşgir": ["Paşgir"],
"Pêşdaçek": ["Pêşdaçek"],
"Pêşgir": ["Pêşgir"],
"Pirtik": ["Pirtik"],
"Reh": ["Reh"],
"Sembol": ["Sembol"],
"Tîp": ["Tîp"]
};
// Template names treated as "real examples" (an allow-list, not the old deny-list) so annotation templates like synonyms/antonyms/alt-forms aren't mistaken for examples.
var exampleTemplateNames = ["jêder", "nimûne"].concat(Object.keys(jederDefs));
// Returns the template name starting a "#:"/"#*" line (e.g. "jêder" from "#* {{jêder|ku|...}}"), or null if the line doesn't start with a template.
function getLineTemplateName(line) {
var m = /^#[:*]\s*\{\{\s*([^|}]+)/.exec(line);
return m ? m[1].trim() : null;
}
// Returns the index of the line where a (possibly multi-line) template block starting at startIndex closes its {{ }} braces, so multi-line templates are treated as one block.
function findBlockEnd(lines, startIndex) {
var depth = 0;
var i = startIndex;
for (; i < lines.length; i++) {
var opens = (lines[i].match(/\{\{/g) || []).length;
var closes = (lines[i].match(/\}\}/g) || []).length;
depth += opens - closes;
if (depth <= 0) {
break;
}
}
return i;
}
// Ported from start.js: converts literal line breaks typed/pasted into the example/translation/transcription boxes into wikitext <br> tags, since a raw newline would break the single-line "#*" wikitext structure.
function nlToBr(text) {
return text ? text.replace(/\r\n|\r|\n/g, "<br>") : text;
}
function escapeHtmlForBackdrop(str) {
return String(str)
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">");
}
// Mirrors a textarea's text with a small marker after each line that's followed by an actual typed/pasted linebreak, rendered into a transparent backdrop behind the textarea (see ensureLinebreakBackdrop()).
function buildLinebreakBackdropHtml(text) {
var lines = text.split(/\r\n|\r|\n/);
return $.map(lines, function(line, i) {
var isLast = i === lines.length - 1;
return escapeHtmlForBackdrop(line) +
(isLast ? "" : "<mark class='add-example-linebreak-mark'>↵</mark>\n");
}).join("");
}
// Copies the metrics that affect where text wraps/lands (font, line height, padding, border) from the real textarea onto its backdrop via computed style, since the backdrop is a plain <div>, not a themed OOUI input.
function syncLinebreakBackdropMetrics(textarea, backdrop) {
var cs = window.getComputedStyle(textarea[0]);
backdrop.css({
"box-sizing": cs.boxSizing,
"padding-top": cs.paddingTop,
"padding-right": cs.paddingRight,
"padding-bottom": cs.paddingBottom,
"padding-left": cs.paddingLeft,
"border-width": cs.borderWidth,
"border-style": "solid",
"font-family": cs.fontFamily,
"font-size": cs.fontSize,
"font-weight": cs.fontWeight,
"line-height": cs.lineHeight,
"letter-spacing": cs.letterSpacing
});
}
// Lazily inserts the transparent backdrop layer used to mark linebreaks, as a sibling of the textarea inside its existing OOUI input wrapper (which OOUI already positions relatively for icon overlays), rather than start.js's approach of wrapping the textarea in a new div — that would risk disturbing OOUI's own layout of the input. Safe to call more than once; the backdrop is cached.
function ensureLinebreakBackdrop(textarea) {
var existing = textarea.data("addExampleLinebreakBackdrop");
if (existing) {
return existing;
}
var $parent = textarea.parent();
if ($parent.css("position") === "static") {
$parent.css("position", "relative");
}
var backdrop = $("<div aria-hidden='true'></div>").addClass("add-example-linebreak-backdrop");
textarea.before(backdrop);
textarea.data("addExampleLinebreakBackdrop", backdrop);
textarea.on("scroll.addExampleLinebreak", function() {
backdrop.scrollTop(textarea.scrollTop()).scrollLeft(textarea.scrollLeft());
});
return backdrop;
}
// Flags a textarea (via CSS class, for the border tint + tooltip) while it contains a typed/pasted linebreak, so the user notices before it's silently turned into <br> on submit; marks only the exact point of the break via the mirrored backdrop.
function highlightLinebreak(el) {
var textarea = $(el);
var text = textarea.val();
var hasBreak = /\r|\n/.test(text);
textarea
.toggleClass("add-example-has-linebreak", hasBreak)
.attr("title", hasBreak ? "Xeta nû dê wek <br> bê nivîsandin" : "");
if (!hasBreak) {
var cached = textarea.data("addExampleLinebreakBackdrop");
if (cached) {
cached.hide();
}
textarea.removeClass("add-example-has-linebreak-source");
return;
}
var backdrop = ensureLinebreakBackdrop(textarea);
textarea.addClass("add-example-has-linebreak-source");
syncLinebreakBackdropMetrics(textarea, backdrop);
backdrop.html(buildLinebreakBackdropHtml(text)).show();
backdrop.scrollTop(textarea.scrollTop()).scrollLeft(textarea.scrollLeft());
}
// Wires linebreak detection onto an OOUI multiline widget, matching start.js's scope: only the quote/example text and its translation/transcription, not bibliographic fields. Uses OOUI's own "change" event rather than the raw <textarea> "input" event start.js listens to, since our fields can also be set programmatically (Clear button, draft restore) via setValue(), which doesn't fire a native DOM input event.
function watchForLinebreaks(widget) {
widget.on("change", function() {
highlightLinebreak(widget.$input[0]);
});
}
var api = new mw.Api();
// Loads wikihez.citoid if it isn't already loaded, from Wikihez's testing page (MediaWiki: isn't editable
// right now) -- self-contained rather than calling wikihez.citoidHelper.ensure() directly, since that
// function only exists once citoid-helper.js has already run once, which isn't guaranteed here.
function ensureCitoid() {
if (window.wikihez && window.wikihez.citoid) {
return $.Deferred().resolve().promise();
}
var url = mw.util.getUrl("Bikarhêner:Wikihez/skrîpt/js/Gadget-citoid-helper.js", {
action: "raw",
ctype: "text/javascript"
});
return mw.loader.getScript(mw.config.get("wgServer") + url);
}
// Language display name, read from the matching section's .besazimani link text.
function languageNameForCode(code) {
var $mark = $(".besazimani[id='" + code + "']").first();
return $mark.length ? $mark.text().trim() : null;
}
// Whether the page title itself (accented Kurdish Latin letters included) is written in Latin script.
var pageTitleIsLatin = !/[^\x00-\x7FÀ-ɏḀ-ỿ‘’]/.test(mw.config.get("wgTitle") || "");
// .example/.benimune = old Şablon:jêder hidden marker; .h-usage-example/.h-quotation = Modul:usex containers used directly by Şablon:nimûne; .citation-whole = Modul:quote's own wrapper, now used by jêder-* templates (Modul:quote nests .h-quotation inside .citation-whole > dl > dd instead of putting it directly under the <li>, so it needs its own entry here).
// Requiring "ul > li >" is what makes this only match an example that's grouped into its own <ul> -- a
// {{nimûne}} (or its "mk" redirect) with no jêder-family citation alongside it in the same definition
// renders straight under the definition's own content instead, with no such group; also reused below to
// tell whether the second pass still needs to handle a given definition.
var EXISTING_EXAMPLE_SELECTOR = "ul > li > .example, ul > li > .benimune, ul > li > .h-usage-example, ul > li > .h-quotation, ul > li > .citation-whole";
$(EXISTING_EXAMPLE_SELECTOR).each(function() {
var $element = $(this);
var $item = $element.parent();
if (!$item.next().length) {
// Get example’s language
// bdi[lang] = old hidden marker; .e-example[lang]/.e-quotation[lang] = Modul:usex/Modul:quote already put lang on the visible span.
// A jêder-* citation with no jêgirtin= (quotation text) yet renders no h-quotation/e-quotation at all
// (see get_quote() in Modul quote.lua) -- exactly the "bare citation" case this button exists to fill
// in, so this can't just crash: without the guard, [0] is undefined here and ".lang" throws, which
// (since $.each() has no try/catch) silently kills the button for every remaining match on the page.
var $langEl = $item.find(".e-example[lang], .e-quotation[lang], bdi[lang]")[0];
if (!$langEl) {
console.warn("Gadget-wikt.add-examples: nikaribe zimanê vê nimûneyê bibîne, valakirî hate derbaskirin.", $item);
return;
}
var language = $langEl.lang;
if (language === "ku-Latn") {
language = "ku";
}
console.log('Language:', language);
// Get section and indices of associated definition
var definitionLevel = [];
var $definitionItem = $item.parent().parent();
var $topItem;
do {
// Skip MediaWiki's empty <li class="mw-empty-elt"> placeholders so indices match the real "#" lines in wikitext (see submit()).
definitionLevel.splice(0, 0, $definitionItem.prevAll("li:not(.mw-empty-elt)").length);
$topItem = $definitionItem;
$definitionItem = $definitionItem.parent().parent();
} while ($definitionItem.prop("tagName") === "LI");
var $section = $($topItem.parent().prevAll(".mw-heading3, h3").get(0));
if ($section.length) {
definitionLevel.splice(0, 0, $section.find("h3").attr("id"));
} else {
console.warn("Gadget-wikt.add-examples: Section heading not found");
// TODO: why does this happen? mw.notify("Beş nehat dîtin. Jkx li WF:Dîwanê vê problemê ragihînin!");
return;
}
// Remove default edit link if present
var $defaultEditLink = $item.find("span.example > span.stubedit");
if ($defaultEditLink.length) {
$defaultEditLink.remove();
}
// Add a nice button to open the form. $group is the citation-group <ul> itself (parent of $item);
// the form panel is inserted AFTER it (see click handler below), not inside it, so the panel isn't
// squeezed into that <ul>'s narrow hanging-indent width on mobile -- only the button/title stays
// there, matching the "Form redesign for Kurdish example" mockup (title inside the bullet list,
// full-width panel below it).
var $group = $item.parent();
var $formItem = $("<li>");
var $button = $("<a href='#'>Nimûneyeke bikaranînê lê zêde bike</a>");
$button.css("color", "var( --color-subtle, #777777 )");
// Shown in the button's place once the form is open (see Form#setVisible).
var $title = $("<span class='add-example-form-title'></span>").hide();
$formItem.append($button).append($title);
$button.on("click", function() {
if (!$button.form) {
$title.text("Nimûneyeke bi " + (languageNameForCode(language) || "zimanekî nenas").toLowerCase() + " lê zêde dikî.");
var form = new Form($item, $button, $title, language, definitionLevel);
$group.after(form.$element);
}
$button.form.setVisible(true);
return false;
});
$item.after($formItem);
}
});
// Second pass: some definitions have no example the pass above could react to at all -- either genuinely
// zero examples, or one rendered via {{nimûne}} (or its "mk" redirect) with no jêder-family citation next
// to it, which (see the comment on EXISTING_EXAMPLE_SELECTOR above) renders with no "ul > li" group to
// match. This walks every recognized POS section's own definitions list directly instead of reacting to
// an existing example, and reads the language off the language section's own <h2> rather than off an
// example -- so it doesn't need one to already exist. Everything else (Form, submit()) is reused as-is.
// MediaWiki wraps each heading in a "mw-heading2"/"mw-heading3"/... div in current skin output; falls
// back to the bare heading element for older/other output that doesn't wrap it.
function headingOuter($h) {
var $wrap = $h.closest(".mw-heading2, .mw-heading3, .mw-heading4, .mw-heading5, .mw-heading6");
return $wrap.length ? $wrap : $h;
}
// Section's language code: nearest preceding .besazimani[id] by document order (not sibling-walking, which mobile's per-section wrapping breaks).
function languageCodeForOl($ol) {
var $marks = $(".besazimani[id]").add($ol);
var ol = $ol.get(0);
var idx = $marks.index(ol);
for (var i = idx - 1; i >= 0; i--) {
var el = $marks.get(i);
if (el.id) {
return el.id;
}
}
return null;
}
// A <li> whose OWN direct content (not counting a nested <ol>) is wrapped in ".form-of-definition" is
// MediaWiki's "form of" template system marking that content as generated by a template -- e.g.
// {{ku-tewîna-nav}}'s "Formeke heval:" wrapper together with its "rewşa îzafeyî"/"rewşa çemandî"/...
// readings underneath. That whole nested block is normally the ENTIRE expansion of a single "#"
// wikitext line, with no separate "##" line behind any individual reading -- recursing into it would
// hand out one button per reading, each trying to match a "##" line that doesn't exist, and submit()
// would fail to find where to insert every one of them. A <li> without that class whose nested <ol>
// holds real hand-typed prose (e.g. sîno-koreyî/Navdêr's two genuinely separate "##" sub-senses) has
// no such problem -- those really are individually addressable wikitext lines.
function isFormOfWrapper($li) {
return $li.children(".form-of-definition").length > 0;
}
// Recurse into a <li>'s own nested <ol> UNLESS it's a form-of-template wrapper (see isFormOfWrapper) --
// a wrapper <li> with its own nested <ol> isn't itself a sense with content of its own, only its real
// (non-generated) leaves are.
function eachLeafDefinition($ol, fn) {
$ol.children("li").each(function() {
var $li = $(this);
var $childOl = $li.children("ol");
if ($childOl.length && !isFormOfWrapper($li)) {
$childOl.each(function() {
eachLeafDefinition($(this), fn);
});
} else {
fn($li);
}
});
}
$("h3").each(function() {
var sectionType = $(this).text().trim();
if (!sectionNames[sectionType]) {
return; // not a recognized word-sense section (Bilêvkirin, Etîmolojî, Çavkanî, ...)
}
var h3Id = $(this).attr("id");
// Forward-walk siblings to the definitions <ol>, skipping over a declension table/TemplateStyles/the
// headword line; stop (nothing to attach to in this section) if another heading comes first instead.
var $ol = null;
for (var $cursor = headingOuter($(this)).next(); $cursor.length; $cursor = $cursor.next()) {
if ($cursor.is("ol")) {
$ol = $cursor;
break;
}
if ($cursor.is(".mw-heading2, .mw-heading3, .mw-heading4, .mw-heading5, .mw-heading6, h2, h3, h4, h5, h6")) {
break;
}
}
if (!$ol) {
return;
}
var language = languageCodeForOl($ol);
if (!language) {
console.warn("Gadget-wikt.add-examples: nikaribe koda zimanê vê beşê bibîne.", $ol);
return;
}
eachLeafDefinition($ol, function($li) {
// The pass above already added a button here (or will) -- an actual example already wrapped in
// its own "ul > li" group.
if ($li.find(EXISTING_EXAMPLE_SELECTOR).length) {
return;
}
var definitionLevel = [];
var $definitionItem = $li;
while ($definitionItem.prop("tagName") === "LI") {
// Skip MediaWiki's empty <li class="mw-empty-elt"> placeholders so indices match the real "#" lines in wikitext (see submit()).
definitionLevel.splice(0, 0, $definitionItem.prevAll("li:not(.mw-empty-elt)").length);
$definitionItem = $definitionItem.parent().parent();
}
definitionLevel.splice(0, 0, h3Id);
// A hidden, empty placeholder <li> so submit()'s existing "_$lastExample.after(newLi)" insertion
// (unchanged, same as the pass above) lands the first submitted example right before the button
// -- matching the existing convention of new examples going in before the button, not after it.
var $placeholder = $("<li style='display:none'></li>");
var $formItem = $("<li>");
var $button = $("<a href='#'>Nimûneyeke bikaranînê lê zêde bike</a>");
$button.css("color", "var( --color-subtle, #777777 )");
// Shown in the button's place once the form is open (see Form#setVisible).
var $title = $("<span class='add-example-form-title'></span>").hide();
$formItem.append($button).append($title);
// A "ul" nested directly under a definition "li" starts hidden here (see the HQToggle-controlled
// jêder-citation-group "ul", which only ever renders with an explicit "style="display: block""
// set on it) -- this one has no HQToggle to unhide it, so it needs the same explicit override or
// the button (and the placeholder above) never becomes visible at all.
var $ul = $("<ul>").css("display", "block").append($placeholder).append($formItem);
// The form panel is inserted AFTER $ul (not inside it) once opened -- same reasoning as the first
// pass above: keeps the full-width panel out of the tight bulleted-list indentation on mobile.
$button.on("click", function() {
if (!$button.form) {
$title.text("Nimûneyeke bi " + (languageNameForCode(language) || "zimanekî nenas").toLowerCase() + " lê zêde dikî.");
var form = new Form($placeholder, $button, $title, language, definitionLevel);
$ul.after(form.$element);
}
$button.form.setVisible(true);
return false;
});
$li.append($ul);
});
});
// Pulls the form panel flush with the page's own left/right edges, undoing whatever nested-list indent it inherited from sitting inside a deeply-nested definition.
function alignFormToPage($form) {
var $container = $form.closest(".mw-parser-output");
if (!$container.length) {
return;
}
var pad = parseFloat(window.getComputedStyle($container[0]).paddingLeft) || 0;
var containerLeft = $container.offset().left + pad;
var indent = $form.offset().left - containerLeft;
$form.css({
marginLeft: indent > 0 ? -indent : 0,
width: $container.width() + "px"
});
}
// Constructor for the edit form; lastExample/button/title/language/definitionLevel identify where the form attaches and what it edits.
function Form($lastExample, $button, $title, language, definitionLevel) {
var self = this;
this._language = language;
this._definitionLevel = definitionLevel;
this._$lastExample = $lastExample;
this._$button = $button;
this._$button.form = this;
this._$title = $title;
this._currentJederKey = "";
this._jederFieldWidgets = {};
this._textInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var textInputLayout = new OO.ui.FieldLayout(this._textInput, {
label: "Metna nimûneyê",
align: "top",
});
this._textInput.on("change", function(value) {
self._applyButton.setDisabled(!value);
self._updateReadyHint();
});
watchForLinebreaks(this._textInput);
// Source type dropdown: free text, a jêder-* template, or "citoid" (a pseudo key, not in jederDefs) meaning "not yet detected" — the default, switched automatically once a Citoid fetch succeeds (see _fillFromCitoid).
var sourceTypeMenuItems = [
new OO.ui.MenuOptionWidget({ data: "citoid", label: "Bi Citoidê otomatîk zêde bike" }),
new OO.ui.MenuOptionWidget({ data: "", label: "Bi destê xwe binivîsim" }),
];
for (var jederKey in jederDefs) {
if (jederDefs.hasOwnProperty(jederKey)) {
sourceTypeMenuItems.push(new OO.ui.MenuOptionWidget({
data: jederKey,
label: jederDefs[jederKey].label,
}));
}
}
this._sourceTypeDropdown = new OO.ui.DropdownWidget({
menu: { items: sourceTypeMenuItems },
label: "Bi Citoidê otomatîk zêde bike",
});
var sourceTypeLayout = new OO.ui.FieldLayout(this._sourceTypeDropdown, {
label: "Şablona çavkaniyê",
align: "top",
});
this._sourceTypeDropdown.getMenu().on("choose", function(menuOption) {
self._setSourceType(menuOption.getData());
});
this._sourceInput = new OO.ui.MultilineTextInputWidget();
this._sourceInput.on("change", function() {
self._updateReadyHint();
});
this._sourceInputLayout = new OO.ui.FieldLayout(this._sourceInput, {
label: "Çavkaniya nimûneyê",
align: "top",
});
// Always visible in every mode (free text included) — submit() reads this unconditionally as the "url=" parameter. The Citoid fetch button sits right next to it (not in a separate box) -- see _urlRowWidget below.
this._sourceURLInput = new OO.ui.TextInputWidget({
icon: "link",
placeholder: "https://… an jî DOI/ISBN",
});
this._citoidButton = new OO.ui.ButtonWidget({
label: "Bi otomatîk tijî bike",
icon: "download",
flags: ["progressive"],
title: "Li gorî URL, DOI an ISBNya jorîn, malûmatan ji Citoid tîne û qadên şablona jêder-* otomatîk tijî dike.",
classes: ["add-example-citoid-fetch"],
});
this._citoidButton.on("click", this._fillFromCitoid.bind(this));
this._sourceURLInput.on("change", function() {
self._updateReadyHint();
self._autofillVideoTimestamp();
});
// URL input + inline "auto-fill" button as one row (replaces the old separate framed Citoid box's
// button row) -- a plain OO.ui.Widget used purely as a flex-row container (same pattern as
// _loadingImage below: build it empty, then manually append its children's $elements). Disabling
// during submit() still goes through the individual _sourceURLInput/_citoidButton references, not
// through this wrapper.
this._urlRowWidget = new OO.ui.Widget({ classes: ["add-example-url-row"] });
this._urlRowWidget.$element.append(this._sourceURLInput.$element, this._citoidButton.$element);
this._sourceURLInputLayout = new OO.ui.FieldLayout(this._urlRowWidget, {
label: "Lînk, DOI an ISBNya çavkaniyê",
align: "top",
help: "Li qutiyê URL, DOI an ISBN binivîse û pê lê bike butona 'Bi otomatîk tijî bike' da ku otomatîk çavkanî were dagirtin.",
helpInline: true,
});
// Matches the wording just constructed above, so the initial _setSourceType("citoid") call at the end of this constructor doesn't needlessly recreate an identical layout.
this._urlFieldIsFreeTextWording = false;
// Shown right after a successful Citoid fetch (see _fillFromCitoid); hidden again on clear.
this._citoidSuccessMsg = $("<span class='add-example-citoid-success'>✓ Malûmat hatin dagirtin — li jêr kontrol bike.</span>").hide();
// Clears the URL field and any filled jêder-* fields without touching the example text/translation.
this._citoidClearButton = new OO.ui.ButtonWidget({
label: "Vala bike",
icon: "trash",
framed: false,
title: "Lînkê û qadên jêder-* yên vê beşê vala bike",
classes: ["add-example-citoid-clear"],
});
this._citoidClearButton.on("click", function() {
self._sourceURLInput.setValue("");
self._citoidSuccessMsg.hide();
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setValue("");
});
});
// Plain div (not OO.ui.FieldsetLayout) so the grid CSS class applies directly to the field items.
this._jederFieldsFieldset = $("<div class='add-example-jeder-fields'>");
// "Malûmatên çavkaniyê" header (+ the "Vala bike" clear button) sitting right above the fields grid,
// replacing the old framed "Ji Citoid an bi destan tijî bike:" box -- like this only makes sense once
// a real jêder-* template is active (there's nothing here to show for the "citoid: not yet detected"
// placeholder or for free text), so the whole section toggles together in _setSourceType().
this._jederSection = $("<div class='add-example-jeder-section'>").append(
$("<div class='add-example-jeder-header'>")
.append($("<span class='add-example-jeder-header-label'>Malûmatên çavkaniyê</span>"))
.append(this._citoidClearButton.$element),
this._jederFieldsFieldset
);
this._translationInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var translationInputLayout = new OO.ui.FieldLayout(this._translationInput, {
label: "Tercimeya kurmancî ya nimûneyê",
align: "top",
});
watchForLinebreaks(this._translationInput);
this._transcriptionInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var transcriptionInputLayout = new OO.ui.FieldLayout(this._transcriptionInput, {
label: "Translîterasyona nimûneyê",
align: "top",
help: "Tenê lê zêde bike eger metna di nimûneyê de bi alfabeya latînî nehatibe nivîsandin.",
helpInline: true,
});
watchForLinebreaks(this._transcriptionInput);
this._applyButton = new OO.ui.ButtonWidget({
label: "Biweşîne",
icon: "check",
title: "Nimûneyê ji bo vê tarîfê nimûneyê lê zêde bike",
flags: ["progressive", "primary"],
disabled: true,
});
this._applyButton.on("click", this.submit.bind(this));
// Reactive "ready to submit" hint next to Biweşîne: no text yet, text but no source (still submittable
// as a bare {{nimûne}}), or fully ready -- kept in sync by _updateReadyHint(), wired to every field below.
this._readyHint = $("<span class='add-example-ready-hint'></span>").text("Metna nimûneyê lazim e.");
// True while a Citoid-eligible URL/DOI/ISBN is typed in but not yet fetched (or fetched then edited away) and no jêder field has been filled by hand -- the "looks done but isn't" trap this exists to catch. Not applicable in free-text mode, where the fetch button isn't even offered.
this._citoidPending = function() {
return self._currentJederKey !== "" &&
!!self._sourceURLInput.getValue().trim() &&
!self._citoidSuccessMsg.is(":visible") &&
!Object.keys(self._jederFieldWidgets).some(function(key) {
return self._jederFieldWidgets[key].getValue().trim();
});
};
this._updateReadyHint = function() {
if (!self._textInput.getValue()) {
self._readyHint.text("Metna nimûneyê lazim e.");
return;
}
if (self._citoidPending()) {
self._readyHint.text("Pêşî 'Bi otomatîk tijî bike' bitikîne.");
return;
}
var hasSource = self._sourceInput.getValue().trim() || self._sourceURLInput.getValue().trim() ||
Object.keys(self._jederFieldWidgets).some(function(key) {
return self._jederFieldWidgets[key].getValue().trim();
});
self._readyHint.text(hasSource ? "Hazir e." : "Çavkanî nehatiye dayîn.");
};
// Prefills the Dem field from the typed URL's own "t=" (see wikihez.citoid.extractVideoTimestamp) once jêder-vîdeo is active -- never overwrites a value the user already entered by hand.
this._autofillVideoTimestamp = function() {
var demWidget = self._jederFieldWidgets.dem;
if (self._currentJederKey !== "jêder-vîdeo" || !demWidget || demWidget.getValue().trim()) {
return;
}
ensureCitoid().then(function() {
var dem = wikihez.citoid.extractVideoTimestamp(self._sourceURLInput.getValue().trim());
if (dem && !demWidget.getValue().trim()) {
demWidget.setValue(dem);
}
});
};
// framed:false (+ the "destructive" flag for the red text/hover) matches the mockup's borderless
// "Betal bike" -- a plain colored link rather than a boxed button, distinguishing it from Paqij bike.
this._cancelButton = new OO.ui.ButtonWidget({
label: "Betal bike",
icon: "close",
title: "Formê bigire",
flags: ["destructive"],
framed: false,
});
this._cancelButton.on("click", function() {
self.setVisible(false);
});
this._clearButton = new OO.ui.ButtonWidget({
label: "Paqij bike",
icon: "trash",
title: "Hemû qadan vala bike û pêşnûyisên hilanîbûyî jê bibe",
});
this._clearButton.on("click", function() {
self.clear();
self._clearDraft();
});
// Native CSS spinner (see Gadget-wikt.add-examples.css) instead of an external Commons GIF, so there's no network request and it matches dark/light mode.
this._loadingImage = new OO.ui.Widget({
classes: ["add-example-loading"],
});
this._loadingImage.$element.append($('<span class="add-example-spinner" aria-hidden="true"></span>'));
this._loadingImage.toggle(false);
// Two-column top section (see "Form redesign for Kurdish example/Nimûne zêde bike.dc.html"): example
// text (+ translation/transliteration for non-ku, right after it, not after the source fields) on the
// left; source-type + link/Citoid on the right. Built as plain <div>s, not an OOUI layout -- OOUI has
// no CSS-grid container -- so .add-example-top-grid in the CSS can lay them out as a real responsive
// 7fr/5fr grid (collapsing to one column on narrow screens).
var $topLeft = $("<div class='add-example-top-col'>").append(textInputLayout.$element);
if (language !== "ku") {
$topLeft.append(translationInputLayout.$element);
}
if (!pageTitleIsLatin) {
$topLeft.append(transcriptionInputLayout.$element);
}
var $topRight = $("<div class='add-example-top-col'>").append(
sourceTypeLayout.$element,
this._sourceInputLayout.$element,
this._sourceURLInputLayout.$element,
this._citoidSuccessMsg
);
var $topGrid = $("<div class='add-example-top-grid'>").append($topLeft, $topRight);
// Saved on the instance (not just a local var) so _setSourceType() can swap the URL field's label/help
// wording in and out of it when switching to/from free text (see the FieldLayout replaceWith() there).
this._fieldsLayout = $("<div class='add-example-fieldset'>").append($topGrid, this._jederSection);
// Bottom action row -- order/spacing matches the mockup: Biweşîne (+ spinner + ready hint), a spacer
// pushing the rest right, then Paqij bike (bordered/subtle) and Betal bike (borderless red text, via
// framed:false above). A plain flex <div>, not an OOUI HorizontalLayout, so the raw hint/spacer
// elements can sit alongside the real button widgets (same reasoning as the top grid above).
var $buttonsRow = $("<div class='add-example-main-buttons'>").append(
this._applyButton.$element,
this._loadingImage.$element,
this._readyHint,
$("<span class='add-example-buttons-spacer'></span>"),
this._clearButton.$element,
this._cancelButton.$element
);
this._frame = new OO.ui.PanelLayout({
id: "add-example-definition-{0}-form".format(this._definitionLevel.join("-")),
classes: ["add-example-form"],
expanded: false,
});
this._frame.$element.append(this._fieldsLayout, $buttonsRow);
// Default to "citoid" mode; selectItemByData() doesn't fire "choose" (that only fires for interactive selection), so _setSourceType() must also be called explicitly to set up the initial UI.
this._sourceTypeDropdown.getMenu().selectItemByData("citoid");
this._setSourceType("citoid");
}
Form.prototype = {
// Returns the jQuery object for this form.
get $element() {
return this._frame.$element;
},
// Switches the source section between free text, Citoid auto-detect (no template chosen yet), and a specific jêder-* template, rebuilding the field list to match. The URL field itself is always visible in every mode (see the constructor); only the free-text textarea, the Citoid fetch button, and the "Malûmatên çavkaniyê" fields section toggle here.
_setSourceType: function(jederKey) {
var self = this;
this._currentJederKey = jederKey;
this._jederFieldsFieldset.empty();
this._jederFieldWidgets = {};
var isRealJederKey = jederKey && jederDefs[jederKey];
if (isRealJederKey) {
var def = jederDefs[jederKey];
def.fields.forEach(function(field) {
var widget = field.multiline
? new OO.ui.MultilineTextInputWidget({ rows: 2, autosize: false })
: new OO.ui.TextInputWidget();
self._jederFieldWidgets[field.key] = widget;
widget.on("change", function() {
self._updateReadyHint();
});
var layout = new OO.ui.FieldLayout(widget, {
label: field.label,
align: "top",
classes: ["add-example-field-span-" + (field.span || 4)],
});
self._jederFieldsFieldset.append(layout.$element);
});
}
// "Malûmatên çavkaniyê" header + fields grid: only once a real template is chosen/detected --
// nothing to show yet for the plain "citoid: not yet detected" placeholder or for free text.
this._jederSection.toggle(!!isRealJederKey);
// Free text textarea only for "" (free text); hidden for "citoid" and any real jêder-* key.
this._sourceInputLayout.toggle(jederKey === "");
// Citoid fetch button: hidden for free text (nothing there for it to fill in), shown for "citoid" auto-detect and any real jêder-* key. The URL input itself next to it stays visible in every mode.
this._citoidButton.toggle(jederKey !== "");
// URL field wording: plain "attach a link" phrasing for free text, Citoid-oriented phrasing otherwise. Only recreated when actually crossing that boundary, not on every dropdown change (e.g. switching between two jêder-* types keeps the same wording, no need to touch the DOM).
var isFreeText = jederKey === "";
if (this._urlFieldIsFreeTextWording !== isFreeText) {
this._urlFieldIsFreeTextWording = isFreeText;
this._sourceURLInput.setPlaceholder(isFreeText ? "URLyeke wekî https://…" : "URLyek wekî https://… an jî DOI/ISBN");
var $oldLayout = this._sourceURLInputLayout.$element;
// Re-wraps the SAME _urlRowWidget (still holding _sourceURLInput + _citoidButton) in a new
// FieldLayout with the new label/help; the widget's $element moves along with it, same as the
// old addItems()/removeItems() swap did for the plain input before this redesign.
this._sourceURLInputLayout = new OO.ui.FieldLayout(this._urlRowWidget, isFreeText ? {
label: "Adresa webê ya nimûneyê",
align: "top",
help: "Tenê binivîse eger lînk jixwe di referansa çavkaniyê de tinebe.",
helpInline: true,
} : {
label: "Lînk, DOI an ISBNya çavkaniyê",
align: "top",
help: "Ev dibe lînka çavkaniyê (url=). Ji bo şablonên jêder-*, dikare bi Citoid an bi destan jî bên dagirtin.",
helpInline: true,
});
$oldLayout.replaceWith(this._sourceURLInputLayout.$element);
}
this._autofillVideoTimestamp();
this._updateReadyHint();
},
// Fetches data via wikihez.citoid (loaded on demand by ensureCitoid() if needed), picks the matching jêder-* template, and fills its empty fields.
_fillFromCitoid: function() {
var self = this;
var query = this._sourceURLInput.getValue().trim();
if (!query) {
mw.notify("Ji kerema xwe re pêşî URL, DOI an ISBNyekê binivîse.");
return;
}
this._citoidButton.setDisabled(true);
this._loadingImage.toggle(true);
ensureCitoid().then(function() {
return wikihez.citoid.fetchJederFields(query);
}).then(function(result) {
// Only let Citoid pick the template type when nothing's been chosen yet (the "citoid" auto-detect default). If the user already selected a specific jêder-* type (or free text), that choice is respected — e.g. picking "Websîte" and fetching a tweet must not silently switch to "Kovar" just because Citoid guessed differently.
var wasAutoDetect = self._currentJederKey === "citoid";
if (wasAutoDetect) {
var menu = self._sourceTypeDropdown.getMenu();
var item = menu.findItemFromData(result.jederKey);
if (item) {
menu.chooseItem(item); // this calls _setSourceType(jederKey) automatically
}
}
var targetJederKey = self._currentJederKey;
// Fields Citoid returned were shaped for its own detected type; if the active template differs (the case above where the user's choice was kept), re-derive fields for that template instead so e.g. "Websîte" still gets its own website-shaped fields (websîte, tarîx, ...) rather than leftover kovar-shaped ones.
var fields = targetJederKey === result.jederKey ? result.fields : wikihez.citoid.dataToJederFields(targetJederKey, result.raw, query);
Object.keys(fields).forEach(function(key) {
var widget = self._jederFieldWidgets[key];
if (widget && !widget.getValue()) {
widget.setValue(fields[key]);
}
});
self._citoidSuccessMsg.show();
self._updateReadyHint();
mw.notify("Malûmat ji Citoid hatin barkirin.");
}, function(errorMsg) {
// wikihez.citoid may still be missing here if ensureCitoid() itself failed to load the script (e.g. network error) -- fall back to the bare error notice in that case.
if (!window.wikihez || !window.wikihez.citoid) {
mw.notify("Nekarî citoid-helper.js bar bike.");
return;
}
// Citoid can't fetch some sites at all (e.g. x.com/twitter.com) -- fall back to jêder-websîte with a website name guessed from the URL itself, rather than just a bare error.
var fallbackSite = wikihez.citoid.websiteNameForUrl(query);
if (fallbackSite) {
if (self._currentJederKey !== "jêder-websîte") {
var menu = self._sourceTypeDropdown.getMenu();
var item = menu.findItemFromData("jêder-websîte");
if (item) {
menu.chooseItem(item); // this calls _setSourceType("jêder-websîte") automatically
}
}
var websiteWidget = self._jederFieldWidgets["websîte"];
if (websiteWidget && !websiteWidget.getValue()) {
websiteWidget.setValue(fallbackSite);
}
mw.notify("Citoid nikare vê malperê bixwîne; şablona Websîte hate hilbijartin, ji kerema xwe mayî bi destan tijî bike.");
return;
}
mw.notify(typeof errorMsg === "string" ? errorMsg : "Nekarî malûmatan ji Citoid bistîne. Kontrol bike ka URL/DOI/ISBN rast e.");
}).always(function() {
self._citoidButton.setDisabled(false);
self._loadingImage.toggle(false);
});
},
// Toggles the visibility of this form and restores any saved draft when shown. The title text takes
// the button's place while open (see the "Form redesign for Kurdish example" mockup); the button
// itself stays put ready to reappear once the form is cancelled/closed.
setVisible: function(visible) {
this._$button.toggle(!visible);
this._$title.toggle(visible);
this._frame.toggle(visible);
if (visible) {
alignFormToPage(this._frame.$element);
var draft = draftStorage.Get() || {};
if (!this._textInput.getValue() && draft.text) {
this._textInput.setValue(draft.text);
}
if (!this._sourceInput.getValue() && draft.source) {
this._sourceInput.setValue(draft.source);
}
if (!this._sourceURLInput.getValue() && draft.sourceURL) {
this._sourceURLInput.setValue(draft.sourceURL);
}
if (!this._translationInput.getValue() && draft.translation) {
this._translationInput.setValue(draft.translation);
}
if (!this._transcriptionInput.getValue() && draft.transcription) {
this._transcriptionInput.setValue(draft.transcription);
}
}
},
// Removes any saved draft (localStorage/cookie via MediaWiki:Gadget-StorageUtils.js) so it can't resurface on other pages.
_clearDraft: function() {
draftStorage.Set({});
},
// Clears all fields in this form.
clear: function() {
this._textInput.setValue("");
this._sourceInput.setValue("");
this._sourceURLInput.setValue("");
this._translationInput.setValue("");
this._transcriptionInput.setValue("");
this._citoidSuccessMsg.hide();
this._sourceTypeDropdown.getMenu().selectItemByData("citoid");
this._setSourceType("citoid");
},
// Warns before submitting if a Citoid URL/DOI/ISBN was typed but never successfully fetched, then defers to _doSubmit.
submit: function() {
if (this._citoidPending() && !window.confirm("Te lînk, DOI an ISBN nivîsand lê hîn jê malûmat nehatine standin. Bêyî wan berdewam bikî?")) {
return;
}
this._doSubmit();
},
// Generates and submits the wikicode, then inserts the resulting HTML element if no errors occurred.
_doSubmit: function() {
var self = this;
self._textInput.setDisabled(true);
self._sourceInput.setDisabled(true);
self._sourceURLInput.setDisabled(true);
self._translationInput.setDisabled(true);
self._transcriptionInput.setDisabled(true);
self._sourceTypeDropdown.setDisabled(true);
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setDisabled(true);
});
// self._disableTranslationChk.setDisabled(true);
this._applyButton.setDisabled(true);
this._clearButton.setDisabled(true);
this._loadingImage.toggle(true);
var source = this._sourceInput.getValue().trim();
var sourceURL = this._sourceURLInput.getValue().trim();
var text = this._textInput.getValue().trim();
// If a jêder-* template is selected, collect its filled-in fields.
var jederParams = [];
if (this._currentJederKey && jederDefs[this._currentJederKey]) {
jederDefs[this._currentJederKey].fields.forEach(function(field) {
var widget = self._jederFieldWidgets[field.key];
var value = widget ? widget.getValue().trim() : "";
if (value) {
jederParams.push(field.key + "=" + value);
}
});
}
var usingJederTemplate = this._currentJederKey && jederParams.length > 0;
var minakAnNa, sablon;
if (usingJederTemplate) {
// The jêder-* template itself is used as the template, not as the "2=" content.
minakAnNa = "*";
sablon = this._currentJederKey;
} else if (source || sourceURL) {
minakAnNa = "*";
sablon = "jêder";
} else {
minakAnNa = ":";
sablon = "nimûne";
}
var listMarker = "".padStart(this._definitionLevel.length - 1, "#") + minakAnNa;
var title = mw.config.get('wgTitle');
// jêder-* template, jêder, or nimûne
var code = listMarker + " {{" + sablon;
// 1= language code
code += "|" + this._language;
if (usingJederTemplate) {
// Fields of the selected jêder-* template, passed straight through as its parameters.
jederParams.forEach(function(param) {
code += "|" + param;
});
} else {
// 2= source (free text)
if (source) {
code += "|2=" + source;
}
if (sourceURL) {
code += "|url=" + sourceURL;
}
}
// jêgirtin/nimûne (quotation text)
code += "|";
if (sablon !== "nimûne") {
code += "jêgirtin=";
}
// bold the page title, then convert any literal linebreak in the example text to <br> (see nlToBr) so it can't break the single-line "#*" wikitext
code += nlToBr(text.replace(new RegExp("(" + title + "([^( |,|;|?|.|!)]+)?)", "ig"), "'''$1'''"));
if (this._language !== "ku") {
var translation = nlToBr(this._translationInput.getValue().trim());
if (translation) {
code += "|tercime=" + translation;
}
}
var transcription = nlToBr(this._transcriptionInput.getValue().trim());
if (transcription) {
code += "|tr=" + transcription;
}
code += "}}";
// var escapedLangCode = languages[this._language].charAt(0).toUpperCase() + languages[this._language].slice(1);
// console.log("escapedLangCode: ", escapedLangCode);
var sectionIDPattern = new RegExp("^([\\wîêçş_]+?)_?(\\d+)?_?(\\d+)?$");
console.log("this._definitionLevel[0]: ", this._definitionLevel[0]);
var matchSectionID = sectionIDPattern.exec(this._definitionLevel[0]);
//var isInflection;
var sectionType = matchSectionID[1].replace(/_/, ' ');
sectionType = sectionType.replace(/_\d+$/, '');
console.log("sectionType: ", sectionType);
var sectionNum = matchSectionID[2] ? parseInt(matchSectionID[2]) : "";
console.log("Section Number:", sectionNum);
// Insert new example into page’s code
api.get({
action: "query",
titles: mw.config.get("wgPageName"),
prop: "revisions",
rvprop: "content",
rvslots: "main",
}).then(function(data) {
var pageContent;
for (var pageID in data.query.pages) {
if (data.query.pages.hasOwnProperty(pageID)) {
// noinspection JSUnresolvedVariable
pageContent = data.query.pages[pageID].revisions[0].slots.main["*"];
break;
}
}
// Look for correct language section
var langSectionRegex = new RegExp("==[ ]*{{ziman\\|{0}}}[ ]*==".format(self._language));
var langSectionIndex = pageContent.search(langSectionRegex);
console.log("langSectionIndex:", langSectionIndex);
if (langSectionIndex === -1) {
console.log("langSectionIndex === -1");
error("Xeletiyeke bi koda zimanî heye. Koda zimanî:" + self._language);
return;
}
// Look for correct word type section
var lines = pageContent.slice(langSectionIndex).split("\n");
var sectionNamesRegex = Object.keys(sectionNames).join('|');
var sectionRegex = new RegExp('^===[ ]*(' + sectionNamesRegex + ')\\s*(\\d+)?');
var targetLineIndex;
for (targetLineIndex = 0; targetLineIndex < lines.length; targetLineIndex++) {
var line = lines[targetLineIndex];
console.log("line:", line);
var matchSection = sectionRegex.exec(line);
if (matchSection) {
console.log("matchSection:", matchSection[1]);
// Extract section name and number from the matched result
var matchedSectionName = matchSection[1];
var matchedSectionNum = matchSection[2]; // It could be undefined
if (!sectionNames[sectionType]) {
error('Navê beşê xelet e. Di beşên "Ji wêjêyê" û "Ji wêjêya klasîk" ev amûr nayê bikaranîn.');
return; // Exit the function
}
// Check if the matched section name is in the expected list
if (sectionNames[sectionType].includes(matchedSectionName)) {
// Match only the specific numbered section the button was clicked in (e.g. "Navdêr 2",
// not just the first "===Navdêr...===" heading found) -- both sides are "" when the
// section has no number at all (a single unnumbered "===Navdêr===").
var matchedSectionNumValue = matchedSectionNum ? parseInt(matchedSectionNum, 10) : "";
if (matchedSectionNumValue === sectionNum) {
// Add more conditions if needed for inflection, e.g., (isInflection === line.includes("Formeke "))
break;
}
}
}
}
if (targetLineIndex === lines.length) {
console.log("targetLineIndex === lines.length");
error("Di navê beşê de xeletî heye. Îhtimalen bi vî navê beşê çend heb hene.");
return;
}
// Look for correct definition
var defIndex = -1;
var level = 1;
for (; targetLineIndex < lines.length; targetLineIndex++) {
var m = /^(#+)[^*#:]/.exec(lines[targetLineIndex]);
console.log("lines[targetLineIndex]:", lines[targetLineIndex]);
if (m) {
console.log("m:", m);
if (level === m[1].length) {
console.log("m[1]:", m[1]);
defIndex++;
console.log("defIndex:", defIndex);
if (self._definitionLevel[level] === defIndex) {
console.log("self._definitionLevel[level] === defIndex");
console.log("self._definitionLevel[level]", self._definitionLevel[level]);
if (level === self._definitionLevel.length - 1) {
console.log("level:", level);
break;
} else {
level++;
defIndex = -1;
}
}
}
}
}
// Find where to insert within this definition's "#:"/"#*" block: walk lines after the definition (findBlockEnd() tracks multi-line templates), and use exampleTemplateNames to tell real examples from annotations (synonyms, antonyms, alt-forms, etc.) rather than hard-blocking specific names.
var insertionFound = false;
var lastRelevantBlockEnd = -1;
var isJederFamily = (sablon === "jêder" || Object.prototype.hasOwnProperty.call(jederDefs, sablon));
var scanIndex = targetLineIndex + 1;
var emptyTemplate = false;
for (; scanIndex < lines.length; scanIndex++) {
var scanLine = lines[scanIndex];
if (!scanLine.startsWith("#:") && !scanLine.startsWith("#*")) {
// Left this definition's "#:"/"#*" block (e.g. a new definition or section starts).
break;
}
var blockEnd = findBlockEnd(lines, scanIndex);
var templateName = getLineTemplateName(scanLine);
var isExampleLine = templateName !== null &&
exampleTemplateNames.indexOf(templateName) !== -1;
if (isJederFamily) {
// jêder-family examples go after all "#:"/"#*" lines of this definition (both real examples and annotations).
lastRelevantBlockEnd = blockEnd;
insertionFound = true;
} else if (sablon === "nimûne") {
// "nimûne" examples go before any "#*" line, but after "#:" lines.
if (scanLine.startsWith("#*")) {
break;
}
lastRelevantBlockEnd = blockEnd;
insertionFound = true;
}
scanIndex = blockEnd; // Skip past the whole (possibly multi-line) block
}
var insertAt = lastRelevantBlockEnd >= 0 ? lastRelevantBlockEnd + 1 : scanIndex;
if (lastRelevantBlockEnd >= 0) {
emptyTemplate = /#+\*\s*{{[ ]*b?ê?(nimûne|mînak|jêgirtin)\??\s*\|\s*\|?\s*[^|}]+}}/.test(lines[lastRelevantBlockEnd]);
}
if (emptyTemplate) {
console.log("empty Template found", sablon);
// Replace empty template with new example
lines.splice(lastRelevantBlockEnd, 1, code);
} else {
console.log("empty Template not found", sablon);
// Insert the new example (right after the definition if it had no existing "#:"/"#*" lines yet, or after the relevant block otherwise).
lines.splice(insertAt, 0, code);
}
// Submit new page content
api.edit(mw.config.get("wgPageName"), function(_) {
return {
text: pageContent.slice(0, langSectionIndex) + lines.join("\n"),
summary: "+nimûneya bikaranînê bi amûra « {0} » (v{1}).".format(NAME, VERSION),
};
}).then(function() {
api.parse(code).done(function(data) {
var $renderedExample = $(data).find("ul > li").html();
var $item;
// Insert rendered example into page
if (emptyTemplate) {
self._$lastExample.html($renderedExample);
$item = self._$lastExample;
} else {
self._$lastExample.after($item = $("<li>").append($renderedExample));
}
$item.css("background-color", "lightgreen");
setTimeout(function() {
$item.css("background-color", "inherit");
}, 1000);
self._$lastExample = $item;
});
self.setVisible(false);
self.clear();
self._clearDraft();
reenable();
});
});
function error(errorMessage) {
mw.notify(errorMessage || "Nimûne nehat weşandin, îhtimalen rûpel hate guhartin. Ji kerema xwe re rûpelê dîsa bar bike û dîsa biceribîne.");
draftStorage.Set({
text: self._textInput.getValue(),
source: self._sourceInput.getValue(),
sourceURL: self._sourceURLInput.getValue(),
translation: self._translationInput.getValue(),
transcription: self._transcriptionInput.getValue(),
});
reenable();
}
function reenable() {
self._textInput.setDisabled(false);
self._sourceInput.setDisabled(false);
self._sourceURLInput.setDisabled(false);
self._translationInput.setDisabled(false);
self._transcriptionInput.setDisabled(false);
self._sourceTypeDropdown.setDisabled(false);
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setDisabled(false);
});
// self._disableTranslationChk.setDisabled(false);
self._applyButton.setDisabled(false);
self._cancelButton.setDisabled(false);
self._clearButton.setDisabled(false);
self._loadingImage.toggle(false);
}
},
};
});
// </nowiki>
geyo08j84sfskch4uixo0zm6g8px9cn
6342654
6342603
2026-08-26T09:07:49Z
Wikihez
7344
6342654
javascript
text/javascript
// <nowiki>
// dependencies (declared in MediaWiki:Gadgets-definition): oojs, oojs-ui, ext.gadget.citoid-helper (wikihez.citoid), ext.gadget.StorageUtils (ObjectStorage)
// Formats a string using {0}, {1}, ... placeholders.
if (!String.prototype.format) {
String.prototype.format = function(var_args) {
var args = arguments;
return this.replace(/{(\d+)}/g, function(match, number) {
return typeof args[number] !== "undefined" ? args[number] : match;
});
};
}
$(function() {
"use strict";
// Skip pages where this gadget shouldn't run.
if (
mw.config.get("wgPageName") !== "Wîkîferheng:ceribandin/nimûne" &&
mw.config.get("wgNamespaceNumber") !== 108 &&
mw.config.get("wgNamespaceNumber") !== 0 ||
mw.config.get("wgPageName") === "Destpêk" ||
mw.config.get("wgArticleId") === 0
) return;
console.log("Gadget-wikt.add-examples.js dest pê dike…");
var NAME = "[[Mediawiki:Gadget-wikt.add-examples|Nimûne zêde bike]]";
var VERSION = "2.0";
// Persists form drafts via MediaWiki:Gadget-StorageUtils.js (localStorage, falling back to a cookie) so unsaved text survives a failed submit.
var draftStorage = new ObjectStorage("add_examples_draft", 1);
// Citoid logic normally lives in MediaWiki:Gadget-citoid-helper.js as a registered gadget dependency; not
// currently editable, so ensureCitoid() (below) loads it from a user testing page on demand instead.
// "span" is the field's width in the 12-column grid the fields render in (see .add-example-jeder-fields
// in the CSS and _setSourceType below) -- field ORDER here is also the grid's reading order.
var jederDefs = {
"jêder-kitêb": {
"label": "Kitêb",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 3 },
{ "key": "terciman", "label": "Terciman", "span": 3 },
{ "key": "amadekar", "label": "Amadekar", "span": 3 },
{ "key": "weşanxane", "label": "Weşanxane", "span": 3 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "cih", "label": "Cih", "span": 2 },
{ "key": "sal", "label": "Sal", "span": 1 },
{ "key": "sala-weşandinê", "label": "Sala weşandinê", "span": 2 },
{ "key": "çap", "label": "Çap", "span": 1 },
{ "key": "rûpel", "label": "Rûpel", "span": 1 },
{ "key": "isbn", "label": "ISBN", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
},
"jêder-kovar": {
"label": "Kovar",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 3 },
{ "key": "terciman", "label": "Terciman", "span": 3 },
{ "key": "amadekar", "label": "Amadekar", "span": 3 },
{ "key": "weşanxane", "label": "Weşanxane", "span": 3 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "kovar", "label": "Kovar", "span": 4 },
{ "key": "cild", "label": "Cild", "span": 2 },
{ "key": "hejmar", "label": "Hejmar", "span": 2 },
{ "key": "sal", "label": "Sal", "span": 2 },
{ "key": "rûpel", "label": "Rûpel", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
},
"jêder-websîte": {
"label": "Websîte",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 4 },
{ "key": "terciman", "label": "Terciman", "span": 4 },
{ "key": "websîte", "label": "Websîte", "span": 4 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "url", "label": "URL", "span": 5 },
{ "key": "urlya-arşîvê", "label": "URLya Arşîvê", "span": 5 },
{ "key": "sal", "label": "Sal", "span": 1 },
{ "key": "tarîx", "label": "Tarîx", "span": 1 }
]
},
"jêder-vîdeo": {
"label": "Vîdeo",
"fields": [
{ "key": "hunermend", "label": "Hunermend", "span": 6 },
{ "key": "platform", "label": "Platform", "span": 6 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "sal", "label": "Sal", "span": 2 },
{ "key": "tarîx", "label": "Tarîx", "span": 3 },
{ "key": "dem", "label": "Dem", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
}
};
var sectionNames = {
"Navdêr": ["Navdêr"],
"Formeke navdêrê": ["Formeke navdêrê"],
"Lêker": ["Lêker"],
"Formeke lêkerê": ["Formeke lêkerê"],
"Rengdêr": ["Rengdêr"],
"Formeke rengdêrê": ["Formeke rengdêrê"],
"Hoker": ["Hoker"],
"Formeke hokerê": ["Formeke hokerê"],
"Serenav": ["Serenav"],
"Formeke serenavê": ["Formeke serenavê"],
"Artîkel": ["Artîkel"],
"Baneşan": ["Baneşan"],
"Bazinedaçek": ["Bazinedaçek"],
"Biwêj": ["Biwêj"],
"Cînav": ["Cînav"],
"Daçek": ["Daçek"],
"Girêdek": ["Girêdek"],
"Gotineke pêşiyan": ["Gotineke pêşiyan"],
"Hejmar": ["Hejmar"],
"Hevok": ["Hevok"],
"Îfade": ["Îfade"],
"Kurtenav": ["Kurtenav"],
"Navgir": ["Navgir"],
"Paşdaçek": ["Paşdaçek"],
"Paşgir": ["Paşgir"],
"Pêşdaçek": ["Pêşdaçek"],
"Pêşgir": ["Pêşgir"],
"Pirtik": ["Pirtik"],
"Reh": ["Reh"],
"Sembol": ["Sembol"],
"Tîp": ["Tîp"]
};
// Template names treated as "real examples" (an allow-list, not the old deny-list) so annotation templates like synonyms/antonyms/alt-forms aren't mistaken for examples.
var exampleTemplateNames = ["jêder", "nimûne"].concat(Object.keys(jederDefs));
// Returns the template name starting a "#:"/"#*" line (e.g. "jêder" from "#* {{jêder|ku|...}}"), or null if the line doesn't start with a template.
function getLineTemplateName(line) {
var m = /^#[:*]\s*\{\{\s*([^|}]+)/.exec(line);
return m ? m[1].trim() : null;
}
// Returns the index of the line where a (possibly multi-line) template block starting at startIndex closes its {{ }} braces, so multi-line templates are treated as one block.
function findBlockEnd(lines, startIndex) {
var depth = 0;
var i = startIndex;
for (; i < lines.length; i++) {
var opens = (lines[i].match(/\{\{/g) || []).length;
var closes = (lines[i].match(/\}\}/g) || []).length;
depth += opens - closes;
if (depth <= 0) {
break;
}
}
return i;
}
// Ported from start.js: converts literal line breaks typed/pasted into the example/translation/transcription boxes into wikitext <br> tags, since a raw newline would break the single-line "#*" wikitext structure.
function nlToBr(text) {
return text ? text.replace(/\r\n|\r|\n/g, "<br>") : text;
}
// Escapes str for safe interpolation into a RegExp -- page titles can contain regex metacharacters
// (parentheses for disambiguation, periods in abbreviation entries, etc.).
function escapeRegExp(str) {
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
// Wraps the first occurrence of the page title (+ an optional glued-on suffix, e.g. a plural "-an") in the
// example text with wikitext bold markup, so the headword stands out in the rendered example. Skips it if
// the title is already bolded by hand, to avoid turning "'''reh'''" into "'''''reh'''''" (bold+italic).
// Returns {text, bolded}; bolded is false if the title wasn't found anywhere and nothing changed.
function boldenPageTitle(text, title) {
var escapedTitle = escapeRegExp(title);
var suffixPattern = "([^\\s.,;?!()']+)?";
if (new RegExp("'''" + escapedTitle + suffixPattern + "'''", "i").test(text)) {
return { text: text, bolded: true };
}
var bolded = text.replace(new RegExp("(" + escapedTitle + suffixPattern + ")", "ig"), "'''$1'''");
return { text: bolded, bolded: bolded !== text };
}
// Extracts a human-readable message from an mw.Api rejection (code, result).
function apiErrorMessage(code, result) {
return (result && result.error && result.error.info) || (typeof code === "string" ? code : "Xeletiyeke nenas");
}
function escapeHtmlForBackdrop(str) {
return String(str)
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">");
}
// Mirrors a textarea's text with a small marker after each line that's followed by an actual typed/pasted linebreak, rendered into a transparent backdrop behind the textarea (see ensureLinebreakBackdrop()).
function buildLinebreakBackdropHtml(text) {
var lines = text.split(/\r\n|\r|\n/);
return $.map(lines, function(line, i) {
var isLast = i === lines.length - 1;
return escapeHtmlForBackdrop(line) +
(isLast ? "" : "<mark class='add-example-linebreak-mark'>↵</mark>\n");
}).join("");
}
// Copies the metrics that affect where text wraps/lands (font, line height, padding, border) from the real textarea onto its backdrop via computed style, since the backdrop is a plain <div>, not a themed OOUI input.
function syncLinebreakBackdropMetrics(textarea, backdrop) {
var cs = window.getComputedStyle(textarea[0]);
backdrop.css({
"box-sizing": cs.boxSizing,
"padding-top": cs.paddingTop,
"padding-right": cs.paddingRight,
"padding-bottom": cs.paddingBottom,
"padding-left": cs.paddingLeft,
"border-width": cs.borderWidth,
"border-style": "solid",
"font-family": cs.fontFamily,
"font-size": cs.fontSize,
"font-weight": cs.fontWeight,
"line-height": cs.lineHeight,
"letter-spacing": cs.letterSpacing
});
}
// Lazily inserts the transparent backdrop layer used to mark linebreaks, as a sibling of the textarea inside its existing OOUI input wrapper (which OOUI already positions relatively for icon overlays), rather than start.js's approach of wrapping the textarea in a new div — that would risk disturbing OOUI's own layout of the input. Safe to call more than once; the backdrop is cached.
function ensureLinebreakBackdrop(textarea) {
var existing = textarea.data("addExampleLinebreakBackdrop");
if (existing) {
return existing;
}
var $parent = textarea.parent();
if ($parent.css("position") === "static") {
$parent.css("position", "relative");
}
var backdrop = $("<div aria-hidden='true'></div>").addClass("add-example-linebreak-backdrop");
textarea.before(backdrop);
textarea.data("addExampleLinebreakBackdrop", backdrop);
textarea.on("scroll.addExampleLinebreak", function() {
backdrop.scrollTop(textarea.scrollTop()).scrollLeft(textarea.scrollLeft());
});
return backdrop;
}
// Flags a textarea (via CSS class, for the border tint + tooltip) while it contains a typed/pasted linebreak, so the user notices before it's silently turned into <br> on submit; marks only the exact point of the break via the mirrored backdrop.
function highlightLinebreak(el) {
var textarea = $(el);
var text = textarea.val();
var hasBreak = /\r|\n/.test(text);
textarea
.toggleClass("add-example-has-linebreak", hasBreak)
.attr("title", hasBreak ? "Xeta nû dê wek <br> bê nivîsandin" : "");
if (!hasBreak) {
var cached = textarea.data("addExampleLinebreakBackdrop");
if (cached) {
cached.hide();
}
textarea.removeClass("add-example-has-linebreak-source");
return;
}
var backdrop = ensureLinebreakBackdrop(textarea);
textarea.addClass("add-example-has-linebreak-source");
syncLinebreakBackdropMetrics(textarea, backdrop);
backdrop.html(buildLinebreakBackdropHtml(text)).show();
backdrop.scrollTop(textarea.scrollTop()).scrollLeft(textarea.scrollLeft());
}
// Wires linebreak detection onto an OOUI multiline widget, matching start.js's scope: only the quote/example text and its translation/transcription, not bibliographic fields. Uses OOUI's own "change" event rather than the raw <textarea> "input" event start.js listens to, since our fields can also be set programmatically (Clear button, draft restore) via setValue(), which doesn't fire a native DOM input event.
function watchForLinebreaks(widget) {
widget.on("change", function() {
highlightLinebreak(widget.$input[0]);
});
}
var api = new mw.Api();
// Loads wikihez.citoid if it isn't already loaded, from Wikihez's testing page (MediaWiki: isn't editable
// right now) -- self-contained rather than calling wikihez.citoidHelper.ensure() directly, since that
// function only exists once citoid-helper.js has already run once, which isn't guaranteed here.
function ensureCitoid() {
if (window.wikihez && window.wikihez.citoid) {
return $.Deferred().resolve().promise();
}
var url = mw.util.getUrl("Bikarhêner:Wikihez/skrîpt/js/Gadget-citoid-helper.js", {
action: "raw",
ctype: "text/javascript"
});
return mw.loader.getScript(mw.config.get("wgServer") + url);
}
// Language display name, read from the matching section's .besazimani link text.
function languageNameForCode(code) {
var $mark = $(".besazimani[id='" + code + "']").first();
return $mark.length ? $mark.text().trim() : null;
}
// Whether the page title itself (accented Kurdish Latin letters included) is written in Latin script.
var pageTitleIsLatin = !/[^\x00-\x7FÀ-ɏḀ-ỿ‘’]/.test(mw.config.get("wgTitle") || "");
// .example/.benimune = old Şablon:jêder hidden marker; .h-usage-example/.h-quotation = Modul:usex containers used directly by Şablon:nimûne; .citation-whole = Modul:quote's own wrapper, now used by jêder-* templates (Modul:quote nests .h-quotation inside .citation-whole > dl > dd instead of putting it directly under the <li>, so it needs its own entry here).
// Requiring "ul > li >" is what makes this only match an example that's grouped into its own <ul> -- a
// {{nimûne}} (or its "mk" redirect) with no jêder-family citation alongside it in the same definition
// renders straight under the definition's own content instead, with no such group; also reused below to
// tell whether the second pass still needs to handle a given definition.
var EXISTING_EXAMPLE_SELECTOR = "ul > li > .example, ul > li > .benimune, ul > li > .h-usage-example, ul > li > .h-quotation, ul > li > .citation-whole";
$(EXISTING_EXAMPLE_SELECTOR).each(function() {
var $element = $(this);
var $item = $element.parent();
if (!$item.next().length) {
// Get example’s language
// bdi[lang] = old hidden marker; .e-example[lang]/.e-quotation[lang] = Modul:usex/Modul:quote already put lang on the visible span.
// A jêder-* citation with no jêgirtin= (quotation text) yet renders no h-quotation/e-quotation at all
// (see get_quote() in Modul quote.lua) -- exactly the "bare citation" case this button exists to fill
// in, so this can't just crash: without the guard, [0] is undefined here and ".lang" throws, which
// (since $.each() has no try/catch) silently kills the button for every remaining match on the page.
var $langEl = $item.find(".e-example[lang], .e-quotation[lang], bdi[lang]")[0];
if (!$langEl) {
console.warn("Gadget-wikt.add-examples: nikaribe zimanê vê nimûneyê bibîne, valakirî hate derbaskirin.", $item);
return;
}
var language = $langEl.lang;
if (language === "ku-Latn") {
language = "ku";
}
console.log('Language:', language);
// Get section and indices of associated definition
var definitionLevel = [];
var $definitionItem = $item.parent().parent();
var $topItem;
do {
// Skip MediaWiki's empty <li class="mw-empty-elt"> placeholders so indices match the real "#" lines in wikitext (see submit()).
definitionLevel.splice(0, 0, $definitionItem.prevAll("li:not(.mw-empty-elt)").length);
$topItem = $definitionItem;
$definitionItem = $definitionItem.parent().parent();
} while ($definitionItem.prop("tagName") === "LI");
var $section = $($topItem.parent().prevAll(".mw-heading3, h3").get(0));
if ($section.length) {
definitionLevel.splice(0, 0, $section.find("h3").attr("id"));
} else {
console.warn("Gadget-wikt.add-examples: Section heading not found");
// TODO: why does this happen? mw.notify("Beş nehat dîtin. Jkx li WF:Dîwanê vê problemê ragihînin!");
return;
}
// Remove default edit link if present
var $defaultEditLink = $item.find("span.example > span.stubedit");
if ($defaultEditLink.length) {
$defaultEditLink.remove();
}
// Add a nice button to open the form. $group is the citation-group <ul> itself (parent of $item);
// the form panel is inserted AFTER it (see click handler below), not inside it, so the panel isn't
// squeezed into that <ul>'s narrow hanging-indent width on mobile -- only the button/title stays
// there, matching the "Form redesign for Kurdish example" mockup (title inside the bullet list,
// full-width panel below it).
var $group = $item.parent();
var $formItem = $("<li>");
var $button = $("<a href='#'>Nimûneyeke bikaranînê lê zêde bike</a>");
$button.css("color", "var( --color-subtle, #777777 )");
// Shown in the button's place once the form is open (see Form#setVisible).
var $title = $("<span class='add-example-form-title'></span>").hide();
$formItem.append($button).append($title);
$button.on("click", function() {
if (!$button.form) {
$title.text("Nimûneyeke bi " + (languageNameForCode(language) || "zimanekî nenas").toLowerCase() + " lê zêde dikî.");
var form = new Form($item, $button, $title, language, definitionLevel);
$group.after(form.$element);
}
$button.form.setVisible(true);
return false;
});
$item.after($formItem);
}
});
// Second pass: some definitions have no example the pass above could react to at all -- either genuinely
// zero examples, or one rendered via {{nimûne}} (or its "mk" redirect) with no jêder-family citation next
// to it, which (see the comment on EXISTING_EXAMPLE_SELECTOR above) renders with no "ul > li" group to
// match. This walks every recognized POS section's own definitions list directly instead of reacting to
// an existing example, and reads the language off the language section's own <h2> rather than off an
// example -- so it doesn't need one to already exist. Everything else (Form, submit()) is reused as-is.
// MediaWiki wraps each heading in a "mw-heading2"/"mw-heading3"/... div in current skin output; falls
// back to the bare heading element for older/other output that doesn't wrap it.
function headingOuter($h) {
var $wrap = $h.closest(".mw-heading2, .mw-heading3, .mw-heading4, .mw-heading5, .mw-heading6");
return $wrap.length ? $wrap : $h;
}
// Section's language code: nearest preceding .besazimani[id] by document order (not sibling-walking, which mobile's per-section wrapping breaks).
function languageCodeForOl($ol) {
var $marks = $(".besazimani[id]").add($ol);
var ol = $ol.get(0);
var idx = $marks.index(ol);
for (var i = idx - 1; i >= 0; i--) {
var el = $marks.get(i);
if (el.id) {
return el.id;
}
}
return null;
}
// A <li> whose OWN direct content (not counting a nested <ol>) is wrapped in ".form-of-definition" is
// MediaWiki's "form of" template system marking that content as generated by a template -- e.g.
// {{ku-tewîna-nav}}'s "Formeke heval:" wrapper together with its "rewşa îzafeyî"/"rewşa çemandî"/...
// readings underneath. That whole nested block is normally the ENTIRE expansion of a single "#"
// wikitext line, with no separate "##" line behind any individual reading -- recursing into it would
// hand out one button per reading, each trying to match a "##" line that doesn't exist, and submit()
// would fail to find where to insert every one of them. A <li> without that class whose nested <ol>
// holds real hand-typed prose (e.g. sîno-koreyî/Navdêr's two genuinely separate "##" sub-senses) has
// no such problem -- those really are individually addressable wikitext lines.
function isFormOfWrapper($li) {
return $li.children(".form-of-definition").length > 0;
}
// Recurse into a <li>'s own nested <ol> UNLESS it's a form-of-template wrapper (see isFormOfWrapper) --
// a wrapper <li> with its own nested <ol> isn't itself a sense with content of its own, only its real
// (non-generated) leaves are.
function eachLeafDefinition($ol, fn) {
$ol.children("li").each(function() {
var $li = $(this);
var $childOl = $li.children("ol");
if ($childOl.length && !isFormOfWrapper($li)) {
$childOl.each(function() {
eachLeafDefinition($(this), fn);
});
} else {
fn($li);
}
});
}
$("h3").each(function() {
var sectionType = $(this).text().trim();
if (!sectionNames[sectionType]) {
return; // not a recognized word-sense section (Bilêvkirin, Etîmolojî, Çavkanî, ...)
}
var h3Id = $(this).attr("id");
// Forward-walk siblings to the definitions <ol>, skipping over a declension table/TemplateStyles/the
// headword line; stop (nothing to attach to in this section) if another heading comes first instead.
var $ol = null;
for (var $cursor = headingOuter($(this)).next(); $cursor.length; $cursor = $cursor.next()) {
if ($cursor.is("ol")) {
$ol = $cursor;
break;
}
if ($cursor.is(".mw-heading2, .mw-heading3, .mw-heading4, .mw-heading5, .mw-heading6, h2, h3, h4, h5, h6")) {
break;
}
}
if (!$ol) {
return;
}
var language = languageCodeForOl($ol);
if (!language) {
console.warn("Gadget-wikt.add-examples: nikaribe koda zimanê vê beşê bibîne.", $ol);
return;
}
eachLeafDefinition($ol, function($li) {
// The pass above already added a button here (or will) -- an actual example already wrapped in
// its own "ul > li" group.
if ($li.find(EXISTING_EXAMPLE_SELECTOR).length) {
return;
}
var definitionLevel = [];
var $definitionItem = $li;
while ($definitionItem.prop("tagName") === "LI") {
// Skip MediaWiki's empty <li class="mw-empty-elt"> placeholders so indices match the real "#" lines in wikitext (see submit()).
definitionLevel.splice(0, 0, $definitionItem.prevAll("li:not(.mw-empty-elt)").length);
$definitionItem = $definitionItem.parent().parent();
}
definitionLevel.splice(0, 0, h3Id);
// A hidden, empty placeholder <li> so submit()'s existing "_$lastExample.after(newLi)" insertion
// (unchanged, same as the pass above) lands the first submitted example right before the button
// -- matching the existing convention of new examples going in before the button, not after it.
var $placeholder = $("<li style='display:none'></li>");
var $formItem = $("<li>");
var $button = $("<a href='#'>Nimûneyeke bikaranînê lê zêde bike</a>");
$button.css("color", "var( --color-subtle, #777777 )");
// Shown in the button's place once the form is open (see Form#setVisible).
var $title = $("<span class='add-example-form-title'></span>").hide();
$formItem.append($button).append($title);
// A "ul" nested directly under a definition "li" starts hidden here (see the HQToggle-controlled
// jêder-citation-group "ul", which only ever renders with an explicit "style="display: block""
// set on it) -- this one has no HQToggle to unhide it, so it needs the same explicit override or
// the button (and the placeholder above) never becomes visible at all.
var $ul = $("<ul>").css("display", "block").append($placeholder).append($formItem);
// The form panel is inserted AFTER $ul (not inside it) once opened -- same reasoning as the first
// pass above: keeps the full-width panel out of the tight bulleted-list indentation on mobile.
$button.on("click", function() {
if (!$button.form) {
$title.text("Nimûneyeke bi " + (languageNameForCode(language) || "zimanekî nenas").toLowerCase() + " lê zêde dikî.");
var form = new Form($placeholder, $button, $title, language, definitionLevel);
$ul.after(form.$element);
}
$button.form.setVisible(true);
return false;
});
$li.append($ul);
});
});
// Pulls the form panel flush with the page's own left/right edges, undoing whatever nested-list indent it inherited from sitting inside a deeply-nested definition.
function alignFormToPage($form) {
var $container = $form.closest(".mw-parser-output");
if (!$container.length) {
return;
}
var pad = parseFloat(window.getComputedStyle($container[0]).paddingLeft) || 0;
var containerLeft = $container.offset().left + pad;
var indent = $form.offset().left - containerLeft;
$form.css({
marginLeft: indent > 0 ? -indent : 0,
width: $container.width() + "px"
});
}
// Constructor for the edit form; lastExample/button/title/language/definitionLevel identify where the form attaches and what it edits.
function Form($lastExample, $button, $title, language, definitionLevel) {
var self = this;
this._language = language;
this._definitionLevel = definitionLevel;
this._$lastExample = $lastExample;
this._$button = $button;
this._$button.form = this;
this._$title = $title;
this._currentJederKey = "";
this._jederFieldWidgets = {};
this._textInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var textInputLayout = new OO.ui.FieldLayout(this._textInput, {
label: "Metna nimûneyê",
align: "top",
});
this._textInput.on("change", function(value) {
self._applyButton.setDisabled(!value);
self._updateReadyHint();
});
watchForLinebreaks(this._textInput);
// Source type dropdown: free text, a jêder-* template, or "citoid" (a pseudo key, not in jederDefs) meaning "not yet detected" — the default, switched automatically once a Citoid fetch succeeds (see _fillFromCitoid).
var sourceTypeMenuItems = [
new OO.ui.MenuOptionWidget({ data: "citoid", label: "Bi Citoidê otomatîk zêde bike" }),
new OO.ui.MenuOptionWidget({ data: "", label: "Bi destê xwe binivîsim" }),
];
for (var jederKey in jederDefs) {
if (jederDefs.hasOwnProperty(jederKey)) {
sourceTypeMenuItems.push(new OO.ui.MenuOptionWidget({
data: jederKey,
label: jederDefs[jederKey].label,
}));
}
}
this._sourceTypeDropdown = new OO.ui.DropdownWidget({
menu: { items: sourceTypeMenuItems },
label: "Bi Citoidê otomatîk zêde bike",
});
var sourceTypeLayout = new OO.ui.FieldLayout(this._sourceTypeDropdown, {
label: "Şablona çavkaniyê",
align: "top",
});
this._sourceTypeDropdown.getMenu().on("choose", function(menuOption) {
self._setSourceType(menuOption.getData());
});
this._sourceInput = new OO.ui.MultilineTextInputWidget();
this._sourceInput.on("change", function() {
self._updateReadyHint();
});
this._sourceInputLayout = new OO.ui.FieldLayout(this._sourceInput, {
label: "Çavkaniya nimûneyê",
align: "top",
});
// Always visible in every mode (free text included) — submit() reads this unconditionally as the "url=" parameter. The Citoid fetch button sits right next to it (not in a separate box) -- see _urlRowWidget below.
this._sourceURLInput = new OO.ui.TextInputWidget({
icon: "link",
placeholder: "https://… an jî DOI/ISBN",
});
this._citoidButton = new OO.ui.ButtonWidget({
label: "Bi otomatîk tijî bike",
icon: "download",
flags: ["progressive"],
title: "Li gorî URL, DOI an ISBNya jorîn, malûmatan ji Citoid tîne û qadên şablona jêder-* otomatîk tijî dike.",
classes: ["add-example-citoid-fetch"],
});
this._citoidButton.on("click", this._fillFromCitoid.bind(this));
this._sourceURLInput.on("change", function() {
self._updateReadyHint();
self._autofillVideoTimestamp();
});
// URL input + inline "auto-fill" button as one row (replaces the old separate framed Citoid box's
// button row) -- a plain OO.ui.Widget used purely as a flex-row container (same pattern as
// _loadingImage below: build it empty, then manually append its children's $elements). Disabling
// during submit() still goes through the individual _sourceURLInput/_citoidButton references, not
// through this wrapper.
this._urlRowWidget = new OO.ui.Widget({ classes: ["add-example-url-row"] });
this._urlRowWidget.$element.append(this._sourceURLInput.$element, this._citoidButton.$element);
this._sourceURLInputLayout = new OO.ui.FieldLayout(this._urlRowWidget, {
label: "Lînk, DOI an ISBNya çavkaniyê",
align: "top",
help: "Li qutiyê URL, DOI an ISBN binivîse û pê lê bike butona 'Bi otomatîk tijî bike' da ku otomatîk çavkanî were dagirtin.",
helpInline: true,
});
// Matches the wording just constructed above, so the initial _setSourceType("citoid") call at the end of this constructor doesn't needlessly recreate an identical layout.
this._urlFieldIsFreeTextWording = false;
// Shown right after a successful Citoid fetch (see _fillFromCitoid); hidden again on clear.
this._citoidSuccessMsg = $("<span class='add-example-citoid-success'>✓ Malûmat hatin dagirtin — li jêr kontrol bike.</span>").hide();
// Clears the URL field and any filled jêder-* fields without touching the example text/translation.
this._citoidClearButton = new OO.ui.ButtonWidget({
label: "Vala bike",
icon: "trash",
framed: false,
title: "Lînkê û qadên jêder-* yên vê beşê vala bike",
classes: ["add-example-citoid-clear"],
});
this._citoidClearButton.on("click", function() {
self._sourceURLInput.setValue("");
self._citoidSuccessMsg.hide();
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setValue("");
});
});
// Plain div (not OO.ui.FieldsetLayout) so the grid CSS class applies directly to the field items.
this._jederFieldsFieldset = $("<div class='add-example-jeder-fields'>");
// "Malûmatên çavkaniyê" header (+ the "Vala bike" clear button) sitting right above the fields grid,
// replacing the old framed "Ji Citoid an bi destan tijî bike:" box -- like this only makes sense once
// a real jêder-* template is active (there's nothing here to show for the "citoid: not yet detected"
// placeholder or for free text), so the whole section toggles together in _setSourceType().
this._jederSection = $("<div class='add-example-jeder-section'>").append(
$("<div class='add-example-jeder-header'>")
.append($("<span class='add-example-jeder-header-label'>Malûmatên çavkaniyê</span>"))
.append(this._citoidClearButton.$element),
this._jederFieldsFieldset
);
this._translationInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var translationInputLayout = new OO.ui.FieldLayout(this._translationInput, {
label: "Tercimeya kurmancî ya nimûneyê",
align: "top",
});
watchForLinebreaks(this._translationInput);
this._transcriptionInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var transcriptionInputLayout = new OO.ui.FieldLayout(this._transcriptionInput, {
label: "Translîterasyona nimûneyê",
align: "top",
help: "Tenê lê zêde bike eger metna di nimûneyê de bi alfabeya latînî nehatibe nivîsandin.",
helpInline: true,
});
watchForLinebreaks(this._transcriptionInput);
this._applyButton = new OO.ui.ButtonWidget({
label: "Biweşîne",
icon: "check",
title: "Nimûneyê ji bo vê tarîfê nimûneyê lê zêde bike",
flags: ["progressive", "primary"],
disabled: true,
});
this._applyButton.on("click", this.submit.bind(this));
// Reactive "ready to submit" hint next to Biweşîne: no text yet, text but no source (still submittable
// as a bare {{nimûne}}), or fully ready -- kept in sync by _updateReadyHint(), wired to every field below.
this._readyHint = $("<span class='add-example-ready-hint'></span>").text("Metna nimûneyê lazim e.");
// True while a Citoid-eligible URL/DOI/ISBN is typed in but not yet fetched (or fetched then edited away) and no jêder field has been filled by hand -- the "looks done but isn't" trap this exists to catch. Not applicable in free-text mode, where the fetch button isn't even offered.
this._citoidPending = function() {
return self._currentJederKey !== "" &&
!!self._sourceURLInput.getValue().trim() &&
!self._citoidSuccessMsg.is(":visible") &&
!Object.keys(self._jederFieldWidgets).some(function(key) {
return self._jederFieldWidgets[key].getValue().trim();
});
};
this._updateReadyHint = function() {
if (!self._textInput.getValue()) {
self._readyHint.text("Metna nimûneyê lazim e.");
return;
}
if (self._citoidPending()) {
self._readyHint.text("Pêşî 'Bi otomatîk tijî bike' bitikîne.");
return;
}
var hasSource = self._sourceInput.getValue().trim() || self._sourceURLInput.getValue().trim() ||
Object.keys(self._jederFieldWidgets).some(function(key) {
return self._jederFieldWidgets[key].getValue().trim();
});
self._readyHint.text(hasSource ? "Hazir e." : "Çavkanî nehatiye dayîn.");
};
// Prefills the Dem field from the typed URL's own "t=" (see wikihez.citoid.extractVideoTimestamp) once jêder-vîdeo is active -- never overwrites a value the user already entered by hand.
this._autofillVideoTimestamp = function() {
var demWidget = self._jederFieldWidgets.dem;
if (self._currentJederKey !== "jêder-vîdeo" || !demWidget || demWidget.getValue().trim()) {
return;
}
ensureCitoid().then(function() {
var dem = wikihez.citoid.extractVideoTimestamp(self._sourceURLInput.getValue().trim());
if (dem && !demWidget.getValue().trim()) {
demWidget.setValue(dem);
}
});
};
// framed:false (+ the "destructive" flag for the red text/hover) matches the mockup's borderless
// "Betal bike" -- a plain colored link rather than a boxed button, distinguishing it from Paqij bike.
this._cancelButton = new OO.ui.ButtonWidget({
label: "Betal bike",
icon: "close",
title: "Formê bigire",
flags: ["destructive"],
framed: false,
});
this._cancelButton.on("click", function() {
self.setVisible(false);
});
this._clearButton = new OO.ui.ButtonWidget({
label: "Paqij bike",
icon: "trash",
title: "Hemû qadan vala bike û pêşnûyisên hilanîbûyî jê bibe",
});
this._clearButton.on("click", function() {
self.clear();
self._clearDraft();
});
// Native CSS spinner (see Gadget-wikt.add-examples.css) instead of an external Commons GIF, so there's no network request and it matches dark/light mode.
this._loadingImage = new OO.ui.Widget({
classes: ["add-example-loading"],
});
this._loadingImage.$element.append($('<span class="add-example-spinner" aria-hidden="true"></span>'));
this._loadingImage.toggle(false);
// Two-column top section (see "Form redesign for Kurdish example/Nimûne zêde bike.dc.html"): example
// text (+ translation/transliteration for non-ku, right after it, not after the source fields) on the
// left; source-type + link/Citoid on the right. Built as plain <div>s, not an OOUI layout -- OOUI has
// no CSS-grid container -- so .add-example-top-grid in the CSS can lay them out as a real responsive
// 7fr/5fr grid (collapsing to one column on narrow screens).
var $topLeft = $("<div class='add-example-top-col'>").append(textInputLayout.$element);
if (language !== "ku") {
$topLeft.append(translationInputLayout.$element);
}
if (!pageTitleIsLatin) {
$topLeft.append(transcriptionInputLayout.$element);
}
var $topRight = $("<div class='add-example-top-col'>").append(
sourceTypeLayout.$element,
this._sourceInputLayout.$element,
this._sourceURLInputLayout.$element,
this._citoidSuccessMsg
);
var $topGrid = $("<div class='add-example-top-grid'>").append($topLeft, $topRight);
// Saved on the instance (not just a local var) so _setSourceType() can swap the URL field's label/help
// wording in and out of it when switching to/from free text (see the FieldLayout replaceWith() there).
this._fieldsLayout = $("<div class='add-example-fieldset'>").append($topGrid, this._jederSection);
// Bottom action row -- order/spacing matches the mockup: Biweşîne (+ spinner + ready hint), a spacer
// pushing the rest right, then Paqij bike (bordered/subtle) and Betal bike (borderless red text, via
// framed:false above). A plain flex <div>, not an OOUI HorizontalLayout, so the raw hint/spacer
// elements can sit alongside the real button widgets (same reasoning as the top grid above).
var $buttonsRow = $("<div class='add-example-main-buttons'>").append(
this._applyButton.$element,
this._loadingImage.$element,
this._readyHint,
$("<span class='add-example-buttons-spacer'></span>"),
this._clearButton.$element,
this._cancelButton.$element
);
this._frame = new OO.ui.PanelLayout({
id: "add-example-definition-{0}-form".format(this._definitionLevel.join("-")),
classes: ["add-example-form"],
expanded: false,
});
this._frame.$element.append(this._fieldsLayout, $buttonsRow);
// Default to "citoid" mode; selectItemByData() doesn't fire "choose" (that only fires for interactive selection), so _setSourceType() must also be called explicitly to set up the initial UI.
this._sourceTypeDropdown.getMenu().selectItemByData("citoid");
this._setSourceType("citoid");
}
Form.prototype = {
// Returns the jQuery object for this form.
get $element() {
return this._frame.$element;
},
// Switches the source section between free text, Citoid auto-detect (no template chosen yet), and a specific jêder-* template, rebuilding the field list to match. The URL field itself is always visible in every mode (see the constructor); only the free-text textarea, the Citoid fetch button, and the "Malûmatên çavkaniyê" fields section toggle here.
_setSourceType: function(jederKey) {
var self = this;
this._currentJederKey = jederKey;
this._jederFieldsFieldset.empty();
this._jederFieldWidgets = {};
var isRealJederKey = jederKey && jederDefs[jederKey];
if (isRealJederKey) {
var def = jederDefs[jederKey];
def.fields.forEach(function(field) {
var widget = field.multiline
? new OO.ui.MultilineTextInputWidget({ rows: 2, autosize: false })
: new OO.ui.TextInputWidget();
self._jederFieldWidgets[field.key] = widget;
widget.on("change", function() {
self._updateReadyHint();
});
var layout = new OO.ui.FieldLayout(widget, {
label: field.label,
align: "top",
classes: ["add-example-field-span-" + (field.span || 4)],
});
self._jederFieldsFieldset.append(layout.$element);
});
}
// "Malûmatên çavkaniyê" header + fields grid: only once a real template is chosen/detected --
// nothing to show yet for the plain "citoid: not yet detected" placeholder or for free text.
this._jederSection.toggle(!!isRealJederKey);
// Free text textarea only for "" (free text); hidden for "citoid" and any real jêder-* key.
this._sourceInputLayout.toggle(jederKey === "");
// Citoid fetch button: hidden for free text (nothing there for it to fill in), shown for "citoid" auto-detect and any real jêder-* key. The URL input itself next to it stays visible in every mode.
this._citoidButton.toggle(jederKey !== "");
// URL field wording: plain "attach a link" phrasing for free text, Citoid-oriented phrasing otherwise. Only recreated when actually crossing that boundary, not on every dropdown change (e.g. switching between two jêder-* types keeps the same wording, no need to touch the DOM).
var isFreeText = jederKey === "";
if (this._urlFieldIsFreeTextWording !== isFreeText) {
this._urlFieldIsFreeTextWording = isFreeText;
this._sourceURLInput.setPlaceholder(isFreeText ? "URLyeke wekî https://…" : "URLyek wekî https://… an jî DOI/ISBN");
var $oldLayout = this._sourceURLInputLayout.$element;
// Re-wraps the SAME _urlRowWidget (still holding _sourceURLInput + _citoidButton) in a new
// FieldLayout with the new label/help; the widget's $element moves along with it, same as the
// old addItems()/removeItems() swap did for the plain input before this redesign.
this._sourceURLInputLayout = new OO.ui.FieldLayout(this._urlRowWidget, isFreeText ? {
label: "Adresa webê ya nimûneyê",
align: "top",
help: "Tenê binivîse eger lînk jixwe di referansa çavkaniyê de tinebe.",
helpInline: true,
} : {
label: "Lînk, DOI an ISBNya çavkaniyê",
align: "top",
help: "Ev dibe lînka çavkaniyê (url=). Ji bo şablonên jêder-*, dikare bi Citoid an bi destan jî bên dagirtin.",
helpInline: true,
});
$oldLayout.replaceWith(this._sourceURLInputLayout.$element);
}
this._autofillVideoTimestamp();
this._updateReadyHint();
},
// Fetches data via wikihez.citoid (loaded on demand by ensureCitoid() if needed), picks the matching jêder-* template, and fills its empty fields.
_fillFromCitoid: function() {
var self = this;
var query = this._sourceURLInput.getValue().trim();
if (!query) {
mw.notify("Ji kerema xwe re pêşî URL, DOI an ISBNyekê binivîse.");
return;
}
this._citoidButton.setDisabled(true);
this._loadingImage.toggle(true);
ensureCitoid().then(function() {
return wikihez.citoid.fetchJederFields(query);
}).then(function(result) {
// Only let Citoid pick the template type when nothing's been chosen yet (the "citoid" auto-detect default). If the user already selected a specific jêder-* type (or free text), that choice is respected — e.g. picking "Websîte" and fetching a tweet must not silently switch to "Kovar" just because Citoid guessed differently.
var wasAutoDetect = self._currentJederKey === "citoid";
if (wasAutoDetect) {
var menu = self._sourceTypeDropdown.getMenu();
var item = menu.findItemFromData(result.jederKey);
if (item) {
menu.chooseItem(item); // this calls _setSourceType(jederKey) automatically
}
}
var targetJederKey = self._currentJederKey;
// Fields Citoid returned were shaped for its own detected type; if the active template differs (the case above where the user's choice was kept), re-derive fields for that template instead so e.g. "Websîte" still gets its own website-shaped fields (websîte, tarîx, ...) rather than leftover kovar-shaped ones.
var fields = targetJederKey === result.jederKey ? result.fields : wikihez.citoid.dataToJederFields(targetJederKey, result.raw, query);
Object.keys(fields).forEach(function(key) {
var widget = self._jederFieldWidgets[key];
if (widget && !widget.getValue()) {
widget.setValue(fields[key]);
}
});
self._citoidSuccessMsg.show();
self._updateReadyHint();
mw.notify("Malûmat ji Citoid hatin barkirin.");
}, function(errorMsg) {
// wikihez.citoid may still be missing here if ensureCitoid() itself failed to load the script (e.g. network error) -- fall back to the bare error notice in that case.
if (!window.wikihez || !window.wikihez.citoid) {
mw.notify("Nekarî citoid-helper.js bar bike.");
return;
}
// Citoid can't fetch some sites at all (e.g. x.com/twitter.com) -- fall back to jêder-websîte with a website name guessed from the URL itself, rather than just a bare error.
var fallbackSite = wikihez.citoid.websiteNameForUrl(query);
if (fallbackSite) {
if (self._currentJederKey !== "jêder-websîte") {
var menu = self._sourceTypeDropdown.getMenu();
var item = menu.findItemFromData("jêder-websîte");
if (item) {
menu.chooseItem(item); // this calls _setSourceType("jêder-websîte") automatically
}
}
var websiteWidget = self._jederFieldWidgets["websîte"];
if (websiteWidget && !websiteWidget.getValue()) {
websiteWidget.setValue(fallbackSite);
}
mw.notify("Citoid nikare vê malperê bixwîne; şablona Websîte hate hilbijartin, ji kerema xwe mayî bi destan tijî bike.");
return;
}
mw.notify(typeof errorMsg === "string" ? errorMsg : "Nekarî malûmatan ji Citoid bistîne. Kontrol bike ka URL/DOI/ISBN rast e.");
}).always(function() {
self._citoidButton.setDisabled(false);
self._loadingImage.toggle(false);
});
},
// Toggles the visibility of this form and restores any saved draft when shown. The title text takes
// the button's place while open (see the "Form redesign for Kurdish example" mockup); the button
// itself stays put ready to reappear once the form is cancelled/closed.
setVisible: function(visible) {
this._$button.toggle(!visible);
this._$title.toggle(visible);
this._frame.toggle(visible);
if (visible) {
alignFormToPage(this._frame.$element);
var draft = draftStorage.Get() || {};
if (!this._textInput.getValue() && draft.text) {
this._textInput.setValue(draft.text);
}
if (!this._sourceInput.getValue() && draft.source) {
this._sourceInput.setValue(draft.source);
}
if (!this._sourceURLInput.getValue() && draft.sourceURL) {
this._sourceURLInput.setValue(draft.sourceURL);
}
if (!this._translationInput.getValue() && draft.translation) {
this._translationInput.setValue(draft.translation);
}
if (!this._transcriptionInput.getValue() && draft.transcription) {
this._transcriptionInput.setValue(draft.transcription);
}
}
},
// Removes any saved draft (localStorage/cookie via MediaWiki:Gadget-StorageUtils.js) so it can't resurface on other pages.
_clearDraft: function() {
draftStorage.Set({});
},
// Clears all fields in this form.
clear: function() {
this._textInput.setValue("");
this._sourceInput.setValue("");
this._sourceURLInput.setValue("");
this._translationInput.setValue("");
this._transcriptionInput.setValue("");
this._citoidSuccessMsg.hide();
this._sourceTypeDropdown.getMenu().selectItemByData("citoid");
this._setSourceType("citoid");
},
// Warns before submitting if a Citoid URL/DOI/ISBN was typed but never successfully fetched, or if the
// page title can't be found in the example text (so it won't get bolded), then defers to _doSubmit.
submit: function() {
if (this._citoidPending() && !window.confirm("Te lînk, DOI an ISBN nivîsand lê hîn jê malûmat nehatine standin. Bêyî wan berdewam bikî?")) {
return;
}
var text = this._textInput.getValue().trim();
var title = mw.config.get("wgTitle");
if (text && !boldenPageTitle(text, title).bolded &&
!window.confirm("Peyva serekî (" + title + ") di nav nimûneyê de nehat dîtin, ji ber vê yekê dê neyê qelewkirin. Bêyî wê berdewam bikî?")) {
return;
}
this._doSubmit();
},
// Generates and submits the wikicode, then inserts the resulting HTML element if no errors occurred.
_doSubmit: function() {
var self = this;
self._textInput.setDisabled(true);
self._sourceInput.setDisabled(true);
self._sourceURLInput.setDisabled(true);
self._translationInput.setDisabled(true);
self._transcriptionInput.setDisabled(true);
self._sourceTypeDropdown.setDisabled(true);
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setDisabled(true);
});
// self._disableTranslationChk.setDisabled(true);
this._applyButton.setDisabled(true);
this._clearButton.setDisabled(true);
this._loadingImage.toggle(true);
var source = this._sourceInput.getValue().trim();
var sourceURL = this._sourceURLInput.getValue().trim();
var text = this._textInput.getValue().trim();
// If a jêder-* template is selected, collect its filled-in fields.
var jederParams = [];
if (this._currentJederKey && jederDefs[this._currentJederKey]) {
jederDefs[this._currentJederKey].fields.forEach(function(field) {
var widget = self._jederFieldWidgets[field.key];
var value = widget ? widget.getValue().trim() : "";
if (value) {
jederParams.push(field.key + "=" + value);
}
});
}
var usingJederTemplate = this._currentJederKey && jederParams.length > 0;
var minakAnNa, sablon;
if (usingJederTemplate) {
// The jêder-* template itself is used as the template, not as the "2=" content.
minakAnNa = "*";
sablon = this._currentJederKey;
} else if (source || sourceURL) {
minakAnNa = "*";
sablon = "jêder";
} else {
minakAnNa = ":";
sablon = "nimûne";
}
var listMarker = "".padStart(this._definitionLevel.length - 1, "#") + minakAnNa;
var title = mw.config.get('wgTitle');
// jêder-* template, jêder, or nimûne
var code = listMarker + " {{" + sablon;
// 1= language code
code += "|" + this._language;
if (usingJederTemplate) {
// Fields of the selected jêder-* template, passed straight through as its parameters.
jederParams.forEach(function(param) {
code += "|" + param;
});
} else {
// 2= source (free text)
if (source) {
code += "|2=" + source;
}
if (sourceURL) {
code += "|url=" + sourceURL;
}
}
// jêgirtin/nimûne (quotation text)
code += "|";
if (sablon !== "nimûne") {
code += "jêgirtin=";
}
// bold the page title (see boldenPageTitle), then convert any literal linebreak in the example text to <br> (see nlToBr) so it can't break the single-line "#*" wikitext
code += nlToBr(boldenPageTitle(text, title).text);
if (this._language !== "ku") {
var translation = nlToBr(this._translationInput.getValue().trim());
if (translation) {
code += "|tercime=" + translation;
}
}
var transcription = nlToBr(this._transcriptionInput.getValue().trim());
if (transcription) {
code += "|tr=" + transcription;
}
code += "}}";
// var escapedLangCode = languages[this._language].charAt(0).toUpperCase() + languages[this._language].slice(1);
// console.log("escapedLangCode: ", escapedLangCode);
var sectionIDPattern = new RegExp("^([\\wîêçş_]+?)_?(\\d+)?_?(\\d+)?$");
console.log("this._definitionLevel[0]: ", this._definitionLevel[0]);
var matchSectionID = sectionIDPattern.exec(this._definitionLevel[0]);
//var isInflection;
var sectionType = matchSectionID[1].replace(/_/, ' ');
sectionType = sectionType.replace(/_\d+$/, '');
console.log("sectionType: ", sectionType);
var sectionNum = matchSectionID[2] ? parseInt(matchSectionID[2]) : "";
console.log("Section Number:", sectionNum);
// Insert new example into page’s code
api.get({
action: "query",
titles: mw.config.get("wgPageName"),
prop: "revisions",
rvprop: "content",
rvslots: "main",
}).then(function(data) {
var pageContent;
for (var pageID in data.query.pages) {
if (data.query.pages.hasOwnProperty(pageID)) {
// noinspection JSUnresolvedVariable
pageContent = data.query.pages[pageID].revisions[0].slots.main["*"];
break;
}
}
// Look for correct language section
var langSectionRegex = new RegExp("==[ ]*{{ziman\\|{0}}}[ ]*==".format(self._language));
var langSectionIndex = pageContent.search(langSectionRegex);
console.log("langSectionIndex:", langSectionIndex);
if (langSectionIndex === -1) {
console.log("langSectionIndex === -1");
error("Xeletiyeke bi koda zimanî heye. Koda zimanî:" + self._language);
return;
}
// Look for correct word type section
var lines = pageContent.slice(langSectionIndex).split("\n");
var sectionNamesRegex = Object.keys(sectionNames).join('|');
var sectionRegex = new RegExp('^===[ ]*(' + sectionNamesRegex + ')\\s*(\\d+)?');
var targetLineIndex;
for (targetLineIndex = 0; targetLineIndex < lines.length; targetLineIndex++) {
var line = lines[targetLineIndex];
console.log("line:", line);
var matchSection = sectionRegex.exec(line);
if (matchSection) {
console.log("matchSection:", matchSection[1]);
// Extract section name and number from the matched result
var matchedSectionName = matchSection[1];
var matchedSectionNum = matchSection[2]; // It could be undefined
if (!sectionNames[sectionType]) {
error('Navê beşê xelet e. Di beşên "Ji wêjêyê" û "Ji wêjêya klasîk" ev amûr nayê bikaranîn.');
return; // Exit the function
}
// Check if the matched section name is in the expected list
if (sectionNames[sectionType].includes(matchedSectionName)) {
// Match only the specific numbered section the button was clicked in (e.g. "Navdêr 2",
// not just the first "===Navdêr...===" heading found) -- both sides are "" when the
// section has no number at all (a single unnumbered "===Navdêr===").
var matchedSectionNumValue = matchedSectionNum ? parseInt(matchedSectionNum, 10) : "";
if (matchedSectionNumValue === sectionNum) {
// Add more conditions if needed for inflection, e.g., (isInflection === line.includes("Formeke "))
break;
}
}
}
}
if (targetLineIndex === lines.length) {
console.log("targetLineIndex === lines.length");
error("Di navê beşê de xeletî heye. Îhtimalen bi vî navê beşê çend heb hene.");
return;
}
// Look for correct definition
var defIndex = -1;
var level = 1;
for (; targetLineIndex < lines.length; targetLineIndex++) {
var m = /^(#+)[^*#:]/.exec(lines[targetLineIndex]);
console.log("lines[targetLineIndex]:", lines[targetLineIndex]);
if (m) {
console.log("m:", m);
if (level === m[1].length) {
console.log("m[1]:", m[1]);
defIndex++;
console.log("defIndex:", defIndex);
if (self._definitionLevel[level] === defIndex) {
console.log("self._definitionLevel[level] === defIndex");
console.log("self._definitionLevel[level]", self._definitionLevel[level]);
if (level === self._definitionLevel.length - 1) {
console.log("level:", level);
break;
} else {
level++;
defIndex = -1;
}
}
}
}
}
// Find where to insert within this definition's "#:"/"#*" block: walk lines after the definition (findBlockEnd() tracks multi-line templates), and use exampleTemplateNames to tell real examples from annotations (synonyms, antonyms, alt-forms, etc.) rather than hard-blocking specific names.
var insertionFound = false;
var lastRelevantBlockEnd = -1;
var isJederFamily = (sablon === "jêder" || Object.prototype.hasOwnProperty.call(jederDefs, sablon));
var scanIndex = targetLineIndex + 1;
var emptyTemplate = false;
for (; scanIndex < lines.length; scanIndex++) {
var scanLine = lines[scanIndex];
if (!scanLine.startsWith("#:") && !scanLine.startsWith("#*")) {
// Left this definition's "#:"/"#*" block (e.g. a new definition or section starts).
break;
}
var blockEnd = findBlockEnd(lines, scanIndex);
var templateName = getLineTemplateName(scanLine);
var isExampleLine = templateName !== null &&
exampleTemplateNames.indexOf(templateName) !== -1;
if (isJederFamily) {
// jêder-family examples go after all "#:"/"#*" lines of this definition (both real examples and annotations).
lastRelevantBlockEnd = blockEnd;
insertionFound = true;
} else if (sablon === "nimûne") {
// "nimûne" examples go before any "#*" line, but after "#:" lines.
if (scanLine.startsWith("#*")) {
break;
}
lastRelevantBlockEnd = blockEnd;
insertionFound = true;
}
scanIndex = blockEnd; // Skip past the whole (possibly multi-line) block
}
var insertAt = lastRelevantBlockEnd >= 0 ? lastRelevantBlockEnd + 1 : scanIndex;
if (lastRelevantBlockEnd >= 0) {
emptyTemplate = /#+\*\s*{{[ ]*b?ê?(nimûne|mînak|jêgirtin)\??\s*\|\s*\|?\s*[^|}]+}}/.test(lines[lastRelevantBlockEnd]);
}
if (emptyTemplate) {
console.log("empty Template found", sablon);
// Replace empty template with new example
lines.splice(lastRelevantBlockEnd, 1, code);
} else {
console.log("empty Template not found", sablon);
// Insert the new example (right after the definition if it had no existing "#:"/"#*" lines yet, or after the relevant block otherwise).
lines.splice(insertAt, 0, code);
}
// Submit new page content
api.edit(mw.config.get("wgPageName"), function(_) {
return {
text: pageContent.slice(0, langSectionIndex) + lines.join("\n"),
summary: "+nimûneya bikaranînê bi amûra « {0} » (v{1}).".format(NAME, VERSION),
};
}).then(function() {
api.parse(code).done(function(data) {
var $renderedExample = $(data).find("ul > li").html();
var $item;
// Insert rendered example into page
if (emptyTemplate) {
self._$lastExample.html($renderedExample);
$item = self._$lastExample;
} else {
self._$lastExample.after($item = $("<li>").append($renderedExample));
}
$item.css("background-color", "lightgreen");
setTimeout(function() {
$item.css("background-color", "inherit");
}, 1000);
self._$lastExample = $item;
});
self.setVisible(false);
self.clear();
self._clearDraft();
reenable();
}, function(code, result) {
error("Nekarî rûpelê xilas bike: " + apiErrorMessage(code, result));
});
}, function(code, result) {
error("Nekarî naveroka rûpelê bistîne: " + apiErrorMessage(code, result));
});
function error(errorMessage) {
mw.notify(errorMessage || "Nimûne nehat weşandin, îhtimalen rûpel hate guhartin. Ji kerema xwe re rûpelê dîsa bar bike û dîsa biceribîne.");
draftStorage.Set({
text: self._textInput.getValue(),
source: self._sourceInput.getValue(),
sourceURL: self._sourceURLInput.getValue(),
translation: self._translationInput.getValue(),
transcription: self._transcriptionInput.getValue(),
});
reenable();
}
function reenable() {
self._textInput.setDisabled(false);
self._sourceInput.setDisabled(false);
self._sourceURLInput.setDisabled(false);
self._translationInput.setDisabled(false);
self._transcriptionInput.setDisabled(false);
self._sourceTypeDropdown.setDisabled(false);
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setDisabled(false);
});
// self._disableTranslationChk.setDisabled(false);
self._applyButton.setDisabled(false);
self._cancelButton.setDisabled(false);
self._clearButton.setDisabled(false);
self._loadingImage.toggle(false);
}
},
};
});
// </nowiki>
l87ovd83y5gvc1jwo53v0lk31f18qv2
6342678
6342654
2026-08-26T10:34:57Z
Wikihez
7344
6342678
javascript
text/javascript
// <nowiki>
// dependencies (declared in MediaWiki:Gadgets-definition): oojs, oojs-ui, ext.gadget.citoid-helper (wikihez.citoid), ext.gadget.StorageUtils (ObjectStorage)
// Formats a string using {0}, {1}, ... placeholders.
if (!String.prototype.format) {
String.prototype.format = function(var_args) {
var args = arguments;
return this.replace(/{(\d+)}/g, function(match, number) {
return typeof args[number] !== "undefined" ? args[number] : match;
});
};
}
$(function() {
"use strict";
// Skip pages where this gadget shouldn't run.
if (
mw.config.get("wgPageName") !== "Wîkîferheng:ceribandin/nimûne" &&
mw.config.get("wgNamespaceNumber") !== 108 &&
mw.config.get("wgNamespaceNumber") !== 0 ||
mw.config.get("wgPageName") === "Destpêk" ||
mw.config.get("wgArticleId") === 0
) return;
console.log("Gadget-wikt.add-examples.js dest pê dike…");
var NAME = "[[Mediawiki:Gadget-wikt.add-examples|Nimûne zêde bike]]";
var VERSION = "2.0";
// Persists form drafts via MediaWiki:Gadget-StorageUtils.js (localStorage, falling back to a cookie) so unsaved text survives a failed submit.
var draftStorage = new ObjectStorage("add_examples_draft", 1);
// Citoid logic normally lives in MediaWiki:Gadget-citoid-helper.js as a registered gadget dependency; not
// currently editable, so ensureCitoid() (below) loads it from a user testing page on demand instead.
// "span" is the field's width in the 12-column grid the fields render in (see .add-example-jeder-fields
// in the CSS and _setSourceType below) -- field ORDER here is also the grid's reading order.
var jederDefs = {
"jêder-kitêb": {
"label": "Kitêb",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 3 },
{ "key": "terciman", "label": "Terciman", "span": 3 },
{ "key": "amadekar", "label": "Amadekar", "span": 3 },
{ "key": "weşanxane", "label": "Weşanxane", "span": 3 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "cih", "label": "Cih", "span": 2 },
{ "key": "sal", "label": "Sal", "span": 1 },
{ "key": "sala-weşandinê", "label": "Sala weşandinê", "span": 2 },
{ "key": "çap", "label": "Çap", "span": 1 },
{ "key": "rûpel", "label": "Rûpel", "span": 1 },
{ "key": "isbn", "label": "ISBN", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
},
"jêder-kovar": {
"label": "Kovar",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 3 },
{ "key": "terciman", "label": "Terciman", "span": 3 },
{ "key": "amadekar", "label": "Amadekar", "span": 3 },
{ "key": "weşanxane", "label": "Weşanxane", "span": 3 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "kovar", "label": "Kovar", "span": 4 },
{ "key": "cild", "label": "Cild", "span": 2 },
{ "key": "hejmar", "label": "Hejmar", "span": 2 },
{ "key": "sal", "label": "Sal", "span": 2 },
{ "key": "rûpel", "label": "Rûpel", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
},
"jêder-websîte": {
"label": "Websîte",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 4 },
{ "key": "terciman", "label": "Terciman", "span": 4 },
{ "key": "websîte", "label": "Websîte", "span": 4 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "url", "label": "URL", "span": 5 },
{ "key": "urlya-arşîvê", "label": "URLya Arşîvê", "span": 5 },
{ "key": "sal", "label": "Sal", "span": 1 },
{ "key": "tarîx", "label": "Tarîx", "span": 1 }
]
},
"jêder-vîdeo": {
"label": "Vîdeo",
"fields": [
{ "key": "hunermend", "label": "Hunermend", "span": 6 },
{ "key": "platform", "label": "Platform", "span": 6 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "sal", "label": "Sal", "span": 2 },
{ "key": "tarîx", "label": "Tarîx", "span": 3 },
{ "key": "dem", "label": "Dem", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
}
};
var sectionNames = {
"Navdêr": ["Navdêr"],
"Formeke navdêrê": ["Formeke navdêrê"],
"Lêker": ["Lêker"],
"Formeke lêkerê": ["Formeke lêkerê"],
"Rengdêr": ["Rengdêr"],
"Formeke rengdêrê": ["Formeke rengdêrê"],
"Hoker": ["Hoker"],
"Formeke hokerê": ["Formeke hokerê"],
"Serenav": ["Serenav"],
"Formeke serenavê": ["Formeke serenavê"],
"Artîkel": ["Artîkel"],
"Baneşan": ["Baneşan"],
"Bazinedaçek": ["Bazinedaçek"],
"Biwêj": ["Biwêj"],
"Cînav": ["Cînav"],
"Daçek": ["Daçek"],
"Girêdek": ["Girêdek"],
"Gotineke pêşiyan": ["Gotineke pêşiyan"],
"Hejmar": ["Hejmar"],
"Hevok": ["Hevok"],
"Îfade": ["Îfade"],
"Kurtenav": ["Kurtenav"],
"Navgir": ["Navgir"],
"Paşdaçek": ["Paşdaçek"],
"Paşgir": ["Paşgir"],
"Pêşdaçek": ["Pêşdaçek"],
"Pêşgir": ["Pêşgir"],
"Pirtik": ["Pirtik"],
"Reh": ["Reh"],
"Sembol": ["Sembol"],
"Tîp": ["Tîp"]
};
// Template names treated as "real examples" (an allow-list, not the old deny-list) so annotation templates like synonyms/antonyms/alt-forms aren't mistaken for examples.
var exampleTemplateNames = ["jêder", "nimûne"].concat(Object.keys(jederDefs));
// Returns the template name starting a "#:"/"#*" line (e.g. "jêder" from "#* {{jêder|ku|...}}"), or null if the line doesn't start with a template.
function getLineTemplateName(line) {
var m = /^#[:*]\s*\{\{\s*([^|}]+)/.exec(line);
return m ? m[1].trim() : null;
}
// Returns the index of the line where a (possibly multi-line) template block starting at startIndex closes its {{ }} braces, so multi-line templates are treated as one block.
function findBlockEnd(lines, startIndex) {
var depth = 0;
var i = startIndex;
for (; i < lines.length; i++) {
var opens = (lines[i].match(/\{\{/g) || []).length;
var closes = (lines[i].match(/\}\}/g) || []).length;
depth += opens - closes;
if (depth <= 0) {
break;
}
}
return i;
}
// Ported from start.js: converts literal line breaks typed/pasted into the example/translation/transcription boxes into wikitext <br> tags, since a raw newline would break the single-line "#*" wikitext structure.
function nlToBr(text) {
return text ? text.replace(/\r\n|\r|\n/g, "<br>") : text;
}
// Escapes str for safe interpolation into a RegExp -- page titles can contain regex metacharacters
// (parentheses for disambiguation, periods in abbreviation entries, etc.).
function escapeRegExp(str) {
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
// Wraps the first occurrence of the page title (+ an optional glued-on suffix, e.g. a plural "-an") in the
// example text with wikitext bold markup, so the headword stands out in the rendered example. Skips it if
// the title is already bolded by hand, to avoid turning "'''reh'''" into "'''''reh'''''" (bold+italic).
// Returns {text, bolded}; bolded is false if the title wasn't found anywhere and nothing changed.
function boldenPageTitle(text, title) {
var escapedTitle = escapeRegExp(title);
var suffixPattern = "([^\\s.,;?!()']+)?";
if (new RegExp("'''" + escapedTitle + suffixPattern + "'''", "i").test(text)) {
return { text: text, bolded: true };
}
var bolded = text.replace(new RegExp("(" + escapedTitle + suffixPattern + ")", "ig"), "'''$1'''");
return { text: bolded, bolded: bolded !== text };
}
// Extracts a human-readable message from an mw.Api rejection (code, result).
function apiErrorMessage(code, result) {
return (result && result.error && result.error.info) || (typeof code === "string" ? code : "Xeletiyeke nenas");
}
function escapeHtmlForBackdrop(str) {
return String(str)
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">");
}
// Mirrors a textarea's text with a small marker after each line that's followed by an actual typed/pasted linebreak, rendered into a transparent backdrop behind the textarea (see ensureLinebreakBackdrop()).
function buildLinebreakBackdropHtml(text) {
var lines = text.split(/\r\n|\r|\n/);
return $.map(lines, function(line, i) {
var isLast = i === lines.length - 1;
return escapeHtmlForBackdrop(line) +
(isLast ? "" : "<mark class='add-example-linebreak-mark'>↵</mark>\n");
}).join("");
}
// Copies the metrics that affect where text wraps/lands (font, line height, padding, border) from the real textarea onto its backdrop via computed style, since the backdrop is a plain <div>, not a themed OOUI input.
function syncLinebreakBackdropMetrics(textarea, backdrop) {
var cs = window.getComputedStyle(textarea[0]);
backdrop.css({
"box-sizing": cs.boxSizing,
"padding-top": cs.paddingTop,
"padding-right": cs.paddingRight,
"padding-bottom": cs.paddingBottom,
"padding-left": cs.paddingLeft,
"border-width": cs.borderWidth,
"border-style": "solid",
"font-family": cs.fontFamily,
"font-size": cs.fontSize,
"font-weight": cs.fontWeight,
"line-height": cs.lineHeight,
"letter-spacing": cs.letterSpacing
});
}
// Lazily inserts the transparent backdrop layer used to mark linebreaks, as a sibling of the textarea inside its existing OOUI input wrapper (which OOUI already positions relatively for icon overlays), rather than start.js's approach of wrapping the textarea in a new div — that would risk disturbing OOUI's own layout of the input. Safe to call more than once; the backdrop is cached.
function ensureLinebreakBackdrop(textarea) {
var existing = textarea.data("addExampleLinebreakBackdrop");
if (existing) {
return existing;
}
var $parent = textarea.parent();
if ($parent.css("position") === "static") {
$parent.css("position", "relative");
}
var backdrop = $("<div aria-hidden='true'></div>").addClass("add-example-linebreak-backdrop");
textarea.before(backdrop);
textarea.data("addExampleLinebreakBackdrop", backdrop);
textarea.on("scroll.addExampleLinebreak", function() {
backdrop.scrollTop(textarea.scrollTop()).scrollLeft(textarea.scrollLeft());
});
return backdrop;
}
// Flags a textarea (via CSS class, for the border tint + tooltip) while it contains a typed/pasted linebreak, so the user notices before it's silently turned into <br> on submit; marks only the exact point of the break via the mirrored backdrop.
function highlightLinebreak(el) {
var textarea = $(el);
var text = textarea.val();
var hasBreak = /\r|\n/.test(text);
textarea
.toggleClass("add-example-has-linebreak", hasBreak)
.attr("title", hasBreak ? "Xeta nû dê wek <br> bê nivîsandin" : "");
if (!hasBreak) {
var cached = textarea.data("addExampleLinebreakBackdrop");
if (cached) {
cached.hide();
}
textarea.removeClass("add-example-has-linebreak-source");
return;
}
var backdrop = ensureLinebreakBackdrop(textarea);
textarea.addClass("add-example-has-linebreak-source");
syncLinebreakBackdropMetrics(textarea, backdrop);
backdrop.html(buildLinebreakBackdropHtml(text)).show();
backdrop.scrollTop(textarea.scrollTop()).scrollLeft(textarea.scrollLeft());
}
// Wires linebreak detection onto an OOUI multiline widget, matching start.js's scope: only the quote/example text and its translation/transcription, not bibliographic fields. Uses OOUI's own "change" event rather than the raw <textarea> "input" event start.js listens to, since our fields can also be set programmatically (Clear button, draft restore) via setValue(), which doesn't fire a native DOM input event.
function watchForLinebreaks(widget) {
widget.on("change", function() {
highlightLinebreak(widget.$input[0]);
});
}
var api = new mw.Api();
// Loads wikihez.citoid if it isn't already loaded, from Wikihez's testing page (MediaWiki: isn't editable
// right now) -- self-contained rather than calling wikihez.citoidHelper.ensure() directly, since that
// function only exists once citoid-helper.js has already run once, which isn't guaranteed here.
function ensureCitoid() {
if (window.wikihez && window.wikihez.citoid) {
return $.Deferred().resolve().promise();
}
var url = mw.util.getUrl("Bikarhêner:Wikihez/skrîpt/js/Gadget-citoid-helper.js", {
action: "raw",
ctype: "text/javascript"
});
return mw.loader.getScript(mw.config.get("wgServer") + url);
}
// Language display name, read from the matching section's .besazimani link text.
function languageNameForCode(code) {
var $mark = $(".besazimani[id='" + code + "']").first();
return $mark.length ? $mark.text().trim() : null;
}
// Whether the page title itself (accented Kurdish Latin letters included) is written in Latin script.
var pageTitleIsLatin = !/[^\x00-\x7FÀ-ɏḀ-ỿ‘’]/.test(mw.config.get("wgTitle") || "");
// .example/.benimune = old Şablon:jêder hidden marker; .h-usage-example/.h-quotation = Modul:usex containers used directly by Şablon:nimûne; .citation-whole = Modul:quote's own wrapper, now used by jêder-* templates (Modul:quote nests .h-quotation inside .citation-whole > dl > dd instead of putting it directly under the <li>, so it needs its own entry here).
// Requiring "ul > li >" is what makes this only match an example that's grouped into its own <ul> -- a
// {{nimûne}} (or its "mk" redirect) with no jêder-family citation alongside it in the same definition
// renders straight under the definition's own content instead, with no such group; also reused below to
// tell whether the second pass still needs to handle a given definition.
var EXISTING_EXAMPLE_SELECTOR = "ul > li > .example, ul > li > .benimune, ul > li > .h-usage-example, ul > li > .h-quotation, ul > li > .citation-whole";
$(EXISTING_EXAMPLE_SELECTOR).each(function() {
var $element = $(this);
var $item = $element.parent();
if (!$item.next().length) {
// Get example’s language
// bdi[lang] = old hidden marker; .e-example[lang]/.e-quotation[lang] = Modul:usex/Modul:quote already put lang on the visible span.
// A jêder-* citation with no jêgirtin= (quotation text) yet renders no h-quotation/e-quotation at all
// (see get_quote() in Modul quote.lua) -- exactly the "bare citation" case this button exists to fill
// in, so this can't just crash: without the guard, [0] is undefined here and ".lang" throws, which
// (since $.each() has no try/catch) silently kills the button for every remaining match on the page.
var $langEl = $item.find(".e-example[lang], .e-quotation[lang], bdi[lang]")[0];
if (!$langEl) {
console.warn("Gadget-wikt.add-examples: nikaribe zimanê vê nimûneyê bibîne, valakirî hate derbaskirin.", $item);
return;
}
var language = $langEl.lang;
if (language === "ku-Latn") {
language = "ku";
}
console.log('Language:', language);
// Get section and indices of associated definition
var definitionLevel = [];
var $definitionItem = $item.parent().parent();
var $topItem;
do {
// Skip MediaWiki's empty <li class="mw-empty-elt"> placeholders so indices match the real "#" lines in wikitext (see submit()).
definitionLevel.splice(0, 0, $definitionItem.prevAll("li:not(.mw-empty-elt)").length);
$topItem = $definitionItem;
$definitionItem = $definitionItem.parent().parent();
} while ($definitionItem.prop("tagName") === "LI");
var $section = $($topItem.parent().prevAll(".mw-heading3, h3").get(0));
if ($section.length) {
definitionLevel.splice(0, 0, $section.find("h3").attr("id"));
} else {
console.warn("Gadget-wikt.add-examples: Section heading not found");
// TODO: why does this happen? mw.notify("Beş nehat dîtin. Jkx li WF:Dîwanê vê problemê ragihînin!");
return;
}
// Remove default edit link if present
var $defaultEditLink = $item.find("span.example > span.stubedit");
if ($defaultEditLink.length) {
$defaultEditLink.remove();
}
// Add a nice button to open the form. $group is the citation-group <ul> itself (parent of $item);
// the form panel is inserted AFTER it (see click handler below), not inside it, so the panel isn't
// squeezed into that <ul>'s narrow hanging-indent width on mobile -- only the button/title stays
// there, matching the "Form redesign for Kurdish example" mockup (title inside the bullet list,
// full-width panel below it).
var $group = $item.parent();
var $formItem = $("<li>");
var $button = $("<a href='#'>Nimûneyeke bikaranînê lê zêde bike</a>");
$button.css("color", "var( --color-subtle, #777777 )");
// Shown in the button's place once the form is open (see Form#setVisible).
var $title = $("<span class='add-example-form-title'></span>").hide();
$formItem.append($button).append($title);
$button.on("click", function() {
if (!$button.form) {
$title.text("Nimûneyeke bi " + (languageNameForCode(language) || "zimanekî nenas").toLowerCase() + " lê zêde dikî.");
var form = new Form($item, $button, $title, language, definitionLevel);
$group.after(form.$element);
}
$button.form.setVisible(true);
return false;
});
$item.after($formItem);
}
});
// Second pass: some definitions have no example the pass above could react to at all -- either genuinely
// zero examples, or one rendered via {{nimûne}} (or its "mk" redirect) with no jêder-family citation next
// to it, which (see the comment on EXISTING_EXAMPLE_SELECTOR above) renders with no "ul > li" group to
// match. This walks every recognized POS section's own definitions list directly instead of reacting to
// an existing example, and reads the language off the language section's own <h2> rather than off an
// example -- so it doesn't need one to already exist. Everything else (Form, submit()) is reused as-is.
// MediaWiki wraps each heading in a "mw-heading2"/"mw-heading3"/... div in current skin output; falls
// back to the bare heading element for older/other output that doesn't wrap it.
function headingOuter($h) {
var $wrap = $h.closest(".mw-heading2, .mw-heading3, .mw-heading4, .mw-heading5, .mw-heading6");
return $wrap.length ? $wrap : $h;
}
// Section's language code: nearest preceding .besazimani[id] by document order (not sibling-walking, which mobile's per-section wrapping breaks).
function languageCodeForOl($ol) {
var $marks = $(".besazimani[id]").add($ol);
var ol = $ol.get(0);
var idx = $marks.index(ol);
for (var i = idx - 1; i >= 0; i--) {
var el = $marks.get(i);
if (el.id) {
return el.id;
}
}
return null;
}
// A <li> whose OWN direct content (not counting a nested <ol>) is wrapped in ".form-of-definition" is
// MediaWiki's "form of" template system marking that content as generated by a template -- e.g.
// {{ku-tewîna-nav}}'s "Formeke heval:" wrapper together with its "rewşa îzafeyî"/"rewşa çemandî"/...
// readings underneath. That whole nested block is normally the ENTIRE expansion of a single "#"
// wikitext line, with no separate "##" line behind any individual reading -- recursing into it would
// hand out one button per reading, each trying to match a "##" line that doesn't exist, and submit()
// would fail to find where to insert every one of them. A <li> without that class whose nested <ol>
// holds real hand-typed prose (e.g. sîno-koreyî/Navdêr's two genuinely separate "##" sub-senses) has
// no such problem -- those really are individually addressable wikitext lines.
function isFormOfWrapper($li) {
return $li.children(".form-of-definition").length > 0;
}
// Recurse into a <li>'s own nested <ol> UNLESS it's a form-of-template wrapper (see isFormOfWrapper) --
// a wrapper <li> with its own nested <ol> isn't itself a sense with content of its own, only its real
// (non-generated) leaves are.
function eachLeafDefinition($ol, fn) {
$ol.children("li").each(function() {
var $li = $(this);
var $childOl = $li.children("ol");
if ($childOl.length && !isFormOfWrapper($li)) {
$childOl.each(function() {
eachLeafDefinition($(this), fn);
});
} else {
fn($li);
}
});
}
$("h3").each(function() {
var sectionType = $(this).text().trim();
if (!sectionNames[sectionType]) {
return; // not a recognized word-sense section (Bilêvkirin, Etîmolojî, Çavkanî, ...)
}
var h3Id = $(this).attr("id");
// Forward-walk siblings to the definitions <ol>, skipping over a declension table/TemplateStyles/the
// headword line; stop (nothing to attach to in this section) if another heading comes first instead.
var $ol = null;
for (var $cursor = headingOuter($(this)).next(); $cursor.length; $cursor = $cursor.next()) {
if ($cursor.is("ol")) {
$ol = $cursor;
break;
}
if ($cursor.is(".mw-heading2, .mw-heading3, .mw-heading4, .mw-heading5, .mw-heading6, h2, h3, h4, h5, h6")) {
break;
}
}
if (!$ol) {
return;
}
var language = languageCodeForOl($ol);
if (!language) {
console.warn("Gadget-wikt.add-examples: nikaribe koda zimanê vê beşê bibîne.", $ol);
return;
}
eachLeafDefinition($ol, function($li) {
// The pass above already added a button here (or will) -- an actual example already wrapped in
// its own "ul > li" group.
if ($li.find(EXISTING_EXAMPLE_SELECTOR).length) {
return;
}
var definitionLevel = [];
var $definitionItem = $li;
while ($definitionItem.prop("tagName") === "LI") {
// Skip MediaWiki's empty <li class="mw-empty-elt"> placeholders so indices match the real "#" lines in wikitext (see submit()).
definitionLevel.splice(0, 0, $definitionItem.prevAll("li:not(.mw-empty-elt)").length);
$definitionItem = $definitionItem.parent().parent();
}
definitionLevel.splice(0, 0, h3Id);
// A hidden, empty placeholder <li> so submit()'s existing "_$lastExample.after(newLi)" insertion
// (unchanged, same as the pass above) lands the first submitted example right before the button
// -- matching the existing convention of new examples going in before the button, not after it.
var $placeholder = $("<li style='display:none'></li>");
var $formItem = $("<li>");
var $button = $("<a href='#'>Nimûneyeke bikaranînê lê zêde bike</a>");
$button.css("color", "var( --color-subtle, #777777 )");
// Shown in the button's place once the form is open (see Form#setVisible).
var $title = $("<span class='add-example-form-title'></span>").hide();
$formItem.append($button).append($title);
// A "ul" nested directly under a definition "li" starts hidden here (see the HQToggle-controlled
// jêder-citation-group "ul", which only ever renders with an explicit "style="display: block""
// set on it) -- this one has no HQToggle to unhide it, so it needs the same explicit override or
// the button (and the placeholder above) never becomes visible at all.
var $ul = $("<ul>").css("display", "block").append($placeholder).append($formItem);
// The form panel is inserted AFTER $ul (not inside it) once opened -- same reasoning as the first
// pass above: keeps the full-width panel out of the tight bulleted-list indentation on mobile.
$button.on("click", function() {
if (!$button.form) {
$title.text("Nimûneyeke bi " + (languageNameForCode(language) || "zimanekî nenas").toLowerCase() + " lê zêde dikî.");
var form = new Form($placeholder, $button, $title, language, definitionLevel);
$ul.after(form.$element);
}
$button.form.setVisible(true);
return false;
});
$li.append($ul);
});
});
// Pulls the form panel flush with the page's own left/right edges, undoing whatever nested-list indent it inherited from sitting inside a deeply-nested definition.
function alignFormToPage($form) {
var $container = $form.closest(".mw-parser-output");
if (!$container.length) {
return;
}
var pad = parseFloat(window.getComputedStyle($container[0]).paddingLeft) || 0;
var containerLeft = $container.offset().left + pad;
var indent = $form.offset().left - containerLeft;
$form.css({
marginLeft: indent > 0 ? -indent : 0,
width: $container.width() + "px"
});
}
// Constructor for the edit form; lastExample/button/title/language/definitionLevel identify where the form attaches and what it edits.
function Form($lastExample, $button, $title, language, definitionLevel) {
var self = this;
this._language = language;
this._definitionLevel = definitionLevel;
this._$lastExample = $lastExample;
this._$button = $button;
this._$button.form = this;
this._$title = $title;
this._currentJederKey = "";
this._jederFieldWidgets = {};
this._textInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var textInputLayout = new OO.ui.FieldLayout(this._textInput, {
label: "Metna nimûneyê",
align: "top",
});
// Shown under the text box (see boldenPageTitle) when the page title can't be found in the example text
// as typed, so it won't get bolded; purely informational, doesn't block submitting.
this._titleBoldHint = $("<span class='add-example-title-bold-hint'></span>").hide();
this._updateTitleBoldHint = function() {
var text = self._textInput.getValue().trim();
var title = mw.config.get("wgTitle");
var show = !!text && !boldenPageTitle(text, title).bolded;
self._titleBoldHint.toggle(show).text(show ? "Peyva serekî (" + title + ") nehat dîtin; dê neyê qelewkirin." : "");
};
this._textInput.on("change", function(value) {
self._applyButton.setDisabled(!value);
self._updateReadyHint();
self._updateTitleBoldHint();
});
watchForLinebreaks(this._textInput);
// Source type dropdown: free text, a jêder-* template, or "citoid" (a pseudo key, not in jederDefs) meaning "not yet detected" — the default, switched automatically once a Citoid fetch succeeds (see _fillFromCitoid).
var sourceTypeMenuItems = [
new OO.ui.MenuOptionWidget({ data: "citoid", label: "Bi Citoidê otomatîk zêde bike" }),
new OO.ui.MenuOptionWidget({ data: "", label: "Bi destê xwe binivîsim" }),
];
for (var jederKey in jederDefs) {
if (jederDefs.hasOwnProperty(jederKey)) {
sourceTypeMenuItems.push(new OO.ui.MenuOptionWidget({
data: jederKey,
label: jederDefs[jederKey].label,
}));
}
}
this._sourceTypeDropdown = new OO.ui.DropdownWidget({
menu: { items: sourceTypeMenuItems },
label: "Bi Citoidê otomatîk zêde bike",
});
var sourceTypeLayout = new OO.ui.FieldLayout(this._sourceTypeDropdown, {
label: "Şablona çavkaniyê",
align: "top",
});
this._sourceTypeDropdown.getMenu().on("choose", function(menuOption) {
self._setSourceType(menuOption.getData());
});
this._sourceInput = new OO.ui.MultilineTextInputWidget();
this._sourceInput.on("change", function() {
self._updateReadyHint();
});
this._sourceInputLayout = new OO.ui.FieldLayout(this._sourceInput, {
label: "Çavkaniya nimûneyê",
align: "top",
});
// Always visible in every mode (free text included) — submit() reads this unconditionally as the "url=" parameter. The Citoid fetch button sits right next to it (not in a separate box) -- see _urlRowWidget below.
this._sourceURLInput = new OO.ui.TextInputWidget({
icon: "link",
placeholder: "https://… an jî DOI/ISBN",
});
this._citoidButton = new OO.ui.ButtonWidget({
label: "Bi otomatîk tijî bike",
icon: "download",
flags: ["progressive"],
title: "Li gorî URL, DOI an ISBNya jorîn, malûmatan ji Citoid tîne û qadên şablona jêder-* otomatîk tijî dike.",
classes: ["add-example-citoid-fetch"],
});
this._citoidButton.on("click", this._fillFromCitoid.bind(this));
this._sourceURLInput.on("change", function() {
self._updateReadyHint();
self._autofillVideoTimestamp();
});
// URL input + inline "auto-fill" button as one row (replaces the old separate framed Citoid box's
// button row) -- a plain OO.ui.Widget used purely as a flex-row container (same pattern as
// _loadingImage below: build it empty, then manually append its children's $elements). Disabling
// during submit() still goes through the individual _sourceURLInput/_citoidButton references, not
// through this wrapper.
this._urlRowWidget = new OO.ui.Widget({ classes: ["add-example-url-row"] });
this._urlRowWidget.$element.append(this._sourceURLInput.$element, this._citoidButton.$element);
this._sourceURLInputLayout = new OO.ui.FieldLayout(this._urlRowWidget, {
label: "Lînk, DOI an ISBNya çavkaniyê",
align: "top",
help: "Li qutiyê URL, DOI an ISBN binivîse û pê lê bike butona 'Bi otomatîk tijî bike' da ku otomatîk çavkanî were dagirtin.",
helpInline: true,
});
// Matches the wording just constructed above, so the initial _setSourceType("citoid") call at the end of this constructor doesn't needlessly recreate an identical layout.
this._urlFieldIsFreeTextWording = false;
// Shown right after a successful Citoid fetch (see _fillFromCitoid); hidden again on clear.
this._citoidSuccessMsg = $("<span class='add-example-citoid-success'>✓ Malûmat hatin dagirtin — li jêr kontrol bike.</span>").hide();
// Clears the URL field and any filled jêder-* fields without touching the example text/translation.
this._citoidClearButton = new OO.ui.ButtonWidget({
label: "Vala bike",
icon: "trash",
framed: false,
title: "Lînkê û qadên jêder-* yên vê beşê vala bike",
classes: ["add-example-citoid-clear"],
});
this._citoidClearButton.on("click", function() {
self._sourceURLInput.setValue("");
self._citoidSuccessMsg.hide();
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setValue("");
});
});
// Plain div (not OO.ui.FieldsetLayout) so the grid CSS class applies directly to the field items.
this._jederFieldsFieldset = $("<div class='add-example-jeder-fields'>");
// "Malûmatên çavkaniyê" header (+ the "Vala bike" clear button) sitting right above the fields grid,
// replacing the old framed "Ji Citoid an bi destan tijî bike:" box -- like this only makes sense once
// a real jêder-* template is active (there's nothing here to show for the "citoid: not yet detected"
// placeholder or for free text), so the whole section toggles together in _setSourceType().
this._jederSection = $("<div class='add-example-jeder-section'>").append(
$("<div class='add-example-jeder-header'>")
.append($("<span class='add-example-jeder-header-label'>Malûmatên çavkaniyê</span>"))
.append(this._citoidClearButton.$element),
this._jederFieldsFieldset
);
this._translationInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var translationInputLayout = new OO.ui.FieldLayout(this._translationInput, {
label: "Tercimeya kurmancî ya nimûneyê",
align: "top",
});
watchForLinebreaks(this._translationInput);
this._transcriptionInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var transcriptionInputLayout = new OO.ui.FieldLayout(this._transcriptionInput, {
label: "Translîterasyona nimûneyê",
align: "top",
help: "Tenê lê zêde bike eger metna di nimûneyê de bi alfabeya latînî nehatibe nivîsandin.",
helpInline: true,
});
watchForLinebreaks(this._transcriptionInput);
this._applyButton = new OO.ui.ButtonWidget({
label: "Biweşîne",
icon: "check",
title: "Nimûneyê ji bo vê tarîfê nimûneyê lê zêde bike",
flags: ["progressive", "primary"],
disabled: true,
});
this._applyButton.on("click", this.submit.bind(this));
// Reactive "ready to submit" hint next to Biweşîne: no text yet, text but no source (still submittable
// as a bare {{nimûne}}), or fully ready -- kept in sync by _updateReadyHint(), wired to every field below.
this._readyHint = $("<span class='add-example-ready-hint'></span>").text("Metna nimûneyê lazim e.");
// True while a Citoid-eligible URL/DOI/ISBN is typed in but not yet fetched (or fetched then edited away) and no jêder field has been filled by hand -- the "looks done but isn't" trap this exists to catch. Not applicable in free-text mode, where the fetch button isn't even offered.
this._citoidPending = function() {
return self._currentJederKey !== "" &&
!!self._sourceURLInput.getValue().trim() &&
!self._citoidSuccessMsg.is(":visible") &&
!Object.keys(self._jederFieldWidgets).some(function(key) {
return self._jederFieldWidgets[key].getValue().trim();
});
};
this._updateReadyHint = function() {
if (!self._textInput.getValue()) {
self._readyHint.text("Metna nimûneyê lazim e.");
return;
}
if (self._citoidPending()) {
self._readyHint.text("Pêşî 'Bi otomatîk tijî bike' bitikîne.");
return;
}
var hasSource = self._sourceInput.getValue().trim() || self._sourceURLInput.getValue().trim() ||
Object.keys(self._jederFieldWidgets).some(function(key) {
return self._jederFieldWidgets[key].getValue().trim();
});
self._readyHint.text(hasSource ? "Hazir e." : "Çavkanî nehatiye dayîn.");
};
// Prefills the Dem field from the typed URL's own "t=" (see wikihez.citoid.extractVideoTimestamp) once jêder-vîdeo is active -- never overwrites a value the user already entered by hand.
this._autofillVideoTimestamp = function() {
var demWidget = self._jederFieldWidgets.dem;
if (self._currentJederKey !== "jêder-vîdeo" || !demWidget || demWidget.getValue().trim()) {
return;
}
ensureCitoid().then(function() {
var dem = wikihez.citoid.extractVideoTimestamp(self._sourceURLInput.getValue().trim());
if (dem && !demWidget.getValue().trim()) {
demWidget.setValue(dem);
}
});
};
// framed:false (+ the "destructive" flag for the red text/hover) matches the mockup's borderless
// "Betal bike" -- a plain colored link rather than a boxed button, distinguishing it from Paqij bike.
this._cancelButton = new OO.ui.ButtonWidget({
label: "Betal bike",
icon: "close",
title: "Formê bigire",
flags: ["destructive"],
framed: false,
});
this._cancelButton.on("click", function() {
self.setVisible(false);
});
this._clearButton = new OO.ui.ButtonWidget({
label: "Paqij bike",
icon: "trash",
title: "Hemû qadan vala bike û pêşnûyisên hilanîbûyî jê bibe",
});
this._clearButton.on("click", function() {
self.clear();
self._clearDraft();
});
// Native CSS spinner (see Gadget-wikt.add-examples.css) instead of an external Commons GIF, so there's no network request and it matches dark/light mode.
this._loadingImage = new OO.ui.Widget({
classes: ["add-example-loading"],
});
this._loadingImage.$element.append($('<span class="add-example-spinner" aria-hidden="true"></span>'));
this._loadingImage.toggle(false);
// Two-column top section (see "Form redesign for Kurdish example/Nimûne zêde bike.dc.html"): example
// text (+ translation/transliteration for non-ku, right after it, not after the source fields) on the
// left; source-type + link/Citoid on the right. Built as plain <div>s, not an OOUI layout -- OOUI has
// no CSS-grid container -- so .add-example-top-grid in the CSS can lay them out as a real responsive
// 7fr/5fr grid (collapsing to one column on narrow screens).
var $topLeft = $("<div class='add-example-top-col'>").append(textInputLayout.$element, this._titleBoldHint);
if (language !== "ku") {
$topLeft.append(translationInputLayout.$element);
}
if (!pageTitleIsLatin) {
$topLeft.append(transcriptionInputLayout.$element);
}
var $topRight = $("<div class='add-example-top-col'>").append(
sourceTypeLayout.$element,
this._sourceInputLayout.$element,
this._sourceURLInputLayout.$element,
this._citoidSuccessMsg
);
var $topGrid = $("<div class='add-example-top-grid'>").append($topLeft, $topRight);
// Saved on the instance (not just a local var) so _setSourceType() can swap the URL field's label/help
// wording in and out of it when switching to/from free text (see the FieldLayout replaceWith() there).
this._fieldsLayout = $("<div class='add-example-fieldset'>").append($topGrid, this._jederSection);
// Bottom action row -- order/spacing matches the mockup: Biweşîne (+ spinner + ready hint), a spacer
// pushing the rest right, then Paqij bike (bordered/subtle) and Betal bike (borderless red text, via
// framed:false above). A plain flex <div>, not an OOUI HorizontalLayout, so the raw hint/spacer
// elements can sit alongside the real button widgets (same reasoning as the top grid above).
var $buttonsRow = $("<div class='add-example-main-buttons'>").append(
this._applyButton.$element,
this._loadingImage.$element,
this._readyHint,
$("<span class='add-example-buttons-spacer'></span>"),
this._clearButton.$element,
this._cancelButton.$element
);
this._frame = new OO.ui.PanelLayout({
id: "add-example-definition-{0}-form".format(this._definitionLevel.join("-")),
classes: ["add-example-form"],
expanded: false,
});
this._frame.$element.append(this._fieldsLayout, $buttonsRow);
// Default to "citoid" mode; selectItemByData() doesn't fire "choose" (that only fires for interactive selection), so _setSourceType() must also be called explicitly to set up the initial UI.
this._sourceTypeDropdown.getMenu().selectItemByData("citoid");
this._setSourceType("citoid");
}
Form.prototype = {
// Returns the jQuery object for this form.
get $element() {
return this._frame.$element;
},
// Switches the source section between free text, Citoid auto-detect (no template chosen yet), and a specific jêder-* template, rebuilding the field list to match. The URL field itself is always visible in every mode (see the constructor); only the free-text textarea, the Citoid fetch button, and the "Malûmatên çavkaniyê" fields section toggle here.
_setSourceType: function(jederKey) {
var self = this;
this._currentJederKey = jederKey;
this._jederFieldsFieldset.empty();
this._jederFieldWidgets = {};
var isRealJederKey = jederKey && jederDefs[jederKey];
if (isRealJederKey) {
var def = jederDefs[jederKey];
def.fields.forEach(function(field) {
var widget = field.multiline
? new OO.ui.MultilineTextInputWidget({ rows: 2, autosize: false })
: new OO.ui.TextInputWidget();
self._jederFieldWidgets[field.key] = widget;
widget.on("change", function() {
self._updateReadyHint();
});
var layout = new OO.ui.FieldLayout(widget, {
label: field.label,
align: "top",
classes: ["add-example-field-span-" + (field.span || 4)],
});
self._jederFieldsFieldset.append(layout.$element);
});
}
// "Malûmatên çavkaniyê" header + fields grid: only once a real template is chosen/detected --
// nothing to show yet for the plain "citoid: not yet detected" placeholder or for free text.
this._jederSection.toggle(!!isRealJederKey);
// Free text textarea only for "" (free text); hidden for "citoid" and any real jêder-* key.
this._sourceInputLayout.toggle(jederKey === "");
// Citoid fetch button: hidden for free text (nothing there for it to fill in), shown for "citoid" auto-detect and any real jêder-* key. The URL input itself next to it stays visible in every mode.
this._citoidButton.toggle(jederKey !== "");
// URL field wording: plain "attach a link" phrasing for free text, Citoid-oriented phrasing otherwise. Only recreated when actually crossing that boundary, not on every dropdown change (e.g. switching between two jêder-* types keeps the same wording, no need to touch the DOM).
var isFreeText = jederKey === "";
if (this._urlFieldIsFreeTextWording !== isFreeText) {
this._urlFieldIsFreeTextWording = isFreeText;
this._sourceURLInput.setPlaceholder(isFreeText ? "URLyeke wekî https://…" : "URLyek wekî https://… an jî DOI/ISBN");
var $oldLayout = this._sourceURLInputLayout.$element;
// Re-wraps the SAME _urlRowWidget (still holding _sourceURLInput + _citoidButton) in a new
// FieldLayout with the new label/help; the widget's $element moves along with it, same as the
// old addItems()/removeItems() swap did for the plain input before this redesign.
this._sourceURLInputLayout = new OO.ui.FieldLayout(this._urlRowWidget, isFreeText ? {
label: "Adresa webê ya nimûneyê",
align: "top",
help: "Tenê binivîse eger lînk jixwe di referansa çavkaniyê de tinebe.",
helpInline: true,
} : {
label: "Lînk, DOI an ISBNya çavkaniyê",
align: "top",
help: "Ev dibe lînka çavkaniyê (url=). Ji bo şablonên jêder-*, dikare bi Citoid an bi destan jî bên dagirtin.",
helpInline: true,
});
$oldLayout.replaceWith(this._sourceURLInputLayout.$element);
}
this._autofillVideoTimestamp();
this._updateReadyHint();
},
// Fetches data via wikihez.citoid (loaded on demand by ensureCitoid() if needed), picks the matching jêder-* template, and fills its empty fields.
_fillFromCitoid: function() {
var self = this;
var query = this._sourceURLInput.getValue().trim();
if (!query) {
mw.notify("Ji kerema xwe re pêşî URL, DOI an ISBNyekê binivîse.");
return;
}
this._citoidButton.setDisabled(true);
this._loadingImage.toggle(true);
ensureCitoid().then(function() {
return wikihez.citoid.fetchJederFields(query);
}).then(function(result) {
// Only let Citoid pick the template type when nothing's been chosen yet (the "citoid" auto-detect default). If the user already selected a specific jêder-* type (or free text), that choice is respected — e.g. picking "Websîte" and fetching a tweet must not silently switch to "Kovar" just because Citoid guessed differently.
var wasAutoDetect = self._currentJederKey === "citoid";
if (wasAutoDetect) {
var menu = self._sourceTypeDropdown.getMenu();
var item = menu.findItemFromData(result.jederKey);
if (item) {
menu.chooseItem(item); // this calls _setSourceType(jederKey) automatically
}
}
var targetJederKey = self._currentJederKey;
// Fields Citoid returned were shaped for its own detected type; if the active template differs (the case above where the user's choice was kept), re-derive fields for that template instead so e.g. "Websîte" still gets its own website-shaped fields (websîte, tarîx, ...) rather than leftover kovar-shaped ones.
var fields = targetJederKey === result.jederKey ? result.fields : wikihez.citoid.dataToJederFields(targetJederKey, result.raw, query);
Object.keys(fields).forEach(function(key) {
var widget = self._jederFieldWidgets[key];
if (widget && !widget.getValue()) {
widget.setValue(fields[key]);
}
});
self._citoidSuccessMsg.show();
self._updateReadyHint();
mw.notify("Malûmat ji Citoid hatin barkirin.");
}, function(errorMsg) {
// wikihez.citoid may still be missing here if ensureCitoid() itself failed to load the script (e.g. network error) -- fall back to the bare error notice in that case.
if (!window.wikihez || !window.wikihez.citoid) {
mw.notify("Nekarî citoid-helper.js bar bike.");
return;
}
// Citoid can't fetch some sites at all (e.g. x.com/twitter.com) -- fall back to jêder-websîte with a website name guessed from the URL itself, rather than just a bare error.
var fallbackSite = wikihez.citoid.websiteNameForUrl(query);
if (fallbackSite) {
if (self._currentJederKey !== "jêder-websîte") {
var menu = self._sourceTypeDropdown.getMenu();
var item = menu.findItemFromData("jêder-websîte");
if (item) {
menu.chooseItem(item); // this calls _setSourceType("jêder-websîte") automatically
}
}
var websiteWidget = self._jederFieldWidgets["websîte"];
if (websiteWidget && !websiteWidget.getValue()) {
websiteWidget.setValue(fallbackSite);
}
mw.notify("Citoid nikare vê malperê bixwîne; şablona Websîte hate hilbijartin, ji kerema xwe mayî bi destan tijî bike.");
return;
}
mw.notify(typeof errorMsg === "string" ? errorMsg : "Nekarî malûmatan ji Citoid bistîne. Kontrol bike ka URL/DOI/ISBN rast e.");
}).always(function() {
self._citoidButton.setDisabled(false);
self._loadingImage.toggle(false);
});
},
// Toggles the visibility of this form and restores any saved draft when shown. The title text takes
// the button's place while open (see the "Form redesign for Kurdish example" mockup); the button
// itself stays put ready to reappear once the form is cancelled/closed.
setVisible: function(visible) {
this._$button.toggle(!visible);
this._$title.toggle(visible);
this._frame.toggle(visible);
if (visible) {
alignFormToPage(this._frame.$element);
var draft = draftStorage.Get() || {};
if (!this._textInput.getValue() && draft.text) {
this._textInput.setValue(draft.text);
}
if (!this._sourceInput.getValue() && draft.source) {
this._sourceInput.setValue(draft.source);
}
if (!this._sourceURLInput.getValue() && draft.sourceURL) {
this._sourceURLInput.setValue(draft.sourceURL);
}
if (!this._translationInput.getValue() && draft.translation) {
this._translationInput.setValue(draft.translation);
}
if (!this._transcriptionInput.getValue() && draft.transcription) {
this._transcriptionInput.setValue(draft.transcription);
}
}
},
// Removes any saved draft (localStorage/cookie via MediaWiki:Gadget-StorageUtils.js) so it can't resurface on other pages.
_clearDraft: function() {
draftStorage.Set({});
},
// Clears all fields in this form.
clear: function() {
this._textInput.setValue("");
this._sourceInput.setValue("");
this._sourceURLInput.setValue("");
this._translationInput.setValue("");
this._transcriptionInput.setValue("");
this._citoidSuccessMsg.hide();
this._sourceTypeDropdown.getMenu().selectItemByData("citoid");
this._setSourceType("citoid");
},
// Warns before submitting if a Citoid URL/DOI/ISBN was typed but never successfully fetched, then defers
// to _doSubmit. The title-not-boldable case (see boldenPageTitle) is shown inline under the text box
// instead (_titleBoldHint) rather than blocking submission here.
submit: function() {
if (this._citoidPending() && !window.confirm("Te lînk, DOI an ISBN nivîsand lê hîn jê malûmat nehatine standin. Bêyî wan berdewam bikî?")) {
return;
}
this._doSubmit();
},
// Generates and submits the wikicode, then inserts the resulting HTML element if no errors occurred.
_doSubmit: function() {
var self = this;
self._textInput.setDisabled(true);
self._sourceInput.setDisabled(true);
self._sourceURLInput.setDisabled(true);
self._translationInput.setDisabled(true);
self._transcriptionInput.setDisabled(true);
self._sourceTypeDropdown.setDisabled(true);
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setDisabled(true);
});
// self._disableTranslationChk.setDisabled(true);
this._applyButton.setDisabled(true);
this._clearButton.setDisabled(true);
this._loadingImage.toggle(true);
var source = this._sourceInput.getValue().trim();
var sourceURL = this._sourceURLInput.getValue().trim();
var text = this._textInput.getValue().trim();
// If a jêder-* template is selected, collect its filled-in fields.
var jederParams = [];
if (this._currentJederKey && jederDefs[this._currentJederKey]) {
jederDefs[this._currentJederKey].fields.forEach(function(field) {
var widget = self._jederFieldWidgets[field.key];
var value = widget ? widget.getValue().trim() : "";
if (value) {
jederParams.push(field.key + "=" + value);
}
});
}
var usingJederTemplate = this._currentJederKey && jederParams.length > 0;
var minakAnNa, sablon;
if (usingJederTemplate) {
// The jêder-* template itself is used as the template, not as the "2=" content.
minakAnNa = "*";
sablon = this._currentJederKey;
} else if (source || sourceURL) {
minakAnNa = "*";
sablon = "jêder";
} else {
minakAnNa = ":";
sablon = "nimûne";
}
var listMarker = "".padStart(this._definitionLevel.length - 1, "#") + minakAnNa;
var title = mw.config.get('wgTitle');
// jêder-* template, jêder, or nimûne
var code = listMarker + " {{" + sablon;
// 1= language code
code += "|" + this._language;
if (usingJederTemplate) {
// Fields of the selected jêder-* template, passed straight through as its parameters.
jederParams.forEach(function(param) {
code += "|" + param;
});
} else {
// 2= source (free text)
if (source) {
code += "|2=" + source;
}
if (sourceURL) {
code += "|url=" + sourceURL;
}
}
// jêgirtin/nimûne (quotation text)
code += "|";
if (sablon !== "nimûne") {
code += "jêgirtin=";
}
// bold the page title (see boldenPageTitle), then convert any literal linebreak in the example text to <br> (see nlToBr) so it can't break the single-line "#*" wikitext
code += nlToBr(boldenPageTitle(text, title).text);
if (this._language !== "ku") {
var translation = nlToBr(this._translationInput.getValue().trim());
if (translation) {
code += "|tercime=" + translation;
}
}
var transcription = nlToBr(this._transcriptionInput.getValue().trim());
if (transcription) {
code += "|tr=" + transcription;
}
code += "}}";
// var escapedLangCode = languages[this._language].charAt(0).toUpperCase() + languages[this._language].slice(1);
// console.log("escapedLangCode: ", escapedLangCode);
var sectionIDPattern = new RegExp("^([\\wîêçş_]+?)_?(\\d+)?_?(\\d+)?$");
console.log("this._definitionLevel[0]: ", this._definitionLevel[0]);
var matchSectionID = sectionIDPattern.exec(this._definitionLevel[0]);
//var isInflection;
var sectionType = matchSectionID[1].replace(/_/, ' ');
sectionType = sectionType.replace(/_\d+$/, '');
console.log("sectionType: ", sectionType);
var sectionNum = matchSectionID[2] ? parseInt(matchSectionID[2]) : "";
console.log("Section Number:", sectionNum);
// Insert new example into page’s code
api.get({
action: "query",
titles: mw.config.get("wgPageName"),
prop: "revisions",
rvprop: "content",
rvslots: "main",
}).then(function(data) {
var pageContent;
for (var pageID in data.query.pages) {
if (data.query.pages.hasOwnProperty(pageID)) {
// noinspection JSUnresolvedVariable
pageContent = data.query.pages[pageID].revisions[0].slots.main["*"];
break;
}
}
// Look for correct language section
var langSectionRegex = new RegExp("==[ ]*{{ziman\\|{0}}}[ ]*==".format(self._language));
var langSectionIndex = pageContent.search(langSectionRegex);
console.log("langSectionIndex:", langSectionIndex);
if (langSectionIndex === -1) {
console.log("langSectionIndex === -1");
error("Xeletiyeke bi koda zimanî heye. Koda zimanî:" + self._language);
return;
}
// Look for correct word type section
var lines = pageContent.slice(langSectionIndex).split("\n");
var sectionNamesRegex = Object.keys(sectionNames).join('|');
var sectionRegex = new RegExp('^===[ ]*(' + sectionNamesRegex + ')\\s*(\\d+)?');
var targetLineIndex;
for (targetLineIndex = 0; targetLineIndex < lines.length; targetLineIndex++) {
var line = lines[targetLineIndex];
console.log("line:", line);
var matchSection = sectionRegex.exec(line);
if (matchSection) {
console.log("matchSection:", matchSection[1]);
// Extract section name and number from the matched result
var matchedSectionName = matchSection[1];
var matchedSectionNum = matchSection[2]; // It could be undefined
if (!sectionNames[sectionType]) {
error('Navê beşê xelet e. Di beşên "Ji wêjêyê" û "Ji wêjêya klasîk" ev amûr nayê bikaranîn.');
return; // Exit the function
}
// Check if the matched section name is in the expected list
if (sectionNames[sectionType].includes(matchedSectionName)) {
// Match only the specific numbered section the button was clicked in (e.g. "Navdêr 2",
// not just the first "===Navdêr...===" heading found) -- both sides are "" when the
// section has no number at all (a single unnumbered "===Navdêr===").
var matchedSectionNumValue = matchedSectionNum ? parseInt(matchedSectionNum, 10) : "";
if (matchedSectionNumValue === sectionNum) {
// Add more conditions if needed for inflection, e.g., (isInflection === line.includes("Formeke "))
break;
}
}
}
}
if (targetLineIndex === lines.length) {
console.log("targetLineIndex === lines.length");
error("Di navê beşê de xeletî heye. Îhtimalen bi vî navê beşê çend heb hene.");
return;
}
// Look for correct definition
var defIndex = -1;
var level = 1;
for (; targetLineIndex < lines.length; targetLineIndex++) {
var m = /^(#+)[^*#:]/.exec(lines[targetLineIndex]);
console.log("lines[targetLineIndex]:", lines[targetLineIndex]);
if (m) {
console.log("m:", m);
if (level === m[1].length) {
console.log("m[1]:", m[1]);
defIndex++;
console.log("defIndex:", defIndex);
if (self._definitionLevel[level] === defIndex) {
console.log("self._definitionLevel[level] === defIndex");
console.log("self._definitionLevel[level]", self._definitionLevel[level]);
if (level === self._definitionLevel.length - 1) {
console.log("level:", level);
break;
} else {
level++;
defIndex = -1;
}
}
}
}
}
// Find where to insert within this definition's "#:"/"#*" block: walk lines after the definition (findBlockEnd() tracks multi-line templates), and use exampleTemplateNames to tell real examples from annotations (synonyms, antonyms, alt-forms, etc.) rather than hard-blocking specific names.
var insertionFound = false;
var lastRelevantBlockEnd = -1;
var isJederFamily = (sablon === "jêder" || Object.prototype.hasOwnProperty.call(jederDefs, sablon));
var scanIndex = targetLineIndex + 1;
var emptyTemplate = false;
for (; scanIndex < lines.length; scanIndex++) {
var scanLine = lines[scanIndex];
if (!scanLine.startsWith("#:") && !scanLine.startsWith("#*")) {
// Left this definition's "#:"/"#*" block (e.g. a new definition or section starts).
break;
}
var blockEnd = findBlockEnd(lines, scanIndex);
var templateName = getLineTemplateName(scanLine);
var isExampleLine = templateName !== null &&
exampleTemplateNames.indexOf(templateName) !== -1;
if (isJederFamily) {
// jêder-family examples go after all "#:"/"#*" lines of this definition (both real examples and annotations).
lastRelevantBlockEnd = blockEnd;
insertionFound = true;
} else if (sablon === "nimûne") {
// "nimûne" examples go before any "#*" line, but after "#:" lines.
if (scanLine.startsWith("#*")) {
break;
}
lastRelevantBlockEnd = blockEnd;
insertionFound = true;
}
scanIndex = blockEnd; // Skip past the whole (possibly multi-line) block
}
var insertAt = lastRelevantBlockEnd >= 0 ? lastRelevantBlockEnd + 1 : scanIndex;
if (lastRelevantBlockEnd >= 0) {
emptyTemplate = /#+\*\s*{{[ ]*b?ê?(nimûne|mînak|jêgirtin)\??\s*\|\s*\|?\s*[^|}]+}}/.test(lines[lastRelevantBlockEnd]);
}
if (emptyTemplate) {
console.log("empty Template found", sablon);
// Replace empty template with new example
lines.splice(lastRelevantBlockEnd, 1, code);
} else {
console.log("empty Template not found", sablon);
// Insert the new example (right after the definition if it had no existing "#:"/"#*" lines yet, or after the relevant block otherwise).
lines.splice(insertAt, 0, code);
}
// Submit new page content
api.edit(mw.config.get("wgPageName"), function(_) {
return {
text: pageContent.slice(0, langSectionIndex) + lines.join("\n"),
summary: "+nimûneya bikaranînê bi amûra « {0} » (v{1}).".format(NAME, VERSION),
};
}).then(function() {
api.parse(code).done(function(data) {
var $renderedExample = $(data).find("ul > li").html();
var $item;
// Insert rendered example into page
if (emptyTemplate) {
self._$lastExample.html($renderedExample);
$item = self._$lastExample;
} else {
self._$lastExample.after($item = $("<li>").append($renderedExample));
}
$item.css("background-color", "lightgreen");
setTimeout(function() {
$item.css("background-color", "inherit");
}, 1000);
self._$lastExample = $item;
});
self.setVisible(false);
self.clear();
self._clearDraft();
reenable();
}, function(code, result) {
error("Nekarî rûpelê xilas bike: " + apiErrorMessage(code, result));
});
}, function(code, result) {
error("Nekarî naveroka rûpelê bistîne: " + apiErrorMessage(code, result));
});
function error(errorMessage) {
mw.notify(errorMessage || "Nimûne nehat weşandin, îhtimalen rûpel hate guhartin. Ji kerema xwe re rûpelê dîsa bar bike û dîsa biceribîne.");
draftStorage.Set({
text: self._textInput.getValue(),
source: self._sourceInput.getValue(),
sourceURL: self._sourceURLInput.getValue(),
translation: self._translationInput.getValue(),
transcription: self._transcriptionInput.getValue(),
});
reenable();
}
function reenable() {
self._textInput.setDisabled(false);
self._sourceInput.setDisabled(false);
self._sourceURLInput.setDisabled(false);
self._translationInput.setDisabled(false);
self._transcriptionInput.setDisabled(false);
self._sourceTypeDropdown.setDisabled(false);
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setDisabled(false);
});
// self._disableTranslationChk.setDisabled(false);
self._applyButton.setDisabled(false);
self._cancelButton.setDisabled(false);
self._clearButton.setDisabled(false);
self._loadingImage.toggle(false);
}
},
};
});
// </nowiki>
fdzav7c0byr3cez4nu66s3wd22qsn71
6342680
6342678
2026-08-26T10:37:33Z
Wikihez
7344
6342680
javascript
text/javascript
// <nowiki>
// dependencies (declared in MediaWiki:Gadgets-definition): oojs, oojs-ui, ext.gadget.citoid-helper (wikihez.citoid), ext.gadget.StorageUtils (ObjectStorage)
// Formats a string using {0}, {1}, ... placeholders.
if (!String.prototype.format) {
String.prototype.format = function(var_args) {
var args = arguments;
return this.replace(/{(\d+)}/g, function(match, number) {
return typeof args[number] !== "undefined" ? args[number] : match;
});
};
}
$(function() {
"use strict";
// Skip pages where this gadget shouldn't run.
if (
mw.config.get("wgPageName") !== "Wîkîferheng:ceribandin/nimûne" &&
mw.config.get("wgNamespaceNumber") !== 108 &&
mw.config.get("wgNamespaceNumber") !== 0 ||
mw.config.get("wgPageName") === "Destpêk" ||
mw.config.get("wgArticleId") === 0
) return;
console.log("Gadget-wikt.add-examples.js dest pê dike…");
var NAME = "[[Mediawiki:Gadget-wikt.add-examples|Nimûne zêde bike]]";
var VERSION = "2.0";
// Persists form drafts via MediaWiki:Gadget-StorageUtils.js (localStorage, falling back to a cookie) so unsaved text survives a failed submit.
var draftStorage = new ObjectStorage("add_examples_draft", 1);
// Citoid logic normally lives in MediaWiki:Gadget-citoid-helper.js as a registered gadget dependency; not
// currently editable, so ensureCitoid() (below) loads it from a user testing page on demand instead.
// "span" is the field's width in the 12-column grid the fields render in (see .add-example-jeder-fields
// in the CSS and _setSourceType below) -- field ORDER here is also the grid's reading order.
var jederDefs = {
"jêder-kitêb": {
"label": "Kitêb",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 3 },
{ "key": "terciman", "label": "Terciman", "span": 3 },
{ "key": "amadekar", "label": "Amadekar", "span": 3 },
{ "key": "weşanxane", "label": "Weşanxane", "span": 3 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "cih", "label": "Cih", "span": 2 },
{ "key": "sal", "label": "Sal", "span": 1 },
{ "key": "sala-weşandinê", "label": "Sala weşandinê", "span": 2 },
{ "key": "çap", "label": "Çap", "span": 1 },
{ "key": "rûpel", "label": "Rûpel", "span": 1 },
{ "key": "isbn", "label": "ISBN", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
},
"jêder-kovar": {
"label": "Kovar",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 3 },
{ "key": "terciman", "label": "Terciman", "span": 3 },
{ "key": "amadekar", "label": "Amadekar", "span": 3 },
{ "key": "weşanxane", "label": "Weşanxane", "span": 3 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "kovar", "label": "Kovar", "span": 4 },
{ "key": "cild", "label": "Cild", "span": 2 },
{ "key": "hejmar", "label": "Hejmar", "span": 2 },
{ "key": "sal", "label": "Sal", "span": 2 },
{ "key": "rûpel", "label": "Rûpel", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
},
"jêder-websîte": {
"label": "Websîte",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 4 },
{ "key": "terciman", "label": "Terciman", "span": 4 },
{ "key": "websîte", "label": "Websîte", "span": 4 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "url", "label": "URL", "span": 5 },
{ "key": "urlya-arşîvê", "label": "URLya Arşîvê", "span": 5 },
{ "key": "sal", "label": "Sal", "span": 1 },
{ "key": "tarîx", "label": "Tarîx", "span": 1 }
]
},
"jêder-vîdeo": {
"label": "Vîdeo",
"fields": [
{ "key": "hunermend", "label": "Hunermend", "span": 6 },
{ "key": "platform", "label": "Platform", "span": 6 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "sal", "label": "Sal", "span": 2 },
{ "key": "tarîx", "label": "Tarîx", "span": 3 },
{ "key": "dem", "label": "Dem", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
}
};
var sectionNames = {
"Navdêr": ["Navdêr"],
"Formeke navdêrê": ["Formeke navdêrê"],
"Lêker": ["Lêker"],
"Formeke lêkerê": ["Formeke lêkerê"],
"Rengdêr": ["Rengdêr"],
"Formeke rengdêrê": ["Formeke rengdêrê"],
"Hoker": ["Hoker"],
"Formeke hokerê": ["Formeke hokerê"],
"Serenav": ["Serenav"],
"Formeke serenavê": ["Formeke serenavê"],
"Artîkel": ["Artîkel"],
"Baneşan": ["Baneşan"],
"Bazinedaçek": ["Bazinedaçek"],
"Biwêj": ["Biwêj"],
"Cînav": ["Cînav"],
"Daçek": ["Daçek"],
"Girêdek": ["Girêdek"],
"Gotineke pêşiyan": ["Gotineke pêşiyan"],
"Hejmar": ["Hejmar"],
"Hevok": ["Hevok"],
"Îfade": ["Îfade"],
"Kurtenav": ["Kurtenav"],
"Navgir": ["Navgir"],
"Paşdaçek": ["Paşdaçek"],
"Paşgir": ["Paşgir"],
"Pêşdaçek": ["Pêşdaçek"],
"Pêşgir": ["Pêşgir"],
"Pirtik": ["Pirtik"],
"Reh": ["Reh"],
"Sembol": ["Sembol"],
"Tîp": ["Tîp"]
};
// Template names treated as "real examples" (an allow-list, not the old deny-list) so annotation templates like synonyms/antonyms/alt-forms aren't mistaken for examples.
var exampleTemplateNames = ["jêder", "nimûne"].concat(Object.keys(jederDefs));
// Returns the template name starting a "#:"/"#*" line (e.g. "jêder" from "#* {{jêder|ku|...}}"), or null if the line doesn't start with a template.
function getLineTemplateName(line) {
var m = /^#[:*]\s*\{\{\s*([^|}]+)/.exec(line);
return m ? m[1].trim() : null;
}
// Returns the index of the line where a (possibly multi-line) template block starting at startIndex closes its {{ }} braces, so multi-line templates are treated as one block.
function findBlockEnd(lines, startIndex) {
var depth = 0;
var i = startIndex;
for (; i < lines.length; i++) {
var opens = (lines[i].match(/\{\{/g) || []).length;
var closes = (lines[i].match(/\}\}/g) || []).length;
depth += opens - closes;
if (depth <= 0) {
break;
}
}
return i;
}
// Ported from start.js: converts literal line breaks typed/pasted into the example/translation/transcription boxes into wikitext <br> tags, since a raw newline would break the single-line "#*" wikitext structure.
function nlToBr(text) {
return text ? text.replace(/\r\n|\r|\n/g, "<br>") : text;
}
// Escapes str for safe interpolation into a RegExp -- page titles can contain regex metacharacters
// (parentheses for disambiguation, periods in abbreviation entries, etc.).
function escapeRegExp(str) {
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
// Wraps the first occurrence of the page title (+ an optional glued-on suffix, e.g. a plural "-an") in the
// example text with wikitext bold markup, so the headword stands out in the rendered example. Skips it if
// the title is already bolded by hand, to avoid turning "'''reh'''" into "'''''reh'''''" (bold+italic).
// Returns {text, bolded}; bolded is false if the title wasn't found anywhere and nothing changed.
function boldenPageTitle(text, title) {
var escapedTitle = escapeRegExp(title);
var suffixPattern = "([^\\s.,;?!()']+)?";
if (new RegExp("'''" + escapedTitle + suffixPattern + "'''", "i").test(text)) {
return { text: text, bolded: true };
}
var bolded = text.replace(new RegExp("(" + escapedTitle + suffixPattern + ")", "ig"), "'''$1'''");
return { text: bolded, bolded: bolded !== text };
}
// Extracts a human-readable message from an mw.Api rejection (code, result).
function apiErrorMessage(code, result) {
return (result && result.error && result.error.info) || (typeof code === "string" ? code : "Xeletiyeke nenas");
}
function escapeHtmlForBackdrop(str) {
return String(str)
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">");
}
// Mirrors a textarea's text with a small marker after each line that's followed by an actual typed/pasted linebreak, rendered into a transparent backdrop behind the textarea (see ensureLinebreakBackdrop()).
function buildLinebreakBackdropHtml(text) {
var lines = text.split(/\r\n|\r|\n/);
return $.map(lines, function(line, i) {
var isLast = i === lines.length - 1;
return escapeHtmlForBackdrop(line) +
(isLast ? "" : "<mark class='add-example-linebreak-mark'>↵</mark>\n");
}).join("");
}
// Copies the metrics that affect where text wraps/lands (font, line height, padding, border) from the real textarea onto its backdrop via computed style, since the backdrop is a plain <div>, not a themed OOUI input.
function syncLinebreakBackdropMetrics(textarea, backdrop) {
var cs = window.getComputedStyle(textarea[0]);
backdrop.css({
"box-sizing": cs.boxSizing,
"padding-top": cs.paddingTop,
"padding-right": cs.paddingRight,
"padding-bottom": cs.paddingBottom,
"padding-left": cs.paddingLeft,
"border-width": cs.borderWidth,
"border-style": "solid",
"font-family": cs.fontFamily,
"font-size": cs.fontSize,
"font-weight": cs.fontWeight,
"line-height": cs.lineHeight,
"letter-spacing": cs.letterSpacing
});
}
// Lazily inserts the transparent backdrop layer used to mark linebreaks, as a sibling of the textarea inside its existing OOUI input wrapper (which OOUI already positions relatively for icon overlays), rather than start.js's approach of wrapping the textarea in a new div — that would risk disturbing OOUI's own layout of the input. Safe to call more than once; the backdrop is cached.
function ensureLinebreakBackdrop(textarea) {
var existing = textarea.data("addExampleLinebreakBackdrop");
if (existing) {
return existing;
}
var $parent = textarea.parent();
if ($parent.css("position") === "static") {
$parent.css("position", "relative");
}
var backdrop = $("<div aria-hidden='true'></div>").addClass("add-example-linebreak-backdrop");
textarea.before(backdrop);
textarea.data("addExampleLinebreakBackdrop", backdrop);
textarea.on("scroll.addExampleLinebreak", function() {
backdrop.scrollTop(textarea.scrollTop()).scrollLeft(textarea.scrollLeft());
});
return backdrop;
}
// Flags a textarea (via CSS class, for the border tint + tooltip) while it contains a typed/pasted linebreak, so the user notices before it's silently turned into <br> on submit; marks only the exact point of the break via the mirrored backdrop.
function highlightLinebreak(el) {
var textarea = $(el);
var text = textarea.val();
var hasBreak = /\r|\n/.test(text);
textarea
.toggleClass("add-example-has-linebreak", hasBreak)
.attr("title", hasBreak ? "Xeta nû dê wek <br> bê nivîsandin" : "");
if (!hasBreak) {
var cached = textarea.data("addExampleLinebreakBackdrop");
if (cached) {
cached.hide();
}
textarea.removeClass("add-example-has-linebreak-source");
return;
}
var backdrop = ensureLinebreakBackdrop(textarea);
textarea.addClass("add-example-has-linebreak-source");
syncLinebreakBackdropMetrics(textarea, backdrop);
backdrop.html(buildLinebreakBackdropHtml(text)).show();
backdrop.scrollTop(textarea.scrollTop()).scrollLeft(textarea.scrollLeft());
}
// Wires linebreak detection onto an OOUI multiline widget, matching start.js's scope: only the quote/example text and its translation/transcription, not bibliographic fields. Uses OOUI's own "change" event rather than the raw <textarea> "input" event start.js listens to, since our fields can also be set programmatically (Clear button, draft restore) via setValue(), which doesn't fire a native DOM input event.
function watchForLinebreaks(widget) {
widget.on("change", function() {
highlightLinebreak(widget.$input[0]);
});
}
var api = new mw.Api();
// Loads wikihez.citoid if it isn't already loaded, from Wikihez's testing page (MediaWiki: isn't editable
// right now) -- self-contained rather than calling wikihez.citoidHelper.ensure() directly, since that
// function only exists once citoid-helper.js has already run once, which isn't guaranteed here.
function ensureCitoid() {
if (window.wikihez && window.wikihez.citoid) {
return $.Deferred().resolve().promise();
}
var url = mw.util.getUrl("Bikarhêner:Wikihez/skrîpt/js/Gadget-citoid-helper.js", {
action: "raw",
ctype: "text/javascript"
});
return mw.loader.getScript(mw.config.get("wgServer") + url);
}
// Language display name, read from the matching section's .besazimani link text.
function languageNameForCode(code) {
var $mark = $(".besazimani[id='" + code + "']").first();
return $mark.length ? $mark.text().trim() : null;
}
// Whether the page title itself (accented Kurdish Latin letters included) is written in Latin script.
var pageTitleIsLatin = !/[^\x00-\x7FÀ-ɏḀ-ỿ‘’]/.test(mw.config.get("wgTitle") || "");
// .example/.benimune = old Şablon:jêder hidden marker; .h-usage-example/.h-quotation = Modul:usex containers used directly by Şablon:nimûne; .citation-whole = Modul:quote's own wrapper, now used by jêder-* templates (Modul:quote nests .h-quotation inside .citation-whole > dl > dd instead of putting it directly under the <li>, so it needs its own entry here).
// Requiring "ul > li >" is what makes this only match an example that's grouped into its own <ul> -- a
// {{nimûne}} (or its "mk" redirect) with no jêder-family citation alongside it in the same definition
// renders straight under the definition's own content instead, with no such group; also reused below to
// tell whether the second pass still needs to handle a given definition.
var EXISTING_EXAMPLE_SELECTOR = "ul > li > .example, ul > li > .benimune, ul > li > .h-usage-example, ul > li > .h-quotation, ul > li > .citation-whole";
$(EXISTING_EXAMPLE_SELECTOR).each(function() {
var $element = $(this);
var $item = $element.parent();
if (!$item.next().length) {
// Get example’s language
// bdi[lang] = old hidden marker; .e-example[lang]/.e-quotation[lang] = Modul:usex/Modul:quote already put lang on the visible span.
// A jêder-* citation with no jêgirtin= (quotation text) yet renders no h-quotation/e-quotation at all
// (see get_quote() in Modul quote.lua) -- exactly the "bare citation" case this button exists to fill
// in, so this can't just crash: without the guard, [0] is undefined here and ".lang" throws, which
// (since $.each() has no try/catch) silently kills the button for every remaining match on the page.
var $langEl = $item.find(".e-example[lang], .e-quotation[lang], bdi[lang]")[0];
if (!$langEl) {
console.warn("Gadget-wikt.add-examples: nikaribe zimanê vê nimûneyê bibîne, valakirî hate derbaskirin.", $item);
return;
}
var language = $langEl.lang;
if (language === "ku-Latn") {
language = "ku";
}
console.log('Language:', language);
// Get section and indices of associated definition
var definitionLevel = [];
var $definitionItem = $item.parent().parent();
var $topItem;
do {
// Skip MediaWiki's empty <li class="mw-empty-elt"> placeholders so indices match the real "#" lines in wikitext (see submit()).
definitionLevel.splice(0, 0, $definitionItem.prevAll("li:not(.mw-empty-elt)").length);
$topItem = $definitionItem;
$definitionItem = $definitionItem.parent().parent();
} while ($definitionItem.prop("tagName") === "LI");
var $section = $($topItem.parent().prevAll(".mw-heading3, h3").get(0));
if ($section.length) {
definitionLevel.splice(0, 0, $section.find("h3").attr("id"));
} else {
console.warn("Gadget-wikt.add-examples: Section heading not found");
// TODO: why does this happen? mw.notify("Beş nehat dîtin. Jkx li WF:Dîwanê vê problemê ragihînin!");
return;
}
// Remove default edit link if present
var $defaultEditLink = $item.find("span.example > span.stubedit");
if ($defaultEditLink.length) {
$defaultEditLink.remove();
}
// Add a nice button to open the form. $group is the citation-group <ul> itself (parent of $item);
// the form panel is inserted AFTER it (see click handler below), not inside it, so the panel isn't
// squeezed into that <ul>'s narrow hanging-indent width on mobile -- only the button/title stays
// there, matching the "Form redesign for Kurdish example" mockup (title inside the bullet list,
// full-width panel below it).
var $group = $item.parent();
var $formItem = $("<li>");
var $button = $("<a href='#'>Nimûneyeke bikaranînê lê zêde bike</a>");
$button.css("color", "var( --color-subtle, #777777 )");
// Shown in the button's place once the form is open (see Form#setVisible).
var $title = $("<span class='add-example-form-title'></span>").hide();
$formItem.append($button).append($title);
$button.on("click", function() {
if (!$button.form) {
$title.text("Nimûneyeke bi " + (languageNameForCode(language) || "zimanekî nenas").toLowerCase() + " lê zêde dikî.");
var form = new Form($item, $button, $title, language, definitionLevel);
$group.after(form.$element);
}
$button.form.setVisible(true);
return false;
});
$item.after($formItem);
}
});
// Second pass: some definitions have no example the pass above could react to at all -- either genuinely
// zero examples, or one rendered via {{nimûne}} (or its "mk" redirect) with no jêder-family citation next
// to it, which (see the comment on EXISTING_EXAMPLE_SELECTOR above) renders with no "ul > li" group to
// match. This walks every recognized POS section's own definitions list directly instead of reacting to
// an existing example, and reads the language off the language section's own <h2> rather than off an
// example -- so it doesn't need one to already exist. Everything else (Form, submit()) is reused as-is.
// MediaWiki wraps each heading in a "mw-heading2"/"mw-heading3"/... div in current skin output; falls
// back to the bare heading element for older/other output that doesn't wrap it.
function headingOuter($h) {
var $wrap = $h.closest(".mw-heading2, .mw-heading3, .mw-heading4, .mw-heading5, .mw-heading6");
return $wrap.length ? $wrap : $h;
}
// Section's language code: nearest preceding .besazimani[id] by document order (not sibling-walking, which mobile's per-section wrapping breaks).
function languageCodeForOl($ol) {
var $marks = $(".besazimani[id]").add($ol);
var ol = $ol.get(0);
var idx = $marks.index(ol);
for (var i = idx - 1; i >= 0; i--) {
var el = $marks.get(i);
if (el.id) {
return el.id;
}
}
return null;
}
// A <li> whose OWN direct content (not counting a nested <ol>) is wrapped in ".form-of-definition" is
// MediaWiki's "form of" template system marking that content as generated by a template -- e.g.
// {{ku-tewîna-nav}}'s "Formeke heval:" wrapper together with its "rewşa îzafeyî"/"rewşa çemandî"/...
// readings underneath. That whole nested block is normally the ENTIRE expansion of a single "#"
// wikitext line, with no separate "##" line behind any individual reading -- recursing into it would
// hand out one button per reading, each trying to match a "##" line that doesn't exist, and submit()
// would fail to find where to insert every one of them. A <li> without that class whose nested <ol>
// holds real hand-typed prose (e.g. sîno-koreyî/Navdêr's two genuinely separate "##" sub-senses) has
// no such problem -- those really are individually addressable wikitext lines.
function isFormOfWrapper($li) {
return $li.children(".form-of-definition").length > 0;
}
// Recurse into a <li>'s own nested <ol> UNLESS it's a form-of-template wrapper (see isFormOfWrapper) --
// a wrapper <li> with its own nested <ol> isn't itself a sense with content of its own, only its real
// (non-generated) leaves are.
function eachLeafDefinition($ol, fn) {
$ol.children("li").each(function() {
var $li = $(this);
var $childOl = $li.children("ol");
if ($childOl.length && !isFormOfWrapper($li)) {
$childOl.each(function() {
eachLeafDefinition($(this), fn);
});
} else {
fn($li);
}
});
}
$("h3").each(function() {
var sectionType = $(this).text().trim();
if (!sectionNames[sectionType]) {
return; // not a recognized word-sense section (Bilêvkirin, Etîmolojî, Çavkanî, ...)
}
var h3Id = $(this).attr("id");
// Forward-walk siblings to the definitions <ol>, skipping over a declension table/TemplateStyles/the
// headword line; stop (nothing to attach to in this section) if another heading comes first instead.
var $ol = null;
for (var $cursor = headingOuter($(this)).next(); $cursor.length; $cursor = $cursor.next()) {
if ($cursor.is("ol")) {
$ol = $cursor;
break;
}
if ($cursor.is(".mw-heading2, .mw-heading3, .mw-heading4, .mw-heading5, .mw-heading6, h2, h3, h4, h5, h6")) {
break;
}
}
if (!$ol) {
return;
}
var language = languageCodeForOl($ol);
if (!language) {
console.warn("Gadget-wikt.add-examples: nikaribe koda zimanê vê beşê bibîne.", $ol);
return;
}
eachLeafDefinition($ol, function($li) {
// The pass above already added a button here (or will) -- an actual example already wrapped in
// its own "ul > li" group.
if ($li.find(EXISTING_EXAMPLE_SELECTOR).length) {
return;
}
var definitionLevel = [];
var $definitionItem = $li;
while ($definitionItem.prop("tagName") === "LI") {
// Skip MediaWiki's empty <li class="mw-empty-elt"> placeholders so indices match the real "#" lines in wikitext (see submit()).
definitionLevel.splice(0, 0, $definitionItem.prevAll("li:not(.mw-empty-elt)").length);
$definitionItem = $definitionItem.parent().parent();
}
definitionLevel.splice(0, 0, h3Id);
// A hidden, empty placeholder <li> so submit()'s existing "_$lastExample.after(newLi)" insertion
// (unchanged, same as the pass above) lands the first submitted example right before the button
// -- matching the existing convention of new examples going in before the button, not after it.
var $placeholder = $("<li style='display:none'></li>");
var $formItem = $("<li>");
var $button = $("<a href='#'>Nimûneyeke bikaranînê lê zêde bike</a>");
$button.css("color", "var( --color-subtle, #777777 )");
// Shown in the button's place once the form is open (see Form#setVisible).
var $title = $("<span class='add-example-form-title'></span>").hide();
$formItem.append($button).append($title);
// A "ul" nested directly under a definition "li" starts hidden here (see the HQToggle-controlled
// jêder-citation-group "ul", which only ever renders with an explicit "style="display: block""
// set on it) -- this one has no HQToggle to unhide it, so it needs the same explicit override or
// the button (and the placeholder above) never becomes visible at all.
var $ul = $("<ul>").css("display", "block").append($placeholder).append($formItem);
// The form panel is inserted AFTER $ul (not inside it) once opened -- same reasoning as the first
// pass above: keeps the full-width panel out of the tight bulleted-list indentation on mobile.
$button.on("click", function() {
if (!$button.form) {
$title.text("Nimûneyeke bi " + (languageNameForCode(language) || "zimanekî nenas").toLowerCase() + " lê zêde dikî.");
var form = new Form($placeholder, $button, $title, language, definitionLevel);
$ul.after(form.$element);
}
$button.form.setVisible(true);
return false;
});
$li.append($ul);
});
});
// Pulls the form panel flush with the page's own left/right edges, undoing whatever nested-list indent it inherited from sitting inside a deeply-nested definition.
function alignFormToPage($form) {
var $container = $form.closest(".mw-parser-output");
if (!$container.length) {
return;
}
var pad = parseFloat(window.getComputedStyle($container[0]).paddingLeft) || 0;
var containerLeft = $container.offset().left + pad;
var indent = $form.offset().left - containerLeft;
$form.css({
marginLeft: indent > 0 ? -indent : 0,
width: $container.width() + "px"
});
}
// Constructor for the edit form; lastExample/button/title/language/definitionLevel identify where the form attaches and what it edits.
function Form($lastExample, $button, $title, language, definitionLevel) {
var self = this;
this._language = language;
this._definitionLevel = definitionLevel;
this._$lastExample = $lastExample;
this._$button = $button;
this._$button.form = this;
this._$title = $title;
this._currentJederKey = "";
this._jederFieldWidgets = {};
this._textInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var textInputLayout = new OO.ui.FieldLayout(this._textInput, {
label: "Metna nimûneyê",
align: "top",
});
// Shown under the text box (see boldenPageTitle) when the page title can't be found in the example text
// as typed, so it won't get bolded; purely informational, doesn't block submitting.
this._titleBoldHint = $("<span class='add-example-title-bold-hint'></span>").hide();
this._updateTitleBoldHint = function() {
var text = self._textInput.getValue().trim();
var title = mw.config.get("wgTitle");
var show = !!text && !boldenPageTitle(text, title).bolded;
self._titleBoldHint.toggle(show).text(show ? "Sermade (" + title + ") nehat dîtin; dê neyê qelewkirin." : "");
};
this._textInput.on("change", function(value) {
self._applyButton.setDisabled(!value);
self._updateReadyHint();
self._updateTitleBoldHint();
});
watchForLinebreaks(this._textInput);
// Source type dropdown: free text, a jêder-* template, or "citoid" (a pseudo key, not in jederDefs) meaning "not yet detected" — the default, switched automatically once a Citoid fetch succeeds (see _fillFromCitoid).
var sourceTypeMenuItems = [
new OO.ui.MenuOptionWidget({ data: "citoid", label: "Bi Citoidê otomatîk zêde bike" }),
new OO.ui.MenuOptionWidget({ data: "", label: "Bi destê xwe binivîsim" }),
];
for (var jederKey in jederDefs) {
if (jederDefs.hasOwnProperty(jederKey)) {
sourceTypeMenuItems.push(new OO.ui.MenuOptionWidget({
data: jederKey,
label: jederDefs[jederKey].label,
}));
}
}
this._sourceTypeDropdown = new OO.ui.DropdownWidget({
menu: { items: sourceTypeMenuItems },
label: "Bi Citoidê otomatîk zêde bike",
});
var sourceTypeLayout = new OO.ui.FieldLayout(this._sourceTypeDropdown, {
label: "Şablona çavkaniyê",
align: "top",
});
this._sourceTypeDropdown.getMenu().on("choose", function(menuOption) {
self._setSourceType(menuOption.getData());
});
this._sourceInput = new OO.ui.MultilineTextInputWidget();
this._sourceInput.on("change", function() {
self._updateReadyHint();
});
this._sourceInputLayout = new OO.ui.FieldLayout(this._sourceInput, {
label: "Çavkaniya nimûneyê",
align: "top",
});
// Always visible in every mode (free text included) — submit() reads this unconditionally as the "url=" parameter. The Citoid fetch button sits right next to it (not in a separate box) -- see _urlRowWidget below.
this._sourceURLInput = new OO.ui.TextInputWidget({
icon: "link",
placeholder: "https://… an jî DOI/ISBN",
});
this._citoidButton = new OO.ui.ButtonWidget({
label: "Bi otomatîk tijî bike",
icon: "download",
flags: ["progressive"],
title: "Li gorî URL, DOI an ISBNya jorîn, malûmatan ji Citoid tîne û qadên şablona jêder-* otomatîk tijî dike.",
classes: ["add-example-citoid-fetch"],
});
this._citoidButton.on("click", this._fillFromCitoid.bind(this));
this._sourceURLInput.on("change", function() {
self._updateReadyHint();
self._autofillVideoTimestamp();
});
// URL input + inline "auto-fill" button as one row (replaces the old separate framed Citoid box's
// button row) -- a plain OO.ui.Widget used purely as a flex-row container (same pattern as
// _loadingImage below: build it empty, then manually append its children's $elements). Disabling
// during submit() still goes through the individual _sourceURLInput/_citoidButton references, not
// through this wrapper.
this._urlRowWidget = new OO.ui.Widget({ classes: ["add-example-url-row"] });
this._urlRowWidget.$element.append(this._sourceURLInput.$element, this._citoidButton.$element);
this._sourceURLInputLayout = new OO.ui.FieldLayout(this._urlRowWidget, {
label: "Lînk, DOI an ISBNya çavkaniyê",
align: "top",
help: "Li qutiyê URL, DOI an ISBN binivîse û pê lê bike butona 'Bi otomatîk tijî bike' da ku otomatîk çavkanî were dagirtin.",
helpInline: true,
});
// Matches the wording just constructed above, so the initial _setSourceType("citoid") call at the end of this constructor doesn't needlessly recreate an identical layout.
this._urlFieldIsFreeTextWording = false;
// Shown right after a successful Citoid fetch (see _fillFromCitoid); hidden again on clear.
this._citoidSuccessMsg = $("<span class='add-example-citoid-success'>✓ Malûmat hatin dagirtin — li jêr kontrol bike.</span>").hide();
// Clears the URL field and any filled jêder-* fields without touching the example text/translation.
this._citoidClearButton = new OO.ui.ButtonWidget({
label: "Vala bike",
icon: "trash",
framed: false,
title: "Lînkê û qadên jêder-* yên vê beşê vala bike",
classes: ["add-example-citoid-clear"],
});
this._citoidClearButton.on("click", function() {
self._sourceURLInput.setValue("");
self._citoidSuccessMsg.hide();
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setValue("");
});
});
// Plain div (not OO.ui.FieldsetLayout) so the grid CSS class applies directly to the field items.
this._jederFieldsFieldset = $("<div class='add-example-jeder-fields'>");
// "Malûmatên çavkaniyê" header (+ the "Vala bike" clear button) sitting right above the fields grid,
// replacing the old framed "Ji Citoid an bi destan tijî bike:" box -- like this only makes sense once
// a real jêder-* template is active (there's nothing here to show for the "citoid: not yet detected"
// placeholder or for free text), so the whole section toggles together in _setSourceType().
this._jederSection = $("<div class='add-example-jeder-section'>").append(
$("<div class='add-example-jeder-header'>")
.append($("<span class='add-example-jeder-header-label'>Malûmatên çavkaniyê</span>"))
.append(this._citoidClearButton.$element),
this._jederFieldsFieldset
);
this._translationInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var translationInputLayout = new OO.ui.FieldLayout(this._translationInput, {
label: "Tercimeya kurmancî ya nimûneyê",
align: "top",
});
watchForLinebreaks(this._translationInput);
this._transcriptionInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var transcriptionInputLayout = new OO.ui.FieldLayout(this._transcriptionInput, {
label: "Translîterasyona nimûneyê",
align: "top",
help: "Tenê lê zêde bike eger metna di nimûneyê de bi alfabeya latînî nehatibe nivîsandin.",
helpInline: true,
});
watchForLinebreaks(this._transcriptionInput);
this._applyButton = new OO.ui.ButtonWidget({
label: "Biweşîne",
icon: "check",
title: "Nimûneyê ji bo vê tarîfê nimûneyê lê zêde bike",
flags: ["progressive", "primary"],
disabled: true,
});
this._applyButton.on("click", this.submit.bind(this));
// Reactive "ready to submit" hint next to Biweşîne: no text yet, text but no source (still submittable
// as a bare {{nimûne}}), or fully ready -- kept in sync by _updateReadyHint(), wired to every field below.
this._readyHint = $("<span class='add-example-ready-hint'></span>").text("Metna nimûneyê lazim e.");
// True while a Citoid-eligible URL/DOI/ISBN is typed in but not yet fetched (or fetched then edited away) and no jêder field has been filled by hand -- the "looks done but isn't" trap this exists to catch. Not applicable in free-text mode, where the fetch button isn't even offered.
this._citoidPending = function() {
return self._currentJederKey !== "" &&
!!self._sourceURLInput.getValue().trim() &&
!self._citoidSuccessMsg.is(":visible") &&
!Object.keys(self._jederFieldWidgets).some(function(key) {
return self._jederFieldWidgets[key].getValue().trim();
});
};
this._updateReadyHint = function() {
if (!self._textInput.getValue()) {
self._readyHint.text("Metna nimûneyê lazim e.");
return;
}
if (self._citoidPending()) {
self._readyHint.text("Pêşî 'Bi otomatîk tijî bike' bitikîne.");
return;
}
var hasSource = self._sourceInput.getValue().trim() || self._sourceURLInput.getValue().trim() ||
Object.keys(self._jederFieldWidgets).some(function(key) {
return self._jederFieldWidgets[key].getValue().trim();
});
self._readyHint.text(hasSource ? "Hazir e." : "Çavkanî nehatiye dayîn.");
};
// Prefills the Dem field from the typed URL's own "t=" (see wikihez.citoid.extractVideoTimestamp) once jêder-vîdeo is active -- never overwrites a value the user already entered by hand.
this._autofillVideoTimestamp = function() {
var demWidget = self._jederFieldWidgets.dem;
if (self._currentJederKey !== "jêder-vîdeo" || !demWidget || demWidget.getValue().trim()) {
return;
}
ensureCitoid().then(function() {
var dem = wikihez.citoid.extractVideoTimestamp(self._sourceURLInput.getValue().trim());
if (dem && !demWidget.getValue().trim()) {
demWidget.setValue(dem);
}
});
};
// framed:false (+ the "destructive" flag for the red text/hover) matches the mockup's borderless
// "Betal bike" -- a plain colored link rather than a boxed button, distinguishing it from Paqij bike.
this._cancelButton = new OO.ui.ButtonWidget({
label: "Betal bike",
icon: "close",
title: "Formê bigire",
flags: ["destructive"],
framed: false,
});
this._cancelButton.on("click", function() {
self.setVisible(false);
});
this._clearButton = new OO.ui.ButtonWidget({
label: "Paqij bike",
icon: "trash",
title: "Hemû qadan vala bike û pêşnûyisên hilanîbûyî jê bibe",
});
this._clearButton.on("click", function() {
self.clear();
self._clearDraft();
});
// Native CSS spinner (see Gadget-wikt.add-examples.css) instead of an external Commons GIF, so there's no network request and it matches dark/light mode.
this._loadingImage = new OO.ui.Widget({
classes: ["add-example-loading"],
});
this._loadingImage.$element.append($('<span class="add-example-spinner" aria-hidden="true"></span>'));
this._loadingImage.toggle(false);
// Two-column top section (see "Form redesign for Kurdish example/Nimûne zêde bike.dc.html"): example
// text (+ translation/transliteration for non-ku, right after it, not after the source fields) on the
// left; source-type + link/Citoid on the right. Built as plain <div>s, not an OOUI layout -- OOUI has
// no CSS-grid container -- so .add-example-top-grid in the CSS can lay them out as a real responsive
// 7fr/5fr grid (collapsing to one column on narrow screens).
var $topLeft = $("<div class='add-example-top-col'>").append(textInputLayout.$element, this._titleBoldHint);
if (language !== "ku") {
$topLeft.append(translationInputLayout.$element);
}
if (!pageTitleIsLatin) {
$topLeft.append(transcriptionInputLayout.$element);
}
var $topRight = $("<div class='add-example-top-col'>").append(
sourceTypeLayout.$element,
this._sourceInputLayout.$element,
this._sourceURLInputLayout.$element,
this._citoidSuccessMsg
);
var $topGrid = $("<div class='add-example-top-grid'>").append($topLeft, $topRight);
// Saved on the instance (not just a local var) so _setSourceType() can swap the URL field's label/help
// wording in and out of it when switching to/from free text (see the FieldLayout replaceWith() there).
this._fieldsLayout = $("<div class='add-example-fieldset'>").append($topGrid, this._jederSection);
// Bottom action row -- order/spacing matches the mockup: Biweşîne (+ spinner + ready hint), a spacer
// pushing the rest right, then Paqij bike (bordered/subtle) and Betal bike (borderless red text, via
// framed:false above). A plain flex <div>, not an OOUI HorizontalLayout, so the raw hint/spacer
// elements can sit alongside the real button widgets (same reasoning as the top grid above).
var $buttonsRow = $("<div class='add-example-main-buttons'>").append(
this._applyButton.$element,
this._loadingImage.$element,
this._readyHint,
$("<span class='add-example-buttons-spacer'></span>"),
this._clearButton.$element,
this._cancelButton.$element
);
this._frame = new OO.ui.PanelLayout({
id: "add-example-definition-{0}-form".format(this._definitionLevel.join("-")),
classes: ["add-example-form"],
expanded: false,
});
this._frame.$element.append(this._fieldsLayout, $buttonsRow);
// Default to "citoid" mode; selectItemByData() doesn't fire "choose" (that only fires for interactive selection), so _setSourceType() must also be called explicitly to set up the initial UI.
this._sourceTypeDropdown.getMenu().selectItemByData("citoid");
this._setSourceType("citoid");
}
Form.prototype = {
// Returns the jQuery object for this form.
get $element() {
return this._frame.$element;
},
// Switches the source section between free text, Citoid auto-detect (no template chosen yet), and a specific jêder-* template, rebuilding the field list to match. The URL field itself is always visible in every mode (see the constructor); only the free-text textarea, the Citoid fetch button, and the "Malûmatên çavkaniyê" fields section toggle here.
_setSourceType: function(jederKey) {
var self = this;
this._currentJederKey = jederKey;
this._jederFieldsFieldset.empty();
this._jederFieldWidgets = {};
var isRealJederKey = jederKey && jederDefs[jederKey];
if (isRealJederKey) {
var def = jederDefs[jederKey];
def.fields.forEach(function(field) {
var widget = field.multiline
? new OO.ui.MultilineTextInputWidget({ rows: 2, autosize: false })
: new OO.ui.TextInputWidget();
self._jederFieldWidgets[field.key] = widget;
widget.on("change", function() {
self._updateReadyHint();
});
var layout = new OO.ui.FieldLayout(widget, {
label: field.label,
align: "top",
classes: ["add-example-field-span-" + (field.span || 4)],
});
self._jederFieldsFieldset.append(layout.$element);
});
}
// "Malûmatên çavkaniyê" header + fields grid: only once a real template is chosen/detected --
// nothing to show yet for the plain "citoid: not yet detected" placeholder or for free text.
this._jederSection.toggle(!!isRealJederKey);
// Free text textarea only for "" (free text); hidden for "citoid" and any real jêder-* key.
this._sourceInputLayout.toggle(jederKey === "");
// Citoid fetch button: hidden for free text (nothing there for it to fill in), shown for "citoid" auto-detect and any real jêder-* key. The URL input itself next to it stays visible in every mode.
this._citoidButton.toggle(jederKey !== "");
// URL field wording: plain "attach a link" phrasing for free text, Citoid-oriented phrasing otherwise. Only recreated when actually crossing that boundary, not on every dropdown change (e.g. switching between two jêder-* types keeps the same wording, no need to touch the DOM).
var isFreeText = jederKey === "";
if (this._urlFieldIsFreeTextWording !== isFreeText) {
this._urlFieldIsFreeTextWording = isFreeText;
this._sourceURLInput.setPlaceholder(isFreeText ? "URLyeke wekî https://…" : "URLyek wekî https://… an jî DOI/ISBN");
var $oldLayout = this._sourceURLInputLayout.$element;
// Re-wraps the SAME _urlRowWidget (still holding _sourceURLInput + _citoidButton) in a new
// FieldLayout with the new label/help; the widget's $element moves along with it, same as the
// old addItems()/removeItems() swap did for the plain input before this redesign.
this._sourceURLInputLayout = new OO.ui.FieldLayout(this._urlRowWidget, isFreeText ? {
label: "Adresa webê ya nimûneyê",
align: "top",
help: "Tenê binivîse eger lînk jixwe di referansa çavkaniyê de tinebe.",
helpInline: true,
} : {
label: "Lînk, DOI an ISBNya çavkaniyê",
align: "top",
help: "Ev dibe lînka çavkaniyê (url=). Ji bo şablonên jêder-*, dikare bi Citoid an bi destan jî bên dagirtin.",
helpInline: true,
});
$oldLayout.replaceWith(this._sourceURLInputLayout.$element);
}
this._autofillVideoTimestamp();
this._updateReadyHint();
},
// Fetches data via wikihez.citoid (loaded on demand by ensureCitoid() if needed), picks the matching jêder-* template, and fills its empty fields.
_fillFromCitoid: function() {
var self = this;
var query = this._sourceURLInput.getValue().trim();
if (!query) {
mw.notify("Ji kerema xwe re pêşî URL, DOI an ISBNyekê binivîse.");
return;
}
this._citoidButton.setDisabled(true);
this._loadingImage.toggle(true);
ensureCitoid().then(function() {
return wikihez.citoid.fetchJederFields(query);
}).then(function(result) {
// Only let Citoid pick the template type when nothing's been chosen yet (the "citoid" auto-detect default). If the user already selected a specific jêder-* type (or free text), that choice is respected — e.g. picking "Websîte" and fetching a tweet must not silently switch to "Kovar" just because Citoid guessed differently.
var wasAutoDetect = self._currentJederKey === "citoid";
if (wasAutoDetect) {
var menu = self._sourceTypeDropdown.getMenu();
var item = menu.findItemFromData(result.jederKey);
if (item) {
menu.chooseItem(item); // this calls _setSourceType(jederKey) automatically
}
}
var targetJederKey = self._currentJederKey;
// Fields Citoid returned were shaped for its own detected type; if the active template differs (the case above where the user's choice was kept), re-derive fields for that template instead so e.g. "Websîte" still gets its own website-shaped fields (websîte, tarîx, ...) rather than leftover kovar-shaped ones.
var fields = targetJederKey === result.jederKey ? result.fields : wikihez.citoid.dataToJederFields(targetJederKey, result.raw, query);
Object.keys(fields).forEach(function(key) {
var widget = self._jederFieldWidgets[key];
if (widget && !widget.getValue()) {
widget.setValue(fields[key]);
}
});
self._citoidSuccessMsg.show();
self._updateReadyHint();
mw.notify("Malûmat ji Citoid hatin barkirin.");
}, function(errorMsg) {
// wikihez.citoid may still be missing here if ensureCitoid() itself failed to load the script (e.g. network error) -- fall back to the bare error notice in that case.
if (!window.wikihez || !window.wikihez.citoid) {
mw.notify("Nekarî citoid-helper.js bar bike.");
return;
}
// Citoid can't fetch some sites at all (e.g. x.com/twitter.com) -- fall back to jêder-websîte with a website name guessed from the URL itself, rather than just a bare error.
var fallbackSite = wikihez.citoid.websiteNameForUrl(query);
if (fallbackSite) {
if (self._currentJederKey !== "jêder-websîte") {
var menu = self._sourceTypeDropdown.getMenu();
var item = menu.findItemFromData("jêder-websîte");
if (item) {
menu.chooseItem(item); // this calls _setSourceType("jêder-websîte") automatically
}
}
var websiteWidget = self._jederFieldWidgets["websîte"];
if (websiteWidget && !websiteWidget.getValue()) {
websiteWidget.setValue(fallbackSite);
}
mw.notify("Citoid nikare vê malperê bixwîne; şablona Websîte hate hilbijartin, ji kerema xwe mayî bi destan tijî bike.");
return;
}
mw.notify(typeof errorMsg === "string" ? errorMsg : "Nekarî malûmatan ji Citoid bistîne. Kontrol bike ka URL/DOI/ISBN rast e.");
}).always(function() {
self._citoidButton.setDisabled(false);
self._loadingImage.toggle(false);
});
},
// Toggles the visibility of this form and restores any saved draft when shown. The title text takes
// the button's place while open (see the "Form redesign for Kurdish example" mockup); the button
// itself stays put ready to reappear once the form is cancelled/closed.
setVisible: function(visible) {
this._$button.toggle(!visible);
this._$title.toggle(visible);
this._frame.toggle(visible);
if (visible) {
alignFormToPage(this._frame.$element);
var draft = draftStorage.Get() || {};
if (!this._textInput.getValue() && draft.text) {
this._textInput.setValue(draft.text);
}
if (!this._sourceInput.getValue() && draft.source) {
this._sourceInput.setValue(draft.source);
}
if (!this._sourceURLInput.getValue() && draft.sourceURL) {
this._sourceURLInput.setValue(draft.sourceURL);
}
if (!this._translationInput.getValue() && draft.translation) {
this._translationInput.setValue(draft.translation);
}
if (!this._transcriptionInput.getValue() && draft.transcription) {
this._transcriptionInput.setValue(draft.transcription);
}
}
},
// Removes any saved draft (localStorage/cookie via MediaWiki:Gadget-StorageUtils.js) so it can't resurface on other pages.
_clearDraft: function() {
draftStorage.Set({});
},
// Clears all fields in this form.
clear: function() {
this._textInput.setValue("");
this._sourceInput.setValue("");
this._sourceURLInput.setValue("");
this._translationInput.setValue("");
this._transcriptionInput.setValue("");
this._citoidSuccessMsg.hide();
this._sourceTypeDropdown.getMenu().selectItemByData("citoid");
this._setSourceType("citoid");
},
// Warns before submitting if a Citoid URL/DOI/ISBN was typed but never successfully fetched, then defers
// to _doSubmit. The title-not-boldable case (see boldenPageTitle) is shown inline under the text box
// instead (_titleBoldHint) rather than blocking submission here.
submit: function() {
if (this._citoidPending() && !window.confirm("Te lînk, DOI an ISBN nivîsand lê hîn jê malûmat nehatine standin. Bêyî wan berdewam bikî?")) {
return;
}
this._doSubmit();
},
// Generates and submits the wikicode, then inserts the resulting HTML element if no errors occurred.
_doSubmit: function() {
var self = this;
self._textInput.setDisabled(true);
self._sourceInput.setDisabled(true);
self._sourceURLInput.setDisabled(true);
self._translationInput.setDisabled(true);
self._transcriptionInput.setDisabled(true);
self._sourceTypeDropdown.setDisabled(true);
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setDisabled(true);
});
// self._disableTranslationChk.setDisabled(true);
this._applyButton.setDisabled(true);
this._clearButton.setDisabled(true);
this._loadingImage.toggle(true);
var source = this._sourceInput.getValue().trim();
var sourceURL = this._sourceURLInput.getValue().trim();
var text = this._textInput.getValue().trim();
// If a jêder-* template is selected, collect its filled-in fields.
var jederParams = [];
if (this._currentJederKey && jederDefs[this._currentJederKey]) {
jederDefs[this._currentJederKey].fields.forEach(function(field) {
var widget = self._jederFieldWidgets[field.key];
var value = widget ? widget.getValue().trim() : "";
if (value) {
jederParams.push(field.key + "=" + value);
}
});
}
var usingJederTemplate = this._currentJederKey && jederParams.length > 0;
var minakAnNa, sablon;
if (usingJederTemplate) {
// The jêder-* template itself is used as the template, not as the "2=" content.
minakAnNa = "*";
sablon = this._currentJederKey;
} else if (source || sourceURL) {
minakAnNa = "*";
sablon = "jêder";
} else {
minakAnNa = ":";
sablon = "nimûne";
}
var listMarker = "".padStart(this._definitionLevel.length - 1, "#") + minakAnNa;
var title = mw.config.get('wgTitle');
// jêder-* template, jêder, or nimûne
var code = listMarker + " {{" + sablon;
// 1= language code
code += "|" + this._language;
if (usingJederTemplate) {
// Fields of the selected jêder-* template, passed straight through as its parameters.
jederParams.forEach(function(param) {
code += "|" + param;
});
} else {
// 2= source (free text)
if (source) {
code += "|2=" + source;
}
if (sourceURL) {
code += "|url=" + sourceURL;
}
}
// jêgirtin/nimûne (quotation text)
code += "|";
if (sablon !== "nimûne") {
code += "jêgirtin=";
}
// bold the page title (see boldenPageTitle), then convert any literal linebreak in the example text to <br> (see nlToBr) so it can't break the single-line "#*" wikitext
code += nlToBr(boldenPageTitle(text, title).text);
if (this._language !== "ku") {
var translation = nlToBr(this._translationInput.getValue().trim());
if (translation) {
code += "|tercime=" + translation;
}
}
var transcription = nlToBr(this._transcriptionInput.getValue().trim());
if (transcription) {
code += "|tr=" + transcription;
}
code += "}}";
// var escapedLangCode = languages[this._language].charAt(0).toUpperCase() + languages[this._language].slice(1);
// console.log("escapedLangCode: ", escapedLangCode);
var sectionIDPattern = new RegExp("^([\\wîêçş_]+?)_?(\\d+)?_?(\\d+)?$");
console.log("this._definitionLevel[0]: ", this._definitionLevel[0]);
var matchSectionID = sectionIDPattern.exec(this._definitionLevel[0]);
//var isInflection;
var sectionType = matchSectionID[1].replace(/_/, ' ');
sectionType = sectionType.replace(/_\d+$/, '');
console.log("sectionType: ", sectionType);
var sectionNum = matchSectionID[2] ? parseInt(matchSectionID[2]) : "";
console.log("Section Number:", sectionNum);
// Insert new example into page’s code
api.get({
action: "query",
titles: mw.config.get("wgPageName"),
prop: "revisions",
rvprop: "content",
rvslots: "main",
}).then(function(data) {
var pageContent;
for (var pageID in data.query.pages) {
if (data.query.pages.hasOwnProperty(pageID)) {
// noinspection JSUnresolvedVariable
pageContent = data.query.pages[pageID].revisions[0].slots.main["*"];
break;
}
}
// Look for correct language section
var langSectionRegex = new RegExp("==[ ]*{{ziman\\|{0}}}[ ]*==".format(self._language));
var langSectionIndex = pageContent.search(langSectionRegex);
console.log("langSectionIndex:", langSectionIndex);
if (langSectionIndex === -1) {
console.log("langSectionIndex === -1");
error("Xeletiyeke bi koda zimanî heye. Koda zimanî:" + self._language);
return;
}
// Look for correct word type section
var lines = pageContent.slice(langSectionIndex).split("\n");
var sectionNamesRegex = Object.keys(sectionNames).join('|');
var sectionRegex = new RegExp('^===[ ]*(' + sectionNamesRegex + ')\\s*(\\d+)?');
var targetLineIndex;
for (targetLineIndex = 0; targetLineIndex < lines.length; targetLineIndex++) {
var line = lines[targetLineIndex];
console.log("line:", line);
var matchSection = sectionRegex.exec(line);
if (matchSection) {
console.log("matchSection:", matchSection[1]);
// Extract section name and number from the matched result
var matchedSectionName = matchSection[1];
var matchedSectionNum = matchSection[2]; // It could be undefined
if (!sectionNames[sectionType]) {
error('Navê beşê xelet e. Di beşên "Ji wêjêyê" û "Ji wêjêya klasîk" ev amûr nayê bikaranîn.');
return; // Exit the function
}
// Check if the matched section name is in the expected list
if (sectionNames[sectionType].includes(matchedSectionName)) {
// Match only the specific numbered section the button was clicked in (e.g. "Navdêr 2",
// not just the first "===Navdêr...===" heading found) -- both sides are "" when the
// section has no number at all (a single unnumbered "===Navdêr===").
var matchedSectionNumValue = matchedSectionNum ? parseInt(matchedSectionNum, 10) : "";
if (matchedSectionNumValue === sectionNum) {
// Add more conditions if needed for inflection, e.g., (isInflection === line.includes("Formeke "))
break;
}
}
}
}
if (targetLineIndex === lines.length) {
console.log("targetLineIndex === lines.length");
error("Di navê beşê de xeletî heye. Îhtimalen bi vî navê beşê çend heb hene.");
return;
}
// Look for correct definition
var defIndex = -1;
var level = 1;
for (; targetLineIndex < lines.length; targetLineIndex++) {
var m = /^(#+)[^*#:]/.exec(lines[targetLineIndex]);
console.log("lines[targetLineIndex]:", lines[targetLineIndex]);
if (m) {
console.log("m:", m);
if (level === m[1].length) {
console.log("m[1]:", m[1]);
defIndex++;
console.log("defIndex:", defIndex);
if (self._definitionLevel[level] === defIndex) {
console.log("self._definitionLevel[level] === defIndex");
console.log("self._definitionLevel[level]", self._definitionLevel[level]);
if (level === self._definitionLevel.length - 1) {
console.log("level:", level);
break;
} else {
level++;
defIndex = -1;
}
}
}
}
}
// Find where to insert within this definition's "#:"/"#*" block: walk lines after the definition (findBlockEnd() tracks multi-line templates), and use exampleTemplateNames to tell real examples from annotations (synonyms, antonyms, alt-forms, etc.) rather than hard-blocking specific names.
var insertionFound = false;
var lastRelevantBlockEnd = -1;
var isJederFamily = (sablon === "jêder" || Object.prototype.hasOwnProperty.call(jederDefs, sablon));
var scanIndex = targetLineIndex + 1;
var emptyTemplate = false;
for (; scanIndex < lines.length; scanIndex++) {
var scanLine = lines[scanIndex];
if (!scanLine.startsWith("#:") && !scanLine.startsWith("#*")) {
// Left this definition's "#:"/"#*" block (e.g. a new definition or section starts).
break;
}
var blockEnd = findBlockEnd(lines, scanIndex);
var templateName = getLineTemplateName(scanLine);
var isExampleLine = templateName !== null &&
exampleTemplateNames.indexOf(templateName) !== -1;
if (isJederFamily) {
// jêder-family examples go after all "#:"/"#*" lines of this definition (both real examples and annotations).
lastRelevantBlockEnd = blockEnd;
insertionFound = true;
} else if (sablon === "nimûne") {
// "nimûne" examples go before any "#*" line, but after "#:" lines.
if (scanLine.startsWith("#*")) {
break;
}
lastRelevantBlockEnd = blockEnd;
insertionFound = true;
}
scanIndex = blockEnd; // Skip past the whole (possibly multi-line) block
}
var insertAt = lastRelevantBlockEnd >= 0 ? lastRelevantBlockEnd + 1 : scanIndex;
if (lastRelevantBlockEnd >= 0) {
emptyTemplate = /#+\*\s*{{[ ]*b?ê?(nimûne|mînak|jêgirtin)\??\s*\|\s*\|?\s*[^|}]+}}/.test(lines[lastRelevantBlockEnd]);
}
if (emptyTemplate) {
console.log("empty Template found", sablon);
// Replace empty template with new example
lines.splice(lastRelevantBlockEnd, 1, code);
} else {
console.log("empty Template not found", sablon);
// Insert the new example (right after the definition if it had no existing "#:"/"#*" lines yet, or after the relevant block otherwise).
lines.splice(insertAt, 0, code);
}
// Submit new page content
api.edit(mw.config.get("wgPageName"), function(_) {
return {
text: pageContent.slice(0, langSectionIndex) + lines.join("\n"),
summary: "+nimûneya bikaranînê bi amûra « {0} » (v{1}).".format(NAME, VERSION),
};
}).then(function() {
api.parse(code).done(function(data) {
var $renderedExample = $(data).find("ul > li").html();
var $item;
// Insert rendered example into page
if (emptyTemplate) {
self._$lastExample.html($renderedExample);
$item = self._$lastExample;
} else {
self._$lastExample.after($item = $("<li>").append($renderedExample));
}
$item.css("background-color", "lightgreen");
setTimeout(function() {
$item.css("background-color", "inherit");
}, 1000);
self._$lastExample = $item;
});
self.setVisible(false);
self.clear();
self._clearDraft();
reenable();
}, function(code, result) {
error("Nekarî rûpelê xilas bike: " + apiErrorMessage(code, result));
});
}, function(code, result) {
error("Nekarî naveroka rûpelê bistîne: " + apiErrorMessage(code, result));
});
function error(errorMessage) {
mw.notify(errorMessage || "Nimûne nehat weşandin, îhtimalen rûpel hate guhartin. Ji kerema xwe re rûpelê dîsa bar bike û dîsa biceribîne.");
draftStorage.Set({
text: self._textInput.getValue(),
source: self._sourceInput.getValue(),
sourceURL: self._sourceURLInput.getValue(),
translation: self._translationInput.getValue(),
transcription: self._transcriptionInput.getValue(),
});
reenable();
}
function reenable() {
self._textInput.setDisabled(false);
self._sourceInput.setDisabled(false);
self._sourceURLInput.setDisabled(false);
self._translationInput.setDisabled(false);
self._transcriptionInput.setDisabled(false);
self._sourceTypeDropdown.setDisabled(false);
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setDisabled(false);
});
// self._disableTranslationChk.setDisabled(false);
self._applyButton.setDisabled(false);
self._cancelButton.setDisabled(false);
self._clearButton.setDisabled(false);
self._loadingImage.toggle(false);
}
},
};
});
// </nowiki>
er9hmr8mnvrrl1kucx3af66axmkpppk
6342685
6342680
2026-08-26T10:57:34Z
Wikihez
7344
6342685
javascript
text/javascript
// <nowiki>
// dependencies (declared in MediaWiki:Gadgets-definition): oojs, oojs-ui, ext.gadget.citoid-helper (wikihez.citoid), ext.gadget.StorageUtils (ObjectStorage)
// Formats a string using {0}, {1}, ... placeholders.
if (!String.prototype.format) {
String.prototype.format = function(var_args) {
var args = arguments;
return this.replace(/{(\d+)}/g, function(match, number) {
return typeof args[number] !== "undefined" ? args[number] : match;
});
};
}
$(function() {
"use strict";
// Skip pages where this gadget shouldn't run.
if (
mw.config.get("wgPageName") !== "Wîkîferheng:ceribandin/nimûne" &&
mw.config.get("wgNamespaceNumber") !== 108 &&
mw.config.get("wgNamespaceNumber") !== 0 ||
mw.config.get("wgPageName") === "Destpêk" ||
mw.config.get("wgArticleId") === 0
) return;
console.log("Gadget-wikt.add-examples.js dest pê dike…");
var NAME = "[[Mediawiki:Gadget-wikt.add-examples|Nimûne zêde bike]]";
var VERSION = "2.0";
// Persists form drafts via MediaWiki:Gadget-StorageUtils.js (localStorage, falling back to a cookie) so unsaved text survives a failed submit.
var draftStorage = new ObjectStorage("add_examples_draft", 1);
// Citoid logic normally lives in MediaWiki:Gadget-citoid-helper.js as a registered gadget dependency; not
// currently editable, so ensureCitoid() (below) loads it from a user testing page on demand instead.
// "span" is the field's width in the 12-column grid the fields render in (see .add-example-jeder-fields
// in the CSS and _setSourceType below) -- field ORDER here is also the grid's reading order.
var jederDefs = {
"jêder-kitêb": {
"label": "Kitêb",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 3 },
{ "key": "terciman", "label": "Terciman", "span": 3 },
{ "key": "amadekar", "label": "Amadekar", "span": 3 },
{ "key": "weşanxane", "label": "Weşanxane", "span": 3 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "cih", "label": "Cih", "span": 2 },
{ "key": "sal", "label": "Sal", "span": 1 },
{ "key": "sala-weşandinê", "label": "Sala weşandinê", "span": 2 },
{ "key": "çap", "label": "Çap", "span": 1 },
{ "key": "rûpel", "label": "Rûpel", "span": 1 },
{ "key": "isbn", "label": "ISBN", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
},
"jêder-kovar": {
"label": "Kovar",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 3 },
{ "key": "terciman", "label": "Terciman", "span": 3 },
{ "key": "amadekar", "label": "Amadekar", "span": 3 },
{ "key": "weşanxane", "label": "Weşanxane", "span": 3 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "kovar", "label": "Kovar", "span": 4 },
{ "key": "cild", "label": "Cild", "span": 2 },
{ "key": "hejmar", "label": "Hejmar", "span": 2 },
{ "key": "sal", "label": "Sal", "span": 2 },
{ "key": "rûpel", "label": "Rûpel", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
},
"jêder-websîte": {
"label": "Websîte",
"fields": [
{ "key": "nivîskar", "label": "Nivîskar", "span": 4 },
{ "key": "terciman", "label": "Terciman", "span": 4 },
{ "key": "websîte", "label": "Websîte", "span": 4 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "url", "label": "URL", "span": 5 },
{ "key": "urlya-arşîvê", "label": "URLya Arşîvê", "span": 5 },
{ "key": "sal", "label": "Sal", "span": 1 },
{ "key": "tarîx", "label": "Tarîx", "span": 1 }
]
},
"jêder-vîdeo": {
"label": "Vîdeo",
"fields": [
{ "key": "hunermend", "label": "Hunermend", "span": 6 },
{ "key": "platform", "label": "Platform", "span": 6 },
{ "key": "sernav", "label": "Sernav", "multiline": true, "span": 12 },
{ "key": "sal", "label": "Sal", "span": 2 },
{ "key": "tarîx", "label": "Tarîx", "span": 3 },
{ "key": "dem", "label": "Dem", "span": 2 },
{ "key": "url", "label": "URL", "span": 12 }
]
}
};
var sectionNames = {
"Navdêr": ["Navdêr"],
"Formeke navdêrê": ["Formeke navdêrê"],
"Lêker": ["Lêker"],
"Formeke lêkerê": ["Formeke lêkerê"],
"Rengdêr": ["Rengdêr"],
"Formeke rengdêrê": ["Formeke rengdêrê"],
"Hoker": ["Hoker"],
"Formeke hokerê": ["Formeke hokerê"],
"Serenav": ["Serenav"],
"Formeke serenavê": ["Formeke serenavê"],
"Artîkel": ["Artîkel"],
"Baneşan": ["Baneşan"],
"Bazinedaçek": ["Bazinedaçek"],
"Biwêj": ["Biwêj"],
"Cînav": ["Cînav"],
"Daçek": ["Daçek"],
"Girêdek": ["Girêdek"],
"Gotineke pêşiyan": ["Gotineke pêşiyan"],
"Hejmar": ["Hejmar"],
"Hevok": ["Hevok"],
"Îfade": ["Îfade"],
"Kurtenav": ["Kurtenav"],
"Navgir": ["Navgir"],
"Paşdaçek": ["Paşdaçek"],
"Paşgir": ["Paşgir"],
"Pêşdaçek": ["Pêşdaçek"],
"Pêşgir": ["Pêşgir"],
"Pirtik": ["Pirtik"],
"Reh": ["Reh"],
"Sembol": ["Sembol"],
"Tîp": ["Tîp"]
};
// Template names treated as "real examples" (an allow-list, not the old deny-list) so annotation templates like synonyms/antonyms/alt-forms aren't mistaken for examples.
var exampleTemplateNames = ["jêder", "nimûne"].concat(Object.keys(jederDefs));
// Returns the template name starting a "#:"/"#*" line (e.g. "jêder" from "#* {{jêder|ku|...}}"), or null if the line doesn't start with a template.
function getLineTemplateName(line) {
var m = /^#[:*]\s*\{\{\s*([^|}]+)/.exec(line);
return m ? m[1].trim() : null;
}
// Returns the index of the line where a (possibly multi-line) template block starting at startIndex closes its {{ }} braces, so multi-line templates are treated as one block.
function findBlockEnd(lines, startIndex) {
var depth = 0;
var i = startIndex;
for (; i < lines.length; i++) {
var opens = (lines[i].match(/\{\{/g) || []).length;
var closes = (lines[i].match(/\}\}/g) || []).length;
depth += opens - closes;
if (depth <= 0) {
break;
}
}
return i;
}
// Ported from start.js: converts literal line breaks typed/pasted into the example/translation/transcription boxes into wikitext <br> tags, since a raw newline would break the single-line "#*" wikitext structure.
function nlToBr(text) {
return text ? text.replace(/\r\n|\r|\n/g, "<br>") : text;
}
// Escapes str for safe interpolation into a RegExp -- page titles can contain regex metacharacters
// (parentheses for disambiguation, periods in abbreviation entries, etc.).
function escapeRegExp(str) {
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
// Wraps the first occurrence of the page title (+ an optional glued-on suffix, e.g. a plural "-an") in the
// example text with wikitext bold markup, so the headword stands out in the rendered example. Skips it if
// the title is already bolded by hand, to avoid turning "'''reh'''" into "'''''reh'''''" (bold+italic).
// Returns {text, bolded}; bolded is false if the title wasn't found anywhere and nothing changed.
function boldenPageTitle(text, title) {
var escapedTitle = escapeRegExp(title);
var suffixPattern = "([^\\s.,;?!()']+)?";
if (new RegExp("'''" + escapedTitle + suffixPattern + "'''", "i").test(text)) {
return { text: text, bolded: true };
}
var bolded = text.replace(new RegExp("(" + escapedTitle + suffixPattern + ")", "ig"), "'''$1'''");
return { text: bolded, bolded: bolded !== text };
}
// Extracts a human-readable message from an mw.Api rejection (code, result).
function apiErrorMessage(code, result) {
return (result && result.error && result.error.info) || (typeof code === "string" ? code : "Xeletiyeke nenas");
}
function escapeHtmlForBackdrop(str) {
return String(str)
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">");
}
// Mirrors a textarea's text with a small marker after each line that's followed by an actual typed/pasted linebreak, rendered into a transparent backdrop behind the textarea (see ensureLinebreakBackdrop()).
function buildLinebreakBackdropHtml(text) {
var lines = text.split(/\r\n|\r|\n/);
return $.map(lines, function(line, i) {
var isLast = i === lines.length - 1;
return escapeHtmlForBackdrop(line) +
(isLast ? "" : "<mark class='add-example-linebreak-mark'>↵</mark>\n");
}).join("");
}
// Copies the metrics that affect where text wraps/lands (font, line height, padding, border) from the real textarea onto its backdrop via computed style, since the backdrop is a plain <div>, not a themed OOUI input.
function syncLinebreakBackdropMetrics(textarea, backdrop) {
var cs = window.getComputedStyle(textarea[0]);
backdrop.css({
"box-sizing": cs.boxSizing,
"padding-top": cs.paddingTop,
"padding-right": cs.paddingRight,
"padding-bottom": cs.paddingBottom,
"padding-left": cs.paddingLeft,
"border-width": cs.borderWidth,
"border-style": "solid",
"font-family": cs.fontFamily,
"font-size": cs.fontSize,
"font-weight": cs.fontWeight,
"line-height": cs.lineHeight,
"letter-spacing": cs.letterSpacing
});
}
// Lazily inserts the transparent backdrop layer used to mark linebreaks, as a sibling of the textarea inside its existing OOUI input wrapper (which OOUI already positions relatively for icon overlays), rather than start.js's approach of wrapping the textarea in a new div — that would risk disturbing OOUI's own layout of the input. Safe to call more than once; the backdrop is cached.
function ensureLinebreakBackdrop(textarea) {
var existing = textarea.data("addExampleLinebreakBackdrop");
if (existing) {
return existing;
}
var $parent = textarea.parent();
if ($parent.css("position") === "static") {
$parent.css("position", "relative");
}
var backdrop = $("<div aria-hidden='true'></div>").addClass("add-example-linebreak-backdrop");
textarea.before(backdrop);
textarea.data("addExampleLinebreakBackdrop", backdrop);
textarea.on("scroll.addExampleLinebreak", function() {
backdrop.scrollTop(textarea.scrollTop()).scrollLeft(textarea.scrollLeft());
});
return backdrop;
}
// Flags a textarea (via CSS class, for the border tint + tooltip) while it contains a typed/pasted linebreak, so the user notices before it's silently turned into <br> on submit; marks only the exact point of the break via the mirrored backdrop.
function highlightLinebreak(el) {
var textarea = $(el);
var text = textarea.val();
var hasBreak = /\r|\n/.test(text);
textarea
.toggleClass("add-example-has-linebreak", hasBreak)
.attr("title", hasBreak ? "Xeta nû dê wek <br> bê nivîsandin" : "");
if (!hasBreak) {
var cached = textarea.data("addExampleLinebreakBackdrop");
if (cached) {
cached.hide();
}
textarea.removeClass("add-example-has-linebreak-source");
return;
}
var backdrop = ensureLinebreakBackdrop(textarea);
textarea.addClass("add-example-has-linebreak-source");
syncLinebreakBackdropMetrics(textarea, backdrop);
backdrop.html(buildLinebreakBackdropHtml(text)).show();
backdrop.scrollTop(textarea.scrollTop()).scrollLeft(textarea.scrollLeft());
}
// Wires linebreak detection onto an OOUI multiline widget, matching start.js's scope: only the quote/example text and its translation/transcription, not bibliographic fields. Uses OOUI's own "change" event rather than the raw <textarea> "input" event start.js listens to, since our fields can also be set programmatically (Clear button, draft restore) via setValue(), which doesn't fire a native DOM input event.
function watchForLinebreaks(widget) {
widget.on("change", function() {
highlightLinebreak(widget.$input[0]);
});
}
var api = new mw.Api();
// Loads wikihez.citoid if it isn't already loaded, from Wikihez's testing page (MediaWiki: isn't editable
// right now) -- self-contained rather than calling wikihez.citoidHelper.ensure() directly, since that
// function only exists once citoid-helper.js has already run once, which isn't guaranteed here.
function ensureCitoid() {
if (window.wikihez && window.wikihez.citoid) {
return $.Deferred().resolve().promise();
}
var url = mw.util.getUrl("Bikarhêner:Wikihez/skrîpt/js/Gadget-citoid-helper.js", {
action: "raw",
ctype: "text/javascript"
});
return mw.loader.getScript(mw.config.get("wgServer") + url);
}
// Language display name, read from the matching section's .besazimani link text.
function languageNameForCode(code) {
var $mark = $(".besazimani[id='" + code + "']").first();
return $mark.length ? $mark.text().trim() : null;
}
// Whether the page title itself (accented Kurdish Latin letters included) is written in Latin script.
var pageTitleIsLatin = !/[^\x00-\x7FÀ-ɏḀ-ỿ‘’]/.test(mw.config.get("wgTitle") || "");
// .example/.benimune = old Şablon:jêder hidden marker; .h-usage-example/.h-quotation = Modul:usex containers used directly by Şablon:nimûne; .citation-whole = Modul:quote's own wrapper, now used by jêder-* templates (Modul:quote nests .h-quotation inside .citation-whole > dl > dd instead of putting it directly under the <li>, so it needs its own entry here).
// Requiring "ul > li >" is what makes this only match an example that's grouped into its own <ul> -- a
// {{nimûne}} (or its "mk" redirect) with no jêder-family citation alongside it in the same definition
// renders straight under the definition's own content instead, with no such group; also reused below to
// tell whether the second pass still needs to handle a given definition.
var EXISTING_EXAMPLE_SELECTOR = "ul > li > .example, ul > li > .benimune, ul > li > .h-usage-example, ul > li > .h-quotation, ul > li > .citation-whole";
$(EXISTING_EXAMPLE_SELECTOR).each(function() {
var $element = $(this);
var $item = $element.parent();
if (!$item.next().length) {
// Get example’s language
// bdi[lang] = old hidden marker; .e-example[lang]/.e-quotation[lang] = Modul:usex/Modul:quote already put lang on the visible span.
// A jêder-* citation with no jêgirtin= (quotation text) yet renders no h-quotation/e-quotation at all
// (see get_quote() in Modul quote.lua) -- exactly the "bare citation" case this button exists to fill
// in, so this can't just crash: without the guard, [0] is undefined here and ".lang" throws, which
// (since $.each() has no try/catch) silently kills the button for every remaining match on the page.
var $langEl = $item.find(".e-example[lang], .e-quotation[lang], bdi[lang]")[0];
if (!$langEl) {
console.warn("Gadget-wikt.add-examples: nikaribe zimanê vê nimûneyê bibîne, valakirî hate derbaskirin.", $item);
return;
}
var language = $langEl.lang;
if (language === "ku-Latn") {
language = "ku";
}
console.log('Language:', language);
// Get section and indices of associated definition
var definitionLevel = [];
var $definitionItem = $item.parent().parent();
var $topItem;
do {
// Skip MediaWiki's empty <li class="mw-empty-elt"> placeholders so indices match the real "#" lines in wikitext (see submit()).
definitionLevel.splice(0, 0, $definitionItem.prevAll("li:not(.mw-empty-elt)").length);
$topItem = $definitionItem;
$definitionItem = $definitionItem.parent().parent();
} while ($definitionItem.prop("tagName") === "LI");
var $section = $($topItem.parent().prevAll(".mw-heading3, h3").get(0));
if ($section.length) {
definitionLevel.splice(0, 0, $section.find("h3").attr("id"));
} else {
console.warn("Gadget-wikt.add-examples: Section heading not found");
// TODO: why does this happen? mw.notify("Beş nehat dîtin. Jkx li WF:Dîwanê vê problemê ragihînin!");
return;
}
// Remove default edit link if present
var $defaultEditLink = $item.find("span.example > span.stubedit");
if ($defaultEditLink.length) {
$defaultEditLink.remove();
}
// Add a nice button to open the form. $group is the citation-group <ul> itself (parent of $item);
// the form panel is inserted AFTER it (see click handler below), not inside it, so the panel isn't
// squeezed into that <ul>'s narrow hanging-indent width on mobile -- only the button/title stays
// there, matching the "Form redesign for Kurdish example" mockup (title inside the bullet list,
// full-width panel below it).
var $group = $item.parent();
var $formItem = $("<li>");
var $button = $("<a href='#'>Nimûneyeke bikaranînê lê zêde bike</a>");
$button.css("color", "var( --color-subtle, #777777 )");
// Shown in the button's place once the form is open (see Form#setVisible).
var $title = $("<span class='add-example-form-title'></span>").hide();
$formItem.append($button).append($title);
$button.on("click", function() {
if (!$button.form) {
$title.text("Nimûneyeke bi " + (languageNameForCode(language) || "zimanekî nenas").toLowerCase() + " lê zêde dikî.");
var form = new Form($item, $button, $title, language, definitionLevel);
$group.after(form.$element);
}
$button.form.setVisible(true);
return false;
});
$item.after($formItem);
}
});
// Second pass: some definitions have no example the pass above could react to at all -- either genuinely
// zero examples, or one rendered via {{nimûne}} (or its "mk" redirect) with no jêder-family citation next
// to it, which (see the comment on EXISTING_EXAMPLE_SELECTOR above) renders with no "ul > li" group to
// match. This walks every recognized POS section's own definitions list directly instead of reacting to
// an existing example, and reads the language off the language section's own <h2> rather than off an
// example -- so it doesn't need one to already exist. Everything else (Form, submit()) is reused as-is.
// MediaWiki wraps each heading in a "mw-heading2"/"mw-heading3"/... div in current skin output; falls
// back to the bare heading element for older/other output that doesn't wrap it.
function headingOuter($h) {
var $wrap = $h.closest(".mw-heading2, .mw-heading3, .mw-heading4, .mw-heading5, .mw-heading6");
return $wrap.length ? $wrap : $h;
}
// Section's language code: nearest preceding .besazimani[id] by document order (not sibling-walking, which mobile's per-section wrapping breaks).
function languageCodeForOl($ol) {
var $marks = $(".besazimani[id]").add($ol);
var ol = $ol.get(0);
var idx = $marks.index(ol);
for (var i = idx - 1; i >= 0; i--) {
var el = $marks.get(i);
if (el.id) {
return el.id;
}
}
return null;
}
// A <li> whose OWN direct content (not counting a nested <ol>) is wrapped in ".form-of-definition" is
// MediaWiki's "form of" template system marking that content as generated by a template -- e.g.
// {{ku-tewîna-nav}}'s "Formeke heval:" wrapper together with its "rewşa îzafeyî"/"rewşa çemandî"/...
// readings underneath. That whole nested block is normally the ENTIRE expansion of a single "#"
// wikitext line, with no separate "##" line behind any individual reading -- recursing into it would
// hand out one button per reading, each trying to match a "##" line that doesn't exist, and submit()
// would fail to find where to insert every one of them. A <li> without that class whose nested <ol>
// holds real hand-typed prose (e.g. sîno-koreyî/Navdêr's two genuinely separate "##" sub-senses) has
// no such problem -- those really are individually addressable wikitext lines.
function isFormOfWrapper($li) {
return $li.children(".form-of-definition").length > 0;
}
// Recurse into a <li>'s own nested <ol> UNLESS it's a form-of-template wrapper (see isFormOfWrapper) --
// a wrapper <li> with its own nested <ol> isn't itself a sense with content of its own, only its real
// (non-generated) leaves are.
function eachLeafDefinition($ol, fn) {
$ol.children("li").each(function() {
var $li = $(this);
var $childOl = $li.children("ol");
if ($childOl.length && !isFormOfWrapper($li)) {
$childOl.each(function() {
eachLeafDefinition($(this), fn);
});
} else {
fn($li);
}
});
}
$("h3").each(function() {
var sectionType = $(this).text().trim();
if (!sectionNames[sectionType]) {
return; // not a recognized word-sense section (Bilêvkirin, Etîmolojî, Çavkanî, ...)
}
var h3Id = $(this).attr("id");
// Forward-walk siblings to the definitions <ol>, skipping over a declension table/TemplateStyles/the
// headword line; stop (nothing to attach to in this section) if another heading comes first instead.
var $ol = null;
for (var $cursor = headingOuter($(this)).next(); $cursor.length; $cursor = $cursor.next()) {
if ($cursor.is("ol")) {
$ol = $cursor;
break;
}
if ($cursor.is(".mw-heading2, .mw-heading3, .mw-heading4, .mw-heading5, .mw-heading6, h2, h3, h4, h5, h6")) {
break;
}
}
if (!$ol) {
return;
}
var language = languageCodeForOl($ol);
if (!language) {
console.warn("Gadget-wikt.add-examples: nikaribe koda zimanê vê beşê bibîne.", $ol);
return;
}
eachLeafDefinition($ol, function($li) {
// The pass above already added a button here (or will) -- an actual example already wrapped in
// its own "ul > li" group.
if ($li.find(EXISTING_EXAMPLE_SELECTOR).length) {
return;
}
var definitionLevel = [];
var $definitionItem = $li;
while ($definitionItem.prop("tagName") === "LI") {
// Skip MediaWiki's empty <li class="mw-empty-elt"> placeholders so indices match the real "#" lines in wikitext (see submit()).
definitionLevel.splice(0, 0, $definitionItem.prevAll("li:not(.mw-empty-elt)").length);
$definitionItem = $definitionItem.parent().parent();
}
definitionLevel.splice(0, 0, h3Id);
// A hidden, empty placeholder <li> so submit()'s existing "_$lastExample.after(newLi)" insertion
// (unchanged, same as the pass above) lands the first submitted example right before the button
// -- matching the existing convention of new examples going in before the button, not after it.
var $placeholder = $("<li style='display:none'></li>");
var $formItem = $("<li>");
var $button = $("<a href='#'>Nimûneyeke bikaranînê lê zêde bike</a>");
$button.css("color", "var( --color-subtle, #777777 )");
// Shown in the button's place once the form is open (see Form#setVisible).
var $title = $("<span class='add-example-form-title'></span>").hide();
$formItem.append($button).append($title);
// A "ul" nested directly under a definition "li" starts hidden here (see the HQToggle-controlled
// jêder-citation-group "ul", which only ever renders with an explicit "style="display: block""
// set on it) -- this one has no HQToggle to unhide it, so it needs the same explicit override or
// the button (and the placeholder above) never becomes visible at all.
var $ul = $("<ul>").css("display", "block").append($placeholder).append($formItem);
// The form panel is inserted AFTER $ul (not inside it) once opened -- same reasoning as the first
// pass above: keeps the full-width panel out of the tight bulleted-list indentation on mobile.
$button.on("click", function() {
if (!$button.form) {
$title.text("Nimûneyeke bi " + (languageNameForCode(language) || "zimanekî nenas").toLowerCase() + " lê zêde dikî.");
var form = new Form($placeholder, $button, $title, language, definitionLevel);
$ul.after(form.$element);
}
$button.form.setVisible(true);
return false;
});
$li.append($ul);
});
});
// Pulls the form panel flush with the page's own left/right edges, undoing whatever nested-list indent it inherited from sitting inside a deeply-nested definition.
function alignFormToPage($form) {
var $container = $form.closest(".mw-parser-output");
if (!$container.length) {
return;
}
var pad = parseFloat(window.getComputedStyle($container[0]).paddingLeft) || 0;
var containerLeft = $container.offset().left + pad;
var indent = $form.offset().left - containerLeft;
$form.css({
marginLeft: indent > 0 ? -indent : 0,
width: $container.width() + "px"
});
}
// Constructor for the edit form; lastExample/button/title/language/definitionLevel identify where the form attaches and what it edits.
function Form($lastExample, $button, $title, language, definitionLevel) {
var self = this;
this._language = language;
this._definitionLevel = definitionLevel;
this._$lastExample = $lastExample;
this._$button = $button;
this._$button.form = this;
this._$title = $title;
this._currentJederKey = "";
this._jederFieldWidgets = {};
this._textInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var textInputLayout = new OO.ui.FieldLayout(this._textInput, {
label: "Metna nimûneyê",
align: "top",
});
// Shown under the text box (see boldenPageTitle) when the page title can't be found in the example text
// as typed, so it won't get bolded; purely informational, doesn't block submitting.
this._titleBoldHint = $("<span class='add-example-title-bold-hint'></span>").hide();
this._updateTitleBoldHint = function() {
var text = self._textInput.getValue().trim();
var title = mw.config.get("wgTitle");
var show = !!text && !boldenPageTitle(text, title).bolded;
self._titleBoldHint.toggle(show).html(show ? "Sermade (" + escapeHtmlForBackdrop(title) + ") nehat dîtin; dê neyê <b>stûr</b>kirin." : "");
};
this._textInput.on("change", function(value) {
self._applyButton.setDisabled(!value);
self._updateReadyHint();
self._updateTitleBoldHint();
});
watchForLinebreaks(this._textInput);
// Source type dropdown: free text, a jêder-* template, or "citoid" (a pseudo key, not in jederDefs) meaning "not yet detected" — the default, switched automatically once a Citoid fetch succeeds (see _fillFromCitoid).
var sourceTypeMenuItems = [
new OO.ui.MenuOptionWidget({ data: "citoid", label: "Bi Citoidê otomatîk zêde bike" }),
new OO.ui.MenuOptionWidget({ data: "", label: "Bi destê xwe binivîsim" }),
];
for (var jederKey in jederDefs) {
if (jederDefs.hasOwnProperty(jederKey)) {
sourceTypeMenuItems.push(new OO.ui.MenuOptionWidget({
data: jederKey,
label: jederDefs[jederKey].label,
}));
}
}
this._sourceTypeDropdown = new OO.ui.DropdownWidget({
menu: { items: sourceTypeMenuItems },
label: "Bi Citoidê otomatîk zêde bike",
});
var sourceTypeLayout = new OO.ui.FieldLayout(this._sourceTypeDropdown, {
label: "Şablona çavkaniyê",
align: "top",
});
this._sourceTypeDropdown.getMenu().on("choose", function(menuOption) {
self._setSourceType(menuOption.getData());
});
this._sourceInput = new OO.ui.MultilineTextInputWidget();
this._sourceInput.on("change", function() {
self._updateReadyHint();
});
this._sourceInputLayout = new OO.ui.FieldLayout(this._sourceInput, {
label: "Çavkaniya nimûneyê",
align: "top",
});
// Always visible in every mode (free text included) — submit() reads this unconditionally as the "url=" parameter. The Citoid fetch button sits right next to it (not in a separate box) -- see _urlRowWidget below.
this._sourceURLInput = new OO.ui.TextInputWidget({
icon: "link",
placeholder: "https://… an jî DOI/ISBN",
});
this._citoidButton = new OO.ui.ButtonWidget({
label: "Bi otomatîk tijî bike",
icon: "download",
flags: ["progressive"],
title: "Li gorî URL, DOI an ISBNya jorîn, malûmatan ji Citoid tîne û qadên şablona jêder-* otomatîk tijî dike.",
classes: ["add-example-citoid-fetch"],
});
this._citoidButton.on("click", this._fillFromCitoid.bind(this));
this._sourceURLInput.on("change", function() {
self._updateReadyHint();
self._autofillVideoTimestamp();
});
// URL input + inline "auto-fill" button as one row (replaces the old separate framed Citoid box's
// button row) -- a plain OO.ui.Widget used purely as a flex-row container (same pattern as
// _loadingImage below: build it empty, then manually append its children's $elements). Disabling
// during submit() still goes through the individual _sourceURLInput/_citoidButton references, not
// through this wrapper.
this._urlRowWidget = new OO.ui.Widget({ classes: ["add-example-url-row"] });
this._urlRowWidget.$element.append(this._sourceURLInput.$element, this._citoidButton.$element);
this._sourceURLInputLayout = new OO.ui.FieldLayout(this._urlRowWidget, {
label: "Lînk, DOI an ISBNya çavkaniyê",
align: "top",
help: "Li qutiyê URL, DOI an ISBN binivîse û pê lê bike butona 'Bi otomatîk tijî bike' da ku otomatîk çavkanî were dagirtin.",
helpInline: true,
});
// Matches the wording just constructed above, so the initial _setSourceType("citoid") call at the end of this constructor doesn't needlessly recreate an identical layout.
this._urlFieldIsFreeTextWording = false;
// Shown right after a successful Citoid fetch (see _fillFromCitoid); hidden again on clear.
this._citoidSuccessMsg = $("<span class='add-example-citoid-success'>✓ Malûmat hatin dagirtin — li jêr kontrol bike.</span>").hide();
// Clears the URL field and any filled jêder-* fields without touching the example text/translation.
this._citoidClearButton = new OO.ui.ButtonWidget({
label: "Vala bike",
icon: "trash",
framed: false,
title: "Lînkê û qadên jêder-* yên vê beşê vala bike",
classes: ["add-example-citoid-clear"],
});
this._citoidClearButton.on("click", function() {
self._sourceURLInput.setValue("");
self._citoidSuccessMsg.hide();
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setValue("");
});
});
// Plain div (not OO.ui.FieldsetLayout) so the grid CSS class applies directly to the field items.
this._jederFieldsFieldset = $("<div class='add-example-jeder-fields'>");
// "Malûmatên çavkaniyê" header (+ the "Vala bike" clear button) sitting right above the fields grid,
// replacing the old framed "Ji Citoid an bi destan tijî bike:" box -- like this only makes sense once
// a real jêder-* template is active (there's nothing here to show for the "citoid: not yet detected"
// placeholder or for free text), so the whole section toggles together in _setSourceType().
this._jederSection = $("<div class='add-example-jeder-section'>").append(
$("<div class='add-example-jeder-header'>")
.append($("<span class='add-example-jeder-header-label'>Malûmatên çavkaniyê</span>"))
.append(this._citoidClearButton.$element),
this._jederFieldsFieldset
);
this._translationInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var translationInputLayout = new OO.ui.FieldLayout(this._translationInput, {
label: "Tercimeya kurmancî ya nimûneyê",
align: "top",
});
watchForLinebreaks(this._translationInput);
this._transcriptionInput = new OO.ui.MultilineTextInputWidget({ rows: 4 });
var transcriptionInputLayout = new OO.ui.FieldLayout(this._transcriptionInput, {
label: "Translîterasyona nimûneyê",
align: "top",
help: "Tenê lê zêde bike eger metna di nimûneyê de bi alfabeya latînî nehatibe nivîsandin.",
helpInline: true,
});
watchForLinebreaks(this._transcriptionInput);
this._applyButton = new OO.ui.ButtonWidget({
label: "Biweşîne",
icon: "check",
title: "Nimûneyê ji bo vê tarîfê nimûneyê lê zêde bike",
flags: ["progressive", "primary"],
disabled: true,
});
this._applyButton.on("click", this.submit.bind(this));
// Reactive "ready to submit" hint next to Biweşîne: no text yet, text but no source (still submittable
// as a bare {{nimûne}}), or fully ready -- kept in sync by _updateReadyHint(), wired to every field below.
this._readyHint = $("<span class='add-example-ready-hint'></span>").text("Metna nimûneyê lazim e.");
// True while a Citoid-eligible URL/DOI/ISBN is typed in but not yet fetched (or fetched then edited away) and no jêder field has been filled by hand -- the "looks done but isn't" trap this exists to catch. Not applicable in free-text mode, where the fetch button isn't even offered.
this._citoidPending = function() {
return self._currentJederKey !== "" &&
!!self._sourceURLInput.getValue().trim() &&
!self._citoidSuccessMsg.is(":visible") &&
!Object.keys(self._jederFieldWidgets).some(function(key) {
return self._jederFieldWidgets[key].getValue().trim();
});
};
this._updateReadyHint = function() {
if (!self._textInput.getValue()) {
self._readyHint.text("Metna nimûneyê lazim e.");
return;
}
if (self._citoidPending()) {
self._readyHint.text("Pêşî 'Bi otomatîk tijî bike' bitikîne.");
return;
}
var hasSource = self._sourceInput.getValue().trim() || self._sourceURLInput.getValue().trim() ||
Object.keys(self._jederFieldWidgets).some(function(key) {
return self._jederFieldWidgets[key].getValue().trim();
});
self._readyHint.text(hasSource ? "Hazir e." : "Çavkanî nehatiye dayîn.");
};
// Prefills the Dem field from the typed URL's own "t=" (see wikihez.citoid.extractVideoTimestamp) once jêder-vîdeo is active -- never overwrites a value the user already entered by hand.
this._autofillVideoTimestamp = function() {
var demWidget = self._jederFieldWidgets.dem;
if (self._currentJederKey !== "jêder-vîdeo" || !demWidget || demWidget.getValue().trim()) {
return;
}
ensureCitoid().then(function() {
var dem = wikihez.citoid.extractVideoTimestamp(self._sourceURLInput.getValue().trim());
if (dem && !demWidget.getValue().trim()) {
demWidget.setValue(dem);
}
});
};
// framed:false (+ the "destructive" flag for the red text/hover) matches the mockup's borderless
// "Betal bike" -- a plain colored link rather than a boxed button, distinguishing it from Paqij bike.
this._cancelButton = new OO.ui.ButtonWidget({
label: "Betal bike",
icon: "close",
title: "Formê bigire",
flags: ["destructive"],
framed: false,
});
this._cancelButton.on("click", function() {
self.setVisible(false);
});
this._clearButton = new OO.ui.ButtonWidget({
label: "Paqij bike",
icon: "trash",
title: "Hemû qadan vala bike û pêşnûyisên hilanîbûyî jê bibe",
});
this._clearButton.on("click", function() {
self.clear();
self._clearDraft();
});
// Native CSS spinner (see Gadget-wikt.add-examples.css) instead of an external Commons GIF, so there's no network request and it matches dark/light mode.
this._loadingImage = new OO.ui.Widget({
classes: ["add-example-loading"],
});
this._loadingImage.$element.append($('<span class="add-example-spinner" aria-hidden="true"></span>'));
this._loadingImage.toggle(false);
// Two-column top section (see "Form redesign for Kurdish example/Nimûne zêde bike.dc.html"): example
// text (+ translation/transliteration for non-ku, right after it, not after the source fields) on the
// left; source-type + link/Citoid on the right. Built as plain <div>s, not an OOUI layout -- OOUI has
// no CSS-grid container -- so .add-example-top-grid in the CSS can lay them out as a real responsive
// 7fr/5fr grid (collapsing to one column on narrow screens).
var $topLeft = $("<div class='add-example-top-col'>").append(textInputLayout.$element, this._titleBoldHint);
if (language !== "ku") {
$topLeft.append(translationInputLayout.$element);
}
if (!pageTitleIsLatin) {
$topLeft.append(transcriptionInputLayout.$element);
}
var $topRight = $("<div class='add-example-top-col'>").append(
sourceTypeLayout.$element,
this._sourceInputLayout.$element,
this._sourceURLInputLayout.$element,
this._citoidSuccessMsg
);
var $topGrid = $("<div class='add-example-top-grid'>").append($topLeft, $topRight);
// Saved on the instance (not just a local var) so _setSourceType() can swap the URL field's label/help
// wording in and out of it when switching to/from free text (see the FieldLayout replaceWith() there).
this._fieldsLayout = $("<div class='add-example-fieldset'>").append($topGrid, this._jederSection);
// Bottom action row -- order/spacing matches the mockup: Biweşîne (+ spinner + ready hint), a spacer
// pushing the rest right, then Paqij bike (bordered/subtle) and Betal bike (borderless red text, via
// framed:false above). A plain flex <div>, not an OOUI HorizontalLayout, so the raw hint/spacer
// elements can sit alongside the real button widgets (same reasoning as the top grid above).
var $buttonsRow = $("<div class='add-example-main-buttons'>").append(
this._applyButton.$element,
this._loadingImage.$element,
this._readyHint,
$("<span class='add-example-buttons-spacer'></span>"),
this._clearButton.$element,
this._cancelButton.$element
);
this._frame = new OO.ui.PanelLayout({
id: "add-example-definition-{0}-form".format(this._definitionLevel.join("-")),
classes: ["add-example-form"],
expanded: false,
});
this._frame.$element.append(this._fieldsLayout, $buttonsRow);
// Default to "citoid" mode; selectItemByData() doesn't fire "choose" (that only fires for interactive selection), so _setSourceType() must also be called explicitly to set up the initial UI.
this._sourceTypeDropdown.getMenu().selectItemByData("citoid");
this._setSourceType("citoid");
}
Form.prototype = {
// Returns the jQuery object for this form.
get $element() {
return this._frame.$element;
},
// Switches the source section between free text, Citoid auto-detect (no template chosen yet), and a specific jêder-* template, rebuilding the field list to match. The URL field itself is always visible in every mode (see the constructor); only the free-text textarea, the Citoid fetch button, and the "Malûmatên çavkaniyê" fields section toggle here.
_setSourceType: function(jederKey) {
var self = this;
this._currentJederKey = jederKey;
this._jederFieldsFieldset.empty();
this._jederFieldWidgets = {};
var isRealJederKey = jederKey && jederDefs[jederKey];
if (isRealJederKey) {
var def = jederDefs[jederKey];
def.fields.forEach(function(field) {
var widget = field.multiline
? new OO.ui.MultilineTextInputWidget({ rows: 2, autosize: false })
: new OO.ui.TextInputWidget();
self._jederFieldWidgets[field.key] = widget;
widget.on("change", function() {
self._updateReadyHint();
});
var layout = new OO.ui.FieldLayout(widget, {
label: field.label,
align: "top",
classes: ["add-example-field-span-" + (field.span || 4)],
});
self._jederFieldsFieldset.append(layout.$element);
});
}
// "Malûmatên çavkaniyê" header + fields grid: only once a real template is chosen/detected --
// nothing to show yet for the plain "citoid: not yet detected" placeholder or for free text.
this._jederSection.toggle(!!isRealJederKey);
// Free text textarea only for "" (free text); hidden for "citoid" and any real jêder-* key.
this._sourceInputLayout.toggle(jederKey === "");
// Citoid fetch button: hidden for free text (nothing there for it to fill in), shown for "citoid" auto-detect and any real jêder-* key. The URL input itself next to it stays visible in every mode.
this._citoidButton.toggle(jederKey !== "");
// URL field wording: plain "attach a link" phrasing for free text, Citoid-oriented phrasing otherwise. Only recreated when actually crossing that boundary, not on every dropdown change (e.g. switching between two jêder-* types keeps the same wording, no need to touch the DOM).
var isFreeText = jederKey === "";
if (this._urlFieldIsFreeTextWording !== isFreeText) {
this._urlFieldIsFreeTextWording = isFreeText;
this._sourceURLInput.setPlaceholder(isFreeText ? "URLyeke wekî https://…" : "URLyek wekî https://… an jî DOI/ISBN");
var $oldLayout = this._sourceURLInputLayout.$element;
// Re-wraps the SAME _urlRowWidget (still holding _sourceURLInput + _citoidButton) in a new
// FieldLayout with the new label/help; the widget's $element moves along with it, same as the
// old addItems()/removeItems() swap did for the plain input before this redesign.
this._sourceURLInputLayout = new OO.ui.FieldLayout(this._urlRowWidget, isFreeText ? {
label: "Adresa webê ya nimûneyê",
align: "top",
help: "Tenê binivîse eger lînk jixwe di referansa çavkaniyê de tinebe.",
helpInline: true,
} : {
label: "Lînk, DOI an ISBNya çavkaniyê",
align: "top",
help: "Ev dibe lînka çavkaniyê (url=). Ji bo şablonên jêder-*, dikare bi Citoid an bi destan jî bên dagirtin.",
helpInline: true,
});
$oldLayout.replaceWith(this._sourceURLInputLayout.$element);
}
this._autofillVideoTimestamp();
this._updateReadyHint();
},
// Fetches data via wikihez.citoid (loaded on demand by ensureCitoid() if needed), picks the matching jêder-* template, and fills its empty fields.
_fillFromCitoid: function() {
var self = this;
var query = this._sourceURLInput.getValue().trim();
if (!query) {
mw.notify("Ji kerema xwe re pêşî URL, DOI an ISBNyekê binivîse.");
return;
}
this._citoidButton.setDisabled(true);
this._loadingImage.toggle(true);
ensureCitoid().then(function() {
return wikihez.citoid.fetchJederFields(query);
}).then(function(result) {
// Only let Citoid pick the template type when nothing's been chosen yet (the "citoid" auto-detect default). If the user already selected a specific jêder-* type (or free text), that choice is respected — e.g. picking "Websîte" and fetching a tweet must not silently switch to "Kovar" just because Citoid guessed differently.
var wasAutoDetect = self._currentJederKey === "citoid";
if (wasAutoDetect) {
var menu = self._sourceTypeDropdown.getMenu();
var item = menu.findItemFromData(result.jederKey);
if (item) {
menu.chooseItem(item); // this calls _setSourceType(jederKey) automatically
}
}
var targetJederKey = self._currentJederKey;
// Fields Citoid returned were shaped for its own detected type; if the active template differs (the case above where the user's choice was kept), re-derive fields for that template instead so e.g. "Websîte" still gets its own website-shaped fields (websîte, tarîx, ...) rather than leftover kovar-shaped ones.
var fields = targetJederKey === result.jederKey ? result.fields : wikihez.citoid.dataToJederFields(targetJederKey, result.raw, query);
Object.keys(fields).forEach(function(key) {
var widget = self._jederFieldWidgets[key];
if (widget && !widget.getValue()) {
widget.setValue(fields[key]);
}
});
self._citoidSuccessMsg.show();
self._updateReadyHint();
mw.notify("Malûmat ji Citoid hatin barkirin.");
}, function(errorMsg) {
// wikihez.citoid may still be missing here if ensureCitoid() itself failed to load the script (e.g. network error) -- fall back to the bare error notice in that case.
if (!window.wikihez || !window.wikihez.citoid) {
mw.notify("Nekarî citoid-helper.js bar bike.");
return;
}
// Citoid can't fetch some sites at all (e.g. x.com/twitter.com) -- fall back to jêder-websîte with a website name guessed from the URL itself, rather than just a bare error.
var fallbackSite = wikihez.citoid.websiteNameForUrl(query);
if (fallbackSite) {
if (self._currentJederKey !== "jêder-websîte") {
var menu = self._sourceTypeDropdown.getMenu();
var item = menu.findItemFromData("jêder-websîte");
if (item) {
menu.chooseItem(item); // this calls _setSourceType("jêder-websîte") automatically
}
}
var websiteWidget = self._jederFieldWidgets["websîte"];
if (websiteWidget && !websiteWidget.getValue()) {
websiteWidget.setValue(fallbackSite);
}
mw.notify("Citoid nikare vê malperê bixwîne; şablona Websîte hate hilbijartin, ji kerema xwe mayî bi destan tijî bike.");
return;
}
mw.notify(typeof errorMsg === "string" ? errorMsg : "Nekarî malûmatan ji Citoid bistîne. Kontrol bike ka URL/DOI/ISBN rast e.");
}).always(function() {
self._citoidButton.setDisabled(false);
self._loadingImage.toggle(false);
});
},
// Toggles the visibility of this form and restores any saved draft when shown. The title text takes
// the button's place while open (see the "Form redesign for Kurdish example" mockup); the button
// itself stays put ready to reappear once the form is cancelled/closed.
setVisible: function(visible) {
this._$button.toggle(!visible);
this._$title.toggle(visible);
this._frame.toggle(visible);
if (visible) {
alignFormToPage(this._frame.$element);
var draft = draftStorage.Get() || {};
if (!this._textInput.getValue() && draft.text) {
this._textInput.setValue(draft.text);
}
if (!this._sourceInput.getValue() && draft.source) {
this._sourceInput.setValue(draft.source);
}
if (!this._sourceURLInput.getValue() && draft.sourceURL) {
this._sourceURLInput.setValue(draft.sourceURL);
}
if (!this._translationInput.getValue() && draft.translation) {
this._translationInput.setValue(draft.translation);
}
if (!this._transcriptionInput.getValue() && draft.transcription) {
this._transcriptionInput.setValue(draft.transcription);
}
}
},
// Removes any saved draft (localStorage/cookie via MediaWiki:Gadget-StorageUtils.js) so it can't resurface on other pages.
_clearDraft: function() {
draftStorage.Set({});
},
// Clears all fields in this form.
clear: function() {
this._textInput.setValue("");
this._sourceInput.setValue("");
this._sourceURLInput.setValue("");
this._translationInput.setValue("");
this._transcriptionInput.setValue("");
this._citoidSuccessMsg.hide();
this._sourceTypeDropdown.getMenu().selectItemByData("citoid");
this._setSourceType("citoid");
},
// Warns before submitting if a Citoid URL/DOI/ISBN was typed but never successfully fetched, then defers
// to _doSubmit. The title-not-boldable case (see boldenPageTitle) is shown inline under the text box
// instead (_titleBoldHint) rather than blocking submission here.
submit: function() {
if (this._citoidPending() && !window.confirm("Te lînk, DOI an ISBN nivîsand lê hîn jê malûmat nehatine standin. Bêyî wan berdewam bikî?")) {
return;
}
this._doSubmit();
},
// Generates and submits the wikicode, then inserts the resulting HTML element if no errors occurred.
_doSubmit: function() {
var self = this;
self._textInput.setDisabled(true);
self._sourceInput.setDisabled(true);
self._sourceURLInput.setDisabled(true);
self._translationInput.setDisabled(true);
self._transcriptionInput.setDisabled(true);
self._sourceTypeDropdown.setDisabled(true);
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setDisabled(true);
});
// self._disableTranslationChk.setDisabled(true);
this._applyButton.setDisabled(true);
this._clearButton.setDisabled(true);
this._loadingImage.toggle(true);
var source = this._sourceInput.getValue().trim();
var sourceURL = this._sourceURLInput.getValue().trim();
var text = this._textInput.getValue().trim();
// If a jêder-* template is selected, collect its filled-in fields.
var jederParams = [];
if (this._currentJederKey && jederDefs[this._currentJederKey]) {
jederDefs[this._currentJederKey].fields.forEach(function(field) {
var widget = self._jederFieldWidgets[field.key];
var value = widget ? widget.getValue().trim() : "";
if (value) {
jederParams.push(field.key + "=" + value);
}
});
}
var usingJederTemplate = this._currentJederKey && jederParams.length > 0;
var minakAnNa, sablon;
if (usingJederTemplate) {
// The jêder-* template itself is used as the template, not as the "2=" content.
minakAnNa = "*";
sablon = this._currentJederKey;
} else if (source || sourceURL) {
minakAnNa = "*";
sablon = "jêder";
} else {
minakAnNa = ":";
sablon = "nimûne";
}
var listMarker = "".padStart(this._definitionLevel.length - 1, "#") + minakAnNa;
var title = mw.config.get('wgTitle');
// jêder-* template, jêder, or nimûne
var code = listMarker + " {{" + sablon;
// 1= language code
code += "|" + this._language;
if (usingJederTemplate) {
// Fields of the selected jêder-* template, passed straight through as its parameters.
jederParams.forEach(function(param) {
code += "|" + param;
});
} else {
// 2= source (free text)
if (source) {
code += "|2=" + source;
}
if (sourceURL) {
code += "|url=" + sourceURL;
}
}
// jêgirtin/nimûne (quotation text)
code += "|";
if (sablon !== "nimûne") {
code += "jêgirtin=";
}
// bold the page title (see boldenPageTitle), then convert any literal linebreak in the example text to <br> (see nlToBr) so it can't break the single-line "#*" wikitext
code += nlToBr(boldenPageTitle(text, title).text);
if (this._language !== "ku") {
var translation = nlToBr(this._translationInput.getValue().trim());
if (translation) {
code += "|tercime=" + translation;
}
}
var transcription = nlToBr(this._transcriptionInput.getValue().trim());
if (transcription) {
code += "|tr=" + transcription;
}
code += "}}";
// var escapedLangCode = languages[this._language].charAt(0).toUpperCase() + languages[this._language].slice(1);
// console.log("escapedLangCode: ", escapedLangCode);
var sectionIDPattern = new RegExp("^([\\wîêçş_]+?)_?(\\d+)?_?(\\d+)?$");
console.log("this._definitionLevel[0]: ", this._definitionLevel[0]);
var matchSectionID = sectionIDPattern.exec(this._definitionLevel[0]);
//var isInflection;
var sectionType = matchSectionID[1].replace(/_/, ' ');
sectionType = sectionType.replace(/_\d+$/, '');
console.log("sectionType: ", sectionType);
var sectionNum = matchSectionID[2] ? parseInt(matchSectionID[2]) : "";
console.log("Section Number:", sectionNum);
// Insert new example into page’s code
api.get({
action: "query",
titles: mw.config.get("wgPageName"),
prop: "revisions",
rvprop: "content",
rvslots: "main",
}).then(function(data) {
var pageContent;
for (var pageID in data.query.pages) {
if (data.query.pages.hasOwnProperty(pageID)) {
// noinspection JSUnresolvedVariable
pageContent = data.query.pages[pageID].revisions[0].slots.main["*"];
break;
}
}
// Look for correct language section
var langSectionRegex = new RegExp("==[ ]*{{ziman\\|{0}}}[ ]*==".format(self._language));
var langSectionIndex = pageContent.search(langSectionRegex);
console.log("langSectionIndex:", langSectionIndex);
if (langSectionIndex === -1) {
console.log("langSectionIndex === -1");
error("Xeletiyeke bi koda zimanî heye. Koda zimanî:" + self._language);
return;
}
// Look for correct word type section
var lines = pageContent.slice(langSectionIndex).split("\n");
var sectionNamesRegex = Object.keys(sectionNames).join('|');
var sectionRegex = new RegExp('^===[ ]*(' + sectionNamesRegex + ')\\s*(\\d+)?');
var targetLineIndex;
for (targetLineIndex = 0; targetLineIndex < lines.length; targetLineIndex++) {
var line = lines[targetLineIndex];
console.log("line:", line);
var matchSection = sectionRegex.exec(line);
if (matchSection) {
console.log("matchSection:", matchSection[1]);
// Extract section name and number from the matched result
var matchedSectionName = matchSection[1];
var matchedSectionNum = matchSection[2]; // It could be undefined
if (!sectionNames[sectionType]) {
error('Navê beşê xelet e. Di beşên "Ji wêjêyê" û "Ji wêjêya klasîk" ev amûr nayê bikaranîn.');
return; // Exit the function
}
// Check if the matched section name is in the expected list
if (sectionNames[sectionType].includes(matchedSectionName)) {
// Match only the specific numbered section the button was clicked in (e.g. "Navdêr 2",
// not just the first "===Navdêr...===" heading found) -- both sides are "" when the
// section has no number at all (a single unnumbered "===Navdêr===").
var matchedSectionNumValue = matchedSectionNum ? parseInt(matchedSectionNum, 10) : "";
if (matchedSectionNumValue === sectionNum) {
// Add more conditions if needed for inflection, e.g., (isInflection === line.includes("Formeke "))
break;
}
}
}
}
if (targetLineIndex === lines.length) {
console.log("targetLineIndex === lines.length");
error("Di navê beşê de xeletî heye. Îhtimalen bi vî navê beşê çend heb hene.");
return;
}
// Look for correct definition
var defIndex = -1;
var level = 1;
for (; targetLineIndex < lines.length; targetLineIndex++) {
var m = /^(#+)[^*#:]/.exec(lines[targetLineIndex]);
console.log("lines[targetLineIndex]:", lines[targetLineIndex]);
if (m) {
console.log("m:", m);
if (level === m[1].length) {
console.log("m[1]:", m[1]);
defIndex++;
console.log("defIndex:", defIndex);
if (self._definitionLevel[level] === defIndex) {
console.log("self._definitionLevel[level] === defIndex");
console.log("self._definitionLevel[level]", self._definitionLevel[level]);
if (level === self._definitionLevel.length - 1) {
console.log("level:", level);
break;
} else {
level++;
defIndex = -1;
}
}
}
}
}
// Find where to insert within this definition's "#:"/"#*" block: walk lines after the definition (findBlockEnd() tracks multi-line templates), and use exampleTemplateNames to tell real examples from annotations (synonyms, antonyms, alt-forms, etc.) rather than hard-blocking specific names.
var insertionFound = false;
var lastRelevantBlockEnd = -1;
var isJederFamily = (sablon === "jêder" || Object.prototype.hasOwnProperty.call(jederDefs, sablon));
var scanIndex = targetLineIndex + 1;
var emptyTemplate = false;
for (; scanIndex < lines.length; scanIndex++) {
var scanLine = lines[scanIndex];
if (!scanLine.startsWith("#:") && !scanLine.startsWith("#*")) {
// Left this definition's "#:"/"#*" block (e.g. a new definition or section starts).
break;
}
var blockEnd = findBlockEnd(lines, scanIndex);
var templateName = getLineTemplateName(scanLine);
var isExampleLine = templateName !== null &&
exampleTemplateNames.indexOf(templateName) !== -1;
if (isJederFamily) {
// jêder-family examples go after all "#:"/"#*" lines of this definition (both real examples and annotations).
lastRelevantBlockEnd = blockEnd;
insertionFound = true;
} else if (sablon === "nimûne") {
// "nimûne" examples go before any "#*" line, but after "#:" lines.
if (scanLine.startsWith("#*")) {
break;
}
lastRelevantBlockEnd = blockEnd;
insertionFound = true;
}
scanIndex = blockEnd; // Skip past the whole (possibly multi-line) block
}
var insertAt = lastRelevantBlockEnd >= 0 ? lastRelevantBlockEnd + 1 : scanIndex;
if (lastRelevantBlockEnd >= 0) {
emptyTemplate = /#+\*\s*{{[ ]*b?ê?(nimûne|mînak|jêgirtin)\??\s*\|\s*\|?\s*[^|}]+}}/.test(lines[lastRelevantBlockEnd]);
}
if (emptyTemplate) {
console.log("empty Template found", sablon);
// Replace empty template with new example
lines.splice(lastRelevantBlockEnd, 1, code);
} else {
console.log("empty Template not found", sablon);
// Insert the new example (right after the definition if it had no existing "#:"/"#*" lines yet, or after the relevant block otherwise).
lines.splice(insertAt, 0, code);
}
// Submit new page content
api.edit(mw.config.get("wgPageName"), function(_) {
return {
text: pageContent.slice(0, langSectionIndex) + lines.join("\n"),
summary: "+nimûneya bikaranînê bi amûra « {0} » (v{1}).".format(NAME, VERSION),
};
}).then(function() {
api.parse(code).done(function(data) {
var $renderedExample = $(data).find("ul > li").html();
var $item;
// Insert rendered example into page
if (emptyTemplate) {
self._$lastExample.html($renderedExample);
$item = self._$lastExample;
} else {
self._$lastExample.after($item = $("<li>").append($renderedExample));
}
$item.css("background-color", "lightgreen");
setTimeout(function() {
$item.css("background-color", "inherit");
}, 1000);
self._$lastExample = $item;
});
self.setVisible(false);
self.clear();
self._clearDraft();
reenable();
}, function(code, result) {
error("Nekarî rûpelê xilas bike: " + apiErrorMessage(code, result));
});
}, function(code, result) {
error("Nekarî naveroka rûpelê bistîne: " + apiErrorMessage(code, result));
});
function error(errorMessage) {
mw.notify(errorMessage || "Nimûne nehat weşandin, îhtimalen rûpel hate guhartin. Ji kerema xwe re rûpelê dîsa bar bike û dîsa biceribîne.");
draftStorage.Set({
text: self._textInput.getValue(),
source: self._sourceInput.getValue(),
sourceURL: self._sourceURLInput.getValue(),
translation: self._translationInput.getValue(),
transcription: self._transcriptionInput.getValue(),
});
reenable();
}
function reenable() {
self._textInput.setDisabled(false);
self._sourceInput.setDisabled(false);
self._sourceURLInput.setDisabled(false);
self._translationInput.setDisabled(false);
self._transcriptionInput.setDisabled(false);
self._sourceTypeDropdown.setDisabled(false);
Object.keys(self._jederFieldWidgets).forEach(function(key) {
self._jederFieldWidgets[key].setDisabled(false);
});
// self._disableTranslationChk.setDisabled(false);
self._applyButton.setDisabled(false);
self._cancelButton.setDisabled(false);
self._clearButton.setDisabled(false);
self._loadingImage.toggle(false);
}
},
};
});
// </nowiki>
8n2o21xpboe91e8m8rdnhtha7veblzp
Bikarhêner:Wikihez/Gadget-wikt.add-examples.css
2
1357894
6342679
6342538
2026-08-26T10:35:09Z
Wikihez
7344
6342679
css
text/css
/* Design tokens shared with the "Entry wizard" redesign, so gadgets read as one site: warm parchment card
palette, Spectral/IBM Plex Sans/IBM Plex Mono type, no drop shadows, pill-shaped action buttons. */
@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,300;0,400;0,600;1,400&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap');
:root {
--wikt-ae-font-sans: 'IBM Plex Sans', system-ui, sans-serif;
--wikt-ae-font-mono: 'IBM Plex Mono', monospace;
--wikt-ae-card-bg: #fffdf8;
--wikt-ae-card-border: #e6dfd2;
--wikt-ae-divider: #efe8db;
--wikt-ae-input-border: #cfc7b8;
--wikt-ae-input-bg: #fff;
--wikt-ae-text: #1c1a17;
--wikt-ae-text-body: #4a453d;
--wikt-ae-text-label: #3d3830;
--wikt-ae-text-muted: #8a8378;
--wikt-ae-text-placeholder: #b3ab9e;
--wikt-ae-accent: #2a5db0;
--wikt-ae-accent-hover: #1c4685;
--wikt-ae-accent-bg: #eef2fa;
--wikt-ae-accent-border: #d5def0;
--wikt-ae-destructive: #9c3a28;
--wikt-ae-section-bg: #fbf8f1;
}
html.skin-theme-clientpref-night {
--wikt-ae-card-bg: var(--background-color-base, #101418);
--wikt-ae-card-border: rgba(255, 255, 255, 0.08);
--wikt-ae-divider: rgba(255, 255, 255, 0.06);
--wikt-ae-input-border: rgba(255, 255, 255, 0.2);
--wikt-ae-input-bg: rgba(255, 255, 255, 0.04);
--wikt-ae-text: #f0ece4;
--wikt-ae-text-body: #cfc7b8;
--wikt-ae-text-label: #e4ddd0;
--wikt-ae-text-muted: #a89f8f;
--wikt-ae-text-placeholder: #6b6459;
--wikt-ae-accent: #6ea1e0;
--wikt-ae-accent-hover: #8fb6e8;
--wikt-ae-accent-bg: rgba(110, 161, 224, 0.15);
--wikt-ae-accent-border: rgba(110, 161, 224, 0.35);
--wikt-ae-destructive: #d97a63;
--wikt-ae-section-bg: rgba(255, 255, 255, 0.03);
}
/* {{bênimûne}}'s own "Nimûneyekê bide" prompt is redundant once this gadget's own button renders in its place */
.mw-parser-output li:has(> .benimune) {
display: none;
}
.add-example-form .oo-ui-inputWidget-input {
font-family: var(--wikt-ae-font-sans) !important;
}
.add-example-form .add-example-fieldset {
margin-bottom: 1em;
}
/* Form panel: card with border and radius, no shadow (matches the Entry wizard "no shadows" rule) */
.add-example-form {
width: 100%;
box-sizing: border-box;
margin-top: 0.5em;
padding: 1.25em;
font-family: var(--wikt-ae-font-sans);
color: var(--wikt-ae-text);
border: 1px solid var(--wikt-ae-card-border);
border-radius: 14px;
background-color: var(--wikt-ae-card-bg);
}
/* Title shown in place of the "add example" link while its form is open */
.add-example-form-title {
font-family: var(--wikt-ae-font-sans);
font-weight: 600;
font-size: 13.5px;
color: var(--wikt-ae-text-label);
}
/* Field labels: consistent weight/size/color across all OOUI FieldLayouts in the form */
.add-example-form .oo-ui-fieldLayout-header label {
font-family: var(--wikt-ae-font-sans);
font-size: 12.5px;
font-weight: 500;
color: var(--wikt-ae-text-label);
}
/* Text inputs: shared border/radius/background, focus ring instead of OOUI's default */
.add-example-form .oo-ui-textInputWidget input,
.add-example-form .oo-ui-textInputWidget textarea {
border-color: var(--wikt-ae-input-border) !important;
border-radius: 10px !important;
background-color: var(--wikt-ae-input-bg) !important;
}
.add-example-form .oo-ui-textInputWidget input:focus,
.add-example-form .oo-ui-textInputWidget textarea:focus {
border-color: var(--wikt-ae-accent) !important;
box-shadow: 0 0 0 3px var(--wikt-ae-accent-bg) !important;
}
.add-example-form .oo-ui-textInputWidget input {
min-height: 44px;
}
/* Action buttons: pill-shaped, accent-colored to match the Entry wizard's Bişîne/secondary buttons */
.add-example-form .oo-ui-buttonElement-framed > .oo-ui-buttonElement-button {
border-radius: 999px !important;
}
.add-example-form .oo-ui-flaggedElement-progressive.oo-ui-flaggedElement-primary .oo-ui-buttonElement-button {
background-color: var(--wikt-ae-accent) !important;
border-color: var(--wikt-ae-accent) !important;
}
.add-example-form .oo-ui-flaggedElement-progressive.oo-ui-flaggedElement-primary:hover .oo-ui-buttonElement-button {
background-color: var(--wikt-ae-accent-hover) !important;
border-color: var(--wikt-ae-accent-hover) !important;
}
.add-example-form .oo-ui-buttonElement-framed.oo-ui-flaggedElement-progressive:not(.oo-ui-flaggedElement-primary) .oo-ui-buttonElement-button {
background-color: var(--wikt-ae-accent-bg) !important;
border-color: var(--wikt-ae-accent-border) !important;
color: var(--wikt-ae-accent) !important;
}
.add-example-form .oo-ui-flaggedElement-destructive .oo-ui-buttonElement-button {
color: var(--wikt-ae-destructive) !important;
}
/* Two-column top section: example text left, source type/link right; collapses to one column below 640px */
.add-example-top-grid {
display: grid;
grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
gap: 16px 20px;
align-items: start;
}
.add-example-top-col {
display: flex;
flex-direction: column;
gap: 12px;
min-width: 0; /* lets long unbreakable text shrink instead of overflowing */
}
/* URL input and Citoid fetch button, each on its own line */
.add-example-url-row {
display: flex;
flex-direction: column;
align-items: stretch;
gap: 8px;
}
.add-example-url-row .oo-ui-textInputWidget {
width: 100%;
}
.add-example-url-row .add-example-citoid-fetch {
align-self: flex-start;
}
.add-example-citoid-success {
font-size: 0.92em;
color: var(--wikt-palette-green6, #14866d);
}
/* Source-info section: "Malûmatên çavkaniyê" header + the jêder-* fields grid */
.add-example-jeder-section {
border-top: 1px solid var(--wikt-ae-divider);
background-color: var(--wikt-ae-section-bg);
padding: 1em 1.25em;
margin: 0.75em -1.25em 0; /* bleeds tint to the panel's side edges only */
}
.add-example-jeder-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
margin-bottom: 0.6em;
}
/* Section eyebrow style, matching the Entry wizard's small-caps section labels */
.add-example-jeder-header-label {
font-family: var(--wikt-ae-font-mono);
font-size: 11px;
letter-spacing: 0.12em;
color: var(--wikt-ae-text-muted);
}
.add-example-jeder-header .add-example-citoid-clear {
font-size: 12px;
}
.add-example-jeder-header .add-example-citoid-clear .oo-ui-iconElement-icon {
min-width: 14px;
min-height: 14px;
background-size: 14px;
}
/* jêder-* template fields: 12-column grid, each field spans its own jederDefs[key].span columns */
.add-example-jeder-fields {
display: grid;
grid-template-columns: repeat(12, minmax(0, 1fr));
gap: 4px 12px;
align-items: start;
}
.add-example-jeder-fields .oo-ui-fieldLayout {
min-width: 0; /* lets a field shrink below its content's natural width */
margin-top: 0 !important; /* overrides OOUI's own stacking margin, not wanted between fields sharing a grid row */
}
.add-example-field-span-1 { grid-column: span 1; }
.add-example-field-span-2 { grid-column: span 2; }
.add-example-field-span-3 { grid-column: span 3; }
.add-example-field-span-4 { grid-column: span 4; }
.add-example-field-span-5 { grid-column: span 5; }
.add-example-field-span-6 { grid-column: span 6; }
.add-example-field-span-12 { grid-column: span 12; }
.add-example-jeder-fields .oo-ui-fieldLayout-header label {
font-size: 0.95em;
}
.add-example-jeder-fields .oo-ui-textInputWidget {
max-width: 100%;
width: 100%;
font-size: 0.95em;
}
.add-example-jeder-fields .oo-ui-textInputWidget input,
.add-example-jeder-fields .oo-ui-textInputWidget textarea {
font-size: 0.95em;
padding: 4px 8px;
min-height: 2.2em;
line-height: 1.4;
resize: vertical;
}
/* Larger font for the top-section textareas than the bibliographic sub-fields below */
.add-example-top-col textarea {
font-size: 1.05em;
}
/* Bottom action row: Biweşîne + hint, spacer, Paqij bike, Betal bike */
.add-example-main-buttons {
display: flex;
align-items: center;
margin-top: 0.75em;
padding-top: 0.75em;
border-top: 1px solid var(--wikt-ae-divider);
gap: 0.5em;
flex-wrap: wrap; /* keep buttons from overflowing on narrow screens */
}
.add-example-ready-hint {
font-family: var(--wikt-ae-font-sans);
font-size: 12.5px;
color: var(--wikt-ae-text-muted);
}
.add-example-title-bold-hint {
display: block;
font-family: var(--wikt-ae-font-sans);
font-size: 12.5px;
color: var(--wikt-ae-destructive);
margin-top: 0.35em;
}
.add-example-buttons-spacer {
flex: 1 1 auto;
}
/* CSS-only loading spinner, matches dark/light mode */
.add-example-spinner {
display: inline-block;
width: 1.2em;
height: 1.2em;
vertical-align: middle;
border: 2px solid var(--wikt-ae-input-border);
border-top-color: var(--wikt-ae-accent);
border-radius: 50%;
animation: add-example-spin 0.8s linear infinite;
}
@keyframes add-example-spin {
to { transform: rotate(360deg); }
}
/* Narrow screens: collapse the top grid to one column */
@media (max-width: 640px) {
.add-example-top-grid {
grid-template-columns: 1fr;
}
}
/* Small screens: tighter padding, jêder-fields grid drops to 2 columns */
@media (max-width: 480px) {
.add-example-form {
padding: 0.75em;
}
.add-example-jeder-section {
margin-left: -0.75em;
margin-right: -0.75em;
}
.add-example-jeder-fields {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.add-example-jeder-fields [class*="add-example-field-span-"] {
grid-column: span 1;
}
.add-example-jeder-fields .add-example-field-span-12 {
grid-column: span 2;
}
}
/* Warns when the example/translation/transcription text has a literal linebreak */
.add-example-form textarea.add-example-has-linebreak {
border-color: var(--wikt-palette-yellow6, #ac6600) !important;
}
/* Backdrop mirrors the textarea's text with a marker at each linebreak; metrics synced from the textarea via JS */
.add-example-linebreak-backdrop {
position: absolute;
inset: 0;
z-index: 0;
margin: 0;
overflow: hidden;
white-space: pre-wrap;
word-wrap: break-word;
color: transparent;
background: transparent !important;
border-color: transparent !important;
box-shadow: none !important;
resize: none !important;
pointer-events: none;
display: none;
}
/* Textarea sits above its backdrop with a transparent background so the marker shows through */
.add-example-form textarea.add-example-has-linebreak-source {
position: relative;
z-index: 1;
background-color: transparent !important;
}
/* The ↵ marker itself, placed after each line followed by a linebreak */
.add-example-linebreak-mark {
background-color: var(--wikt-palette-yellow6, #ac6600);
color: var(--wikt-palette-white, #fff);
border-radius: 2px;
}
pd4blnfp4kf4ycv4bb8npjowab9xjbk
xortume
0
1358301
6342617
6297780
2026-08-25T13:20:48Z
Wikihez
7344
/* Çavkanî */
6342617
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Navdêr ===
{{navdêr|zza|c=m}}
# [[xortim|xortim]]
==== Etîmolojî ====
{{ji?|zza}}
==== Çavkanî ====
* {{malper|zza|sernav=xortume — Zazakî Ferheng|malper=Vate Ferheng|url=https://ferheng.vate.com.tr/cekuye/xortume|tarîxa-gihiştinê=2026/08/25}}
h3vnzx18nm3s8gc3tmae2bmaj7l9n36
6342645
6342617
2026-08-25T15:12:13Z
Balyozbot
7867
Bot: Paqijiyên kozmetîk (Lînk paqij kir.)
6342645
wikitext
text/x-wiki
== {{ziman|zza}} ==
=== Navdêr ===
{{navdêr|zza|c=m}}
# [[xortim]]
==== Etîmolojî ====
{{ji?|zza}}
==== Çavkanî ====
* {{malper|zza|sernav=xortume — Zazakî Ferheng|malper=Vate Ferheng|url=https://ferheng.vate.com.tr/cekuye/xortume|tarîxa-gihiştinê=2026/08/25}}
41gow51xsq5c1lddxagsgeg3ysl2pfc
Modul:jêder
828
1358529
6342647
6341511
2026-08-25T15:58:54Z
Wikihez
7344
6342647
Scribunto
text/plain
local export = {}
local parameters_module = "Module:parameters"
local quote_module = "Module:quote"
--[==[
Adapter for [[Şablon:jêder]]. Reads the template's existing parameter names
(2=source, jêgirtin/jg=quotation text, url=/arşîv=, werger/w/tercime/t=
translation, nekat=suppress categorization) and calls Modul:quote's
quote_t-equivalent (export.quote_from_args()) instead of Modul:usex's
format_usex().
This routes {{jêder|...}} through the same code that renders {{quote-book}}/
{{quote-journal}}, so url=/arşîv= get the standard "‎<sup>[url]</sup>"
bare-link treatment, and a date embedded in "2=" gets pulled out into year=
so it's actually recognized as a date (formatted, categorized, etc.) instead
of sitting as inert text inside the title.
Many existing {{jêder|...}} citations embed a date somewhere in the free-text
source, e.g.:
2=Hemîd Deqorî di Koma "Zimanê Kurdî" li ser Rûnameyê de, 5/2013
2=Qaçaxê Mirad, Gava Çara (helbest), Yêrêvan, 1972.
2=Prof. Maksîmê Xemoyî, Ferhenga Kurdî-Rûsî ya Frazêologî, Yêrêvan, 1979,
wergera ji rûsî: Têmûrê Xelîl
2=Husein Muhammed axiftina kurmancekî Çewligê neqil dike, Koma "Zimanê
Kurdî" li ser Rûnameyê 4/2013
2=tirej.net, Ezîz Xemcivîn, 23/1/2005
2=İkram Oğuz, ''Jîyan bi kurdî xweş e'', '''2022''', ''Weşanên NavKurd'',
r.187
Note the date isn't reliably the last piece of text (the third example has a
translator credit after the year), isn't reliably its own comma-set-off
field either (the fourth example has no comma before "4/2013" at all), and
isn't reliably bare digits either (the sixth example has the year wrapped in
wikitext bold markup, "'''2022'''", which match_date_field() strips before
checking any shape) -- these are historically loose, comma-separated field
lists (author, title, place, year, translator, ...) with no fixed field
count, order, or internal formatting. So extract_trailing_date() below
splits the source text on commas (split_fields()) and checks each individual
field (match_date_field()) against the shapes below, searched from the last
field backward so a genuinely trailing date is preferred when more than one field happens to be
date-shaped; whichever field matches gets spliced out and the remaining
fields are rejoined into author=. If no whole field matches, it falls back to
checking whether the last field merely *ends* in one of these shapes
(match_date_suffix()), for a date glued on with just a space and no comma of
its own, as in the fourth example. Shapes tried, in order from most to least
specific so a full date isn't mistaken for just its bare year:
1. ISO "YYYY-MM-DD"
2. "D/M/YYYY" or "DD/MM/YYYY" (day/month/year, day first -- "23/1/2005" in
the fifth example can only be day-first, since there's no 23rd month)
3. "D.M.YYYY" or "DD.MM.YYYY" (dot-separated, day first, same as shape 2 --
e.g. "22.02.2010")
4. "M/YYYY" or "MM/YYYY" (month+year shorthand)
5. Bare "YYYY"
Shapes 1-3 are full dates and go into tarîx=, which Modul:quote parses via
mw.getContentLanguage():formatDate() wrapped in a pcall (see format_date()
in Modul quote.lua), so an extracted chunk that turns out not to actually
parse fails soft (falls back to showing the raw text) rather than erroring
the whole citation. Shapes 2-3 are reformatted to ISO before being passed
through, rather than passed through as typed, since MediaWiki's date parser
doesn't reliably accept slash- or dot-separated dates directly (and
DD/MM vs MM/DD is locale-ambiguous, which ISO sidesteps). Shapes 4-5 go into
year=, since that's the field format_date_args() gives its own
special-cased shorthand handling to. (A spelled-out Kurdish month name, e.g.
"11 tebax 1972", isn't matched: none of the real examples above use one, and
Modul:quote's own fix_date() already translates Kurdish month names to
English for whatever ends up in date=/tarîx= -- so if this turns out to be
needed after all, matching one out of a free-text blob is a separate, harder
problem, not this scope.)
If no field matches any of these, the source text is left untouched and no
year=/tarîx= is set (matches the old "no date given" behavior, i.e. the "Tu
dikarî tarîxa vê jêgirtinê binivîsî?" request).
export.quote_t() always reads frame:getParent().args itself and can't be
handed a pre-built table, so we go through export.quote_from_args() instead,
which accepts a plain table already using Modul:quote's canonical parameter
names (built below from {{jêder}}'s existing, unchanged parameter names).
Note: parameter spec keys below are intentionally the existing Kurdish names
(they're the literal parameter names used across the wiki already and can't
be renamed without a bot rewrite of every article). Once read out of `args`,
though, everything is copied into plain-English locals immediately below —
never access a non-ASCII key with dot notation (e.g. args.arşîv or
args.jêgirtin); Lua identifiers after a "." are restricted to ASCII
letters/digits/underscore, so that's a syntax error, not just a style
choice. Always use bracket string-key access instead (args["arşîv"]).
]==]
-- Split `text` on commas into fields, tolerating any amount of whitespace after each comma (but not requiring
-- any). Free-text jêder citations are historically loose comma-separated field lists (author, title, place,
-- year, translator, ...) with no fixed field count or order, so this is how extract_trailing_date() below finds
-- the date wherever it falls, not just at the very end of the string.
local function split_fields(text)
local fields = {}
for field in (text .. ","):gmatch("(.-),%s*") do
table.insert(fields, field)
end
return fields
end
-- Check whether a single field (already comma-delimited, so containing no further commas) is one of the
-- recognized date shapes (see the module-level comment above), tolerating an optional trailing period (for a
-- date field that happens to be the citation's last field, right before its closing punctuation). Returns
-- dateValue, isFullDate, or nil if `field` isn't date-shaped.
local function match_date_field(field)
field = field:match("^%s*(.-)%s*$")
-- Strip wikitext bold/italic markup ('', ''', or '''''), e.g. a bare year sometimes appears as
-- "'''2022'''" in the raw citation text. Modul:quote bolds year= itself when displaying it (bold_year=true
-- for quote_t; see show_quote()/format_date_args() in Modul quote.lua), so passing the bare digits through
-- and letting it re-add the markup is simpler than trying to preserve and reapply the original markup here.
field = field:match("^'*(.-)'*$")
-- ISO dates go into tarîx=/date=, and Modul:quote's process_ante_circa_post() (which recognizes an
-- approximation-marker prefix) is only ever applied to year=/start_year=, not to date=/start_date= (see
-- where it's called in Modul quote.lua) -- so a leading marker here is deliberately *not* stripped; an ISO
-- field with one just won't match this shape and is left alone (falls through to the year=-bound shapes
-- below, which also won't match a full date, so ultimately falls through to "not a date field" and stays in
-- the citation text untouched, same as any other unrecognized field).
local yr, mon, day = field:match("^(%d%d%d%d)%-(%d%d?)%-(%d%d?)%.?$")
if yr then
-- Zero-pad month/day: some date parsers are strict about ISO 8601's fixed-width MM/DD.
return ("%s-%02d-%02d"):format(yr, tonumber(mon), tonumber(day)), true
end
-- "D/M/YYYY" or "DD/MM/YYYY" (day/month/year, day first, per Kurdish/European convention -- e.g. "23/1/2005"
-- can only be day-first since there's no 23rd month). Reformatted to ISO rather than passed through as-is,
-- since that's the shape already confirmed to parse reliably above; MediaWiki's date parser doesn't reliably
-- accept slash-separated dates directly (and DD/MM vs MM/DD is locale-ambiguous, which ISO sidesteps).
local slashDay, slashMon, slashYr = field:match("^(%d%d?)/(%d%d?)/(%d%d%d%d)%.?$")
if slashDay then
local d, m = tonumber(slashDay), tonumber(slashMon)
if d >= 1 and d <= 31 and m >= 1 and m <= 12 then
return ("%s-%02d-%02d"):format(slashYr, m, d), true
end
end
-- "D.M.YYYY" or "DD.MM.YYYY" (day/month/year, day first, same convention as the slash shape above).
local dotDay, dotMon, dotYr = field:match("^(%d%d?)%.(%d%d?)%.(%d%d%d%d)%.?$")
if dotDay then
local d, m = tonumber(dotDay), tonumber(dotMon)
if d >= 1 and d <= 31 and m >= 1 and m <= 12 then
return ("%s-%02d-%02d"):format(dotYr, m, d), true
end
end
-- Strip an optional leading approximation marker before checking the year=-bound shapes below, then reattach
-- it (translated to the prefix process_ante_circa_post() actually recognizes as input, if necessary) to
-- whichever shape matched. "~" is only the *display* glyph that function renders "c."/"nêzîkî" as (see the
-- `abbrs` table in Modul quote.lua); it isn't itself valid input there, so it's translated to "c." here.
-- "c."/"a."/"p."/"nêzîkî" are already valid input and pass through unchanged.
local approx, rest = "", field
local tildeRest = field:match("^~%s*(.+)$")
if tildeRest then
approx, rest = "c. ", tildeRest
else
local word, wordRest = field:match("^(nêzîkî)%s+(.+)$")
if word then
approx, rest = word .. " ", wordRest
else
local letter, letterRest = field:match("^([acp]%.)%s*(.+)$")
if letter then
approx, rest = letter .. " ", letterRest
end
end
end
-- Note: format_date_args()'s "M/YYYY" -> localized-month-name conversion (the "Accept M/YYYY or MM/YYYY in
-- year=" comment in Modul quote.lua) runs on year= *before* process_ante_circa_post() strips the marker, so
-- combining an approximation marker with this shape (e.g. "~5/2013") won't get that conversion -- it'll
-- still render correctly (marker + "5/2013"), just not with a spelled-out month. Not worth working around
-- for this adapter; the bare-year case below is unaffected.
local mon2, yr2 = rest:match("^(%d%d?)/(%d%d%d%d)%.?$")
if mon2 and tonumber(mon2) >= 1 and tonumber(mon2) <= 12 then
return approx .. mon2 .. "/" .. yr2, false
end
yr = rest:match("^(%d%d%d%d)%.?$")
if yr then
return approx .. yr, false
end
return nil, false
end
-- Like match_date_field(), but for a date that's merely the trailing portion of a field, glued on with just a
-- space and no comma of its own -- e.g. "Koma "Zimanê Kurdî" li ser Rûnameyê 4/2013", where "4/2013" isn't a
-- separate comma-delimited field. Tries the field's last 1-3 whitespace-separated words as a candidate date
-- (3 covers every shape match_date_field() recognizes, e.g. "c. 1692" is 2 words, "nêzîkî 1692" is 2 words),
-- from most to fewest words so a longer match is preferred when ambiguous. Returns remainderOfField, dateValue,
-- isFullDate, or nil if none of the trailing 1-3 words are date-shaped.
local function match_date_suffix(field)
local words = {}
for word in field:gmatch("%S+") do
table.insert(words, word)
end
for n = math.min(3, #words), 1, -1 do
local candidate = table.concat(words, " ", #words - n + 1, #words)
local dateValue, isFullDate = match_date_field(candidate)
if dateValue then
return table.concat(words, " ", 1, #words - n), dateValue, isFullDate
end
end
return nil, nil, false
end
-- See the module-level comment above for the shapes tried and why. Splits `text` into comma-delimited fields and
-- returns remainderPart (the remaining fields re-joined), dateValue, isFullDate for whichever field (searched
-- from the end, so a genuinely trailing date is preferred when more than one field happens to be date-shaped) is
-- date-shaped, or nil if no field is. If no whole field matches, falls back to match_date_suffix() on just the
-- last field, for a date glued onto the end of it without a comma of its own.
local function extract_trailing_date(text)
local fields = split_fields(text)
for i = #fields, 1, -1 do
local dateValue, isFullDate = match_date_field(fields[i])
if dateValue then
table.remove(fields, i)
return table.concat(fields, ", "), dateValue, isFullDate
end
end
if #fields > 0 then
local remainder, dateValue, isFullDate = match_date_suffix(fields[#fields])
if dateValue then
fields[#fields] = remainder
if fields[#fields] == "" then
table.remove(fields, #fields)
end
return table.concat(fields, ", "), dateValue, isFullDate
end
end
return nil, nil, false
end
function export.jeder_t(frame)
local parentArgs = frame:getParent().args
local args = require(parameters_module).process(parentArgs, {
-- Deliberately untyped ([1], sc, nekat): quote_from_args()'s pipeline (Modul:quote's own
-- get_args()/Module:parameters.process()) does its own language/script/boolean conversion from the raw
-- string, so pre-converting here would hand it an already-converted object/boolean where it expects a
-- plain string.
[1] = {required = true},
[2] = true, -- source citation (author, year, etc.)
["jêgirtin"] = true, -- quotation text
["jg"] = {alias_of = "jêgirtin"},
["sc"] = true,
["tr"] = true, -- transliteration
["url"] = true,
["arşîv"] = true, -- archive URL
["werger"] = true, -- translation
["w"] = {alias_of = "werger"},
["tercime"] = {alias_of = "werger"},
["t"] = {alias_of = "werger"},
["nekat"] = true, -- suppress categorization
})
-- Copy everything into English-named locals right away, using bracket
-- string-key access for every named (non-numeric) parameter.
local lang = args[1]
local source = args[2]
local quotationText = args["jêgirtin"]
local script = args["sc"]
local transliteration = args["tr"]
local url = args["url"]
local archiveUrl = args["arşîv"]
local translation = args["werger"]
local suppressCategories = args["nekat"]
-- Pull a trailing date off the raw source-citation text (see extract_trailing_date() above for the shapes
-- tried) and pass it through as tarîx= (full dates) or year= (the "M/YYYY"/bare-"YYYY" shorthand shapes).
local date, year
if source and source ~= "" then
local remainderPart, dateValue, isFullDate = extract_trailing_date(source)
if remainderPart then
source = remainderPart
if isFullDate then
date = dateValue
else
year = dateValue
end
end
end
-- Build a plain table using Modul:quote's own canonical parameter names.
-- "2" (the raw source-citation text, with any trailing date now stripped)
-- maps onto "author", not "title": title= gets wrapped in <cite>...</cite>
-- (always italicized), which is wrong here since "2" is free text that
-- usually mixes an author name in with the actual work title and other
-- info, not a title on its own. author= doesn't get that <cite> wrapping
-- (add_author() only bolds it via j_lazim, same highlight title would
-- get if left empty), so the whole blob displays plainly instead of
-- being incorrectly italicized wholesale. notitle="true" suppresses the
-- "please provide a title" maintenance line and category that would
-- otherwise show since no title= is given; url=/archiveurl='s bare
-- superscript-link attachment isn't title-specific (it runs
-- unconditionally after the title slot, whether or not a title was
-- shown), so it still attaches right after the author text here.
local citeArgs = {
[1] = lang,
author = source ~= "" and source or nil,
notitle = "true",
date = date,
year = year,
text = quotationText ~= "" and quotationText or nil,
sc = script ~= "" and script or nil,
tr = transliteration ~= "" and transliteration or nil,
t = translation ~= "" and translation or nil,
url = url ~= "" and url or nil,
-- Only forward a real archive URL: Modul:quote validates archiveurl= against the Wayback Machine's
-- URL format (or requires an explicit archivedate=), so an unconfirmed guessed link would error here
-- instead of silently rendering, unlike the old hand-rolled fallback this adapter used to have.
archiveurl = archiveUrl ~= "" and archiveUrl or nil,
nocat = suppressCategories,
}
return require(quote_module).quote_from_args(citeArgs)
end
return export
bwp86lzqda55we2r1mc6wy89dml3266
6342653
6342647
2026-08-26T08:28:50Z
Wikihez
7344
6342653
Scribunto
text/plain
local export = {}
local parameters_module = "Module:parameters"
local quote_module = "Module:quote"
--[==[
Adapter for [[Şablon:jêder]]: maps its params onto Modul:quote's canonical names and renders via quote_from_args().
The free-text source (2=) often has a date embedded in it (e.g. "author, title, place, 1972", in no fixed order or
field count); extract_trailing_date() below finds and strips it, passing it through as tarîx= (full date) or
year= (M/YYYY or bare-YYYY shorthand) so Modul:quote actually recognizes it as a date instead of inert text.
Param spec keys below are the existing Kurdish names used across the wiki; args must be read with bracket access
(args["arşîv"]), not dot notation, since Lua identifiers after "." are ASCII-only.
]==]
-- Splits text on commas into fields, trimming whitespace after each comma.
local function split_fields(text)
local fields = {}
for field in (text .. ","):gmatch("(.-),%s*") do
table.insert(fields, field)
end
return fields
end
-- Returns dateValue, isFullDate for a single comma-delimited field matching a recognized date shape (ISO,
-- D/M/YYYY, D.M.YYYY, M/YYYY, bare YYYY), tolerating an optional trailing period; nil if it isn't date-shaped.
local function match_date_field(field)
field = field:match("^%s*(.-)%s*$")
-- Strips wikitext bold/italic markup, e.g. a bare year written as "'''2022'''".
field = field:match("^'*(.-)'*$")
-- ISO "YYYY-MM-DD".
local yr, mon, day = field:match("^(%d%d%d%d)%-(%d%d?)%-(%d%d?)%.?$")
if yr then
return ("%s-%02d-%02d"):format(yr, tonumber(mon), tonumber(day)), true
end
-- "D/M/YYYY" or "DD/MM/YYYY", day first.
local slashDay, slashMon, slashYr = field:match("^(%d%d?)/(%d%d?)/(%d%d%d%d)%.?$")
if slashDay then
local d, m = tonumber(slashDay), tonumber(slashMon)
if d >= 1 and d <= 31 and m >= 1 and m <= 12 then
return ("%s-%02d-%02d"):format(slashYr, m, d), true
end
end
-- "D.M.YYYY" or "DD.MM.YYYY", day first.
local dotDay, dotMon, dotYr = field:match("^(%d%d?)%.(%d%d?)%.(%d%d%d%d)%.?$")
if dotDay then
local d, m = tonumber(dotDay), tonumber(dotMon)
if d >= 1 and d <= 31 and m >= 1 and m <= 12 then
return ("%s-%02d-%02d"):format(dotYr, m, d), true
end
end
-- Strips a leading approximation marker (~, c., a., p., nêzîkî) before checking the year=-only shapes below.
local approx, rest = "", field
local tildeRest = field:match("^~%s*(.+)$")
if tildeRest then
approx, rest = "c. ", tildeRest
else
local word, wordRest = field:match("^(nêzîkî)%s+(.+)$")
if word then
approx, rest = word .. " ", wordRest
else
local letter, letterRest = field:match("^([acp]%.)%s*(.+)$")
if letter then
approx, rest = letter .. " ", letterRest
end
end
end
-- "M/YYYY" or "MM/YYYY" month+year shorthand.
local mon2, yr2 = rest:match("^(%d%d?)/(%d%d%d%d)%.?$")
if mon2 and tonumber(mon2) >= 1 and tonumber(mon2) <= 12 then
return approx .. mon2 .. "/" .. yr2, false
end
-- Bare "YYYY".
yr = rest:match("^(%d%d%d%d)%.?$")
if yr then
return approx .. yr, false
end
return nil, false
end
-- Like match_date_field(), but for a date glued onto the end of a field with no comma of its own (e.g.
-- "... Rûnameyê 4/2013"). Tries the field's last 1-3 words as a candidate date, longest first.
-- Returns remainderOfField, dateValue, isFullDate, or nil if no trailing words are date-shaped.
local function match_date_suffix(field)
local words = {}
for word in field:gmatch("%S+") do
table.insert(words, word)
end
for n = math.min(3, #words), 1, -1 do
local candidate = table.concat(words, " ", #words - n + 1, #words)
local dateValue, isFullDate = match_date_field(candidate)
if dateValue then
return table.concat(words, " ", 1, #words - n), dateValue, isFullDate
end
end
return nil, nil, false
end
-- Finds and removes the last date-shaped field in a comma-separated citation string (searched from the end).
-- Falls back to match_date_suffix() on the last field if no whole field matches.
-- Returns remainderPart (remaining fields re-joined), dateValue, isFullDate, or nil if no date was found.
local function extract_trailing_date(text)
local fields = split_fields(text)
for i = #fields, 1, -1 do
local dateValue, isFullDate = match_date_field(fields[i])
if dateValue then
table.remove(fields, i)
return table.concat(fields, ", "), dateValue, isFullDate
end
end
if #fields > 0 then
local remainder, dateValue, isFullDate = match_date_suffix(fields[#fields])
if dateValue then
fields[#fields] = remainder
if fields[#fields] == "" then
table.remove(fields, #fields)
end
return table.concat(fields, ", "), dateValue, isFullDate
end
end
return nil, nil, false
end
function export.jeder_t(frame)
local parentArgs = frame:getParent().args
local args = require(parameters_module).process(parentArgs, {
-- Untyped: quote_from_args()'s own pipeline does the language/script/boolean conversion.
[1] = {required = true},
[2] = true, -- source citation (author, year, etc.)
["jêgirtin"] = true, -- quotation text
["jg"] = {alias_of = "jêgirtin"},
["sc"] = true,
["tr"] = true, -- transliteration
["url"] = true,
["arşîv"] = true, -- archive URL
["werger"] = true, -- translation
["w"] = {alias_of = "werger"},
["tercime"] = {alias_of = "werger"},
["t"] = {alias_of = "werger"},
["nekat"] = true, -- suppress categorization
})
-- Copy params into English-named locals (bracket access for non-ASCII keys).
local lang = args[1]
local source = args[2]
local quotationText = args["jêgirtin"]
local script = args["sc"]
local transliteration = args["tr"]
local url = args["url"]
local archiveUrl = args["arşîv"]
local translation = args["werger"]
local suppressCategories = args["nekat"]
-- Extract a trailing date from the source text, if any (see extract_trailing_date() above).
local date, year
if source and source ~= "" then
local remainderPart, dateValue, isFullDate = extract_trailing_date(source)
if remainderPart then
source = remainderPart
if isFullDate then
date = dateValue
else
year = dateValue
end
end
end
-- "2" maps onto author= (not title=), so the free-text blob displays plainly instead of being italicized as
-- a <cite> title; notitle="true" suppresses the "please provide a title" maintenance line.
local citeArgs = {
[1] = lang,
author = source ~= "" and source or nil,
notitle = "true",
date = date,
year = year,
text = quotationText ~= "" and quotationText or nil,
sc = script ~= "" and script or nil,
tr = transliteration ~= "" and transliteration or nil,
t = translation ~= "" and translation or nil,
url = url ~= "" and url or nil,
-- Modul:quote validates archiveurl= against the Wayback Machine's URL format, so only forward a real one.
archiveurl = archiveUrl ~= "" and archiveUrl or nil,
nocat = suppressCategories,
}
return require(quote_module).quote_from_args(citeArgs)
end
return export
3g6dvlrgfybnc0j292v87gzp34jbo1i
Şablon:Ç:Chyet:2003
10
1358577
6342664
6333579
2026-08-26T09:59:22Z
Wikihez
7344
6342664
wikitext
text/x-wiki
{{#invoke:quote|call_template
|template=cite-book
|last=Chyet
|first=Michael L.
|authorlink=Michael L. Chyet
|title={{zim|en|Kurdish–English Dictionary}} Ferhenga Kurmancî - Inglîzî
|entry={{lang|ku|{{{1|{{pagename}}}}}}}
|url=https://archive.org/details/kurdishenglishdictionarymichaell.chyet_202001/Kurdish-English%20Dictionary%20-%20%5BMichael%20L.%20Chyet%5D/page/n1/mode/2up
|location=New Haven û London
|publisher={{zim|en|Yale University Press}}
|year=2003
|others=with selected etymologies by Martin Schwartz<t:li gel etîmolojiyên bijarte ji hêla Martin Schwartz ve>
|pageparam=page,2,r,rûpel
|pageurl=https://archive.org/details/kurdishenglishdictionarymichaell.chyet_202001/Kurdish-English%20Dictionary%20-%20%5BMichael%20L.%20Chyet%5D/page/n{{#expr:{{#invoke:string/templates|match|{{{page|{{{pages|{{{rûpel|{{{r|}}}}}}}}}}}}|[0-9]+|}}+45}}/mode/2up
|allowparams=1,r,rûpel
}}<noinclude>{{refcat|ku|en}}</noinclude>
jjqi2g6qx5ypxbktth94mdkzmfps1e9
Şablon:R:Lexico
10
1358772
6342649
6340872
2026-08-25T22:27:21Z
EmausBot
6143
Beralîkirina ducarî li ser [[Şablon:Ç:en:Lexico]] hat sererastkirin
6342649
wikitext
text/x-wiki
#BERALÎKIRIN [[Şablon:Ç:en:Lexico]]
8tj2exb1edw9koiv45c3de1wh0mb21a
Şablon:R:Lexico/belge
10
1358773
6342650
6340874
2026-08-25T22:27:31Z
EmausBot
6143
Beralîkirina ducarî li ser [[Şablon:Ç:en:Lexico/belge]] hat sererastkirin
6342650
wikitext
text/x-wiki
#BERALÎKIRIN [[Şablon:Ç:en:Lexico/belge]]
pvhgyw5rcrkayjhfmfw05w76gtv4701
Kategorî:Daxwazên tarîxê bi zazakî
14
1358839
6342639
2026-08-25T13:49:41Z
Wikihez
7344
Rûpel bi "{{katbike}}" hat çêkirin
6342639
wikitext
text/x-wiki
{{katbike}}
1dpx16ue3vl1l6c1hkqu0q6ftpl2ezh
Şablon:Ç:Gewranî
10
1358840
6342665
2026-08-26T10:15:17Z
Wikihez
7344
Rûpel bi "{{#invoke:quote|call_template |template=cite-book |nivîskar=Ali Seydo Ali Gewranî |authorlink=Elî Seydo Gewranî |title=Ferhenga Kurdî Nûjen |entry={{{1|{{pagename}}}}} |url=https://archive.org/details/ferhenga-kurdi-nujen-2/Ferhenga%20kurdi%20n%C3%BBjen%20%20%201 |location= |publisher= |year=1985 |pageparam=r,rûpel |pageurl={{#ifexpr:{{#invoke:string/templates|match|{{{rûpel|{{{r|}}}}}}|[0-9]+|}}<342|https://archive.org/details/ferhenga-kurdi-nujen-2/Ferhen..." hat çêkirin
6342665
wikitext
text/x-wiki
{{#invoke:quote|call_template
|template=cite-book
|nivîskar=Ali Seydo Ali Gewranî
|authorlink=Elî Seydo Gewranî
|title=Ferhenga Kurdî Nûjen
|entry={{{1|{{pagename}}}}}
|url=https://archive.org/details/ferhenga-kurdi-nujen-2/Ferhenga%20kurdi%20n%C3%BBjen%20%20%201
|location=
|publisher=
|year=1985
|pageparam=r,rûpel
|pageurl={{#ifexpr:{{#invoke:string/templates|match|{{{rûpel|{{{r|}}}}}}|[0-9]+|}}<342|https://archive.org/details/ferhenga-kurdi-nujen-2/Ferhenga%20kurdi%20n%C3%BBjen%20%20%201/page/{{#expr:{{#invoke:string/templates|match|{{{rûpel|{{{r|}}}}}}|[0-9]+|}}+2}}/mode/2up|https://archive.org/details/ferhenga-kurdi-nujen-2/Ferhenga%20kurdi%20n%C3%BBjen%20%20%202/page/{{#expr:{{#invoke:string/templates|match|{{{rûpel|{{{r|}}}}}}|[0-9]+|}}+1}}/mode/2up}}
|allowparams=1,r,rûpel
}}<noinclude>{{refcat|ku|en}}</noinclude>
1kd1sl3rcjwrc6lv4f9ex0disay2hsm
6342666
6342665
2026-08-26T10:15:27Z
Wikihez
7344
Wikihezî/ê navê [[Şablon:Gewranî]] weke [[Şablon:Ç:Gewranî]] guhart
6342665
wikitext
text/x-wiki
{{#invoke:quote|call_template
|template=cite-book
|nivîskar=Ali Seydo Ali Gewranî
|authorlink=Elî Seydo Gewranî
|title=Ferhenga Kurdî Nûjen
|entry={{{1|{{pagename}}}}}
|url=https://archive.org/details/ferhenga-kurdi-nujen-2/Ferhenga%20kurdi%20n%C3%BBjen%20%20%201
|location=
|publisher=
|year=1985
|pageparam=r,rûpel
|pageurl={{#ifexpr:{{#invoke:string/templates|match|{{{rûpel|{{{r|}}}}}}|[0-9]+|}}<342|https://archive.org/details/ferhenga-kurdi-nujen-2/Ferhenga%20kurdi%20n%C3%BBjen%20%20%201/page/{{#expr:{{#invoke:string/templates|match|{{{rûpel|{{{r|}}}}}}|[0-9]+|}}+2}}/mode/2up|https://archive.org/details/ferhenga-kurdi-nujen-2/Ferhenga%20kurdi%20n%C3%BBjen%20%20%202/page/{{#expr:{{#invoke:string/templates|match|{{{rûpel|{{{r|}}}}}}|[0-9]+|}}+1}}/mode/2up}}
|allowparams=1,r,rûpel
}}<noinclude>{{refcat|ku|en}}</noinclude>
1kd1sl3rcjwrc6lv4f9ex0disay2hsm
6342675
6342666
2026-08-26T10:30:52Z
Wikihez
7344
6342675
wikitext
text/x-wiki
{{#invoke:quote|call_template
|template=cite-book
|nivîskar=Ali Seydo Ali Gewranî
|authorlink=Elî Seydo Gewranî
|title=Ferhenga Kurdî Nûjen
|entry={{{1|{{pagename}}}}}
|url=https://archive.org/details/ferhenga-kurdi-nujen-2/Ferhenga%20kurdi%20n%C3%BBjen%20%20%201
|location=
|publisher=
|year=1985
|pageparam=r,rûpel
|pageurl={{#ifexpr:{{#invoke:string/templates|match|{{{rûpel|{{{r|}}}}}}|[0-9]+|}}<342|https://archive.org/details/ferhenga-kurdi-nujen-2/Ferhenga%20kurdi%20n%C3%BBjen%20%20%201/page/{{#expr:{{#invoke:string/templates|match|{{{rûpel|{{{r|}}}}}}|[0-9]+|}}+2}}/mode/2up|https://archive.org/details/ferhenga-kurdi-nujen-2/Ferhenga%20kurdi%20n%C3%BBjen%20%20%202/page/{{#expr:{{#invoke:string/templates|match|{{{rûpel|{{{r|}}}}}}|[0-9]+|}}+1}}/mode/2up}}
|allowparams=1,r,rûpel
}}<noinclude>{{refcat|ku|ar}}</noinclude>
5gs723vmk58a3r3o6kvrsa5erge14q3
Şablon:Gewranî
10
1358841
6342667
2026-08-26T10:15:28Z
Wikihez
7344
Wikihezî/ê navê [[Şablon:Gewranî]] weke [[Şablon:Ç:Gewranî]] guhart
6342667
wikitext
text/x-wiki
#BERALÎKIRIN [[Şablon:Ç:Gewranî]]
dahtmumwzefjcb7phbdi58w1p41dp7v
Şablon:Ali Seydo Ali Gewranî Ferhenga Kurdî Nûjen
10
1358842
6342668
2026-08-26T10:15:57Z
Wikihez
7344
Ji bo [[Şablon:Ç:Gewranî]] hat beralîkirin
6342668
wikitext
text/x-wiki
#BERALÎKIRIN [[Şablon:Ç:Gewranî]]
dahtmumwzefjcb7phbdi58w1p41dp7v
Şablon:ferhenga ronak
10
1358843
6342677
2026-08-26T10:33:21Z
Wikihez
7344
Wikihezî/ê navê [[Şablon:ferhenga ronak]] weke [[Şablon:Ç:Sêfidîn Ehmed]] guhart
6342677
wikitext
text/x-wiki
#BERALÎKIRIN [[Şablon:Ç:Sêfidîn Ehmed]]
stbcivclzjrwh6y57687a1ga4koh95y
Kategorî:Tenê di çend ferhengan de bi kurmancî
14
1358844
6342683
2026-08-26T10:53:58Z
Wikihez
7344
Bi riya [[Bikarhêner:Wikihez/skrîpt/js/addAutoCat.js/belge|JS]]: {{katbike}} (bêyî înterwîkî)
6342683
wikitext
text/x-wiki
{{katbike}}
1dpx16ue3vl1l6c1hkqu0q6ftpl2ezh
Şablon:Zana Farqînî
10
1358845
6342688
2026-08-26T11:07:34Z
Wikihez
7344
Wikihezî/ê navê [[Şablon:Zana Farqînî]] weke [[Şablon:Farqînî:2005]] guhart
6342688
wikitext
text/x-wiki
#BERALÎKIRIN [[Şablon:Farqînî:2005]]
nnrpoint9w6e6ozdtarkbems7nqzmqu
6342691
6342688
2026-08-26T11:08:08Z
Wikihez
7344
Hedefa beralîkirinê ji [[Şablon:Farqînî:2005]] ber bi [[Şablon:Ç:Farqînî:2005]] ve guhart
6342691
wikitext
text/x-wiki
#BERALÎKIRIN [[Şablon:Ç:Farqînî:2005]]
qq9bekphd08sgr9x5b5m7g5sthqckxo
Şablon:Farqînî:2005
10
1358846
6342690
2026-08-26T11:07:46Z
Wikihez
7344
Wikihezî/ê navê [[Şablon:Farqînî:2005]] weke [[Şablon:Ç:Farqînî:2005]] guhart
6342690
wikitext
text/x-wiki
#BERALÎKIRIN [[Şablon:Ç:Farqînî:2005]]
qq9bekphd08sgr9x5b5m7g5sthqckxo