Wikiquote
wowikiquote
https://wo.wikiquote.org/wiki/X%C3%ABt_wu_nj%C3%ABkk
MediaWiki 1.42.0-wmf.20
first-letter
Xibaarukaay
Jagleel
Waxtaan
Jëfandikukat
Waxtaani jëfandikukat
Wikiquote
Wikiquote waxtaan
Dencukaay
Waxtaani dencukaay
MediaWiki
Waxtaani MediaWiki
Royuwaay
Waxtaani royuwaay
Ndimbal
Waxtaani ndimbal
Wàll
Waxtaani wàll
TimedText
TimedText talk
Module
Discussion module
Royuwaay:Delete
10
1752
5401
4063
2020-06-29T22:29:15Z
Samuele2002
1356
fix [[Special:LintErrors]]
wikitext
text/x-wiki
{| style="margin:0.5em auto; width:95%; background-color:#FFFACD; border:2px solid #88A; padding:5px; text align:left"
|'''This page has been nominated for [[Meta:Meta:Deletion policy#Criteria for speedy deletion|speedy deletion]]'''{{#if:{{{soon|}}}| '''after a short period of time.''' This delay is intended to give the contributor time to modify the page to make it relevant. If it is relevant, please remove this tag.}}{{#if:{{{1|}}}|. The user who left this tag provided the following reason:<div style="margin-left:2em" align="center">{{{1}}}</div>|.<br />}}
|-
|style="font-size:.9em;"|If you disagree with its speedy deletion, remove the template and discuss it on [[{{TALKPAGENAME}}|its talk page]]. <div align="center"><small>'''[[Meta:Administrators|Administrators]]:''' Please check the [{{fullurl:{{FULLPAGENAME}}|action=history}} page history], especially the [{{fullurl:{{FULLPAGENAME}}|diff=0}} last diff], before [{{fullurl:{{FULLPAGENAME}}|action=delete}} deleting].</small></div>
|}<includeonly>
[[Category:Deleteme]]
</includeonly>
l1hoi23dm1aauba52x8nj3lzsxj2ial
Wikiquote:Nospam
4
1772
4142
4138
2007-10-13T13:47:47Z
Drini
19
wikitext
text/x-wiki
== Pages locked from recreation ==
* {{:*}}
* {{:MediaWiki Talk:Ipb cant unblock}}
* {{:MediaWiki Talk:Ipb cant unblock/}}
* {{:MediaWiki Talk:Ipb cant unblock/index.php}}
* {{:MediaWiki Talk:Ipb cant unblock/w/index.php}}
* {{:MediaWiki Talk:Ipb cant unblock/w/w/index.php}}
* {{:MediaWiki Talk:Ipb cant unblock/w/w/w/index.php}}
* {{:MediaWiki Talk:Ipb cant unblock/w/w/w/w/w/index.php}}
* {{:MediaWiki talk:Ipb already blocked/wiki/MediaWiki talk:Ipb already blocked/w/w/w/index.php}}
* {{:MediaWiki talk:Ipb already blocked/wiki/MediaWiki talk:Ipb already blocked/w/w/w/w/index.php}}
* {{:Talk:Main Page/}}
* {{:Talk:Main Page/index.php}}
* {{:Talk:Main Page/w/index.php}}
* {{:Talk:Main Page/w/w/index.php}}
* {{:Talk:Main Page/w/w/w/index.php}}
* {{:Talk:Main Page/w/w/w/w/index.php}}
* {{:Main Page/index.php}}
* {{:Main Page/w/index.php}}
* {{:Main Page/w/w/index.php}}
* {{:Main Page/w/w/w/index.php}}
* {{:Main Page/w/w/w/w/index.php}}
* {{:Talk:Main Page/w/index.php?title=Main Page/w/index.php}}
* {{:index.php}}
* {{:W/index.php}}
* {{:W/w/index.php}}
* {{:W/w/w/index.php}}
* {{:W/w/w/w/index.php}}
* {{:W/w/w/w/w/w/index.php}}
<!-- wiktionaries are case sensitive, but it won't hurt on other wikis, so again: -->
* {{:w/index.php}}
* {{:w/w/index.php}}
* {{:w/w/w/index.php}}
* {{:w/w/w/w/index.php}}
* {{:w/w/w/w/w/w/index.php}}
* {{:MediaWiki talk:Ipb expiry invalid}}
* {{:MediaWiki talk:Ipb expiry invalid/}}
* {{:MediaWiki talk:Ipb expiry invalid/index.php}}
* {{:MediaWiki talk:Ipb expiry invalid/w/index.php}}
* {{:MediaWiki talk:Ipb expiry invalid/w/w/index.php}}
* {{:MediaWiki talk:Ipb expiry invalid/w/w/w/index.php}}
* {{:MediaWiki talk:Ipb expiry invalid/w/w/w/w/index.php}}
* {{:MediaWiki talk:Ipb expiry invalid/w/w/w/w/w/index.php}}
* {{:MediaWiki talk:Ipb already blocked/index.php}}
* {{:MediaWiki talk:Ipb already blocked/w/index.php}}
* {{:MediaWiki talk:Ipb already blocked/w/w/index.php}}
* {{:MediaWiki talk:Ipb already blocked/w/w/w/index.php}}
* {{:MediaWiki talk:Ipb already blocked/w/w/w/w/index.php}}
* {{:MediaWiki talk:Ipb already blocked/w/w/w/w/w/index.php}}
* {{:MediaWiki talk:Ipb already blocked/wiki/MediaWiki talk:Ipb already blocked/w/w/index.php}}
* {{:Talk:index.php}}
* {{:Talk:w/index.php}}
* {{:Talk:w/w/index.php}}
* {{:Talk:w/w/w/index.php}}
* {{:Talk:w/w/w/w/index.php}}
* {{:Talk:W/index.php}}
* {{:Talk:W/w/index.php}}
* {{:Talk:W/w/w/index.php}}
* {{:Talk:W/w/w/w/index.php}}
* {{:MediaWiki talk:Ipb expiry invalid/wiki/MediaWiki talk:Ipb expiry invalid/w/index.php}}
* {{:MediaWiki talk:Ipb expiry invalid/wiki/MediaWiki talk:Ipb expiry invalid/w/w/index.php}}
* {{:MediaWiki talk:Ipb expiry invalid/wiki/MediaWiki talk:Ipb expiry invalid/w/w/w/index.php}}
* {{:MediaWiki talk:Ipb expiry invalid/wiki/MediaWiki talk:Ipb expiry invalid/w/w/w/w/index.php}}
dsv9a1v17uz23vy8uu583dkuartt026
Wàll:Deleteme
14
1774
4134
2007-09-16T11:06:35Z
Jorunn
17
Nouvelle page : This category is used by [[m:Multilingual speedy deletions]] until local administrators are available.
wikitext
text/x-wiki
This category is used by [[m:Multilingual speedy deletions]] until local administrators are available.
2xsy0mllj4hooeq56oyi950kvqc7hid
Royuwaay:Babel
10
1783
4158
4157
2007-10-20T13:16:45Z
SF-Language
21
wikitext
text/x-wiki
{| name="userboxes" id="userboxes" style="float: {{{align|right}}}; margin-left: 1em; margin-bottom: 0.5em; width: 242px; border: #99B3FF solid 1px; clear: right"
|-
! style="background-color: {{{color|}}}; text-align: center" colspan="10" | {{{header| '''[[Wikiquote:Babel]]'''}}}
|-
| {{#if:{{{1|}}}|{{User {{{1}}}}}
}}{{#if:{{{2|}}}|{{User {{{2}}}}}
}}{{#if:{{{3|}}}|{{User {{{3}}}}}
}}{{#if:{{{4|}}}|{{User {{{4}}}}}
}}{{#if:{{{5|}}}|{{User {{{5}}}}}
}}{{#if:{{{6|}}}|{{User {{{6}}}}}
}}{{#if:{{{7|}}}|{{User {{{7}}}}}
}}{{#if:{{{8|}}}|{{User {{{8}}}}}
}}{{#if:{{{9|}}}|{{User {{{9}}}}}
}}{{#if:{{{10|}}}|{{User {{{10}}}}}
}}{{#if:{{{11|}}}|{{User {{{11}}}}}
}}{{#if:{{{12|}}}|{{User {{{12}}}}}
}}{{#if:{{{13|}}}|{{User {{{13}}}}}
}}{{#if:{{{14|}}}|{{User {{{14}}}}}
}}{{#if:{{{15|}}}|{{User {{{15}}}}}
}}{{#if:{{{16|}}}|{{User {{{16}}}}}
}}{{#if:{{{17|}}}|{{User {{{17}}}}}
}}{{#if:{{{18|}}}|{{User {{{18}}}}}
}}{{#if:{{{19|}}}|{{User {{{19}}}}}
}}{{#if:{{{20|}}}|{{User {{{20}}}}}
}}{{#if:{{{21|}}}|{{User {{{21}}}}}
}}{{#if:{{{22|}}}|{{User {{{22}}}}}
}}{{#if:{{{23|}}}|{{User {{{23}}}}}
}}{{#if:{{{24|}}}|{{User {{{24}}}}}
}}{{#if:{{{25|}}}|{{User {{{25}}}}}
}}{{#if:{{{26|}}}|{{User {{{26}}}}}
}}{{#if:{{{27|}}}|{{User {{{27}}}}}
}}{{#if:{{{28|}}}|{{User {{{28}}}}}
}}{{#if:{{{29|}}}|{{User {{{29}}}}}
}}{{#if:{{{30|}}}|{{User {{{30}}}}}
}}{{#if:{{{31|}}}|{{User {{{31}}}}}
}}{{#if:{{{32|}}}|{{User {{{32}}}}}
}}{{#if:{{{33|}}}|{{User {{{33}}}}}
}}{{#if:{{{34|}}}|{{User {{{34}}}}}
}}{{#if:{{{35|}}}|{{User {{{35}}}}}
}}{{#if:{{{36|}}}|{{User {{{36}}}}}
}}{{#if:{{{37|}}}|{{User {{{37}}}}}
}}{{#if:{{{38|}}}|{{User {{{38}}}}}
}}{{#if:{{{39|}}}|{{User {{{39}}}}}
}}{{#if:{{{40|}}}|{{User {{{40}}}}}
}}{{#if:{{{41|}}}|{{User {{{41}}}}}
}}{{#if:{{{42|}}}|{{User {{{42}}}}}
}}{{#if:{{{43|}}}|{{User {{{43}}}}}
}}{{#if:{{{44|}}}|{{User {{{44}}}}}
}}{{#if:{{{45|}}}|{{User {{{45}}}}}
}}{{#if:{{{46|}}}|{{User {{{46}}}}}
}}{{#if:{{{47|}}}|{{User {{{47}}}}}
}}{{#if:{{{48|}}}|{{User {{{48}}}}}
}}{{#if:{{{49|}}}|{{User {{{49}}}}}
}}{{#if:{{{50|}}}|{{User {{{50}}}}}
}}{{#if:{{{51|}}}|{{User {{{51}}}}}
}}{{#if:{{{52|}}}|{{User {{{52}}}}}
}}{{#if:{{{53|}}}|{{User {{{53}}}}}
}}{{#if:{{{54|}}}|{{User {{{54}}}}}
}}{{#if:{{{55|}}}|{{User {{{55}}}}}
}}{{#if:{{{56|}}}|{{User {{{56}}}}}
}}{{#if:{{{57|}}}|{{User {{{57}}}}}
}}{{#if:{{{58|}}}|{{User {{{58}}}}}
}}{{#if:{{{59|}}}|{{User {{{59}}}}}
}}{{#if:{{{60|}}}|{{User {{{60}}}}}
}}{{#if:{{{61|}}}|{{User {{{61}}}}}
}}{{#if:{{{62|}}}|{{User {{{62}}}}}
}}{{#if:{{{63|}}}|{{User {{{63}}}}}
}}{{#if:{{{64|}}}|{{User {{{64}}}}}
}}{{#if:{{{65|}}}|{{User {{{65}}}}}
}}{{#if:{{{66|}}}|{{User {{{66}}}}}
}}{{#if:{{{67|}}}|{{User {{{67}}}}}
}}{{#if:{{{68|}}}|{{User {{{68}}}}}
}}{{#if:{{{69|}}}|{{User {{{69}}}}}
}}{{#if:{{{70|}}}|{{User {{{70}}}}}
}}{{#if:{{{71|}}}|{{User {{{71}}}}}
}}{{#if:{{{72|}}}|{{User {{{72}}}}}
}}{{#if:{{{73|}}}|{{User {{{73}}}}}
}}{{#if:{{{74|}}}|{{User {{{74}}}}}
}}{{#if:{{{75|}}}|{{User {{{75}}}}}
}}{{#if:{{{76|}}}|{{User {{{76}}}}}
}}{{#if:{{{77|}}}|{{User {{{77}}}}}
}}{{#if:{{{78|}}}|{{User {{{78}}}}}
}}{{#if:{{{79|}}}|{{User {{{79}}}}}
}}{{#if:{{{80|}}}|{{User {{{80}}}}}
}}{{#if:{{{81|}}}|{{User {{{81}}}}}
}}{{#if:{{{82|}}}|{{User {{{82}}}}}
}}{{#if:{{{83|}}}|{{User {{{83}}}}}
}}{{#if:{{{84|}}}|{{User {{{84}}}}}
}}{{#if:{{{85|}}}|{{User {{{85}}}}}
}}{{#if:{{{86|}}}|{{User {{{86}}}}}
}}{{#if:{{{87|}}}|{{User {{{87}}}}}
}}{{#if:{{{88|}}}|{{User {{{88}}}}}
}}{{#if:{{{89|}}}|{{User {{{89}}}}}
}}{{#if:{{{90|}}}|{{User {{{90}}}}}
}}{{#if:{{{91|}}}|{{User {{{91}}}}}
}}{{#if:{{{92|}}}|{{User {{{92}}}}}
}}{{#if:{{{93|}}}|{{User {{{93}}}}}
}}{{#if:{{{94|}}}|{{User {{{94}}}}}
}}{{#if:{{{95|}}}|{{User {{{95}}}}}
}}{{#if:{{{96|}}}|{{User {{{96}}}}}
}}{{#if:{{{97|}}}|{{User {{{97}}}}}
}}{{#if:{{{98|}}}|{{User {{{98}}}}}
}}{{#if:{{{99|}}}|{{User {{{99}}}}}
}}{{#if:{{{100|}}}|{{User {{{100}}}}}}}
|-
| style="background-color: {{{color|}}}; text-align: center" colspan="10" | {{{footer|}}}
|}
6vvz87wf721bcae2kg48etk2zqokfa2
Wikiquote:Babel
4
1784
4183
4160
2007-10-20T13:57:37Z
SF-Language
21
wikitext
text/x-wiki
Xët wii moo lay leeral nooy xamale yeneen jëfëndikookat yi, say xameel ci yeneen làkk yi ak tolluwaayu xameel gi.
----
----
== Lumuy jariñ ==
Donte fii [[w:Wikipedia]] ci kàllaama [[w:wolof]] la, waaye du ñi fi nekk ñépp a deggante. Am na ñu deggul wolof, walla seen degg des na, ñu man a soxla ku ñu jokkool ci làkk bi ñu degg, walla wolof yu yomb. Am na ay waa wikipedia yu deggul wolof te di bëgg a jàpp ci liggéey bi, kon di na am solo lool nga wax ko ci yan làkk ngeen man a waxtaane, ngir njariñam man a feeñ.
Mii sémb di na yombal jokkoo gi ci biir aw askan gu bariy làkk gu mel ne Wikipedia: ci misaal, di na yomb jot kuy wax wenn làkk wi, te itam di na xamale tolluwaayu degginu wolof gu ab jëfëndikookat bu bindu.
== Nu ma koy defee? ==
{{Babel|wo-1|fr-1|en-1}}
Doy na nga yokk ci sa [[Xëtu jëfëndikookat|xëtu jëfëndikookat]] '''Babelbox''' bi, tabax ko ci topp tektal yii:
* Tambalil ak '''{{Babel-'''
* Nga yokk ci limu làkk yi nga degg te teg ci '''|'''
**Misaal: '''{{Babel-3|''' (3 làkk)
Su ko defeen nak nga def ci tolluwaayu ni nga deggee wolof. Soo bëggee mu mel ne ni nga koy gisee (ci sa ndeyjoor), nga def: wo-0 walla wo-1 walla wo-2,añse.
Misaal:
'''<nowiki>{{Babel|wo-1|fr-1|en-1}}</nowiki>'''
== Yu wolof ==
{|align=left
|{{Babel|wo|wo-5|wo-4|wo-3|wo-2|wo-1|wo-0}}
|}
[[catégorie:jeego yu njëkk]]
taxvjlvwozk3oumvzhb55blt3gwg8oe
Royuwaay:User wo
10
1785
4161
2007-10-20T13:18:20Z
SF-Language
21
Nouvelle page : <div style="float:left;border:solid #6ef7a7 1px;margin:1px;"> <table cellspacing="0" style="width:238px;background:#c5fcdc;"><tr> <td style="width:45px;height:45px;background:#6ef7a7...
wikitext
text/x-wiki
<div style="float:left;border:solid #6ef7a7 1px;margin:1px;">
<table cellspacing="0" style="width:238px;background:#c5fcdc;"><tr>
<td style="width:45px;height:45px;background:#6ef7a7;text-align:center;font-size:14pt;">'''[[wolof|Wo]]'''</td>
<td style="font-size:8pt;padding:4pt;line-height:1.25em;">Kii '''[[:Category:User wo|Wolof]]''' mooy làkku '''[[:Category:User wo|cosaanam]]'''.[[Category:User wo|{{PAGENAME}}]][[Category:User wo-N|{{PAGENAME}}]]</td>
</tr></table></div>
ik9i3fnjbkgg1mp6hbmnprwb1mi0nhd
Royuwaay:User wo-5
10
1786
5405
4162
2020-06-29T22:33:08Z
Samuele2002
1356
fix [[Special:LintErrors]]
wikitext
text/x-wiki
<div style="float:left;border:solid #f99c99 1px;margin:1px">
{| cellspacing="0" style="width:238px;background:#f9cbc9;"
| style="width:45px;height:45px;background:#f99c99;text-align:center;font-size:14pt" | '''[[Wolof |wo]]-5'''
| style="font-size:8pt;padding:4pt;line-height:1.25em" | Bii jëfëndikookat man naa cëru ak '''[[:Category:User wo|Wolof]]''' ci anam bu '''[[:Category:User wo-5|xereñ]]''' .[[Category:User wo|{{PAGENAME}}]][[Category:User wo-5|{{PAGENAME}}]]
|}</div>
46j95eaovh8x536gqcqmn9gahq1y82s
Royuwaay:User wo-4
10
1787
4163
2007-10-20T13:19:27Z
SF-Language
21
Nouvelle page : <div style="float:left;border:solid #99B3FF 1px;margin:1px"> <table cellspacing="0" style="width:238px;background:#E0E8FF"><tr> <td style="width:45px;height:45px;background:#99B3FF;t...
wikitext
text/x-wiki
<div style="float:left;border:solid #99B3FF 1px;margin:1px">
<table cellspacing="0" style="width:238px;background:#E0E8FF"><tr>
<td style="width:45px;height:45px;background:#99B3FF;text-align:center;font-size:14pt">'''[[Wolof |wo]]-4'''</td>
<td style="font-size:8pt;padding:4pt;line-height:1.25em">Bii jëfëndikookat man naa cëru ak '''[[:Category:User wo|Wolof]]''' daanaka '''[[:Category:User wo-4|ni ku ci cosaanoo]]''' .[[Category:User wo|{{PAGENAME}}]][[Category:User wo-4|{{PAGENAME}}]]</td>
</tr></table></div>
9hjfbmll5e677zocc04ts6lq4lrcr3h
Royuwaay:User wo-3
10
1788
4164
2007-10-20T13:19:58Z
SF-Language
21
Nouvelle page : <div style="float:left;border:solid #99B3FF 1px;margin:1px"> <table cellspacing="0" style="width:238px;background:#E0E8FF"><tr> <td style="width:45px;height:45px;background:#99B3FF;t...
wikitext
text/x-wiki
<div style="float:left;border:solid #99B3FF 1px;margin:1px">
<table cellspacing="0" style="width:238px;background:#E0E8FF"><tr>
<td style="width:45px;height:45px;background:#99B3FF;text-align:center;font-size:14pt">'''[[Wolof|wo]]-3'''</td>
<td style="font-size:8pt;padding:4pt;line-height:1.25em">Bii jëfëndikookat man naa cëru ak '''[[:Category:User wo|Wolof]]''' bu tolluwaayam '''[[:Category:User wo-3|baax lool]]'''.[[Category:User wo|{{PAGENAME}}]][[Category:User wo-3|{{PAGENAME}}]]</td>
</tr></table></div>
n9q9r7gjom0m0pcsfi3ggu8ca3qbtz7
Royuwaay:User wo-2
10
1789
4165
2007-10-20T13:20:28Z
SF-Language
21
Nouvelle page : <div style="float:left;border:solid #99B3FF 1px;margin:1px"> <table cellspacing="0" style="width:238px;background:#E0E8FF"><tr> <td style="width:45px;height:45px;background:#99B3FF;t...
wikitext
text/x-wiki
<div style="float:left;border:solid #99B3FF 1px;margin:1px">
<table cellspacing="0" style="width:238px;background:#E0E8FF"><tr>
<td style="width:45px;height:45px;background:#99B3FF;text-align:center;font-size:14pt">'''[[Wolof|wo]]-2'''</td>
<td style="font-size:8pt;padding:4pt;line-height:1.25em">Bii jëfëndikookat man naa cëru ak '''[[:Category:User wo|Wolof]]''' bu tolluwaayam '''[[:Category:User wo-2|diggu]]'''.[[Category:User wo|{{PAGENAME}}]][[Category:User wo-2|{{PAGENAME}}]]</td>
</tr></table></div>
2daqgqre84wz5kq7roylyi6lymzjeep
Royuwaay:User wo-1
10
1790
4166
2007-10-20T13:20:56Z
SF-Language
21
Nouvelle page : <div style="float:left;border:solid #C0C8FF 1px;margin:1px"> {| cellspacing="0" style="width:238px;background:#F0F8FF" | style="width:45px;height:45px;background:#C0C8FF;text-align:c...
wikitext
text/x-wiki
<div style="float:left;border:solid #C0C8FF 1px;margin:1px">
{| cellspacing="0" style="width:238px;background:#F0F8FF"
| style="width:45px;height:45px;background:#C0C8FF;text-align:center;font-size:14pt" | '''[[Wolof|wo]]-1'''
| style="font-size:8pt;padding:4pt;line-height:1.25em" | Bii jëfëndikookat man naa cëru ak '''[[:Category:User wo|wolof]]''' bu tolluwaayam '''[[:Category:User wo-1|suufe]].[[Category:User wo|{{PAGENAME}}]][[Category:User wo-1|{{PAGENAME}}]]
|}
</div>
60pjoio6siv9364c3cdeom1i76gyvsz
Royuwaay:User wo-0
10
1791
4651
4167
2011-06-14T16:18:19Z
Dcljr
354
if you don't speak the language, you shouldn't be in the user category for that language
wikitext
text/x-wiki
<div style="float:left;border:solid #C0C8FF 1px;margin:1px">
{| cellspacing="0" style="width:238px;background:#F0F8FF"
| style="width:45px;height:45px;background:#C0C8FF;text-align:center;font-size:14pt" | '''[[Wolof|wo]]-0'''
| style="font-size:8pt;padding:4pt;line-height:1.25em" | Bii jëfëndikookat manul cëru '''[[:Category:User wo-0|dara]]''' ci '''[[:Category:User wo|Wolof]]'''.<noinclude>[[Category:User wo|{{PAGENAME}}]]</noinclude>[[Category:User wo-0|{{PAGENAME}}]]
|}</div>
eo8zfpwi4fb0vfltnlngcvf1p0bosy7
Royuwaay:User fr-1
10
1792
4168
2007-10-20T13:21:59Z
SF-Language
21
Nouvelle page : <div style="float:left;border:solid #99B3FF 1px;margin:1px"> <table cellspacing="0" style="width:238px;background:#E0E8FF"><tr> <td style="width:45px;height:45px;background:#99B3FF;t...
wikitext
text/x-wiki
<div style="float:left;border:solid #99B3FF 1px;margin:1px">
<table cellspacing="0" style="width:238px;background:#E0E8FF"><tr>
<td style="width:45px;height:45px;background:#99B3FF;text-align:center;font-size:14pt">'''[[French language|fr]]-1'''</td>
<td style="font-size:8pt;padding:4pt;line-height:1.25em">Cette personne peut contribuer avec un niveau '''[[:Category:User fr-1|élémentaire]]''' de '''[[:Category:User fr|français]]'''.[[Category:User fr|{{PAGENAME}}]][[Category:User fr-1|{{PAGENAME}}]]</td>
</tr></table></div>
qutf83b0y0t3iimd17yxorn17va2run
Royuwaay:User en-1
10
1793
4169
2007-10-20T13:22:17Z
SF-Language
21
Nouvelle page : <div style="float:left;border:solid #99B3FF 1px;margin:1px"> <table cellspacing="0" style="width:238px;background:#E0E8FF"><tr> <td style="width:45px;height:45px;background:#99B3FF;t...
wikitext
text/x-wiki
<div style="float:left;border:solid #99B3FF 1px;margin:1px">
<table cellspacing="0" style="width:238px;background:#E0E8FF"><tr>
<td style="width:45px;height:45px;background:#99B3FF;text-align:center;font-size:14pt">'''[[English language|en]]-1'''</td>
<td style="font-size:8pt;padding:4pt;line-height:1.25em">This user is able to contribute with a '''[[:Category:User en-1|basic]]''' level of '''[[:Category:User en|English]]'''.[[Category:User en|{{PAGENAME}}]][[Category:User en-1|{{PAGENAME}}]]</td>
</tr></table></div>
jwe618yx08c4eqg12t40k2z5uzvhn61
Royuwaay:Trans-wo
10
1795
5473
4172
2021-08-05T08:28:51Z
Сергій Липко
1079
wikitext
text/x-wiki
**Bees quote [[Wolof (làkk)|Wolof]]: '''''{{{1}}}'''''
kk81vxixfh0kgiv5pim3xmapyjk6y7q
Royuwaay:Trans-en
10
1796
4173
2007-10-20T13:41:25Z
SF-Language
21
template: original quote in English
wikitext
text/x-wiki
==English==
*Maaget quote: '''''{{{1}}}'''''
68r8z3rxolm334ksy7r7zced7bsoujq
Royuwaay:Mbalit Xët wu njëkk 1
10
1798
5532
5400
2022-06-19T16:53:12Z
NguoiDungKhongDinhDanh
1433
Code improvements
wikitext
text/x-wiki
{| style="margin: 0 auto 8px; border: #FFC17E solid 1px; width: 80%;"
|-
| colspan="2" style="border: #FFC17E solid 1px; background-color: #FFC17E; text-align: center; color: white; font-size: 150%;" | '''Yeneen naal ci Wikiquote'''
|- style="text-align: center; font-size: 120%;"
| style="padding: 1em; width: 50%;" | [[File:Wiktionary-logo-en.svg|30px]] [[:wikt:|Wikibaatukaay]]
| style="padding: 1em; width: 50%;" | [[File:Wikipedia-logo.svg|30px]] [[:w:|Wikipedia]]
|}
a0vl7ff295n8wdveubok8n1ia5tuifk
Royuwaay:Mbalit Xët wu njëkk 2
10
1799
4184
4180
2007-10-20T14:01:18Z
SF-Language
21
wikitext
text/x-wiki
<div class="usermessage">Jii Wikiquote be [[meta:Proposals for closing projects/Closure of Wolof Wikiquote|ubbu]]. Xool cosaanam fii, wante deédeét ci [[incubator:Wq/wo]].</div>
bztosi4ez8y4wbdjk2ouiils8omc8pm
Royuwaay:User en
10
1801
4188
2007-10-20T14:29:07Z
SF-Language
21
Nouvelle page : <div style="float:left;border:solid #6ef7a7 1px;margin:1px;"> <table cellspacing="0" style="width:238px;background:#c5fcdc;"><tr> <td style="width:45px;height:45px;background:#6ef7a7...
wikitext
text/x-wiki
<div style="float:left;border:solid #6ef7a7 1px;margin:1px;">
<table cellspacing="0" style="width:238px;background:#c5fcdc;"><tr>
<td style="width:45px;height:45px;background:#6ef7a7;text-align:center;font-size:14pt;">'''[[English language|en]]'''</td>
<td style="font-size:8pt;padding:4pt;line-height:1.25em;">This user is a '''[[:Category:User en-N|native]]''' speaker of '''[[:Category:User en|English]]'''.[[Category:User en|{{PAGENAME}}]][[Category:User en-N|{{PAGENAME}}]]</td>
</tr></table></div>
503ys42bytuper8btnmhb2dkerlpb0p
Royuwaay:Cat
10
1805
4202
2007-10-23T06:01:05Z
SF-Language
21
Nouvelle page : [[category:{{{1}}}]]
wikitext
text/x-wiki
[[category:{{{1}}}]]
5c39vp2gv1ua5bmi7b2s3deviodhya9
Royuwaay:Quote
10
1806
4203
2007-10-23T06:01:26Z
SF-Language
21
Nouvelle page : {{cat|Quote}}
wikitext
text/x-wiki
{{cat|Quote}}
2n48inl7np0v0ge75lcntkyjukb0p1g
Royuwaay:Trans-en-list
10
1807
5475
5398
2021-08-05T08:41:54Z
Сергій Липко
1079
wikitext
text/x-wiki
*Maaget quote:
**'''''{{{1}}}'''''
***Bees quote [[Wolof (làkk)|Wolof]]:
**'''''{{{2}}}'''''
d3rru3qm61nkcl7g9v2bxdswsxxxzoa
Royuwaay:Untranslated
10
1809
5589
5588
2022-11-14T12:09:04Z
Rich Farmbrough
178
wikitext
text/x-wiki
'''This {{{1|article}}} contains 1 or more untranslated quote: please translate them.'''
----
{{cat|Untranslated articles}}
0674w818kkj5z62na3logsmtxaczvl1
Wàll:Yëp
14
1810
4214
2007-10-24T07:43:59Z
SF-Language
21
Nouvelle page : Every category ''should'' end in this one.
wikitext
text/x-wiki
Every category ''should'' end in this one.
capcdrn2k1725wghlzi0usvbz725rkh
Wàll:Untranslated articles
14
1811
4216
4215
2007-10-24T07:44:31Z
SF-Language
21
wikitext
text/x-wiki
These articles need a translation.
[[category:Yëp]]
1n13wqhc6w3eklh8fmtr0jii8a3ko01
Wàll:Quote
14
1812
4218
4217
2007-10-24T07:45:09Z
SF-Language
21
wikitext
text/x-wiki
All articles containing quotes should be in this category.
[[category:Yëp]]
m6sjd6eo2if0dgzp4pnx9odv40lfqtl
Royuwaay:Vote+
10
1817
4234
2007-11-10T14:17:00Z
84.28.2.108
Nouvelle page : [[Image:symbol support vote.svg|15px]] '''{{{1|Support}}}'''<noinclude> ---- *This template is a generic (potentially multi-lingual) version of {{tl|Support}} and related templates. ...
wikitext
text/x-wiki
[[Image:symbol support vote.svg|15px]] '''{{{1|Support}}}'''<noinclude>
----
*This template is a generic (potentially multi-lingual) version of {{tl|Support}} and related templates.
;Usage
:<nowiki>{{vote+|Strong Support}}</nowiki>
::{{vote+|Strong Support}}
If there's nothing specified, the template defaults to "Support".
'''See also:'''<br />{{tl|vote-}}
[[Category:Templates|Vote+]]
</noinclude>
8rwu9z6zyo4867ialvmf9sou3ofkn2e
Royuwaay:Vote-
10
1818
4235
2007-11-10T14:17:53Z
84.28.2.108
Nouvelle page : [[Image:Symbol oppose vote.svg|15px]] '''{{{1|Oppose}}}'''<noinclude> ---- *This template is a generic (potentially multi-lingual) version of {{tl|Oppose}} and related templates. ;U...
wikitext
text/x-wiki
[[Image:Symbol oppose vote.svg|15px]] '''{{{1|Oppose}}}'''<noinclude>
----
*This template is a generic (potentially multi-lingual) version of {{tl|Oppose}} and related templates.
;Usage
:<nowiki>{{vote-|Strong Oppose}}</nowiki>
::{{vote-|Strong Oppose}}
If there's nothing specified, the template defaults to "Oppose".
'''See also:'''<br />{{tl|vote+}}
[[Category:Templates|Vote-]]
</noinclude>
ad9ce49ry0e5zkjwkhir5fttvlwk999
Royuwaay:Tl
10
1819
4236
2007-11-10T14:18:55Z
84.28.2.108
Nouvelle page : {{[[Template:{{{1}}}|{{{1}}}]]}}
wikitext
text/x-wiki
{{[[Template:{{{1}}}|{{{1}}}]]}}
moyei6gbw83lwlsv1n0nchbx9o0emer
Wàll:Jeego yu njëkk
14
1833
4281
2008-01-10T17:45:57Z
84.28.2.108
Xët wu bees : [[category:Yëp]]
wikitext
text/x-wiki
[[category:Yëp]]
9brt434pvhiluca0qeyl5psjgs5r2iq
Wàll:Templates
14
1834
4282
2008-01-10T17:46:00Z
84.28.2.108
Xët wu bees : [[category:Yëp]]
wikitext
text/x-wiki
[[category:Yëp]]
9brt434pvhiluca0qeyl5psjgs5r2iq
Royuwaay:Softredirect
10
1962
5279
4474
2015-10-18T19:22:32Z
Gangleri
1067
improuved to [[:{{{1}}}|{{{2|{{{1}}}}}}]] using [[m:Soft redirect]]|soft redirect ; ++: LANG="en" dir="ltr"
wikitext
text/x-wiki
[[Image:Redirectltr.png|#REDIRECT ]]<span class="redirectText" id="softredirect">[[:{{{1}}}|{{{2|{{{1}}}}}}]]</span><br /><span style="font-size:85%; padding-left:52px;" LANG="en" dir="ltr" >This page is a [[m:Soft redirect|soft redirect]].</span>
1ck76o1bo02hg51p6ohu2xow0xkifnl
MediaWiki:Sitesupport-url
8
2068
4945
4905
2013-02-07T01:36:10Z
Pgehres (WMF)
462
Updating sidebar link to use subst:CONTENTLANGUAGE
wikitext
text/x-wiki
//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_wo.wikiquote.org&uselang=wo
28fhedjcxagg5vpwu6zb1x5zrne4o7m
Royuwaay:Bot
10
2162
4867
4733
2012-07-29T16:13:44Z
Merlissimo
239
+second parameter for site
wikitext
text/x-wiki
{| align="center" class="plainlinks" style="padding: 8px; border: 2px solid #000; width: 80%; text-align: justify;"
|- valign="center"
| [[File:Crystal Clear action run.svg|90px|left|link=]] || '''This user account is a [[m:en:Wikipedia:Bots|bot]], operated by [[:{{{site|{{{2|wo}}}}}}:User:{{{1}}}|{{{1}}}]] ([[:{{{site|{{{2|wo}}}}}}:User talk:{{{1}}}|talk]]).'''<br />It is not a [[m:en:Wikipedia:Sock puppetry|sock-puppet]], but rather an automated or semi-automated account for making repetitive edits that would be extremely tedious to do manually.<br />''Administrators: if this bot is malfunctioning or causing harm, please [{{fullurl:Special:Blockip|wpBlockAddress={{PAGENAMEE}}&wpBlockExpiry=indefinite&wpAnonOnly=0&wpEnableAutoblock=0&wpCreateAccount=0&wpBlockReason=Bot%20malfunctioning:%20}} block it].''
|}<noinclude>
== Documentation ==
* Replace "Example" with your bot's username.
{| class="wikitable" width="100%"
|-
! width="150px" | Code
! Result
|-
| <code><nowiki>{{Bot|Example}}</nowiki></code>
| {{Bot|Example}}
|}
[[de:Vorlage:Bot]]
</noinclude>
ta7x57h6k0nydl7qkgxj83hrxe1snc3
Wikiquote:Xët wu njëkk
4
2253
4869
2012-07-29T16:16:22Z
Merlissimo
239
Jubluwaat fii [[Waxtaan:Xët wu njëkk]]
wikitext
text/x-wiki
#REDIRECT [[Waxtaan:Xët wu njëkk]]
pejosh8qt8vr93sov0kz4ema78oibgi
Wikiquote:Bot policy
4
2291
4930
2012-12-30T16:46:27Z
Luckas Blade
245
Jubluwaat fii [[Waxtaan:Xët wu njëkk]]
wikitext
text/x-wiki
#REDIRECT [[Waxtaan:Xët wu njëkk]]
pejosh8qt8vr93sov0kz4ema78oibgi
Royuwaay:Mention
10
2499
5259
2015-08-03T23:40:18Z
Flow talk page manager
1051
/* Automatically created by Flow */
wikitext
text/x-wiki
@[[Jëfandikukat:{{{1|Example}}}|{{{2|{{{1|Example}}}}}}]]
tk00p9p3578mmr8awnhlgvesfn4ohb0
Royuwaay:Ébauche de fil LQT déplacée et convertie pour Flow
10
2508
5272
2015-10-02T20:16:18Z
Flow talk page manager
1051
/* Automatically created by Flow */
wikitext
text/x-wiki
Cette note de {{{author}}} a été déplacée le {{{date}}}. Vous pouvez la trouver à [[{{{title}}}]].
2j9g72hlgzo34xnsbczergu38p6q1rq
Royuwaay:Page LQT convertie en Flow
10
2509
5273
2015-10-02T20:16:18Z
Flow talk page manager
1051
/* Automatically created by Flow */
wikitext
text/x-wiki
L’historique de la page précédente a été archivé pour des raisons de sauvegarde dans <span class='flow-link-to-archive'>[[{{{archive}}}]]</span> le {{#time: Y-m-d|{{{date}}} }}.
qmjfhw88gmoquuli9j0gu8at403z10h
Royuwaay:Archive pour la page LQT convertie
10
2510
5274
2015-10-02T20:16:18Z
Flow talk page manager
1051
/* Automatically created by Flow */
wikitext
text/x-wiki
Cette page est une page LiquidThreads archivée. '''Ne pas modifier le contenu de cette page'''. Veuillez mettre tout commentaire supplémentaire dans la [[{{{from}}}|page de discussion actuelle]].
1cbw592zczk9t4t3bm57uusqhry8vxl
Royuwaay:Le message LQT a été importé avec un utilisateur supprimé
10
2511
5275
2015-10-02T20:16:18Z
Flow talk page manager
1051
/* Automatically created by Flow */
wikitext
text/x-wiki
Cette révision a été importée depuis LiquidThreads avec un utilisateur supprimé. Elle a été réaffectée à l’utilisateur courant.
muoneb2l4iu2tjkunl1md51kj7f6vee
Royuwaay:Message LQT importé avec une signature utilisateur différente.
10
2512
5276
2015-10-02T20:16:18Z
Flow talk page manager
1051
/* Automatically created by Flow */
wikitext
text/x-wiki
''Cette note a été publiée par [[User:{{{authorUser}}}|{{{authorUser}}}]], mais signée avec [[User:{{{signatureUser}}}|{{{signatureUser}}}]].''
mtwso3frhkd0w0hmn7c4hynbjcy36f9
Royuwaay:Page de discussion wikitexte convertie en Flow
10
2513
5277
2015-10-02T20:16:19Z
Flow talk page manager
1051
/* Automatically created by Flow */
wikitext
text/x-wiki
La discussion précédente a été archivée dans <span class='flow-link-to-archive'>[[{{{archive}}}]]</span> le {{#time: Y-m-d|{{{date}}} }}.
pgxvzrl3csuyy2keax4736psixvbid8
Royuwaay:Archive pour la page de discussion wikitexte convertie
10
2514
5278
2015-10-02T20:16:19Z
Flow talk page manager
1051
/* Automatically created by Flow */
wikitext
text/x-wiki
Cette page est une archive. '''Ne pas modifier le contenu de cette page'''. Veuillez mettre tout commentaire supplémentaire sur la [[{{{from|{{TALKSPACE}}:{{BASEPAGENAME}}}}}|page de discussion actuelle]].
2ehro6gwl8m8acabmasnre3u2fd5l1m
Royuwaay:Wikipedia
10
2538
5345
5344
2018-03-15T12:38:31Z
180.164.236.244
wikitext
text/x-wiki
<div style= class="infobox sisterproject">[[Image:wikipedia-logo.png|left|40px]]
<div style="margin-left: 40px;">[[Wikipedia]] related article:
<div class="plainlinks" style="margin-left: 10px;">'''[[w:{{{1|{{PAGENAME}}}}}|{{{2|{{{1|{{PAGENAME}}}}}}}}]]'''</div>
</div>
</div>
83kmtcmro14vly9qcndkaa3yrcemhym
MediaWiki:Sitenotice
8
2568
5650
5552
2023-04-11T14:59:10Z
MF-Warburg
16
wikitext
text/x-wiki
<div lang="en" dir="ltr" style="border: 3px solid #000; padding: 1em;">'''This wiki has been locked (see [[:m:Proposals for closing projects/Closure of Wolof Wikiquote 2|discussion]]).''' To contribute to a future wiki, see the [[:incubator:Wq/wo|Wikimedia Incubator project]].</div>
gb8r2xnwxvc31hloydym36s6uacvw75
Royuwaay:User en-4
10
2577
5597
2022-12-08T16:34:52Z
Rich Farmbrough
178
Xët wu bees : {{userbox-level | level = 4 | id = [[English language|en]] | info = This user can contribute with a '''[[:Category:User en-4|near-native]]''' level of '''[[:Category:User en|English]]'''. | usercategory = User en-4 | nocat = {{{nocat|}}} }}<noinclude> {{documentation}} </noinclude>
wikitext
text/x-wiki
{{userbox-level
| level = 4
| id = [[English language|en]]
| info = This user can contribute with a '''[[:Category:User en-4|near-native]]''' level of '''[[:Category:User en|English]]'''.
| usercategory = User en-4
| nocat = {{{nocat|}}}
}}<noinclude>
{{documentation}}
</noinclude>
nfqwzklu7rj3bb4c1ageh99t4lerxu2
Royuwaay:Userbox-level
10
2578
5598
2022-12-08T16:35:34Z
Rich Farmbrough
178
Xët wu bees : {{userbox | border-c = #{{#switch:{{{hidden-level|{{{level}}}}}}|0=B7B7B7|0a=B7B7B7|0b=FFB3B3|0.5=FFCC66|1=C0C8FF|2=77E0E8 |3=99B3FF|3a=99B3FF|3b=00FF00|4=CCCC00|4a=FFCF4D |5=CC0000|5a=CC0000|5b=F99C99|#default=6EF7A7}} | id = {{{id}}}{{#if:{{{level|}}}|{{#if:{{{level-br|}}}|<br>|-}}{{#switch:{{{level}}}|0|0.5|1|2|3|4|5|N={{{level}}}|0a|0b=0|3a|3b=3|4a=4|5a|5b=5}}}} | id-c = #{{#switch:{{{hidden-l...
wikitext
text/x-wiki
{{userbox
| border-c = #{{#switch:{{{hidden-level|{{{level}}}}}}|0=B7B7B7|0a=B7B7B7|0b=FFB3B3|0.5=FFCC66|1=C0C8FF|2=77E0E8
|3=99B3FF|3a=99B3FF|3b=00FF00|4=CCCC00|4a=FFCF4D
|5=CC0000|5a=CC0000|5b=F99C99|#default=6EF7A7}}
| id = {{{id}}}{{#if:{{{level|}}}|{{#if:{{{level-br|}}}|<br>|-}}{{#switch:{{{level}}}|0|0.5|1|2|3|4|5|N={{{level}}}|0a|0b=0|3a|3b=3|4a=4|5a|5b=5}}}}
| id-c = #{{#switch:{{{hidden-level|{{{level}}}}}}|0=B7B7B7|0a=B7B7B7|0b=FFB3B3|0.5=FFCC66|1=C0C8FF|2=77E0E8
|3=99B3FF|3a=99B3FF|3b=00FF00|4=FFFF00|4a=FFCF4D
|5=FF5e5e|5a=FF5e5e|5b=F99C99|#default=6EF7A7}}
| id-s = {{{id-s|{{#ifeq:{{{level|}}}|0.5|12|14}}}}}
| id-op = white-space:nowrap;{{{id-op|}}}
| info = {{{info}}}
| info-c = #{{#switch:{{{hidden-level|{{{level}}}}}}|0=E8E8E8|0a=E8E8E8|0b=FFE0E8|0.5=FFFF99|1=F0F8FF|2=D0F8FF
|3=E0E8FF|3a=E0E8FF|3b=90FF90|4=FFFF99|4a=FFEFA6
|5=FF8080|5a=FF8080|5b=F9CBC9|#default=C5FCDC}}
| info-s = {{{info-s|8}}}
| info-lh = {{{info-lh|1.25}}}
| info-op = {{{info-op|}}}
| info-a = {{{info-a|left}}}
| usercategory = {{{usercategory|}}}
| usercategory2 = {{{usercategory2|}}}
| usercategory3 = {{{usercategory3|}}}
| nocat = {{{nocat|}}}
}}<!--
# Track the existence of level-zero templates
-->{{Template other|{{#switch: {{{level|}}}|0|0a|0b=[[Category:Level-zero userbox templates]]}}}}<noinclude>
{{documentation}}
</noinclude>
fq1a22g0ex2ncwbwjrj6fqys2oi1799
Royuwaay:Userbox
10
2579
5599
2022-12-08T16:36:01Z
Rich Farmbrough
178
Xët wu bees : {{#invoke:userbox|userbox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude>
wikitext
text/x-wiki
{{#invoke:userbox|userbox}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
7xqp98n4frdf5oy8egh9oenx188107s
Module:Userbox
828
2580
5600
2022-12-08T16:39:10Z
Rich Farmbrough
178
Xët wu bees : -- This module implements {{userbox}}. local categoryHandler = require('Module:Category handler').main local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function checkNum(val, default) -- Checks whether a value is a number greater than or equal to zero. If so, -- returns it as a number. If not, returns a default value. v...
Scribunto
text/plain
-- This module implements {{userbox}}.
local categoryHandler = require('Module:Category handler').main
local p = {}
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function checkNum(val, default)
-- Checks whether a value is a number greater than or equal to zero. If so,
-- returns it as a number. If not, returns a default value.
val = tonumber(val)
if val and val >= 0 then
return val
else
return default
end
end
local function addSuffix(num, suffix)
-- Turns a number into a string and adds a suffix.
if num then
return tostring(num) .. suffix
else
return nil
end
end
local function checkNumAndAddSuffix(num, default, suffix)
-- Checks a value with checkNum and adds a suffix.
num = checkNum(num, default)
return addSuffix(num, suffix)
end
local function makeCat(cat, sort)
-- Makes a category link.
if sort then
return mw.ustring.format('[[Category:%s|%s]]', cat, sort)
else
return mw.ustring.format('[[Category:%s]]', cat)
end
end
--------------------------------------------------------------------------------
-- Argument processing
--------------------------------------------------------------------------------
local function makeInvokeFunc(funcName)
return function (frame)
local origArgs = require('Module:Arguments').getArgs(frame)
local args = {}
for k, v in pairs(origArgs) do
args[k] = v
end
return p.main(funcName, args)
end
end
p.userbox = makeInvokeFunc('_userbox')
p['userbox-2'] = makeInvokeFunc('_userbox-2')
p['userbox-r'] = makeInvokeFunc('_userbox-r')
--------------------------------------------------------------------------------
-- Main functions
--------------------------------------------------------------------------------
function p.main(funcName, args)
local userboxData = p[funcName](args)
local userbox = p.render(userboxData)
local cats = p.categories(args)
return userbox .. (cats or '')
end
function p._userbox(args)
-- Does argument processing for {{userbox}}.
local data = {}
-- Get div tag values.
data.float = args.float or 'left'
local borderWidthNum = checkNum(args['border-width'] or args['border-s'], 1) -- Used to calculate width.
data.borderWidth = addSuffix(borderWidthNum, 'px')
data.borderColor = args['border-color'] or args['border-c'] or args[1] or args['id-c'] or '#999'
data.width = addSuffix(240 - 2 * borderWidthNum, 'px') -- Also used in the table tag.
data.bodyClass = args.bodyclass
-- Get table tag values.
data.backgroundColor = args['info-background'] or args[2] or args['info-c'] or '#eee'
-- Get info values.
data.info = args.info or args[4] or "<code>{{{info}}}</code>"
data.infoTextAlign = args['info-a'] or 'left'
data.infoFontSize = checkNumAndAddSuffix(args['info-size'] or args['info-s'], 8, 'pt')
data.infoHeight = checkNumAndAddSuffix(args['logo-height'] or args['id-h'], 45, 'px')
data.infoPadding = args['info-padding'] or args['info-p'] or '0 4px 0 4px'
data.infoLineHeight = args['info-line-height'] or args['info-lh'] or '1.25em'
data.infoColor = args['info-color'] or args['info-fc'] or 'black'
data.infoOtherParams = args['info-other-param'] or args['info-op']
data.infoClass = args['info-class']
-- Get id values.
local id = args.logo or args[3] or args.id
data.id = id
data.showId = id and true or false
data.idWidth = checkNumAndAddSuffix(args['logo-width'] or args['id-w'], 45, 'px')
data.idHeight = checkNumAndAddSuffix(args['logo-height'] or args['id-h'], 45, 'px')
data.idBackgroundColor = args['logo-background'] or args[1] or args['id-c'] or '#ddd'
data.idTextAlign = args['id-a'] or 'center'
data.idFontSize = checkNumAndAddSuffix(args['logo-size'] or args[5] or args['id-s'], 14, 'pt')
data.idColor = args['logo-color'] or args['id-fc'] or data.infoColor
data.idPadding = args['logo-padding'] or args['id-p'] or '0 1px 0 0'
data.idLineHeight = args['logo-line-height'] or args['id-lh'] or '1.25em'
data.idOtherParams = args['logo-other-param'] or args['id-op']
data.idClass = args['id-class']
return data
end
p['_userbox-2'] = function (args)
-- Does argument processing for {{userbox-2}}.
local data = {}
-- Get div tag values.
data.float = args.float or 'left'
local borderWidthNum = checkNum(args['border-s'] or args[9], 1) -- Used to calculate width.
data.borderWidth = addSuffix(borderWidthNum, 'px')
data.borderColor = args['border-c'] or args[6] or args['id1-c'] or args[1] or '#999999'
data.width = addSuffix(240 - 2 * borderWidthNum, 'px') -- Also used in the table tag.
data.bodyClass = args.bodyclass
-- Get table tag values.
data.backgroundColor = args['info-c'] or args[2] or '#eeeeee'
-- Get info values.
data.info = args.info or args[4] or "<code>{{{info}}}</code>"
data.infoTextAlign = args['info-a'] or 'left'
data.infoFontSize = checkNumAndAddSuffix(args['info-s'], 8, 'pt')
data.infoColor = args['info-fc'] or args[8] or 'black'
data.infoPadding = args['info-p'] or '0 4px 0 4px'
data.infoLineHeight = args['info-lh'] or '1.25em'
data.infoOtherParams = args['info-op']
-- Get id values.
data.showId = true
data.id = args.logo or args[3] or args.id1 or 'id1'
data.idWidth = checkNumAndAddSuffix(args['id1-w'], 45, 'px')
data.idHeight = checkNumAndAddSuffix(args['id-h'], 45, 'px')
data.idBackgroundColor = args['id1-c'] or args[1] or '#dddddd'
data.idTextAlign = 'center'
data.idFontSize = checkNumAndAddSuffix(args['id1-s'], 14, 'pt')
data.idLineHeight = args['id1-lh'] or '1.25em'
data.idColor = args['id1-fc'] or data.infoColor
data.idPadding = args['id1-p'] or '0 1px 0 0'
data.idOtherParams = args['id1-op']
-- Get id2 values.
data.showId2 = true
data.id2 = args.logo or args[5] or args.id2 or 'id2'
data.id2Width = checkNumAndAddSuffix(args['id2-w'], 45, 'px')
data.id2Height = data.idHeight
data.id2BackgroundColor = args['id2-c'] or args[7] or args[1] or '#dddddd'
data.id2TextAlign = 'center'
data.id2FontSize = checkNumAndAddSuffix(args['id2-s'], 14, 'pt')
data.id2LineHeight = args['id2-lh'] or '1.25em'
data.id2Color = args['id2-fc'] or data.infoColor
data.id2Padding = args['id2-p'] or '0 0 0 1px'
data.id2OtherParams = args['id2-op']
return data
end
p['_userbox-r'] = function (args)
-- Does argument processing for {{userbox-r}}.
local data = {}
-- Get div tag values.
data.float = args.float or 'left'
local borderWidthNum = checkNum(args['border-width'] or args['border-s'], 1) -- Used to calculate width.
data.borderWidth = addSuffix(borderWidthNum, 'px')
data.borderColor = args['border-color'] or args['border-c'] or args[1] or args['id-c'] or '#999'
data.width = addSuffix(240 - 2 * borderWidthNum, 'px') -- Also used in the table tag.
data.bodyClass = args.bodyclass
-- Get table tag values.
data.backgroundColor = args['info-background'] or args[2] or args['info-c'] or '#eee'
-- Get id values.
data.showId = false -- We only show id2 in userbox-r.
-- Get info values.
data.info = args.info or args[4] or "<code>{{{info}}}</code>"
data.infoTextAlign = args['info-align'] or args['info-a'] or 'left'
data.infoFontSize = checkNumAndAddSuffix(args['info-size'] or args['info-s'], 8, 'pt')
data.infoPadding = args['info-padding'] or args['info-p'] or '0 4px 0 4px'
data.infoLineHeight = args['info-line-height'] or args['info-lh'] or '1.25em'
data.infoColor = args['info-color'] or args['info-fc'] or 'black'
data.infoOtherParams = args['info-other-param'] or args['info-op']
-- Get id2 values.
data.showId2 = true
data.id2 = args.logo or args[3] or args.id or 'id'
data.id2Width = checkNumAndAddSuffix(args['logo-width'] or args['id-w'], 45, 'px')
data.id2Height = checkNumAndAddSuffix(args['logo-height'] or args['id-h'], 45, 'px')
data.id2BackgroundColor = args['logo-background'] or args[1] or args['id-c'] or '#ddd'
data.id2TextAlign = args['id-a'] or 'center'
data.id2FontSize = checkNumAndAddSuffix(args['logo-size'] or args[5] or args['id-s'], 14, 'pt')
data.id2Color = args['logo-color'] or args['id-fc'] or data.infoColor
data.id2Padding = args['logo-padding'] or args['id-p'] or '0 0 0 1px'
data.id2LineHeight = args['logo-line-height'] or args['id-lh'] or '1.25em'
data.id2OtherParams = args['logo-other-param'] or args['id-op']
return data
end
function p.render(data)
-- Renders the userbox html using the content of the data table.
-- Render the div tag html.
local root = mw.html.create('div')
root
:css('float', data.float)
:css('border', (data.borderWidth or '') .. ' solid ' .. (data.borderColor or ''))
:css('margin', '1px')
:css('width', data.width)
:addClass('wikipediauserbox')
:addClass(data.bodyClass)
-- Render the table tag html.
local tableroot = root:tag('table')
tableroot
:attr('role', 'presentation')
:css('border-collapse', 'collapse')
:css('width', data.width)
:css('margin-bottom', '0')
:css('margin-top', '0')
:css('background', data.backgroundColor)
-- Render the id html.
local tablerow = tableroot:tag('tr')
if data.showId then
tablerow:tag('td')
:css('border', '0')
:css('width', data.idWidth)
:css('height', data.idHeight)
:css('background', data.idBackgroundColor)
:css('text-align', data.idTextAlign)
:css('font-size', data.idFontSize)
:css('font-weight', 'bold')
:css('color', data.idColor)
:css('padding', data.idPadding)
:css('line-height', data.idLineHeight)
:css('vertical-align', 'middle')
:cssText(data.idOtherParams)
:addClass(data.idClass)
:wikitext(data.id)
end
-- Render the info html.
tablerow:tag('td')
:css('border', '0')
:css('text-align', data.infoTextAlign)
:css('font-size', data.infoFontSize)
:css('padding', data.infoPadding)
:css('height', data.infoHeight)
:css('line-height', data.infoLineHeight)
:css('color', data.infoColor)
:css('vertical-align', 'middle')
:cssText(data.infoOtherParams)
:addClass(data.infoClass)
:wikitext(data.info)
-- Render the second id html.
if data.showId2 then
tablerow:tag('td')
:css('border', '0')
:css('width', data.id2Width)
:css('height', data.id2Height)
:css('background', data.id2BackgroundColor)
:css('text-align', data.id2TextAlign)
:css('font-size', data.id2FontSize)
:css('font-weight', 'bold')
:css('color', data.id2Color)
:css('padding', data.id2Padding)
:css('line-height', data.id2LineHeight)
:css('vertical-align', 'middle')
:cssText(data.id2OtherParams)
:wikitext(data.id2)
end
local title = mw.title.getCurrentTitle()
if (title.namespace == 2) and not title.text:match("/") then
return tostring(root) -- regular user page
elseif title.namespace == 14 then
return tostring(root) -- category
elseif title.isTalkPage then
return tostring(root) -- talk page
end
local legible = true
local contrast = require('Module:Color contrast')._ratio
local function has_text(wikitext)
local function get_alt(text)
return text:match("|alt=([^|]*)") or ""
end
wikitext = wikitext:gsub("]]", "|]]")
wikitext = wikitext:gsub("%[%[%s*[Mm][Ee][Dd][Ii][Aa]%s*:[^|]-(|.-)]]", get_alt)
wikitext = wikitext:gsub("%[%[%s*[Ii][Mm][Aa][Gg][Ee]%s*:[^|]-(|.-)]]", get_alt)
wikitext = wikitext:gsub("%[%[%s*[Ff][Ii][Ll][Ee]%s*:[^|]-(|.-)]]", get_alt)
return mw.text.trim(wikitext) ~= ""
end
if contrast { data.infoColor, data.backgroundColor, error = 0 } < 4.5 then
legible = false
end
if data.showId and contrast { data.idColor, data.idBackgroundColor, error = 0 } < 4.5 then
if has_text(data.id or "") then
legible = false
end
end
if data.showId2 and contrast { data.id2Color, data.id2BackgroundColor, error = 0 } < 4.5 then
if has_text(data.id2 or "") then
legible = false
end
end
if not legible then
root:wikitext('[[Category:Userboxes with insufficient color contrast]]')
end
return tostring(root)
end
function p.categories(args, page)
-- Gets categories from [[Module:Category handler]].
-- The page parameter makes the function act as though the module was being called from that page.
-- It is included for testing purposes.
local cats = {}
cats[#cats + 1] = args.usercategory
cats[#cats + 1] = args.usercategory2
cats[#cats + 1] = args.usercategory3
cats[#cats + 1] = args.usercategory4
cats[#cats + 1] = args.usercategory5
-- Get the title object
local title
if page then
title = mw.title.new(page)
else
title = mw.title.getCurrentTitle()
end
-- Build category handler arguments.
local chargs = {}
chargs.page = page
chargs.nocat = args.nocat
chargs.main = '[[Category:Pages with templates in the wrong namespace]]'
if args.notcatsubpages then
chargs.subpage = 'no'
end
-- User namespace.
local user = ''
for i, cat in ipairs(cats) do
user = user .. makeCat(cat)
end
chargs.user = user
-- Template namespace.
local basepage = title.baseText
local template = ''
for i, cat in ipairs(cats) do
template = template .. makeCat(cat, ' ' .. basepage)
end
chargs.template = template
return categoryHandler(chargs)
end
return p
5lhlbdmt57la7wx85h5delvr7x5xa79
Module:Category handler
828
2581
5601
2022-12-08T16:40:36Z
Rich Farmbrough
178
Xët wu bees : -------------------------------------------------------------------------------- -- -- -- CATEGORY HANDLER -- -- -- -- This module implements the {{category handler}} template in Lua, -- -- with a few improvements: all namespaces and all namespace aliases...
Scribunto
text/plain
--------------------------------------------------------------------------------
-- --
-- CATEGORY HANDLER --
-- --
-- This module implements the {{category handler}} template in Lua, --
-- with a few improvements: all namespaces and all namespace aliases --
-- are supported, and namespace names are detected automatically for --
-- the local wiki. This module requires [[Module:Namespace detect]] --
-- and [[Module:Yesno]] to be available on the local wiki. It can be --
-- configured for different wikis by altering the values in --
-- [[Module:Category handler/config]], and pages can be blacklisted --
-- from categorisation by using [[Module:Category handler/blacklist]]. --
-- --
--------------------------------------------------------------------------------
-- Load required modules
local yesno = require('Module:Yesno')
-- Lazily load things we don't always need
local mShared, mappings
local p = {}
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function trimWhitespace(s, removeBlanks)
if type(s) ~= 'string' then
return s
end
s = s:match('^%s*(.-)%s*$')
if removeBlanks then
if s ~= '' then
return s
else
return nil
end
else
return s
end
end
--------------------------------------------------------------------------------
-- CategoryHandler class
--------------------------------------------------------------------------------
local CategoryHandler = {}
CategoryHandler.__index = CategoryHandler
function CategoryHandler.new(data, args)
local obj = setmetatable({ _data = data, _args = args }, CategoryHandler)
-- Set the title object
do
local pagename = obj:parameter('demopage')
local success, titleObj
if pagename then
success, titleObj = pcall(mw.title.new, pagename)
end
if success and titleObj then
obj.title = titleObj
if titleObj == mw.title.getCurrentTitle() then
obj._usesCurrentTitle = true
end
else
obj.title = mw.title.getCurrentTitle()
obj._usesCurrentTitle = true
end
end
-- Set suppression parameter values
for _, key in ipairs{'nocat', 'categories'} do
local value = obj:parameter(key)
value = trimWhitespace(value, true)
obj['_' .. key] = yesno(value)
end
do
local subpage = obj:parameter('subpage')
local category2 = obj:parameter('category2')
if type(subpage) == 'string' then
subpage = mw.ustring.lower(subpage)
end
if type(category2) == 'string' then
subpage = mw.ustring.lower(category2)
end
obj._subpage = trimWhitespace(subpage, true)
obj._category2 = trimWhitespace(category2) -- don't remove blank values
end
return obj
end
function CategoryHandler:parameter(key)
local parameterNames = self._data.parameters[key]
local pntype = type(parameterNames)
if pntype == 'string' or pntype == 'number' then
return self._args[parameterNames]
elseif pntype == 'table' then
for _, name in ipairs(parameterNames) do
local value = self._args[name]
if value ~= nil then
return value
end
end
return nil
else
error(string.format(
'invalid config key "%s"',
tostring(key)
), 2)
end
end
function CategoryHandler:isSuppressedByArguments()
return
-- See if a category suppression argument has been set.
self._nocat == true
or self._categories == false
or (
self._category2
and self._category2 ~= self._data.category2Yes
and self._category2 ~= self._data.category2Negative
)
-- Check whether we are on a subpage, and see if categories are
-- suppressed based on our subpage status.
or self._subpage == self._data.subpageNo and self.title.isSubpage
or self._subpage == self._data.subpageOnly and not self.title.isSubpage
end
function CategoryHandler:shouldSkipBlacklistCheck()
-- Check whether the category suppression arguments indicate we
-- should skip the blacklist check.
return self._nocat == false
or self._categories == true
or self._category2 == self._data.category2Yes
end
function CategoryHandler:matchesBlacklist()
if self._usesCurrentTitle then
return self._data.currentTitleMatchesBlacklist
else
mShared = mShared or require('Module:Category handler/shared')
return mShared.matchesBlacklist(
self.title.prefixedText,
mw.loadData('Module:Category handler/blacklist')
)
end
end
function CategoryHandler:isSuppressed()
-- Find if categories are suppressed by either the arguments or by
-- matching the blacklist.
return self:isSuppressedByArguments()
or not self:shouldSkipBlacklistCheck() and self:matchesBlacklist()
end
function CategoryHandler:getNamespaceParameters()
if self._usesCurrentTitle then
return self._data.currentTitleNamespaceParameters
else
if not mappings then
mShared = mShared or require('Module:Category handler/shared')
mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData
end
return mShared.getNamespaceParameters(
self.title,
mappings
)
end
end
function CategoryHandler:namespaceParametersExist()
-- Find whether any namespace parameters have been specified.
-- We use the order "all" --> namespace params --> "other" as this is what
-- the old template did.
if self:parameter('all') then
return true
end
if not mappings then
mShared = mShared or require('Module:Category handler/shared')
mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData
end
for ns, params in pairs(mappings) do
for i, param in ipairs(params) do
if self._args[param] then
return true
end
end
end
if self:parameter('other') then
return true
end
return false
end
function CategoryHandler:getCategories()
local params = self:getNamespaceParameters()
local nsCategory
for i, param in ipairs(params) do
local value = self._args[param]
if value ~= nil then
nsCategory = value
break
end
end
if nsCategory ~= nil or self:namespaceParametersExist() then
-- Namespace parameters exist - advanced usage.
if nsCategory == nil then
nsCategory = self:parameter('other')
end
local ret = {self:parameter('all')}
local numParam = tonumber(nsCategory)
if numParam and numParam >= 1 and math.floor(numParam) == numParam then
-- nsCategory is an integer
ret[#ret + 1] = self._args[numParam]
else
ret[#ret + 1] = nsCategory
end
if #ret < 1 then
return nil
else
return table.concat(ret)
end
elseif self._data.defaultNamespaces[self.title.namespace] then
-- Namespace parameters don't exist, simple usage.
return self._args[1]
end
return nil
end
--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------
local p = {}
function p._exportClasses()
-- Used for testing purposes.
return {
CategoryHandler = CategoryHandler
}
end
function p._main(args, data)
data = data or mw.loadData('Module:Category handler/data')
local handler = CategoryHandler.new(data, args)
if handler:isSuppressed() then
return nil
end
return handler:getCategories()
end
function p.main(frame, data)
data = data or mw.loadData('Module:Category handler/data')
local args = require('Module:Arguments').getArgs(frame, {
wrappers = data.wrappers,
valueFunc = function (k, v)
v = trimWhitespace(v)
if type(k) == 'number' then
if v ~= '' then
return v
else
return nil
end
else
return v
end
end
})
return p._main(args, data)
end
return p
letwavu3yvlayfzew66uuwixmwebq5b
Module:Yesno
828
2582
5602
2022-12-08T16:42:12Z
Rich Farmbrough
178
Xët wu bees : -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'tr...
Scribunto
text/plain
-- Function allowing for consistent treatment of boolean-like wikitext input.
-- It works similarly to the template {{yesno}}.
return function (val, default)
-- If your wiki uses non-ascii characters for any of "yes", "no", etc., you
-- should replace "val:lower()" with "mw.ustring.lower(val)" in the
-- following line.
val = type(val) == 'string' and val:lower() or val
if val == nil then
return nil
elseif val == true
or val == 'yes'
or val == 'y'
or val == 'true'
or val == 't'
or val == 'on'
or tonumber(val) == 1
then
return true
elseif val == false
or val == 'no'
or val == 'n'
or val == 'false'
or val == 'f'
or val == 'off'
or tonumber(val) == 0
then
return false
else
return default
end
end
swdskn7svew8i9wuydn9uj5l3r2ghcs
Module:Arguments
828
2583
5603
2022-12-08T16:43:38Z
Rich Farmbrough
178
Xët wu bees : -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then...
Scribunto
text/plain
-- This module provides easy processing of arguments passed to Scribunto from
-- #invoke. It is intended for use by other Lua modules, and should not be
-- called from #invoke directly.
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local arguments = {}
-- Generate four different tidyVal functions, so that we don't have to check the
-- options every time we call it.
local function tidyValDefault(key, val)
if type(val) == 'string' then
val = val:match('^%s*(.-)%s*$')
if val == '' then
return nil
else
return val
end
else
return val
end
end
local function tidyValTrimOnly(key, val)
if type(val) == 'string' then
return val:match('^%s*(.-)%s*$')
else
return val
end
end
local function tidyValRemoveBlanksOnly(key, val)
if type(val) == 'string' then
if val:find('%S') then
return val
else
return nil
end
else
return val
end
end
local function tidyValNoChange(key, val)
return val
end
local function matchesTitle(given, title)
local tp = type( given )
return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title
end
local translate_mt = { __index = function(t, k) return k end }
function arguments.getArgs(frame, options)
checkType('getArgs', 1, frame, 'table', true)
checkType('getArgs', 2, options, 'table', true)
frame = frame or {}
options = options or {}
--[[
-- Set up argument translation.
--]]
options.translate = options.translate or {}
if getmetatable(options.translate) == nil then
setmetatable(options.translate, translate_mt)
end
if options.backtranslate == nil then
options.backtranslate = {}
for k,v in pairs(options.translate) do
options.backtranslate[v] = k
end
end
if options.backtranslate and getmetatable(options.backtranslate) == nil then
setmetatable(options.backtranslate, {
__index = function(t, k)
if options.translate[k] ~= k then
return nil
else
return k
end
end
})
end
--[[
-- Get the argument tables. If we were passed a valid frame object, get the
-- frame arguments (fargs) and the parent frame arguments (pargs), depending
-- on the options set and on the parent frame's availability. If we weren't
-- passed a valid frame object, we are being called from another Lua module
-- or from the debug console, so assume that we were passed a table of args
-- directly, and assign it to a new variable (luaArgs).
--]]
local fargs, pargs, luaArgs
if type(frame.args) == 'table' and type(frame.getParent) == 'function' then
if options.wrappers then
--[[
-- The wrappers option makes Module:Arguments look up arguments in
-- either the frame argument table or the parent argument table, but
-- not both. This means that users can use either the #invoke syntax
-- or a wrapper template without the loss of performance associated
-- with looking arguments up in both the frame and the parent frame.
-- Module:Arguments will look up arguments in the parent frame
-- if it finds the parent frame's title in options.wrapper;
-- otherwise it will look up arguments in the frame object passed
-- to getArgs.
--]]
local parent = frame:getParent()
if not parent then
fargs = frame.args
else
local title = parent:getTitle():gsub('/sandbox$', '')
local found = false
if matchesTitle(options.wrappers, title) then
found = true
elseif type(options.wrappers) == 'table' then
for _,v in pairs(options.wrappers) do
if matchesTitle(v, title) then
found = true
break
end
end
end
-- We test for false specifically here so that nil (the default) acts like true.
if found or options.frameOnly == false then
pargs = parent.args
end
if not found or options.parentOnly == false then
fargs = frame.args
end
end
else
-- options.wrapper isn't set, so check the other options.
if not options.parentOnly then
fargs = frame.args
end
if not options.frameOnly then
local parent = frame:getParent()
pargs = parent and parent.args or nil
end
end
if options.parentFirst then
fargs, pargs = pargs, fargs
end
else
luaArgs = frame
end
-- Set the order of precedence of the argument tables. If the variables are
-- nil, nothing will be added to the table, which is how we avoid clashes
-- between the frame/parent args and the Lua args.
local argTables = {fargs}
argTables[#argTables + 1] = pargs
argTables[#argTables + 1] = luaArgs
--[[
-- Generate the tidyVal function. If it has been specified by the user, we
-- use that; if not, we choose one of four functions depending on the
-- options chosen. This is so that we don't have to call the options table
-- every time the function is called.
--]]
local tidyVal = options.valueFunc
if tidyVal then
if type(tidyVal) ~= 'function' then
error(
"bad value assigned to option 'valueFunc'"
.. '(function expected, got '
.. type(tidyVal)
.. ')',
2
)
end
elseif options.trim ~= false then
if options.removeBlanks ~= false then
tidyVal = tidyValDefault
else
tidyVal = tidyValTrimOnly
end
else
if options.removeBlanks ~= false then
tidyVal = tidyValRemoveBlanksOnly
else
tidyVal = tidyValNoChange
end
end
--[[
-- Set up the args, metaArgs and nilArgs tables. args will be the one
-- accessed from functions, and metaArgs will hold the actual arguments. Nil
-- arguments are memoized in nilArgs, and the metatable connects all of them
-- together.
--]]
local args, metaArgs, nilArgs, metatable = {}, {}, {}, {}
setmetatable(args, metatable)
local function mergeArgs(tables)
--[[
-- Accepts multiple tables as input and merges their keys and values
-- into one table. If a value is already present it is not overwritten;
-- tables listed earlier have precedence. We are also memoizing nil
-- values, which can be overwritten if they are 's' (soft).
--]]
for _, t in ipairs(tables) do
for key, val in pairs(t) do
if metaArgs[key] == nil and nilArgs[key] ~= 'h' then
local tidiedVal = tidyVal(key, val)
if tidiedVal == nil then
nilArgs[key] = 's'
else
metaArgs[key] = tidiedVal
end
end
end
end
end
--[[
-- Define metatable behaviour. Arguments are memoized in the metaArgs table,
-- and are only fetched from the argument tables once. Fetching arguments
-- from the argument tables is the most resource-intensive step in this
-- module, so we try and avoid it where possible. For this reason, nil
-- arguments are also memoized, in the nilArgs table. Also, we keep a record
-- in the metatable of when pairs and ipairs have been called, so we do not
-- run pairs and ipairs on the argument tables more than once. We also do
-- not run ipairs on fargs and pargs if pairs has already been run, as all
-- the arguments will already have been copied over.
--]]
metatable.__index = function (t, key)
--[[
-- Fetches an argument when the args table is indexed. First we check
-- to see if the value is memoized, and if not we try and fetch it from
-- the argument tables. When we check memoization, we need to check
-- metaArgs before nilArgs, as both can be non-nil at the same time.
-- If the argument is not present in metaArgs, we also check whether
-- pairs has been run yet. If pairs has already been run, we return nil.
-- This is because all the arguments will have already been copied into
-- metaArgs by the mergeArgs function, meaning that any other arguments
-- must be nil.
--]]
if type(key) == 'string' then
key = options.translate[key]
end
local val = metaArgs[key]
if val ~= nil then
return val
elseif metatable.donePairs or nilArgs[key] then
return nil
end
for _, argTable in ipairs(argTables) do
local argTableVal = tidyVal(key, argTable[key])
if argTableVal ~= nil then
metaArgs[key] = argTableVal
return argTableVal
end
end
nilArgs[key] = 'h'
return nil
end
metatable.__newindex = function (t, key, val)
-- This function is called when a module tries to add a new value to the
-- args table, or tries to change an existing value.
if type(key) == 'string' then
key = options.translate[key]
end
if options.readOnly then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; the table is read-only',
2
)
elseif options.noOverwrite and args[key] ~= nil then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; overwriting existing arguments is not permitted',
2
)
elseif val == nil then
--[[
-- If the argument is to be overwritten with nil, we need to erase
-- the value in metaArgs, so that __index, __pairs and __ipairs do
-- not use a previous existing value, if present; and we also need
-- to memoize the nil in nilArgs, so that the value isn't looked
-- up in the argument tables if it is accessed again.
--]]
metaArgs[key] = nil
nilArgs[key] = 'h'
else
metaArgs[key] = val
end
end
local function translatenext(invariant)
local k, v = next(invariant.t, invariant.k)
invariant.k = k
if k == nil then
return nil
elseif type(k) ~= 'string' or not options.backtranslate then
return k, v
else
local backtranslate = options.backtranslate[k]
if backtranslate == nil then
-- Skip this one. This is a tail call, so this won't cause stack overflow
return translatenext(invariant)
else
return backtranslate, v
end
end
end
metatable.__pairs = function ()
-- Called when pairs is run on the args table.
if not metatable.donePairs then
mergeArgs(argTables)
metatable.donePairs = true
end
return translatenext, { t = metaArgs }
end
local function inext(t, i)
-- This uses our __index metamethod
local v = t[i + 1]
if v ~= nil then
return i + 1, v
end
end
metatable.__ipairs = function (t)
-- Called when ipairs is run on the args table.
return inext, t, 0
end
return args
end
return arguments
5qx9tzlul9ser30uxj9nbasjt92cevn
Module:Color contrast
828
2584
5604
2022-12-08T16:44:34Z
Rich Farmbrough
178
Xët wu bees : -- -- This module implements -- {{Color contrast ratio}} -- {{Greater color contrast ratio}} -- {{ColorToLum}} -- {{RGBColorToLum}} -- local p = {} local HTMLcolor = mw.loadData( 'Module:Color contrast/colors' ) local function sRGB (v) if (v <= 0.03928) then v = v / 12.92 else v = math.pow((v+0.055)/1.055, 2.4) end return v end local function rgbdec2lum(R, G, B) if ( 0 <= R and R < 256 and 0 <= G and G < 256 and 0 <= B and B < 256 ) then return 0.2126 * sRGB(...
Scribunto
text/plain
--
-- This module implements
-- {{Color contrast ratio}}
-- {{Greater color contrast ratio}}
-- {{ColorToLum}}
-- {{RGBColorToLum}}
--
local p = {}
local HTMLcolor = mw.loadData( 'Module:Color contrast/colors' )
local function sRGB (v)
if (v <= 0.03928) then
v = v / 12.92
else
v = math.pow((v+0.055)/1.055, 2.4)
end
return v
end
local function rgbdec2lum(R, G, B)
if ( 0 <= R and R < 256 and 0 <= G and G < 256 and 0 <= B and B < 256 ) then
return 0.2126 * sRGB(R/255) + 0.7152 * sRGB(G/255) + 0.0722 * sRGB(B/255)
else
return ''
end
end
local function hsl2lum(h, s, l)
if ( 0 <= h and h < 360 and 0 <= s and s <= 1 and 0 <= l and l <= 1 ) then
local c = (1 - math.abs(2*l - 1))*s
local x = c*(1 - math.abs( math.fmod(h/60, 2) - 1) )
local m = l - c/2
local r, g, b = m, m, m
if( 0 <= h and h < 60 ) then
r = r + c
g = g + x
elseif( 60 <= h and h < 120 ) then
r = r + x
g = g + c
elseif( 120 <= h and h < 180 ) then
g = g + c
b = b + x
elseif( 180 <= h and h < 240 ) then
g = g + x
b = b + c
elseif( 240 <= h and h < 300 ) then
r = r + x
b = b + c
elseif( 300 <= h and h < 360 ) then
r = r + c
b = b + x
end
return rgbdec2lum(255*r, 255*g, 255*b)
else
return ''
end
end
local function color2lum(c)
if (c == nil) then
return ''
end
-- html '#' entity
c = c:gsub("#", "#")
-- whitespace
c = c:match( '^%s*(.-)[%s;]*$' )
-- unstrip nowiki strip markers
c = mw.text.unstripNoWiki(c)
-- lowercase
c = c:lower()
-- first try to look it up
local L = HTMLcolor[c]
if (L ~= nil) then
return L
end
-- convert from hsl
if mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9%.]*[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then
local h, s, l = mw.ustring.match(c,'^hsl%([%s]*([0-9][0-9%.]*)[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$')
return hsl2lum(tonumber(h), tonumber(s)/100, tonumber(l)/100)
end
-- convert from rgb
if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*%)$') then
local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*%)$')
return rgbdec2lum(tonumber(R), tonumber(G), tonumber(B))
end
-- convert from rgb percent
if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then
local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$')
return rgbdec2lum(255*tonumber(R)/100, 255*tonumber(G)/100, 255*tonumber(B)/100)
end
-- remove leading # (if there is one) and whitespace
c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s]*$')
-- split into rgb
local cs = mw.text.split(c or '', '')
if( #cs == 6 ) then
local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2])
local G = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[4])
local B = 16*tonumber('0x' .. cs[5]) + tonumber('0x' .. cs[6])
return rgbdec2lum(R, G, B)
elseif ( #cs == 3 ) then
local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[1])
local G = 16*tonumber('0x' .. cs[2]) + tonumber('0x' .. cs[2])
local B = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[3])
return rgbdec2lum(R, G, B)
end
-- failure, return blank
return ''
end
-- This exports the function for use in other modules.
-- The colour is passed as a string.
function p._lum(color)
return color2lum(color)
end
function p._greatercontrast(args)
local bias = tonumber(args['bias'] or '0') or 0
local css = (args['css'] and args['css'] ~= '') and true or false
local v1 = color2lum(args[1] or '')
local c2 = args[2] or '#FFFFFF'
local v2 = color2lum(c2)
local c3 = args[3] or '#000000'
local v3 = color2lum(c3)
local ratio1 = -1;
local ratio2 = -1;
if (type(v1) == 'number' and type(v2) == 'number') then
ratio1 = (v2 + 0.05)/(v1 + 0.05)
ratio1 = (ratio1 < 1) and 1/ratio1 or ratio1
end
if (type(v1) == 'number' and type(v3) == 'number') then
ratio2 = (v3 + 0.05)/(v1 + 0.05)
ratio2 = (ratio2 < 1) and 1/ratio2 or ratio2
end
if css then
local c1 = args[1] or ''
if mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or
mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then
c1 = '#' .. c1
end
if mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or
mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then
c2 = '#' .. c2
end
if mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or
mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then
c3 = '#' .. c3
end
return 'background-color:' .. c1 .. '; color:' .. ((ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '') .. ';'
end
return (ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or ''
end
function p._ratio(args)
local v1 = color2lum(args[1])
local v2 = color2lum(args[2])
if (type(v1) == 'number' and type(v2) == 'number') then
-- v1 should be the brighter of the two.
if v2 > v1 then
v1, v2 = v2, v1
end
return (v1 + 0.05)/(v2 + 0.05)
else
return args['error'] or '?'
end
end
function p._styleratio(args)
local style = (args[1] or ''):lower()
local bg, fg = 'white', 'black'
local lum_bg, lum_fg = 1, 0
if args[2] then
local lum = color2lum(args[2])
if lum ~= '' then bg, lum_bg = args[2], lum end
end
if args[3] then
local lum = color2lum(args[3])
if lum ~= '' then fg, lum_fg = args[3], lum end
end
local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&#[Xx]23;', '#'), '#', '#'), ';')
for k = 1,#slist do
local s = slist[k]
local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' )
k = k or ''
v = v or ''
if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background%-color)[%s]*$')) then
local lum = color2lum(v)
if( lum ~= '' ) then bg, lum_bg = v, lum end
elseif (k:match('^[%s]*(color)[%s]*$')) then
local lum = color2lum(v)
if( lum ~= '' ) then bg, lum_fg = v, lum end
end
end
if lum_bg > lum_fg then
return (lum_bg + 0.05)/(lum_fg + 0.05)
else
return (lum_fg + 0.05)/(lum_bg + 0.05)
end
end
--[[
Use {{#invoke:Color contrast|somecolor}} directly or
{{#invoke:Color contrast}} from a wrapper template.
Parameters:
-- |1= — required; A color to check.
--]]
function p.lum(frame)
local color = frame.args[1] or frame:getParent().args[1]
return p._lum(color)
end
function p.ratio(frame)
local args = frame.args[1] and frame.args or frame:getParent().args
return p._ratio(args)
end
function p.styleratio(frame)
local args = frame.args[1] and frame.args or frame:getParent().args
return p._styleratio(args)
end
function p.greatercontrast(frame)
local args = frame.args[1] and frame.args or frame:getParent().args
return p._greatercontrast(args)
end
return p
3j3oaih63ygo9p806h5yxpscaqh3xu9
Module:Color contrast/colors
828
2585
5605
2022-12-08T16:45:43Z
Rich Farmbrough
178
Xët wu bees : return { aliceblue = 0.92880068253475, antiquewhite = 0.84646951707754, aqua = 0.7874, aquamarine = 0.8078549208338, azure = 0.97265264954166, beige = 0.8988459998705, bisque = 0.80732327372979, black = 0, blanchedalmond = 0.85084439608156, blue = 0.0722, blueviolet = 0.12622014321946, brown = 0.098224287876511, bu...
Scribunto
text/plain
return {
aliceblue = 0.92880068253475,
antiquewhite = 0.84646951707754,
aqua = 0.7874,
aquamarine = 0.8078549208338,
azure = 0.97265264954166,
beige = 0.8988459998705,
bisque = 0.80732327372979,
black = 0,
blanchedalmond = 0.85084439608156,
blue = 0.0722,
blueviolet = 0.12622014321946,
brown = 0.098224287876511,
burlywood = 0.51559844533893,
cadetblue = 0.29424681085422,
chartreuse = 0.76032025902623,
chocolate = 0.23898526114557,
coral = 0.37017930872924,
cornflowerblue = 0.30318641994179,
cornsilk = 0.93562110372965,
crimson = 0.16042199953026,
cyan = 0.7874,
darkblue = 0.018640801980939,
darkcyan = 0.20329317839046,
darkgoldenrod = 0.27264703559993,
darkgray = 0.39675523072563,
darkgreen = 0.091143429047575,
darkgrey = 0.39675523072563,
darkkhaki = 0.45747326349994,
darkmagenta = 0.07353047651207,
darkolivegreen = 0.12651920884889,
darkorange = 0.40016167026524,
darkorchid = 0.13413142174857,
darkred = 0.054889674531132,
darksalmon = 0.40541471563381,
darkseagreen = 0.43789249325969,
darkslateblue = 0.065792846227988,
darkslategray = 0.067608151928044,
darkslategrey = 0.067608151928044,
darkturquoise = 0.4874606277449,
darkviolet = 0.10999048339343,
deeppink = 0.23866895828276,
deepskyblue = 0.44481603395575,
dimgray = 0.14126329114027,
dimgrey = 0.14126329114027,
dodgerblue = 0.27442536991456,
firebrick = 0.10724525535015,
floralwhite = 0.95922484825004,
forestgreen = 0.18920812076002,
fuchsia = 0.2848,
gainsboro = 0.71569350050648,
ghostwhite = 0.94311261886323,
gold = 0.69860877428159,
goldenrod = 0.41919977809569,
gray = 0.2158605001139,
green = 0.15438342968146,
greenyellow = 0.80609472611453,
grey = 0.2158605001139,
honeydew = 0.96336535554782,
hotpink = 0.34658438169715,
indianred = 0.21406134963884,
indigo = 0.03107561486337,
ivory = 0.99071270600615,
khaki = 0.77012343394121,
lavender = 0.80318750514521,
lavenderblush = 0.90172748631046,
lawngreen = 0.73905893124963,
lemonchiffon = 0.94038992245622,
lightblue = 0.63709141280807,
lightcoral = 0.35522120733135,
lightcyan = 0.94587293494829,
lightgoldenrodyellow = 0.93348351018297,
lightgray = 0.65140563741982,
lightgreen = 0.69091979956865,
lightgrey = 0.65140563741982,
lightpink = 0.58566152734898,
lightsalmon = 0.4780675225206,
lightseagreen = 0.35050145117042,
lightskyblue = 0.56195637618331,
lightslategray = 0.23830165007287,
lightslategrey = 0.23830165007287,
lightsteelblue = 0.53983888284666,
lightyellow = 0.98161818392882,
lime = 0.7152,
limegreen = 0.44571042246098,
linen = 0.88357340984379,
magenta = 0.2848,
maroon = 0.045891942324215,
mediumaquamarine = 0.49389703310801,
mediumblue = 0.044077780212328,
mediumorchid = 0.21639251153773,
mediumpurple = 0.22905858091648,
mediumseagreen = 0.34393112338131,
mediumslateblue = 0.20284629471622,
mediumspringgreen = 0.70704308194184,
mediumturquoise = 0.5133827926448,
mediumvioletred = 0.14371899849357,
midnightblue = 0.02071786635086,
mintcream = 0.97834604947588,
mistyrose = 0.82183047859185,
moccasin = 0.80083000991567,
navajowhite = 0.76519682342785,
navy = 0.015585128108224,
oldlace = 0.91900633405549,
olive = 0.20027537200568,
olivedrab = 0.22593150951929,
orange = 0.4817026703631,
orangered = 0.25516243753416,
orchid = 0.31348806761439,
palegoldenrod = 0.78792647887614,
palegreen = 0.77936759006353,
paleturquoise = 0.76436077921714,
palevioletred = 0.28754994117889,
papayawhip = 0.87797100199835,
peachpuff = 0.74905589878251,
peru = 0.30113074877936,
pink = 0.63271070702466,
plum = 0.45734221587969,
powderblue = 0.68254586500605,
purple = 0.061477070432439,
rebeccapurple = 0.07492341159447,
red = 0.2126,
rosybrown = 0.32319457649407,
royalblue = 0.16663210743188,
saddlebrown = 0.097922285020521,
salmon = 0.36977241527596,
sandybrown = 0.46628543696283,
seagreen = 0.19734199706275,
seashell = 0.92737862206922,
sienna = 0.13697631337098,
silver = 0.52711512570581,
skyblue = 0.55291668518184,
slateblue = 0.14784278062136,
slategray = 0.20896704076536,
slategrey = 0.20896704076536,
snow = 0.96533341834849,
springgreen = 0.73052306068529,
steelblue = 0.20562642207625,
tan = 0.48237604163921,
teal = 0.16996855778968,
thistle = 0.56818401093733,
tomato = 0.30638612719415,
turquoise = 0.5895536427578,
violet = 0.40315452986676,
wheat = 0.74909702820482,
white = 1,
whitesmoke = 0.91309865179342,
yellow = 0.9278,
yellowgreen = 0.50762957208707,
}
chi69ar1btd4wp6xbk3uez6sfu0vipn
Module:Category handler/data
828
2586
5606
2022-12-08T16:46:47Z
Rich Farmbrough
178
Xët wu bees : -- This module assembles data to be passed to [[Module:Category handler]] using -- mw.loadData. This includes the configuration data and whether the current -- page matches the title blacklist. local data = require('Module:Category handler/config') local mShared = require('Module:Category handler/shared') local blacklist = require('Module:Category handler/blacklist') local title = mw.title.getCurrentTitle() data.currentTitleMatchesBlacklist = mShared.matchesBlacklist( titl...
Scribunto
text/plain
-- This module assembles data to be passed to [[Module:Category handler]] using
-- mw.loadData. This includes the configuration data and whether the current
-- page matches the title blacklist.
local data = require('Module:Category handler/config')
local mShared = require('Module:Category handler/shared')
local blacklist = require('Module:Category handler/blacklist')
local title = mw.title.getCurrentTitle()
data.currentTitleMatchesBlacklist = mShared.matchesBlacklist(
title.prefixedText,
blacklist
)
data.currentTitleNamespaceParameters = mShared.getNamespaceParameters(
title,
mShared.getParamMappings()
)
return data
k26mwixuaeijisfddb0sxkg82iux8v4
Module:Category handler/config
828
2587
5607
2022-12-08T16:47:31Z
Rich Farmbrough
178
Xët wu bees : -------------------------------------------------------------------------------- -- [[Module:Category handler]] configuration data -- -- Language-specific parameter names and values can be set here. -- -- For blacklist config, see [[Module:Category handler/blacklist]]. -- -------------------------------------------------------------------------------- local cfg = {} -- Don't edit this line. ---------------------------------...
Scribunto
text/plain
--------------------------------------------------------------------------------
-- [[Module:Category handler]] configuration data --
-- Language-specific parameter names and values can be set here. --
-- For blacklist config, see [[Module:Category handler/blacklist]]. --
--------------------------------------------------------------------------------
local cfg = {} -- Don't edit this line.
--------------------------------------------------------------------------------
-- Start configuration data --
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Parameter names --
-- These configuration items specify custom parameter names. --
-- To add one extra name, you can use this format: --
-- --
-- foo = 'parameter name', --
-- --
-- To add multiple names, you can use this format: --
-- --
-- foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'}, --
--------------------------------------------------------------------------------
cfg.parameters = {
-- The nocat and categories parameter suppress
-- categorisation. They are used with Module:Yesno, and work as follows:
--
-- cfg.nocat:
-- Result of yesno() Effect
-- true Categorisation is suppressed
-- false Categorisation is allowed, and
-- the blacklist check is skipped
-- nil Categorisation is allowed
--
-- cfg.categories:
-- Result of yesno() Effect
-- true Categorisation is allowed, and
-- the blacklist check is skipped
-- false Categorisation is suppressed
-- nil Categorisation is allowed
nocat = 'nocat',
categories = 'categories',
-- The parameter name for the legacy "category2" parameter. This skips the
-- blacklist if set to the cfg.category2Yes value, and suppresses
-- categorisation if present but equal to anything other than
-- cfg.category2Yes or cfg.category2Negative.
category2 = 'category2',
-- cfg.subpage is the parameter name to specify how to behave on subpages.
subpage = 'subpage',
-- The parameter for data to return in all namespaces.
all = 'all',
-- The parameter name for data to return if no data is specified for the
-- namespace that is detected.
other = 'other',
-- The parameter name used to specify a page other than the current page;
-- used for testing and demonstration.
demopage = 'page',
}
--------------------------------------------------------------------------------
-- Parameter values --
-- These are set values that can be used with certain parameters. Only one --
-- value can be specified, like this: --
-- --
-- cfg.foo = 'value name' -- --
--------------------------------------------------------------------------------
-- The following settings are used with the cfg.category2 parameter. Setting
-- cfg.category2 to cfg.category2Yes skips the blacklist, and if cfg.category2
-- is present but equal to anything other than cfg.category2Yes or
-- cfg.category2Negative then it supresses cateogrisation.
cfg.category2Yes = 'yes'
cfg.category2Negative = '¬'
-- The following settings are used with the cfg.subpage parameter.
-- cfg.subpageNo is the value to specify to not categorise on subpages;
-- cfg.subpageOnly is the value to specify to only categorise on subpages.
cfg.subpageNo = 'no'
cfg.subpageOnly = 'only'
--------------------------------------------------------------------------------
-- Default namespaces --
-- This is a table of namespaces to categorise by default. The keys are the --
-- namespace numbers. --
--------------------------------------------------------------------------------
cfg.defaultNamespaces = {
[ 0] = true, -- main
[ 6] = true, -- file
[ 12] = true, -- help
[ 14] = true, -- category
[100] = true, -- portal
[108] = true, -- book
}
--------------------------------------------------------------------------------
-- Wrappers --
-- This is a wrapper template or a list of wrapper templates to be passed to --
-- [[Module:Arguments]]. --
--------------------------------------------------------------------------------
cfg.wrappers = 'Template:Category handler'
--------------------------------------------------------------------------------
-- End configuration data --
--------------------------------------------------------------------------------
return cfg -- Don't edit this line.
6ga9hbq2pdwalsvx68i53dmbr421rq5
Module:Category handler/shared
828
2588
5608
2022-12-08T16:48:15Z
Rich Farmbrough
178
Xët wu bees : -- This module contains shared functions used by [[Module:Category handler]] -- and its submodules. local p = {} function p.matchesBlacklist(page, blacklist) for i, pattern in ipairs(blacklist) do local match = mw.ustring.match(page, pattern) if match then return true end end return false end function p.getParamMappings(useLoadData) local dataPage = 'Module:Namespace detect/data' if useLoadData then return mw.loadData(dataPage).mappings else return requi...
Scribunto
text/plain
-- This module contains shared functions used by [[Module:Category handler]]
-- and its submodules.
local p = {}
function p.matchesBlacklist(page, blacklist)
for i, pattern in ipairs(blacklist) do
local match = mw.ustring.match(page, pattern)
if match then
return true
end
end
return false
end
function p.getParamMappings(useLoadData)
local dataPage = 'Module:Namespace detect/data'
if useLoadData then
return mw.loadData(dataPage).mappings
else
return require(dataPage).mappings
end
end
function p.getNamespaceParameters(titleObj, mappings)
-- We don't use title.nsText for the namespace name because it adds
-- underscores.
local mappingsKey
if titleObj.isTalkPage then
mappingsKey = 'talk'
else
mappingsKey = mw.site.namespaces[titleObj.namespace].name
end
mappingsKey = mw.ustring.lower(mappingsKey)
return mappings[mappingsKey] or {}
end
return p
omlsnhudxz6juptvtxz7ns97jutbzc5
Module:Category handler/blacklist
828
2589
5609
2022-12-08T16:52:22Z
Rich Farmbrough
178
This module may need tweaking to match the Wolof WQ namespace etc
Scribunto
text/plain
-- This module contains the blacklist used by [[Module:Category handler]].
-- Pages that match Lua patterns in this list will not be categorised unless
-- categorisation is explicitly requested.
return {
'^Main Page$', -- don't categorise the main page.
-- Don't categorise the following pages or their subpages.
-- "%f[/\0]" matches if the next character is "/" or the end of the string.
'^Wikiquote:Cascade%-protected items%f[/\0]',
'^Jëfandikukat:UBX%f[/\0]', -- The userbox "template" space.
'^Waxtaani jëfandikukat:UBX%f[/\0]',
-- Don't categorise subpages of these pages, but allow
-- categorisation of the base page.
'^Wikiquote:Template index/.*$',
-- Don't categorise archives.
'/[aA]rchive',
}
20eihps0btp4wiplnda9dkpr5qhea14
Module:Namespace detect/data
828
2590
5610
2022-12-08T16:53:45Z
Rich Farmbrough
178
Xët wu bees : -------------------------------------------------------------------------------- -- Namespace detect data -- -- This module holds data for [[Module:Namespace detect]] to be loaded per -- -- page, rather than per #invoke, for performance reasons. -- -------------------------------------------------------------------------------- local cfg = require('Module:Namespace detect/config') local function addK...
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Namespace detect data --
-- This module holds data for [[Module:Namespace detect]] to be loaded per --
-- page, rather than per #invoke, for performance reasons. --
--------------------------------------------------------------------------------
local cfg = require('Module:Namespace detect/config')
local function addKey(t, key, defaultKey)
if key ~= defaultKey then
t[#t + 1] = key
end
end
-- Get a table of parameters to query for each default parameter name.
-- This allows wikis to customise parameter names in the cfg table while
-- ensuring that default parameter names will always work. The cfg table
-- values can be added as a string, or as an array of strings.
local defaultKeys = {
'main',
'talk',
'other',
'subjectns',
'demospace',
'demopage'
}
local argKeys = {}
for i, defaultKey in ipairs(defaultKeys) do
argKeys[defaultKey] = {defaultKey}
end
for defaultKey, t in pairs(argKeys) do
local cfgValue = cfg[defaultKey]
local cfgValueType = type(cfgValue)
if cfgValueType == 'string' then
addKey(t, cfgValue, defaultKey)
elseif cfgValueType == 'table' then
for i, key in ipairs(cfgValue) do
addKey(t, key, defaultKey)
end
end
cfg[defaultKey] = nil -- Free the cfg value as we don't need it any more.
end
local function getParamMappings()
--[[
-- Returns a table of how parameter names map to namespace names. The keys
-- are the actual namespace names, in lower case, and the values are the
-- possible parameter names for that namespace, also in lower case. The
-- table entries are structured like this:
-- {
-- [''] = {'main'},
-- ['wikipedia'] = {'wikipedia', 'project', 'wp'},
-- ...
-- }
--]]
local mappings = {}
local mainNsName = mw.site.subjectNamespaces[0].name
mainNsName = mw.ustring.lower(mainNsName)
mappings[mainNsName] = mw.clone(argKeys.main)
mappings['talk'] = mw.clone(argKeys.talk)
for nsid, ns in pairs(mw.site.subjectNamespaces) do
if nsid ~= 0 then -- Exclude main namespace.
local nsname = mw.ustring.lower(ns.name)
local canonicalName = mw.ustring.lower(ns.canonicalName)
mappings[nsname] = {nsname}
if canonicalName ~= nsname then
table.insert(mappings[nsname], canonicalName)
end
for _, alias in ipairs(ns.aliases) do
table.insert(mappings[nsname], mw.ustring.lower(alias))
end
end
end
return mappings
end
return {
argKeys = argKeys,
cfg = cfg,
mappings = getParamMappings()
}
ojp6d3pc8mql5nufaqdg576c9so3479
Module:Namespace detect/config
828
2591
5611
2022-12-08T16:54:34Z
Rich Farmbrough
178
Xët wu bees : -------------------------------------------------------------------------------- -- Namespace detect configuration data -- -- -- -- This module stores configuration data for Module:Namespace detect. Here -- -- you can localise the module to your wiki's language. -- --...
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Namespace detect configuration data --
-- --
-- This module stores configuration data for Module:Namespace detect. Here --
-- you can localise the module to your wiki's language. --
-- --
-- To activate a configuration item, you need to uncomment it. This means --
-- that you need to remove the text "-- " at the start of the line. --
--------------------------------------------------------------------------------
local cfg = {} -- Don't edit this line.
--------------------------------------------------------------------------------
-- Parameter names --
-- These configuration items specify custom parameter names. Values added --
-- here will work in addition to the default English parameter names. --
-- To add one extra name, you can use this format: --
-- --
-- cfg.foo = 'parameter name' --
-- --
-- To add multiple names, you can use this format: --
-- --
-- cfg.foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'} --
--------------------------------------------------------------------------------
---- This parameter displays content for the main namespace:
-- cfg.main = 'main'
---- This parameter displays in talk namespaces:
-- cfg.talk = 'talk'
---- This parameter displays content for "other" namespaces (namespaces for which
---- parameters have not been specified):
-- cfg.other = 'other'
---- This parameter makes talk pages behave as though they are the corresponding
---- subject namespace. Note that this parameter is used with [[Module:Yesno]].
---- Edit that module to change the default values of "yes", "no", etc.
-- cfg.subjectns = 'subjectns'
---- This parameter sets a demonstration namespace:
-- cfg.demospace = 'demospace'
---- This parameter sets a specific page to compare:
cfg.demopage = 'page'
--------------------------------------------------------------------------------
-- Table configuration --
-- These configuration items allow customisation of the "table" function, --
-- used to generate a table of possible parameters in the module --
-- documentation. --
--------------------------------------------------------------------------------
---- The header for the namespace column in the wikitable containing the list of
---- possible subject-space parameters.
-- cfg.wikitableNamespaceHeader = 'Namespace'
---- The header for the wikitable containing the list of possible subject-space
---- parameters.
-- cfg.wikitableAliasesHeader = 'Aliases'
--------------------------------------------------------------------------------
-- End of configuration data --
--------------------------------------------------------------------------------
return cfg -- Don't edit this line.
1o6ozz56i8q0xgyl6xa41n2v7kelhli
Royuwaay:Template other
10
2592
5612
2022-12-08T16:55:44Z
Rich Farmbrough
178
Xët wu bees : {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{ns:Template}} | template | other }} }} | template = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} <!-- Add categories and interwikis to the /doc subpage, not here! --> </noinclude>
wikitext
text/x-wiki
{{#switch:
<!--If no or empty "demospace" parameter then detect namespace-->
{{#if:{{{demospace|}}}
| {{lc: {{{demospace}}} }} <!--Use lower case "demospace"-->
| {{#ifeq:{{NAMESPACE}}|{{ns:Template}}
| template
| other
}}
}}
| template = {{{1|}}}
| other
| #default = {{{2|}}}
}}<!--End switch--><noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
0tcssjmltwl7y5v3f5wj2kqciaabqly
Royuwaay:Documentation
10
2593
5613
2022-12-08T16:56:20Z
Rich Farmbrough
178
Xët wu bees : {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> <!-- Add categories to the /doc subpage --> </noinclude>
wikitext
text/x-wiki
{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude>
<!-- Add categories to the /doc subpage -->
</noinclude>
ii1kftoonz87mztj4siz1yhyqeg6agm
Module:Documentation
828
2594
5614
2022-12-08T16:57:07Z
Rich Farmbrough
178
Xët wu bees : -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. -...
Scribunto
text/plain
-- This module implements {{documentation}}.
-- Get required modules.
local getArgs = require('Module:Arguments').getArgs
-- Get the config table.
local cfg = mw.loadData('Module:Documentation/config')
local p = {}
-- Often-used functions.
local ugsub = mw.ustring.gsub
----------------------------------------------------------------------------
-- Helper functions
--
-- These are defined as local functions, but are made available in the p
-- table for testing purposes.
----------------------------------------------------------------------------
local function message(cfgKey, valArray, expectType)
--[[
-- Gets a message from the cfg table and formats it if appropriate.
-- The function raises an error if the value from the cfg table is not
-- of the type expectType. The default type for expectType is 'string'.
-- If the table valArray is present, strings such as $1, $2 etc. in the
-- message are substituted with values from the table keys [1], [2] etc.
-- For example, if the message "foo-message" had the value 'Foo $2 bar $1.',
-- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz."
--]]
local msg = cfg[cfgKey]
expectType = expectType or 'string'
if type(msg) ~= expectType then
error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2)
end
if not valArray then
return msg
end
local function getMessageVal(match)
match = tonumber(match)
return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4)
end
return ugsub(msg, '$([1-9][0-9]*)', getMessageVal)
end
p.message = message
local function makeWikilink(page, display)
if display then
return mw.ustring.format('[[%s|%s]]', page, display)
else
return mw.ustring.format('[[%s]]', page)
end
end
p.makeWikilink = makeWikilink
local function makeCategoryLink(cat, sort)
local catns = mw.site.namespaces[14].name
return makeWikilink(catns .. ':' .. cat, sort)
end
p.makeCategoryLink = makeCategoryLink
local function makeUrlLink(url, display)
return mw.ustring.format('[%s %s]', url, display)
end
p.makeUrlLink = makeUrlLink
local function makeToolbar(...)
local ret = {}
local lim = select('#', ...)
if lim < 1 then
return nil
end
for i = 1, lim do
ret[#ret + 1] = select(i, ...)
end
-- 'documentation-toolbar'
return '<span class="' .. message('toolbar-class') .. '">('
.. table.concat(ret, ' | ') .. ')</span>'
end
p.makeToolbar = makeToolbar
----------------------------------------------------------------------------
-- Argument processing
----------------------------------------------------------------------------
local function makeInvokeFunc(funcName)
return function (frame)
local args = getArgs(frame, {
valueFunc = function (key, value)
if type(value) == 'string' then
value = value:match('^%s*(.-)%s*$') -- Remove whitespace.
if key == 'heading' or value ~= '' then
return value
else
return nil
end
else
return value
end
end
})
return p[funcName](args)
end
end
----------------------------------------------------------------------------
-- Entry points
----------------------------------------------------------------------------
function p.nonexistent(frame)
if mw.title.getCurrentTitle().subpageText == 'testcases' then
return frame:expandTemplate{title = 'module test cases notice'}
else
return p.main(frame)
end
end
p.main = makeInvokeFunc('_main')
function p._main(args)
--[[
-- This function defines logic flow for the module.
-- @args - table of arguments passed by the user
--]]
local env = p.getEnvironment(args)
local root = mw.html.create()
root
:wikitext(p._getModuleWikitext(args, env))
:wikitext(p.protectionTemplate(env))
:wikitext(p.sandboxNotice(args, env))
:tag('div')
-- 'documentation-container'
:addClass(message('container'))
:attr('role', 'complementary')
:attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil)
:attr('aria-label', args.heading == '' and 'Documentation' or nil)
:newline()
:tag('div')
-- 'documentation'
:addClass(message('main-div-classes'))
:newline()
:wikitext(p._startBox(args, env))
:wikitext(p._content(args, env))
:tag('div')
-- 'documentation-clear'
:addClass(message('clear'))
:done()
:newline()
:done()
:wikitext(p._endBox(args, env))
:done()
:wikitext(p.addTrackingCategories(env))
-- 'Module:Documentation/styles.css'
return mw.getCurrentFrame():extensionTag (
'templatestyles', '', {src=cfg['templatestyles']
}) .. tostring(root)
end
----------------------------------------------------------------------------
-- Environment settings
----------------------------------------------------------------------------
function p.getEnvironment(args)
--[[
-- Returns a table with information about the environment, including title
-- objects and other namespace- or path-related data.
-- @args - table of arguments passed by the user
--
-- Title objects include:
-- env.title - the page we are making documentation for (usually the current title)
-- env.templateTitle - the template (or module, file, etc.)
-- env.docTitle - the /doc subpage.
-- env.sandboxTitle - the /sandbox subpage.
-- env.testcasesTitle - the /testcases subpage.
--
-- Data includes:
-- env.protectionLevels - the protection levels table of the title object.
-- env.subjectSpace - the number of the title's subject namespace.
-- env.docSpace - the number of the namespace the title puts its documentation in.
-- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace.
-- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template.
--
-- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value
-- returned will be nil.
--]]
local env, envFuncs = {}, {}
-- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value
-- returned by that function is memoized in the env table so that we don't call any of the functions
-- more than once. (Nils won't be memoized.)
setmetatable(env, {
__index = function (t, key)
local envFunc = envFuncs[key]
if envFunc then
local success, val = pcall(envFunc)
if success then
env[key] = val -- Memoise the value.
return val
end
end
return nil
end
})
function envFuncs.title()
-- The title object for the current page, or a test page passed with args.page.
local title
local titleArg = args.page
if titleArg then
title = mw.title.new(titleArg)
else
title = mw.title.getCurrentTitle()
end
return title
end
function envFuncs.templateTitle()
--[[
-- The template (or module, etc.) title object.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
-- 'testcases-subpage' --> 'testcases'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local subpage = title.subpageText
if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then
return mw.title.makeTitle(subjectSpace, title.baseText)
else
return mw.title.makeTitle(subjectSpace, title.text)
end
end
function envFuncs.docTitle()
--[[
-- Title object of the /doc subpage.
-- Messages:
-- 'doc-subpage' --> 'doc'
--]]
local title = env.title
local docname = args[1] -- User-specified doc page.
local docpage
if docname then
docpage = docname
else
docpage = env.docpageBase .. '/' .. message('doc-subpage')
end
return mw.title.new(docpage)
end
function envFuncs.sandboxTitle()
--[[
-- Title object for the /sandbox subpage.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage'))
end
function envFuncs.testcasesTitle()
--[[
-- Title object for the /testcases subpage.
-- Messages:
-- 'testcases-subpage' --> 'testcases'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))
end
function envFuncs.protectionLevels()
-- The protection levels table of the title object.
return env.title.protectionLevels
end
function envFuncs.subjectSpace()
-- The subject namespace number.
return mw.site.namespaces[env.title.namespace].subject.id
end
function envFuncs.docSpace()
-- The documentation namespace number. For most namespaces this is the
-- same as the subject namespace. However, pages in the Article, File,
-- MediaWiki or Category namespaces must have their /doc, /sandbox and
-- /testcases pages in talk space.
local subjectSpace = env.subjectSpace
if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then
return subjectSpace + 1
else
return subjectSpace
end
end
function envFuncs.docpageBase()
-- The base page of the /doc, /sandbox, and /testcases subpages.
-- For some namespaces this is the talk page, rather than the template page.
local templateTitle = env.templateTitle
local docSpace = env.docSpace
local docSpaceText = mw.site.namespaces[docSpace].name
-- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon.
return docSpaceText .. ':' .. templateTitle.text
end
function envFuncs.compareUrl()
-- Diff link between the sandbox and the main template using [[Special:ComparePages]].
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
if templateTitle.exists and sandboxTitle.exists then
local compareUrl = mw.uri.fullUrl(
'Special:ComparePages',
{ page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText}
)
return tostring(compareUrl)
else
return nil
end
end
return env
end
----------------------------------------------------------------------------
-- Auxiliary templates
----------------------------------------------------------------------------
p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext')
function p._getModuleWikitext(args, env)
local currentTitle = mw.title.getCurrentTitle()
if currentTitle.contentModel ~= 'Scribunto' then return end
pcall(require, currentTitle.prefixedText) -- if it fails, we don't care
local moduleWikitext = package.loaded["Module:Module wikitext"]
if moduleWikitext then
return moduleWikitext.main()
end
end
function p.sandboxNotice(args, env)
--[=[
-- Generates a sandbox notice for display above sandbox pages.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]'
-- 'sandbox-notice-blurb' --> 'This is the $1 for $2.'
-- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).'
-- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page'
-- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page'
-- 'sandbox-notice-pagetype-other' --> 'sandbox page'
-- 'sandbox-notice-compare-link-display' --> 'diff'
-- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.'
-- 'sandbox-notice-testcases-link-display' --> 'test cases'
-- 'sandbox-category' --> 'Template sandboxes'
--]=]
local title = env.title
local sandboxTitle = env.sandboxTitle
local templateTitle = env.templateTitle
local subjectSpace = env.subjectSpace
if not (subjectSpace and title and sandboxTitle and templateTitle
and mw.title.equals(title, sandboxTitle)) then
return nil
end
-- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text".
local omargs = {}
omargs.image = message('sandbox-notice-image')
-- Get the text. We start with the opening blurb, which is something like
-- "This is the template sandbox for [[Template:Foo]] (diff)."
local text = ''
local pagetype
if subjectSpace == 10 then
pagetype = message('sandbox-notice-pagetype-template')
elseif subjectSpace == 828 then
pagetype = message('sandbox-notice-pagetype-module')
else
pagetype = message('sandbox-notice-pagetype-other')
end
local templateLink = makeWikilink(templateTitle.prefixedText)
local compareUrl = env.compareUrl
if compareUrl then
local compareDisplay = message('sandbox-notice-compare-link-display')
local compareLink = makeUrlLink(compareUrl, compareDisplay)
text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink})
else
text = text .. message('sandbox-notice-blurb', {pagetype, templateLink})
end
-- Get the test cases page blurb if the page exists. This is something like
-- "See also the companion subpage for [[Template:Foo/testcases|test cases]]."
local testcasesTitle = env.testcasesTitle
if testcasesTitle and testcasesTitle.exists then
if testcasesTitle.contentModel == "Scribunto" then
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink})
else
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink})
end
end
-- Add the sandbox to the sandbox category.
omargs.text = text .. makeCategoryLink(message('sandbox-category'))
-- 'documentation-clear'
return '<div class="' .. message('clear') .. '"></div>'
.. require('Module:Message box').main('ombox', omargs)
end
function p.protectionTemplate(env)
-- Generates the padlock icon in the top right.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'protection-template' --> 'pp-template'
-- 'protection-template-args' --> {docusage = 'yes'}
local protectionLevels = env.protectionLevels
if not protectionLevels then
return nil
end
local editProt = protectionLevels.edit and protectionLevels.edit[1]
local moveProt = protectionLevels.move and protectionLevels.move[1]
if editProt then
-- The page is edit-protected.
return require('Module:Protection banner')._main{
message('protection-reason-edit'), small = true
}
elseif moveProt and moveProt ~= 'autoconfirmed' then
-- The page is move-protected but not edit-protected. Exclude move
-- protection with the level "autoconfirmed", as this is equivalent to
-- no move protection at all.
return require('Module:Protection banner')._main{
action = 'move', small = true
}
else
return nil
end
end
----------------------------------------------------------------------------
-- Start box
----------------------------------------------------------------------------
p.startBox = makeInvokeFunc('_startBox')
function p._startBox(args, env)
--[[
-- This function generates the start box.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make
-- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox
-- which generate the box HTML.
--]]
env = env or p.getEnvironment(args)
local links
local content = args.content
if not content or args[1] then
-- No need to include the links if the documentation is on the template page itself.
local linksData = p.makeStartBoxLinksData(args, env)
if linksData then
links = p.renderStartBoxLinks(linksData)
end
end
-- Generate the start box html.
local data = p.makeStartBoxData(args, env, links)
if data then
return p.renderStartBox(data)
else
-- User specified no heading.
return nil
end
end
function p.makeStartBoxLinksData(args, env)
--[[
-- Does initial processing of data to make the [view] [edit] [history] [purge] links.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'view-link-display' --> 'view'
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'purge-link-display' --> 'purge'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'docpage-preload' --> 'Template:Documentation/preload'
-- 'create-link-display' --> 'create'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local docTitle = env.docTitle
if not title or not docTitle then
return nil
end
if docTitle.isRedirect then
docTitle = docTitle.redirectTarget
end
local data = {}
data.title = title
data.docTitle = docTitle
-- View, display, edit, and purge links if /doc exists.
data.viewLinkDisplay = message('view-link-display')
data.editLinkDisplay = message('edit-link-display')
data.historyLinkDisplay = message('history-link-display')
data.purgeLinkDisplay = message('purge-link-display')
-- Create link if /doc doesn't exist.
local preload = args.preload
if not preload then
if subjectSpace == 828 then -- Module namespace
preload = message('module-preload')
else
preload = message('docpage-preload')
end
end
data.preload = preload
data.createLinkDisplay = message('create-link-display')
return data
end
function p.renderStartBoxLinks(data)
--[[
-- Generates the [view][edit][history][purge] or [create][purge] links from the data table.
-- @data - a table of data generated by p.makeStartBoxLinksData
--]]
local function escapeBrackets(s)
-- Escapes square brackets with HTML entities.
s = s:gsub('%[', '[') -- Replace square brackets with HTML entities.
s = s:gsub('%]', ']')
return s
end
local ret
local docTitle = data.docTitle
local title = data.title
local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay)
if docTitle.exists then
local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay)
local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay)
local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay)
ret = '[%s] [%s] [%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink)
else
local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
ret = '[%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, createLink, purgeLink)
end
return ret
end
function p.makeStartBoxData(args, env, links)
--[=[
-- Does initial processing of data to pass to the start-box render function, p.renderStartBox.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error.
--
-- Messages:
-- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- 'template-namespace-heading' --> 'Template documentation'
-- 'module-namespace-heading' --> 'Module documentation'
-- 'file-namespace-heading' --> 'Summary'
-- 'other-namespaces-heading' --> 'Documentation'
-- 'testcases-create-link-display' --> 'create'
--]=]
local subjectSpace = env.subjectSpace
if not subjectSpace then
-- Default to an "other namespaces" namespace, so that we get at least some output
-- if an error occurs.
subjectSpace = 2
end
local data = {}
-- Heading
local heading = args.heading -- Blank values are not removed.
if heading == '' then
-- Don't display the start box if the heading arg is defined but blank.
return nil
end
if heading then
data.heading = heading
elseif subjectSpace == 10 then -- Template namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading')
elseif subjectSpace == 828 then -- Module namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading')
elseif subjectSpace == 6 then -- File namespace
data.heading = message('file-namespace-heading')
else
data.heading = message('other-namespaces-heading')
end
-- Heading CSS
local headingStyle = args['heading-style']
if headingStyle then
data.headingStyleText = headingStyle
else
-- 'documentation-heading'
data.headingClass = message('main-div-heading-class')
end
-- Data for the [view][edit][history][purge] or [create] links.
if links then
-- 'mw-editsection-like plainlinks'
data.linksClass = message('start-box-link-classes')
data.links = links
end
return data
end
function p.renderStartBox(data)
-- Renders the start box html.
-- @data - a table of data generated by p.makeStartBoxData.
local sbox = mw.html.create('div')
sbox
-- 'documentation-startbox'
:addClass(message('start-box-class'))
:newline()
:tag('span')
:addClass(data.headingClass)
:attr('id', 'documentation-heading')
:cssText(data.headingStyleText)
:wikitext(data.heading)
local links = data.links
if links then
sbox:tag('span')
:addClass(data.linksClass)
:attr('id', data.linksId)
:wikitext(links)
end
return tostring(sbox)
end
----------------------------------------------------------------------------
-- Documentation content
----------------------------------------------------------------------------
p.content = makeInvokeFunc('_content')
function p._content(args, env)
-- Displays the documentation contents
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
local content = args.content
if not content and docTitle and docTitle.exists then
content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText}
end
-- The line breaks below are necessary so that "=== Headings ===" at the start and end
-- of docs are interpreted correctly.
return '\n' .. (content or '') .. '\n'
end
p.contentTitle = makeInvokeFunc('_contentTitle')
function p._contentTitle(args, env)
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
if not args.content and docTitle and docTitle.exists then
return docTitle.prefixedText
else
return ''
end
end
----------------------------------------------------------------------------
-- End box
----------------------------------------------------------------------------
p.endBox = makeInvokeFunc('_endBox')
function p._endBox(args, env)
--[=[
-- This function generates the end box (also known as the link box).
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
--]=]
-- Get environment data.
env = env or p.getEnvironment(args)
local subjectSpace = env.subjectSpace
local docTitle = env.docTitle
if not subjectSpace or not docTitle then
return nil
end
-- Check whether we should output the end box at all. Add the end
-- box by default if the documentation exists or if we are in the
-- user, module or template namespaces.
local linkBox = args['link box']
if linkBox == 'off'
or not (
docTitle.exists
or subjectSpace == 2
or subjectSpace == 828
or subjectSpace == 10
)
then
return nil
end
-- Assemble the link box.
local text = ''
if linkBox then
text = text .. linkBox
else
text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]."
if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then
-- We are in the user, template or module namespaces.
-- Add sandbox and testcases links.
-- "Editors can experiment in this template's sandbox and testcases pages."
text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />'
if not args.content and not args[1] then
-- "Please add categories to the /doc subpage."
-- Don't show this message with inline docs or with an explicitly specified doc page,
-- as then it is unclear where to add the categories.
text = text .. (p.makeCategoriesBlurb(args, env) or '')
end
text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template"
end
end
local box = mw.html.create('div')
-- 'documentation-metadata'
box:attr('role', 'note')
:addClass(message('end-box-class'))
-- 'plainlinks'
:addClass(message('end-box-plainlinks'))
:wikitext(text)
:done()
return '\n' .. tostring(box)
end
function p.makeDocPageBlurb(args, env)
--[=[
-- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)".
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'transcluded-from-blurb' -->
-- 'The above [[Wikipedia:Template documentation|documentation]]
-- is [[Help:Transclusion|transcluded]] from $1.'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'create-link-display' --> 'create'
-- 'create-module-doc-blurb' -->
-- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].'
--]=]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local ret
if docTitle.exists then
-- /doc exists; link to it.
local docLink = makeWikilink(docTitle.prefixedText)
local editUrl = docTitle:fullUrl{action = 'edit'}
local editDisplay = message('edit-link-display')
local editLink = makeUrlLink(editUrl, editDisplay)
local historyUrl = docTitle:fullUrl{action = 'history'}
local historyDisplay = message('history-link-display')
local historyLink = makeUrlLink(historyUrl, historyDisplay)
ret = message('transcluded-from-blurb', {docLink})
.. ' '
.. makeToolbar(editLink, historyLink)
.. '<br />'
elseif env.subjectSpace == 828 then
-- /doc does not exist; ask to create it.
local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')}
local createDisplay = message('create-link-display')
local createLink = makeUrlLink(createUrl, createDisplay)
ret = message('create-module-doc-blurb', {createLink})
.. '<br />'
end
return ret
end
function p.makeExperimentBlurb(args, env)
--[[
-- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-link-display' --> 'sandbox'
-- 'sandbox-edit-link-display' --> 'edit'
-- 'compare-link-display' --> 'diff'
-- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'sandbox-create-link-display' --> 'create'
-- 'mirror-edit-summary' --> 'Create sandbox version of $1'
-- 'mirror-link-display' --> 'mirror'
-- 'mirror-link-preload' --> 'Template:Documentation/mirror'
-- 'sandbox-link-display' --> 'sandbox'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display'--> 'edit'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'testcases-create-link-display' --> 'create'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display' --> 'edit'
-- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases'
-- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases'
-- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.'
-- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
local testcasesTitle = env.testcasesTitle
local templatePage = templateTitle.prefixedText
if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then
return nil
end
-- Make links.
local sandboxLinks, testcasesLinks
if sandboxTitle.exists then
local sandboxPage = sandboxTitle.prefixedText
local sandboxDisplay = message('sandbox-link-display')
local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay)
local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'}
local sandboxEditDisplay = message('sandbox-edit-link-display')
local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay)
local compareUrl = env.compareUrl
local compareLink
if compareUrl then
local compareDisplay = message('compare-link-display')
compareLink = makeUrlLink(compareUrl, compareDisplay)
end
sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink)
else
local sandboxPreload
if subjectSpace == 828 then
sandboxPreload = message('module-sandbox-preload')
else
sandboxPreload = message('template-sandbox-preload')
end
local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload}
local sandboxCreateDisplay = message('sandbox-create-link-display')
local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay)
local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)})
local mirrorPreload = message('mirror-link-preload')
local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary}
if subjectSpace == 828 then
mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary}
end
local mirrorDisplay = message('mirror-link-display')
local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay)
sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink)
end
if testcasesTitle.exists then
local testcasesPage = testcasesTitle.prefixedText
local testcasesDisplay = message('testcases-link-display')
local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay)
local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'}
local testcasesEditDisplay = message('testcases-edit-link-display')
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)
-- for Modules, add testcases run link if exists
if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then
local testcasesRunLinkDisplay = message('testcases-run-link-display')
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink)
else
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink)
end
else
local testcasesPreload
if subjectSpace == 828 then
testcasesPreload = message('module-testcases-preload')
else
testcasesPreload = message('template-testcases-preload')
end
local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload}
local testcasesCreateDisplay = message('testcases-create-link-display')
local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay)
testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink)
end
local messageName
if subjectSpace == 828 then
messageName = 'experiment-blurb-module'
else
messageName = 'experiment-blurb-template'
end
return message(messageName, {sandboxLinks, testcasesLinks})
end
function p.makeCategoriesBlurb(args, env)
--[[
-- Generates the text "Please add categories to the /doc subpage."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'doc-link-display' --> '/doc'
-- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.'
--]]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display'))
return message('add-categories-blurb', {docPathLink})
end
function p.makeSubpagesBlurb(args, env)
--[[
-- Generates the "Subpages of this template" link.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'template-pagetype' --> 'template'
-- 'module-pagetype' --> 'module'
-- 'default-pagetype' --> 'page'
-- 'subpages-link-display' --> 'Subpages of this $1'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
if not subjectSpace or not templateTitle then
return nil
end
local pagetype
if subjectSpace == 10 then
pagetype = message('template-pagetype')
elseif subjectSpace == 828 then
pagetype = message('module-pagetype')
else
pagetype = message('default-pagetype')
end
local subpagesLink = makeWikilink(
'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/',
message('subpages-link-display', {pagetype})
)
return message('subpages-blurb', {subpagesLink})
end
----------------------------------------------------------------------------
-- Tracking categories
----------------------------------------------------------------------------
function p.addTrackingCategories(env)
--[[
-- Check if {{documentation}} is transcluded on a /doc or /testcases page.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'display-strange-usage-category' --> true
-- 'doc-subpage' --> 'doc'
-- 'testcases-subpage' --> 'testcases'
-- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage'
--
-- /testcases pages in the module namespace are not categorised, as they may have
-- {{documentation}} transcluded automatically.
--]]
local title = env.title
local subjectSpace = env.subjectSpace
if not title or not subjectSpace then
return nil
end
local subpage = title.subpageText
local ret = ''
if message('display-strange-usage-category', nil, 'boolean')
and (
subpage == message('doc-subpage')
or subjectSpace ~= 828 and subpage == message('testcases-subpage')
)
then
ret = ret .. makeCategoryLink(message('strange-usage-category'))
end
return ret
end
return p
5l6x7e2bpqxj9ebmqd90ugg7f3ccrmp
Royuwaay:Emergency-bot-shutoff
10
2595
5615
2022-12-08T17:28:04Z
Rich Farmbrough
178
Xët wu bees : <div class="plainlinks plainlinks2" style="text-align:center;"> <strong style="font-size: 2em;">Emergency {{{titlename|bot}}} shutoff button</strong> [[{{{icon|File:Shutdown button.svg}}}|{{{buttonsize|128}}}px|Emergency block button|link={{fullurl:Special:Block|wpTarget={{BASEPAGENAMEE}}&wpExpiry=indefinite&wpHardBlock=1&wpAutoBlock=0&wpCreateAccount=0&wpReason=other&wpReason-other=Bot%20malfunctioning:%20}}]] <strong>[[Project:Administrators|Administrators]]:</strong> {{#...
wikitext
text/x-wiki
<div class="plainlinks plainlinks2" style="text-align:center;">
<strong style="font-size: 2em;">Emergency {{{titlename|bot}}} shutoff button</strong>
[[{{{icon|File:Shutdown button.svg}}}|{{{buttonsize|128}}}px|Emergency block button|link={{fullurl:Special:Block|wpTarget={{BASEPAGENAMEE}}&wpExpiry=indefinite&wpHardBlock=1&wpAutoBlock=0&wpCreateAccount=0&wpReason=other&wpReason-other=Bot%20malfunctioning:%20}}]]
<strong>[[Project:Administrators|Administrators]]:</strong> {{#if:{{{shutoff|}}}|Please consider using the <strong>[[{{{shutoff}}}|task-specific shutdown options]]</strong> first. Otherwise, u|U}}se this button if {{{name|the bot}}} is malfunctioning. (<strong>[{{fullurl:Special:Block|wpTarget={{BASEPAGENAMEE}}&wpExpiry=indefinite&wpHardBlock=1&wpAutoBlock=0&wpCreateAccount=0&wpReason=other&wpReason-other=Bot%20malfunctioning:%20}} direct link]</strong>)
<br/>
<small>Non-administrators can {{edit|Wikipedia:Administrators' noticeboard/Incidents|report|section=new|preloadtitle=[[:User:{{BASEPAGENAME}}]] is malfunctioning}} a malfunctioning bot to [[Wikipedia:Administrators' noticeboard/Incidents]].</small>
</div><noinclude>{{documentation}}</noinclude>
t5rvd1kr899hitlokeo1ipabe29363u
Royuwaay:Edit
10
2596
5616
2022-12-08T17:29:40Z
Rich Farmbrough
178
Xët wu bees : <span class="noprint plainlinks" title="{{#if:{{{tooltip|}}}|{{{tooltip}}}|Edit {{{1}}}}}">[{{fullurl:{{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}}}}|action=edit{{#if:{{{section|}}}|§ion={{{section}}}}}{{#if:{{{editintro|}}}|&editintro={{urlencode:{{{editintro}}}|wiki}}}}{{#if:{{{preload|}}}|&preload={{urlencode:{{{preload}}}|wiki}}}}{{#if:{{{preloadtitle|}}}|&preloadtitle={{urlencode:{{{preloadtitle}}}}}}}}} {{{2|edit}}}]</span><noinclude> {{documentation}} </noinclude>
wikitext
text/x-wiki
<span class="noprint plainlinks" title="{{#if:{{{tooltip|}}}|{{{tooltip}}}|Edit {{{1}}}}}">[{{fullurl:{{#if:{{{1|}}}|{{{1}}}|{{FULLPAGENAME}}}}|action=edit{{#if:{{{section|}}}|§ion={{{section}}}}}{{#if:{{{editintro|}}}|&editintro={{urlencode:{{{editintro}}}|wiki}}}}{{#if:{{{preload|}}}|&preload={{urlencode:{{{preload}}}|wiki}}}}{{#if:{{{preloadtitle|}}}|&preloadtitle={{urlencode:{{{preloadtitle}}}}}}}}} {{{2|edit}}}]</span><noinclude>
{{documentation}}
</noinclude>
3tfmuuvjjnszagj2mzafv2005px018o