Wiktionary
igwiktionary
https://ig.wiktionary.org/wiki/Ihu_mb%E1%BB%A5
MediaWiki 1.47.0-wmf.8
case-sensitive
Midia
Ọpụrụiche
Ńkàtá
Ojiarụ
Ńkàtá ojiarụ
Wiktionary
Ńkàtá Wiktionary
Faịlụ
Ńkàtá faịlụ
MidiaWiki
Ńkàtá MidiaWiki
Templeeti
Ńkàtá templeeti
Enyemaka
Ńkàtá enyemaka
Otú
Ńkàtá otú
TimedText
TimedText talk
Module
Module talk
Event
Event talk
Adachukwu
0
32
42340
42046
2026-06-23T12:27:44Z
Johnnybam
1153
/* Mkpoputa */
42340
wikitext
text/x-wiki
Adachukwu
===Nkọwa===
Adachukwu pụtara na nwata nwa ada.
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
Adachukwu bụ aha ana-kpo nwanyị na ala igbo
===Mkpoputa===
A/da/chu/kwu
[[File:Ig-Adaukwuu.ogg]]
===Olumba===
Adaolisa
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
God's daughter
[[Òtù:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
2dppq0jvgmi1thoyjxhqi0el28ikd9m
42703
42340
2026-06-23T14:25:52Z
Johnnybam
1153
/* Bekee */
42703
wikitext
text/x-wiki
Adachukwu
===Nkọwa===
Adachukwu pụtara na nwata nwa ada.
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
Adachukwu bụ aha ana-kpo nwanyị na ala igbo
===Mkpoputa===
A/da/chu/kwu
[[File:Ig-Adaukwuu.ogg]]
===Olumba===
Adaolisa
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
God's daughter
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
1jwa4toszguatsuw6gphukjwzb1u54x
42707
42703
2026-06-23T14:26:19Z
Johnnybam
1153
/* Mkpoputa */
42707
wikitext
text/x-wiki
Adachukwu
===Nkọwa===
Adachukwu pụtara na nwata nwa ada.
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
Adachukwu bụ aha ana-kpo nwanyị na ala igbo
===Mkpọpụta===
A/da/chu/kwu
[[File:Ig-Adaukwuu.ogg]]
===Olumba===
Adaolisa
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
God's daughter
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
541pijsjdkptxdi7qtzg6yxxi9wixe9
Adaku
0
35
42432
42224
2026-06-23T13:07:04Z
Akwugo
14
Redirected page to [[Adakụ]]
42432
wikitext
text/x-wiki
#REDIRECT [[Adakụ]]
'''Adakụ'''
===Nkọwa===
Adakụ bụ Aha a na-abakari umụaka n'ala Igbo
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Aha m bụ Adakụ
===Mkpọpụta===
A/da/kụ
[[File:LL-Q33578 (ibo)-Dagentle-Adaku.wav]]
===Olumba===
Ada-eku
==Ntụghari n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/ Daughter of wealth]
[[Òtù:Wiki Loves Names]]
[[Category: Aha]]
[[Category:Mmadụ]]
[[Category:Igbo Noun Project]]
j5cte9wblzd3qdjvt1272fl6oyigilc
Afe
0
44
42344
23244
2026-06-23T12:28:45Z
Johnnybam
1153
/* Mkpọpụta */
42344
wikitext
text/x-wiki
'''Afe'''
===Nkọwa===
Afe bụ akwa mmadụ yi n'ahụ ya.
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
Zụtara m afe mara mma.
===Mkpọpụta===
A/fe
[[File:LL-Q33578 (ibo)-Sayvhior-Afe.wav|LL-Q33578 (ibo)-Sayvhior-Afe]]
===Olumba===
Uwe
*Efe
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Clothe
https://en.m.wiktionary.org/wiki/clothe
===Category===
[[Òtù:wiki loves names]]
p6cu2zzu38ol4s2xdlwjwb2dcslmtp3
42346
42344
2026-06-23T12:29:07Z
Johnnybam
1153
/* Mkpọpụta */
42346
wikitext
text/x-wiki
'''Afe'''
===Nkọwa===
Afe bụ akwa mmadụ yi n'ahụ ya.
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
Zụtara m afe mara mma.
===Mkpọpụta===
A/fe
[[File:LL-Q33578 (ibo)-Sayvhior-Afe.wav|LL-Q33578 (ibo)-Sayvhior-Afe]]
===Olumba===
Uwe
*Efe
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Clothe
https://en.m.wiktionary.org/wiki/clothe
===Category===
[[Òtù:wiki loves names]]
l9gs46cae24m6bteni3g5q5idf25l7d
42737
42346
2026-06-23T14:37:13Z
Johnnybam
1153
/* Category */
42737
wikitext
text/x-wiki
'''Afe'''
===Nkọwa===
Afe bụ akwa mmadụ yi n'ahụ ya.
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
Zụtara m afe mara mma.
===Mkpọpụta===
A/fe
[[File:LL-Q33578 (ibo)-Sayvhior-Afe.wav|LL-Q33578 (ibo)-Sayvhior-Afe]]
===Olumba===
Uwe
*Efe
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Clothe
https://en.m.wiktionary.org/wiki/clothe
[[Òtù:wiki loves names]]
[[Category:Aha]]
[[Category: Mmadụ]]
o39dy5hwmv5xj9spymcypi78vow39sn
42738
42737
2026-06-23T14:37:45Z
Johnnybam
1153
/* Bekee */
42738
wikitext
text/x-wiki
'''Afe'''
===Nkọwa===
Afe bụ akwa mmadụ yi n'ahụ ya.
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
Zụtara m afe mara mma.
===Mkpọpụta===
A/fe
[[File:LL-Q33578 (ibo)-Sayvhior-Afe.wav|LL-Q33578 (ibo)-Sayvhior-Afe]]
===Olumba===
Uwe
*Efe
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
https://en.m.wiktionary.org/wiki/clothe
[[Òtù:wiki loves names]]
[[Category:Aha]]
[[Category: Mmadụ]]
tamciyidmxmhsilti4ponpm85fvscx7
42740
42738
2026-06-23T14:38:14Z
Johnnybam
1153
/* Bekee */
42740
wikitext
text/x-wiki
'''Afe'''
===Nkọwa===
Afe bụ akwa mmadụ yi n'ahụ ya.
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
Zụtara m afe mara mma.
===Mkpọpụta===
A/fe
[[File:LL-Q33578 (ibo)-Sayvhior-Afe.wav|LL-Q33578 (ibo)-Sayvhior-Afe]]
===Olumba===
Uwe
*Efe
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
[https://en.m.wiktionary.org/wiki/clothe Cloth]
[[Òtù:wiki loves names]]
[[Category:Aha]]
[[Category: Mmadụ]]
64pnvj89b90nlhvz96g4mgm1g9tahif
Afia
0
45
42350
42062
2026-06-23T12:30:58Z
Johnnybam
1153
/* Mkpọpụta */
42350
wikitext
text/x-wiki
'''Afia'''
===Nkọwa===
Afia maọbụ ahịa bụ ebe a na ere ma na zụta ihe
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
Na afia haa na ere ihe dị iche iche dịka ncha, ude, ihe nri, akwa were dịrị gawazia
===Mkpọpụta===
A/fi/a
[[File:LL-Q33578 (ibo)-Sayvhior-Afia.wav|LL-Q33578 (ibo)-Sayvhior-Afia]]
===Olumba===
Ahia
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
https://en.m.wiktionary.org/wiki/Market
===Yoruba===
Oja
===hausa===
Kasuwa
===Category===
[[Òtù:wiki loves names]]
r9p5qn5s02gc578h7pwxf2ekc5q7a8c
Afomachukwu
0
46
42357
42060
2026-06-23T12:35:11Z
Johnnybam
1153
/* Mkpọpụta */
42357
wikitext
text/x-wiki
'''Afomachukwu'''
==Nkọwa==
Nke a bụ aha pụtara ihe ọma chukwu nna mere mu.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Aha m bụ Afomachukwu
===Mkpọpụta===
A/fo/ma/chu/kwu
[[File:LL-Q33578 (ibo)-Sayvhior-Afomachukwu.wav|LL-Q33578 (ibo)-Sayvhior-Afomachukwu]]
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Goodness of God
[[Òtù:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
pwjos5hryoy0gi03dlb737gv8fvqxci
Afọ
0
49
42369
23246
2026-06-23T12:43:25Z
Johnnybam
1153
/* Category */
42369
wikitext
text/x-wiki
'''Afọ'''
===Nkọwa===
Afọ bụ akụkụ ahụ mmadụ ebe nri eriri na-abanye.
[[Usòrò:Participants of the Photowalk walk at the sloppy area of Adada River.jpg|thumb|none]]
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
Mmadụ nile nwere afọ.
===Mkpọpụta===
[[File:LL-Q33578 (ibo)-Sayvhior-Afọ.wav|LL-Q33578 (ibo)-Sayvhior-Afọ]]
===Olumba===
Awọ
*Ahọ
*Eho
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Stomach
https://en.m.wiktionary.org/wiki/stomach
===Category===
[[Òtù:wiki loves names]]
[[Category:Aha]]
[[Category:Mmadụ]]
g5obvtgoitjqwjtzr4f2kawe27zwni5
Agbomma
0
60
42329
29494
2026-06-23T12:18:50Z
Johnnybam
1153
/* Mkpọpụta */
42329
wikitext
text/x-wiki
'''Agbọmma'''
===Nkọwa===
Agbomma bụ aha a na enye nwa nwanyị na ala Igbo. Nke pụtara ezi agbọ ma ọbu agbọ na - ama mma nke ukwuu.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
# Aha m bụ Agbomma.
# Agbọmma bụ ezigbo enyi m.
# Aha nwunye nwanne m nwoke bụ Agbọmma.
===Mkpọpụta===
A/gbo/m/ma
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Agbomma.wav|áká_èkpè|thumb|Agbomma]]
===Olumba===
(Nnewi, Anambra)
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
[https://en.wiktionary.org/ beautiful lineage]
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
e2ezysrodlgz4zyjx6dxg7g0gj21top
42331
42329
2026-06-23T12:19:26Z
Johnnybam
1153
/* Mkpọpụta */
42331
wikitext
text/x-wiki
'''Agbọmma'''
===Nkọwa===
Agbomma bụ aha a na enye nwa nwanyị na ala Igbo. Nke pụtara ezi agbọ ma ọbu agbọ na - ama mma nke ukwuu.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
# Aha m bụ Agbomma.
# Agbọmma bụ ezigbo enyi m.
# Aha nwunye nwanne m nwoke bụ Agbọmma.
===Mkpọpụta===
A/gbo/mma
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Agbomma.wav|áká_èkpè|thumb|Agbomma]]
===Olumba===
(Nnewi, Anambra)
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
[https://en.wiktionary.org/ beautiful lineage]
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
5bxs9885pp9lu7o5ijmpez6za4k0i00
42745
42331
2026-06-23T14:49:33Z
Goodymeraj
496
42745
wikitext
text/x-wiki
'''Agbọmma'''
===Nkọwa===
Agbomma bụ aha a na enye nwa nwanyị na ala Igbo. Nke pụtara ezi agbọ ma ọbu agbọ na - ama mma nke ukwuu.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
# Aha m bụ Agbomma.
# Agbọmma bụ ezigbo enyi m.
# Aha nwunye nwanne m nwoke bụ Agbọmma.
===Mkpọpụta===
A/gbo/mma
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Agbomma.wav|áká_èkpè|Agbomma]]
===Olumba===
(Nnewi, Anambra)
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
[https://en.wiktionary.org/ beautiful lineage]
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
39zcshdw8zk7kcinq06hva76pgc7apa
Agbusi
0
61
42428
25495
2026-06-23T13:05:29Z
Johnnybam
1153
/* Bekee */
42428
wikitext
text/x-wiki
'''Agbụsi'''
===Nkọwa===
Nke a bụ obere anụmanụ nke na agahari oge ọbụla ma na agbakwa agba na ahu.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Agbụsi gbara ya na'''Mkpúrù èdè íke''' ahụ.
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Agbusi.wav|áká_èkpè|thumb|Agbusi ]]
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Black ant
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category:Anụmanụ]]
7fxsgt0mu6ytmgq0k5kktwfwy82i4qy
42430
42428
2026-06-23T13:05:54Z
Johnnybam
1153
/* Ọmụmaatụ */
42430
wikitext
text/x-wiki
'''Agbụsi'''
===Nkọwa===
Nke a bụ obere anụmanụ nke na agahari oge ọbụla ma na agbakwa agba na ahu.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Agbụsi gbara ya na '''Mkpúrù èdè íke''' ahụ.
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Agbusi.wav|áká_èkpè|thumb|Agbusi ]]
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Black ant
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category:Anụmanụ]]
dgviudcihrly465mrnlzvm2ldkkxui6
42436
42430
2026-06-23T13:08:02Z
Johnnybam
1153
/* Bekee */
42436
wikitext
text/x-wiki
'''Agbụsi'''
===Nkọwa===
Nke a bụ obere anụmanụ nke na agahari oge ọbụla ma na agbakwa agba na ahu.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Agbụsi gbara ya na '''Mkpúrù èdè íke''' ahụ.
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Agbusi.wav|áká_èkpè|thumb|Agbusi ]]
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
[https://en.wikipedia.org/wiki/Ant Ant]
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category:Anụmanụ]]
sdyhwxhf7rrh3bdw2fwew94uj2kbn4z
Agụ owulu
0
65
42387
29304
2026-06-23T12:51:44Z
Johnnybam
1153
/* Mkpọpụta */
42387
wikitext
text/x-wiki
'''Ágụ owulu'''
===Nkọwa===
Nke a bụ anụmanụ nke na agahari na abali.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Agụ owulu a mara mma na anya.
===Mkpọpụta===
A/gu/o/wu/lu
[[File:LL-Q33578 (ibo)-Sayvhior-Ágụ owulu.wav|LL-Q33578 (ibo)-Sayvhior-Ágụ owulu]]
===Olumba===
Edi abalị
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Wolf
[[Òtù:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ọhịa]]
[[Òtù:Igbo Noun Project]]
k2pffkqiblq26lr5se1vuooxevzd1j0
42389
42387
2026-06-23T12:52:05Z
Johnnybam
1153
/* Bekee */
42389
wikitext
text/x-wiki
'''Ágụ owulu'''
===Nkọwa===
Nke a bụ anụmanụ nke na agahari na abali.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Agụ owulu a mara mma na anya.
===Mkpọpụta===
A/gu/o/wu/lu
[[File:LL-Q33578 (ibo)-Sayvhior-Ágụ owulu.wav|LL-Q33578 (ibo)-Sayvhior-Ágụ owulu]]
===Olumba===
Edi abalị
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Leopard
[[Òtù:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ọhịa]]
[[Òtù:Igbo Noun Project]]
2nmjdyo07i04pduw9hqn2ssnyyohm7p
42405
42389
2026-06-23T12:57:55Z
Johnnybam
1153
/* Bekee */
42405
wikitext
text/x-wiki
'''Ágụ owulu'''
===Nkọwa===
Nke a bụ anụmanụ nke na agahari na abali.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Agụ owulu a mara mma na anya.
===Mkpọpụta===
A/gu/o/wu/lu
[[File:LL-Q33578 (ibo)-Sayvhior-Ágụ owulu.wav|LL-Q33578 (ibo)-Sayvhior-Ágụ owulu]]
===Olumba===
Edi abalị
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
*https://en.wikipedia.org/wiki/Leopard
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ọhịa]]
[[Òtù:Igbo Noun Project]]
przsbpe0cekezxgc487edkvs7zaofte
42413
42405
2026-06-23T12:59:36Z
Johnnybam
1153
/* Bekee */
42413
wikitext
text/x-wiki
'''Ágụ owulu'''
===Nkọwa===
Nke a bụ anụmanụ nke na agahari na abali.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Agụ owulu a mara mma na anya.
===Mkpọpụta===
A/gu/o/wu/lu
[[File:LL-Q33578 (ibo)-Sayvhior-Ágụ owulu.wav|LL-Q33578 (ibo)-Sayvhior-Ágụ owulu]]
===Olumba===
Edi abalị
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
*[https://en.wikipedia.org/wiki/Leopard Leopard]
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ọhịa]]
[[Òtù:Igbo Noun Project]]
ahc86mw8pg3x1lvk0mouznfgksm2yay
42670
42413
2026-06-23T14:16:48Z
Akwugo
14
/* Ntụgharị n'asụsụ ọzọ */
42670
wikitext
text/x-wiki
'''Ágụ owulu'''
===Nkọwa===
Nke a bụ anụmanụ nke na agahari na abali.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Agụ owulu a mara mma na anya.
===Mkpọpụta===
A/gu/o/wu/lu
[[File:LL-Q33578 (ibo)-Sayvhior-Ágụ owulu.wav|LL-Q33578 (ibo)-Sayvhior-Ágụ owulu]]
===Olumba===
Edi abalị
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
*[https://en.wikipedia.org/wiki/Leopard Leopard]
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ọhịa]]
[[Òtù:Igbo Noun Project]]
orcximsrqjmir5yy439x0x074egor46
42673
42670
2026-06-23T14:17:51Z
Akwugo
14
Akwugo moved page [[Agu owulu]] to [[Agụ owulu]]
42670
wikitext
text/x-wiki
'''Ágụ owulu'''
===Nkọwa===
Nke a bụ anụmanụ nke na agahari na abali.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Agụ owulu a mara mma na anya.
===Mkpọpụta===
A/gu/o/wu/lu
[[File:LL-Q33578 (ibo)-Sayvhior-Ágụ owulu.wav|LL-Q33578 (ibo)-Sayvhior-Ágụ owulu]]
===Olumba===
Edi abalị
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
*[https://en.wikipedia.org/wiki/Leopard Leopard]
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ọhịa]]
[[Òtù:Igbo Noun Project]]
orcximsrqjmir5yy439x0x074egor46
Akpi
0
134
42308
42281
2026-06-23T12:03:03Z
Ebube Clara
1134
42308
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ obere anụ nwere odụdụ na agahari agahari.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Akpi gbara Emeka.
===Mkpọpụta===
[[File:LL-Q33578 (ibo)-Sayvhior-Akpi.wav|LL-Q33578 (ibo)-Sayvhior-Akpi]]
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Scorpion
[[Category:Aha]]
[[Òtù:wiki loves names]]
mlyve18c0vvryhpyn201vn1jhq0voud
Alọzie
0
175
42471
16515
2026-06-23T13:21:19Z
Akwugo
14
42471
wikitext
text/x-wiki
==Nkọwa==
Alozie bụ aha Igbo nke pụtara na anyi ebirila
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
* Aha m bụ Alozie
* Agozie ji akwa m ụnyahụ
===Mkpọpụta===
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
We are now settled
moblaff713sikg8evt8o9nsgeacon2y
42475
42471
2026-06-23T13:22:06Z
Akwugo
14
Akwugo moved page [[Alozie]] to [[Alọzie]]
42471
wikitext
text/x-wiki
==Nkọwa==
Alozie bụ aha Igbo nke pụtara na anyi ebirila
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
* Aha m bụ Alozie
* Agozie ji akwa m ụnyahụ
===Mkpọpụta===
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
We are now settled
moblaff713sikg8evt8o9nsgeacon2y
Wiktionary:Amarachukwu
4
186
42766
42257
2026-06-24T04:08:38Z
King ChristLike
964
redirected page
42766
wikitext
text/x-wiki
#REDIRECT [[Amarachukwu]]
759k36ypys2afzoei4viu9spyg3ep99
Amanze
0
189
42529
22380
2026-06-23T13:39:27Z
Ebube Clara
1134
42529
wikitext
text/x-wiki
'''Amanze'''
===Nkọwa===
Nke a bụ aha mmadụ n'akọwa gbasara ama onye nze nọọ.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
1. Amanze bụ aha eji mara ndị okugbo.
2. Amanze bụ aha mmadụ
===Mkpọpụta===
[[File:LL-Q33578_(ibo)-Dagentle-Amanze.wav]]
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/ Chieftancies lineage]
[[Òtù:Aha]]
[[Òtù:Wiki Loves Names]]
[[Category:Mmadu]]
dtftcve2ekmsem13ipze3eaqec0qyu7
42585
42529
2026-06-23T13:55:26Z
Ebube Clara
1134
42585
wikitext
text/x-wiki
'''Amanze'''
==Nkọwa==
Nke a bụ aha mmadụ n'akọwa gbasara ama onye nze nọọ.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
1. Amanze bụ aha eji mara ndị okugbo.
2. Amanze bụ aha mmadụ
===Mkpọpụta===
[[File:LL-Q33578_(ibo)-Dagentle-Amanze.wav]]
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/ Chieftancies lineage]
[[Òtù:Aha]]
[[Òtù:Wiki Loves Names]]
[[Category:Mmadu]]
em4rz3n6i9qo50ocfk1bbo0q1yoit7o
42588
42585
2026-06-23T13:57:08Z
Ebube Clara
1134
42588
wikitext
text/x-wiki
'''Amanze'''
==Nkọwa==
Nke a bụ aha mmadụ n'akọwa ama onye nze nọọ.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
1. Amanze bụ aha eji mara ndị okugbo.
2. Amanze bụ aha mmadụ
===Mkpọpụta===
[[File:LL-Q33578_(ibo)-Dagentle-Amanze.wav]]
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/ Chieftancies lineage]
[[Òtù:Aha]]
[[Òtù:Wiki Loves Names]]
[[Category:Mmadu]]
9ebhgmuh9s3oj6jvsvu5thzgn0wthf7
Amarachukwu
0
192
42396
29464
2026-06-23T12:55:22Z
Ebube Clara
1134
42396
wikitext
text/x-wiki
==Nkọwa==
Ọ bụ aha ejiri mara ndị Igbo nke n'akọwa ebere Chineke ebe mmadụ nọọ.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Aha nwanne mụ nwanyị bụ Amarachukwu
'''Mkpoputa'''
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Amarachukwu.wav|áká_èkpè|thumb|Amarachukwu]]
===Olumba===
Amalachukwu
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/God's grace]
[[Òtù:Wiki Loves Names]]
[[Òtù:aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ụlọ]]
[[Òtù:Igbo Noun Project]]
7shi6i0u10ulndzsmh94syubrgfp3gf
42620
42396
2026-06-23T14:05:34Z
Ebube Clara
1134
42620
wikitext
text/x-wiki
==Nkọwa==
Ọ bụ aha ejiri mara ndị Igbo nke n'akọwa ebere Chineke ebe mmadụ nọọ.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Aha nwanne mụ nwanyị bụ Amarachukwu
'''Mkpoputa'''
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Amarachukwu.wav|áká_èkpè|thumb|Amarachukwu]]
===Olumba===
Amalachukwu
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/God's grace]
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ụlọ]]
[[Òtù:Igbo Noun Project]]
iitol187sat3zue41cxip9opqxikwvr
Arịnzechukwu
0
225
42416
29425
2026-06-23T13:00:15Z
Ebube Clara
1134
42416
wikitext
text/x-wiki
===Nkọwa===
Arịnzéchukwu bụ afa mmadụ eji ekene Chukwu maka ụluoma ya
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
# Afa nwannem nwoke bụ Arịnzechukwu
# Arinze Chukwu bara eba
===Mkpọputa===
Árị́nzéchúkwú
[[File:LL-Q33578 (ibo)-Sayvhior-Arịnzèchukwu.wav|LL-Q33578 (ibo)-Sayvhior-Arịnzèchukwu]]
===Olumba===
Chukwudálụ
===Ntụgharị n'asụsụ ọzọ===
Thank God
===Bekee===
Thank God
[https://en.wiktionary.org/wiki/ Thank God]
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
247ffv8x9ofokodrg2glflmjdhj8nej
42612
42416
2026-06-23T14:04:38Z
Ebube Clara
1134
42612
wikitext
text/x-wiki
==Nkọwa==
Arịnzéchukwu bụ afa mmadụ eji ekene Chukwu maka ụluoma ya
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
# Afa nwannem nwoke bụ Arịnzechukwu
# Arinze Chukwu bara eba
===Mkpọputa===
Árị́nzéchúkwú
[[File:LL-Q33578 (ibo)-Sayvhior-Arịnzèchukwu.wav|LL-Q33578 (ibo)-Sayvhior-Arịnzèchukwu]]
===Olumba===
Chukwudálụ
==Ntụgharị n'asụsụ ọzọ==
Thank God
===Bekee===
Thank God
[https://en.wiktionary.org/wiki/ Thank God]
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
bicmj6iopkd3rqhu70ogq2m067k5ohq
42688
42612
2026-06-23T14:21:40Z
Akwugo
14
/* Bekee */
42688
wikitext
text/x-wiki
==Nkọwa==
Arịnzéchukwu bụ afa mmadụ eji ekene Chukwu maka ụluoma ya
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
# Afa nwannem nwoke bụ Arịnzechukwu
# Arinze Chukwu bara eba
===Mkpọputa===
Árị́nzéchúkwú
[[File:LL-Q33578 (ibo)-Sayvhior-Arịnzèchukwu.wav|LL-Q33578 (ibo)-Sayvhior-Arịnzèchukwu]]
===Olumba===
Chukwudálụ
==Ntụgharị n'asụsụ ọzọ==
Thank God
===Bekee===
[https://en.wiktionary.org/wiki/ Thank God]
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
j6wule9iwddrpgfkw89236z855wamfb
Chekeleke
0
274
42305
17187
2026-06-23T12:02:49Z
Chrysella
166
/* Bekee */
42305
wikitext
text/x-wiki
'''chekeleke'''
==Nkọwa==
Nke a bụ otụ na ime anụmanụ enwere na ala Igbo. Ọ bụ nnụnụ
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Chekeleke a tọrọ ogologo.
===Mkpọpụta===
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
[https://en.wiktionary.org/wiki/egret egret]===Bekee===
Egret
[[Òtù:wiki loves names]]
fov7b22p08t8ekyi48de3w5yo9r5bp5
42310
42305
2026-06-23T12:03:43Z
Chrysella
166
/* Ntụgharị n'asụsụ ọzọ */
42310
wikitext
text/x-wiki
'''chekeleke'''
==Nkọwa==
Nke a bụ otụ na ime anụmanụ enwere na ala Igbo. Ọ bụ nnụnụ
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Chekeleke a tọrọ ogologo.
===Mkpọpụta===
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/egret egret]
[[Òtù:wiki loves names]]
rvp5c0uhy0874e7bp6fo8gg39ik2468
42321
42310
2026-06-23T12:09:26Z
Chrysella
166
/* Nkọwa */
42321
wikitext
text/x-wiki
'''chekeleke'''
==Nkọwa==
Nke a bụ otụ n'ime anụmanụ enwere na ala Igbo. Ọ bụ nnụnụ
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Chekeleke a tọrọ ogologo.
===Mkpọpụta===
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/egret egret]
[[Òtù:wiki loves names]]
5lqekrp3p1kb4ddddrubf8xxp1v0qnh
42374
42321
2026-06-23T12:45:08Z
Chrysella
166
42374
wikitext
text/x-wiki
'''chekeleke'''
==Nkọwa==
Nke a bụ otụ n'ime anụmanụ enwere na ala Igbo. Ọ bụ nnụnụ
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Chekeleke a tọrọ ogologo.
===Mkpọpụta===
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/egret egret]
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Anụmanụ]]
sunejbgv4079je2jx892gav6m7e7jf3
Chekwube
0
275
42390
29193
2026-06-23T12:53:02Z
Ebube Clara
1134
42390
wikitext
text/x-wiki
==Nkọwa==
Okwu a na-akowa aha mmadụ pụtara onye nwere nchekwube na Chukwu.
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
*Aha m bụ Chekwube
*Aha nne m bụkwa Chekwube.
===Mkpọpụta===
[[Usòrò:LL-Q33578_(ibo)-Bigcee007-Chekwube.wav |thumb|áká_èkpè|alt=Chekwube Chekwube]]
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/hope Hope ]
[[Òtù:Wiki Loves Names]]
[[Category: Mmadụ]]
[[Category:Igbo Noun Project]]
[[Category: Aha]]
4guo3f9n6t82uhmzi06456gp836dckn
Chiamanda
0
288
42656
29232
2026-06-23T14:11:55Z
Chrysella
166
42656
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ aha putara na chukwu anyi agaghi ada .
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Aha m bụ Chimamanda.
#Chimamanda bụ aha dị mmá.
===Mkpọpụta===
[[File:LL-Q33578 (ibo)-Lezechima404-Chiamanda.wav|LL-Q33578 (ibo)-Lezechima404-Chiamanda]]
===Olumba===
Chimamanda
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
God won't fail
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
[[Category:Igbo Noun Project]]
h3x7bcpznj0bsk8px14h9vmtlnw1dhi
42675
42656
2026-06-23T14:18:25Z
Johnnybam
1153
/* Bekee */
42675
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ aha putara na chukwu anyi agaghi ada .
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Aha m bụ Chimamanda.
#Chimamanda bụ aha dị mmá.
===Mkpọpụta===
[[File:LL-Q33578 (ibo)-Lezechima404-Chiamanda.wav|LL-Q33578 (ibo)-Lezechima404-Chiamanda]]
===Olumba===
Chimamanda
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
God won't fail
[[Òtù:Wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
[[Category:Igbo Noun Project]]
1xg5fu8e539utljc0n1fsd5w1pv6x39
42676
42675
2026-06-23T14:18:49Z
Johnnybam
1153
/* Bekee */
42676
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ aha putara na chukwu anyi agaghi ada .
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Aha m bụ Chimamanda.
#Chimamanda bụ aha dị mmá.
===Mkpọpụta===
[[File:LL-Q33578 (ibo)-Lezechima404-Chiamanda.wav|LL-Q33578 (ibo)-Lezechima404-Chiamanda]]
===Olumba===
Chimamanda
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
God won't fail
[[Òtù:Wiki loves Names]]
[[Category: Aha]]
[[Category: Mmadụ]]
[[Category:Igbo Noun Project]]
3ukxxjausjvv8liu9jveio10au2t7o6
42680
42676
2026-06-23T14:20:36Z
Johnnybam
1153
/* Bekee */
42680
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ aha putara na chukwu anyi agaghi ada .
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Aha m bụ Chimamanda.
#Chimamanda bụ aha dị mmá.
===Mkpọpụta===
[[File:LL-Q33578 (ibo)-Lezechima404-Chiamanda.wav|LL-Q33578 (ibo)-Lezechima404-Chiamanda]]
===Olumba===
Chimamanda
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
God won't fail
[[Òtù: Wiki Loves Names]]
[[Category: Aha]]
[[Category: Mmadụ]]
[[Category:Igbo Noun Project]]
iq2zlgmqkn2wzoy4vppaar1q9nenirn
42693
42680
2026-06-23T14:23:39Z
Johnnybam
1153
/* Nkọwa */
42693
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ aha pụtara Chukwu anyị agaghị ada.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Aha m bụ Chimamanda.
#Chimamanda bụ aha dị mmá.
===Mkpọpụta===
[[File:LL-Q33578 (ibo)-Lezechima404-Chiamanda.wav|LL-Q33578 (ibo)-Lezechima404-Chiamanda]]
===Olumba===
Chimamanda
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
God won't fail
[[Òtù: Wiki Loves Names]]
[[Category: Aha]]
[[Category: Mmadụ]]
[[Category:Igbo Noun Project]]
ffzka4o93x5nlal8aqc8bou8vgituzk
Chibuihem
0
292
42437
22593
2026-06-23T13:08:06Z
Chrysella
166
42437
wikitext
text/x-wiki
'''Chibuihem'''
===Nkọwa===
Chibuihem pụtara na o bu Chukwu bu ife'm maọbu ihe'm
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
#Chibuihem bu aha mmadụ na aza na ala igbo
#Chibuihem bu aha ya.
===Mkpoputa===
Chibụ̀ihém
[[File:LL-Q33578 (ibo)-Lezechima404-Chibuihem.wav|LL-Q33578 (ibo)-Lezechima404-Chibuihem]]
===Olumba===
Chibuifem
===Ntụgharị===
===bekee===
God is my light
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: mmadụ]]
7n1qd1o7an7mapvooobqxatb2xcplis
42438
42437
2026-06-23T13:08:26Z
Chrysella
166
/* bekee */
42438
wikitext
text/x-wiki
'''Chibuihem'''
===Nkọwa===
Chibuihem pụtara na o bu Chukwu bu ife'm maọbu ihe'm
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
#Chibuihem bu aha mmadụ na aza na ala igbo
#Chibuihem bu aha ya.
===Mkpoputa===
Chibụ̀ihém
[[File:LL-Q33578 (ibo)-Lezechima404-Chibuihem.wav|LL-Q33578 (ibo)-Lezechima404-Chibuihem]]
===Olumba===
Chibuifem
===Ntụgharị===
===bekee===
God is my light
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
df4gwt6ojszsy731jgie495v8nat6vf
42439
42438
2026-06-23T13:11:10Z
Chrysella
166
42439
wikitext
text/x-wiki
===Nkọwa===
Chibuihem pụtara na o bu Chukwu bu ife'm maọbu ihe'm
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
#Chibuihem bu aha mmadụ na aza na ala igbo
#Chibuihem bu aha ya.
===Mkpoputa===
Chibụ̀ihém
[[File:LL-Q33578 (ibo)-Lezechima404-Chibuihem.wav|LL-Q33578 (ibo)-Lezechima404-Chibuihem]]
===Olumba===
Chibuifem
==Ntụgharị==
===bekee===
God is my light
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
bc4tvx5tn8w4xoe9lk80dvoca72uuev
42622
42439
2026-06-23T14:05:53Z
Chrysella
166
/* Ntụgharị */
42622
wikitext
text/x-wiki
===Nkọwa===
Chibuihem pụtara na o bu Chukwu bu ife'm maọbu ihe'm
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
#Chibuihem bu aha mmadụ na aza na ala igbo
#Chibuihem bu aha ya.
===Mkpoputa===
Chibụ̀ihém
[[File:LL-Q33578 (ibo)-Lezechima404-Chibuihem.wav|LL-Q33578 (ibo)-Lezechima404-Chibuihem]]
===Olumba===
Chibuifem
==Ntụgharị n'asụsụ ọzọ==
===bekee===
God is my light
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
scbtmqi3zym55l4lgxquvmnsbfx7fjk
Chideziri
0
307
42335
42262
2026-06-23T12:23:11Z
Johnnybam
1153
/* Mkpọpụta */
42335
wikitext
text/x-wiki
==Nkọwa==
Chideziri bụ aha Igbo n'omenala Igbo nke pụtara na Chukwu dere akụkọ m
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
Aha m bụ Chideziri
===Mkpọpụta===
Chi/de/ziri
===Olumba===
Asusu Igbo
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Chideziri Is an Igbo name in the Igbo culture which means God wrote my story
[[category:Aha]]
[[category:Wiki Loves Names]]
s58ae040bqp4hkve0x55ylzn6re2hd0
42375
42335
2026-06-23T12:46:00Z
Johnnybam
1153
/* Bekee */
42375
wikitext
text/x-wiki
==Nkọwa==
Chideziri bụ aha Igbo n'omenala Igbo nke pụtara na Chukwu dere akụkọ m
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
Aha m bụ Chideziri
===Mkpọpụta===
Chi/de/ziri
===Olumba===
Asusu Igbo
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Chideziri Is an Igbo name in the Igbo culture which means God wrote my story
[[category:Aha]]
[[category:Wiki Loves Names]]
[[Category:Mmadụ]]
d73u5s7mqoy441caz3jml1jxlamgyjd
Chidiadi
0
308
42336
42267
2026-06-23T12:24:45Z
Johnnybam
1153
/* Mkpoputa */
42336
wikitext
text/x-wiki
==Nkowa==
Chidiadi bu aha Igbo nke putara na Chineke di
===Nkejiasusu===
Aha
===Omumaatu===
Aha m bu Chidiadi
===Mkpoputa===
Chi/di/a/di
===Olumba===
Asusu Igbo
==Ntughari==
===Bekee===
Chidiadi is an Igbo name which means there’s God
[[Category:Aha]]
[[Category:Wiki Loves Names]]
qtjjb5dp0cxsr6ccci4ukzzcjf7wywb
42713
42336
2026-06-23T14:27:15Z
Johnnybam
1153
/* Ntughari */
42713
wikitext
text/x-wiki
==Nkowa==
Chidiadi bu aha Igbo nke putara na Chineke di
===Nkejiasusu===
Aha
===Omumaatu===
Aha m bu Chidiadi
===Mkpoputa===
Chi/di/a/di
===Olumba===
Asusu Igbo
==Ntughari==
===Bekee===
Chidiadi is an Igbo name which means there’s God
[[Category:Aha]]
[[Category:Wiki Loves Names]]
[Category: Mmadụ]]
j1916u57oycaazscbgxy6ekp9iomt4w
42716
42713
2026-06-23T14:27:40Z
Johnnybam
1153
/* Nkejiasusu */
42716
wikitext
text/x-wiki
==Nkowa==
Chidiadi bu aha Igbo nke putara na Chineke di
===NkejiAsụsụ===
Aha
===Omumaatu===
Aha m bu Chidiadi
===Mkpoputa===
Chi/di/a/di
===Olumba===
Asusu Igbo
==Ntughari==
===Bekee===
Chidiadi is an Igbo name which means there’s God
[[Category:Aha]]
[[Category:Wiki Loves Names]]
[Category: Mmadụ]]
bj8skd95oao5bv0u42dsaahlrka1yp2
42717
42716
2026-06-23T14:28:00Z
Johnnybam
1153
/* Omumaatu */
42717
wikitext
text/x-wiki
==Nkowa==
Chidiadi bu aha Igbo nke putara na Chineke di
===NkejiAsụsụ===
Aha
===Omụmaatụ===
Aha m bu Chidiadi
===Mkpoputa===
Chi/di/a/di
===Olumba===
Asusu Igbo
==Ntughari==
===Bekee===
Chidiadi is an Igbo name which means there’s God
[[Category:Aha]]
[[Category:Wiki Loves Names]]
[Category: Mmadụ]]
qpt6t5x60wdj9m860ps8gbl6eyodki5
42719
42717
2026-06-23T14:28:13Z
Johnnybam
1153
/* Mkpoputa */
42719
wikitext
text/x-wiki
==Nkowa==
Chidiadi bu aha Igbo nke putara na Chineke di
===NkejiAsụsụ===
Aha
===Omụmaatụ===
Aha m bu Chidiadi
===Mkpọpụta===
Chi/di/a/di
===Olumba===
Asusu Igbo
==Ntughari==
===Bekee===
Chidiadi is an Igbo name which means there’s God
[[Category:Aha]]
[[Category:Wiki Loves Names]]
[Category: Mmadụ]]
dtrccwo53hu5atc145sgms6s4gmnntw
42722
42719
2026-06-23T14:30:04Z
Johnnybam
1153
/* Bekee */
42722
wikitext
text/x-wiki
==Nkowa==
Chidiadi bu aha Igbo nke putara na Chineke di
===NkejiAsụsụ===
Aha
===Omụmaatụ===
Aha m bu Chidiadi
===Mkpọpụta===
Chi/di/a/di
===Olumba===
Asusu Igbo
==Ntughari==
===Bekee=
there is God
[[Category:Aha]]
[[Category:Wiki Loves Names]]
[[Category: Mmadụ]]
j0z8l1d9xuh8s3nbvoje8i8428ov729
42726
42722
2026-06-23T14:30:30Z
Johnnybam
1153
/* ==Bekee */
42726
wikitext
text/x-wiki
==Nkowa==
Chidiadi bu aha Igbo nke putara na Chineke di
===NkejiAsụsụ===
Aha
===Omụmaatụ===
Aha m bu Chidiadi
===Mkpọpụta===
Chi/di/a/di
===Olumba===
Asusu Igbo
==Ntughari==
==Bekee==
there is God
[[Category:Aha]]
[[Category:Wiki Loves Names]]
[[Category: Mmadụ]]
0swdwncyyj7whvyqsdp7bd9f9fohgdz
42730
42726
2026-06-23T14:31:26Z
Johnnybam
1153
/* Nkowa */
42730
wikitext
text/x-wiki
==Nkowa==
Chidiadi bu aha Igbo nke putara na Chineke di
===NkejiAsụsụ===
Aha
===Omụmaatụ===
Aha m bu Chidiadi
===Mkpọpụta===
Chi/di/a/di
===Olumba===
Asusu Igbo
==Ntughari==
==Bekee==
there is God
[[Category:Aha]]
[[Category:Wiki Loves Names]]
[[Category: Mmadụ]]
kifeilh3ihis7002hd19agu4u06n2it
42731
42730
2026-06-23T14:31:51Z
Johnnybam
1153
/* Ntughari */
42731
wikitext
text/x-wiki
==Nkowa==
Chidiadi bu aha Igbo nke putara na Chineke di
===NkejiAsụsụ===
Aha
===Omụmaatụ===
Aha m bu Chidiadi
===Mkpọpụta===
Chi/di/a/di
===Olumba===
Asusu Igbo
==Ntụgharị n'asụsụ ọzọ==
==Bekee==
there is God
[[Category:Aha]]
[[Category:Wiki Loves Names]]
[[Category: Mmadụ]]
hx1gczbuuuz842pxmrjvliu04ggl6hf
Chidiebube
0
311
42318
42265
2026-06-23T12:07:29Z
Johnnybam
1153
/* Mkpoputa */
42318
wikitext
text/x-wiki
==Nkowa==
Chidiebube bụ aha Igbo n'omenala Igbo nke pụtara Chukwu dị ukwuu
===Nkejiasusu===
Aha
===Omumaatu===
Aha m bu Chidiebube
===Mkpoputa===
Chi/di/e/bu/be
===Olumba===
Asusu Igbo
==Ntughari==
===Bekee===
Chidiebube Is an Igbo name in the Igbo culture which means God is great
[[Category:Aha]]
[[Category: Wiki Loves Names]]
991j1mq096m1zzeopmpj2eh9sip3389
42742
42318
2026-06-23T14:39:39Z
Goodymeraj
496
/* Olumba */
42742
wikitext
text/x-wiki
==Nkowa==
Chidiebube bụ aha Igbo n'omenala Igbo nke pụtara Chukwu dị ukwuu
===Nkejiasusu===
Aha
===Omumaatu===
Aha m bu Chidiebube
===Mkpoputa===
Chi/di/e/bu/be
===Olumba===
==Ntughari==
===Bekee===
Chidiebube Is an Igbo name in the Igbo culture which means God is great
[[Category:Aha]]
[[Category: Wiki Loves Names]]
agk0b82gz30h9rqmxgs1q74gk28f9ph
42743
42742
2026-06-23T14:40:20Z
Goodymeraj
496
/* Ntughari */
42743
wikitext
text/x-wiki
==Nkowa==
Chidiebube bụ aha Igbo n'omenala Igbo nke pụtara Chukwu dị ukwuu
===Nkejiasusu===
Aha
===Omumaatu===
Aha m bu Chidiebube
===Mkpoputa===
Chi/di/e/bu/be
===Olumba===
==Ntughari N'asụsụ Ọzọ==
===Bekee===
Chidiebube Is an Igbo name in the Igbo culture which means God is great
[[Category:Aha]]
[[Category: Wiki Loves Names]]
hlhh3xbozn4ar0r67h3e0y6egbsy1s9
Chidiuto
0
313
42507
23292
2026-06-23T13:35:05Z
Johnnybam
1153
/* Category */
42507
wikitext
text/x-wiki
Chidiuto
===Nkọwa===
Chidiuto pụtara na Chukwu di ụtọ
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Chidiuto bu aha ana-kpo nwata nwoke na nwanyị na ala igbo
===Mpkoputa===
Chịdịụtọ
[[File:LL-Q33578 (ibo)-Lezechima404-Chidiuto.wav|LL-Q33578 (ibo)-Lezechima404-Chidiuto]]
===Olumba===
Chimdiuto
chidiuso
===Ntụgharị na asụsụ ọzọ ===
===Bekee===
My God is sweet
===Category===
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
4mffx3p3g07bx3qgcy22xejv4uddabd
42512
42507
2026-06-23T13:36:24Z
Johnnybam
1153
42512
wikitext
text/x-wiki
'''Chidiuto'''
===Nkọwa===
Chidiuto pụtara na Chukwu di ụtọ
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Chidiuto bu aha ana-kpo nwata nwoke na nwanyị na ala igbo
===Mpkoputa===
Chịdịụtọ
[[File:LL-Q33578 (ibo)-Lezechima404-Chidiuto.wav|LL-Q33578 (ibo)-Lezechima404-Chidiuto]]
===Olumba===
Chimdiuto
chidiuso
===Ntụgharị na asụsụ ọzọ ===
===Bekee===
My God is sweet
===Category===
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
6yqeswczetg32l4t0x6dbw7jsff1ojr
42643
42512
2026-06-23T14:09:02Z
Chrysella
166
42643
wikitext
text/x-wiki
===Nkọwa===
Chidiuto pụtara na Chukwu di ụtọ
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Chidiuto bu aha ana-kpo nwata nwoke na nwanyị na ala igbo
===Mpkoputa===
Chịdịụtọ
[[File:LL-Q33578 (ibo)-Lezechima404-Chidiuto.wav|LL-Q33578 (ibo)-Lezechima404-Chidiuto]]
===Olumba===
Chimdiuto
chidiuso
==Ntụgharị na asụsụ ọzọ==
===Bekee===
My God is sweet
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
ietqsytohcpzejbwdbesxfqrk4np2ao
Chiebuka
0
319
42441
22595
2026-06-23T13:11:35Z
Johnnybam
1153
/* category */
42441
wikitext
text/x-wiki
Chiebuka
===Nkọwa===
Chiebuka pụtara na Chukwu ebuka
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Chiebuka bu aha ana-kpo nwata nwoke na ala igbo
===mkpoputa===
Chiēbuka
[[File:LL-Q33578 (ibo)-Lezechima404-Chiebuka.wav|LL-Q33578 (ibo)-Lezechima404-Chiebuka]]
===Olumba===
Chukwuemeka
Olisaebuka
===Ntụgharị===
===Bekee===
Big God
===category===
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
r7xh0gzv689no9iqc1g4bt0bhvg1q7r
42443
42441
2026-06-23T13:12:49Z
Johnnybam
1153
/* mkpoputa */
42443
wikitext
text/x-wiki
Chiebuka
===Nkọwa===
Chiebuka pụtara na Chukwu ebuka
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Chiebuka bu aha ana-kpo nwata nwoke na ala igbo
===mkpoputa===
Chi/e/bu/ka
[[File:LL-Q33578 (ibo)-Lezechima404-Chiebuka.wav|LL-Q33578 (ibo)-Lezechima404-Chiebuka]]
===Olumba===
Chukwuemeka
Olisaebuka
===Ntụgharị===
===Bekee===
Big God
===category===
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
4jjrlukziew8udo75ln95dtxtsa1f97
42446
42443
2026-06-23T13:13:38Z
Johnnybam
1153
/* Ntụgharị */
42446
wikitext
text/x-wiki
Chiebuka
===Nkọwa===
Chiebuka pụtara na Chukwu ebuka
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Chiebuka bu aha ana-kpo nwata nwoke na ala igbo
===mkpoputa===
Chi/e/bu/ka
[[File:LL-Q33578 (ibo)-Lezechima404-Chiebuka.wav|LL-Q33578 (ibo)-Lezechima404-Chiebuka]]
===Olumba===
Chukwuemeka
Olisaebuka
===Ntụgharị na asụsụ ọzọ===
===Bekee===
Big God
===category===
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
539ak76hcwk3z38e9m3jtjgkhjzj7fd
42448
42446
2026-06-23T13:15:19Z
Johnnybam
1153
/* Ọmụmaatụ */
42448
wikitext
text/x-wiki
Chiebuka
===Nkọwa===
Chiebuka pụtara na Chukwu ebuka
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
ọ bụ aha ụmụ nwoke na-enweta n’ala Igbo.
===mkpoputa===
Chi/e/bu/ka
[[File:LL-Q33578 (ibo)-Lezechima404-Chiebuka.wav|LL-Q33578 (ibo)-Lezechima404-Chiebuka]]
===Olumba===
Chukwuemeka
Olisaebuka
===Ntụgharị na asụsụ ọzọ===
===Bekee===
Big God
===category===
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
fi6ulzg5fzty786xu1ys1115ecs3kft
42450
42448
2026-06-23T13:16:03Z
Johnnybam
1153
/* NkejiAsụsụ */
42450
wikitext
text/x-wiki
Chiebuka
===Nkọwa===
Chiebuka pụtara na Chukwu ebuka
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
ọ bụ aha ụmụ nwoke na-enweta n’ala Igbo.
===mkpoputa===
Chi/e/bu/ka
[[File:LL-Q33578 (ibo)-Lezechima404-Chiebuka.wav|LL-Q33578 (ibo)-Lezechima404-Chiebuka]]
===Olumba===
Chukwuemeka
Olisaebuka
===Ntụgharị na asụsụ ọzọ===
===Bekee===
Big God
===category===
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
2qox83asbd18i2wog9tsnnehg9ysl58
42666
42450
2026-06-23T14:15:39Z
Chrysella
166
/* Olumba */
42666
wikitext
text/x-wiki
Chiebuka
===Nkọwa===
Chiebuka pụtara na Chukwu ebuka
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
ọ bụ aha ụmụ nwoke na-enweta n’ala Igbo.
===mkpoputa===
Chi/e/bu/ka
[[File:LL-Q33578 (ibo)-Lezechima404-Chiebuka.wav|LL-Q33578 (ibo)-Lezechima404-Chiebuka]]
===Olumba===
Olisaebuka
===Ntụgharị na asụsụ ọzọ===
===Bekee===
Big God
===category===
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
9mecd3f182iptqpeyoi3e2wfimo7n9s
42667
42666
2026-06-23T14:16:15Z
Chrysella
166
/* Olumba */
42667
wikitext
text/x-wiki
Chiebuka
===Nkọwa===
Chiebuka pụtara na Chukwu ebuka
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
ọ bụ aha ụmụ nwoke na-enweta n’ala Igbo.
===mkpoputa===
Chi/e/bu/ka
[[File:LL-Q33578 (ibo)-Lezechima404-Chiebuka.wav|LL-Q33578 (ibo)-Lezechima404-Chiebuka]]
===Olumba===
Olisaebuka
Chukwuebuka
===Ntụgharị na asụsụ ọzọ===
===Bekee===
Big God
===category===
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
qb505l1e8m6o5ji169i9ipx9znaxe5t
42679
42667
2026-06-23T14:20:34Z
Chrysella
166
42679
wikitext
text/x-wiki
===Nkọwa===
Chiebuka pụtara na Chukwu ebuka
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
Aha nwannem nwoke bụ Chiebuka
===mkpoputa===
Chi/e/bu/ka
[[File:LL-Q33578 (ibo)-Lezechima404-Chiebuka.wav|LL-Q33578 (ibo)-Lezechima404-Chiebuka]]
===Olumba===
* Olisaebuka
* Chukwuebuka
==Ntụgharị na asụsụ ọzọ==
===Bekee===
God is big
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category:Mmadụ]]
03ppikd093l7aqwn41uu6vpz91wu705
Chiemerumeze
0
322
42480
22597
2026-06-23T13:25:20Z
Johnnybam
1153
/* bekee */
42480
wikitext
text/x-wiki
"""Chiemerumeze"""
===nkọwa===
Nke a bụ aha enwere na ala Igbo. Ọ Putara na chukwu emego m eze.
===nkejiasụsụ===
Aha
===ọmụmaatụ===
Aha m bụ chiemerumeze
===mkpọputa===
Chi/eme/rum/eze
[[File:LL-Q33578 (ibo)-Lezechima404-Chiemerumeze.wav|LL-Q33578 (ibo)-Lezechima404-Chiemerumeze]]
===olumba===
===ntụghari===
===bekee===
God made me a king
[[Òtù:wiki loves names]]
[[Category:Aha]]
[Category: Mmadụ]]
e9k3c06cod2wy5ya4yiiyklmojppyn7
42482
42480
2026-06-23T13:25:54Z
Johnnybam
1153
/* bekee */
42482
wikitext
text/x-wiki
"""Chiemerumeze"""
===nkọwa===
Nke a bụ aha enwere na ala Igbo. Ọ Putara na chukwu emego m eze.
===nkejiasụsụ===
Aha
===ọmụmaatụ===
Aha m bụ chiemerumeze
===mkpọputa===
Chi/eme/rum/eze
[[File:LL-Q33578 (ibo)-Lezechima404-Chiemerumeze.wav|LL-Q33578 (ibo)-Lezechima404-Chiemerumeze]]
===olumba===
===ntụghari===
===bekee===
God made me a king
[[Òtù:wiki loves names]]
[[Category:Aha]]
[[Category: Mmadụ]]
cmzrzdtjq1box4jzchd2acg2n2o24mg
42490
42482
2026-06-23T13:27:44Z
Johnnybam
1153
/* ntụghari */
42490
wikitext
text/x-wiki
"""Chiemerumeze"""
===nkọwa===
Nke a bụ aha enwere na ala Igbo. Ọ Putara na chukwu emego m eze.
===nkejiasụsụ===
Aha
===ọmụmaatụ===
Aha m bụ chiemerumeze
===mkpọputa===
Chi/eme/rum/eze
[[File:LL-Q33578 (ibo)-Lezechima404-Chiemerumeze.wav|LL-Q33578 (ibo)-Lezechima404-Chiemerumeze]]
===olumba===
===Ntughari na asụsụ ọzọ===
===bekee===
God made me a king
[[Òtù:wiki loves names]]
[[Category:Aha]]
[[Category: Mmadụ]]
2wzbpf4rng4kpf6xe2hjvrktnb9ghl3
42491
42490
2026-06-23T13:28:07Z
Johnnybam
1153
/* bekee */
42491
wikitext
text/x-wiki
"""Chiemerumeze"""
===nkọwa===
Nke a bụ aha enwere na ala Igbo. Ọ Putara na chukwu emego m eze.
===nkejiasụsụ===
Aha
===ọmụmaatụ===
Aha m bụ chiemerumeze
===mkpọputa===
Chi/eme/rum/eze
[[File:LL-Q33578 (ibo)-Lezechima404-Chiemerumeze.wav|LL-Q33578 (ibo)-Lezechima404-Chiemerumeze]]
===olumba===
===Ntughari na asụsụ ọzọ===
===Bekee===
God made me a king
[[Òtù:wiki loves names]]
[[Category:Aha]]
[[Category: Mmadụ]]
l3encmzybqpheng66p8sgt93nbb2q04
42493
42491
2026-06-23T13:28:47Z
Johnnybam
1153
/* nkejiasụsụ */
42493
wikitext
text/x-wiki
"""Chiemerumeze"""
===nkọwa===
Nke a bụ aha enwere na ala Igbo. Ọ Putara na chukwu emego m eze.
===Nkeji Asụsụ===
Aha
===ọmụmaatụ===
Aha m bụ chiemerumeze
===mkpọputa===
Chi/eme/rum/eze
[[File:LL-Q33578 (ibo)-Lezechima404-Chiemerumeze.wav|LL-Q33578 (ibo)-Lezechima404-Chiemerumeze]]
===olumba===
===Ntughari na asụsụ ọzọ===
===Bekee===
God made me a king
[[Òtù:wiki loves names]]
[[Category:Aha]]
[[Category: Mmadụ]]
bukunkd963v1y9aglk5fk3b60jlgied
42502
42493
2026-06-23T13:33:52Z
Johnnybam
1153
42502
wikitext
text/x-wiki
'''Chiemerumeze'''
===nkọwa===
Nke a bụ aha enwere na ala Igbo. Ọ Putara na chukwu emego m eze.
===Nkeji Asụsụ===
Aha
===ọmụmaatụ===
Aha m bụ chiemerumeze
===mkpọputa===
Chi/eme/rum/eze
[[File:LL-Q33578 (ibo)-Lezechima404-Chiemerumeze.wav|LL-Q33578 (ibo)-Lezechima404-Chiemerumeze]]
===olumba===
===Ntughari na asụsụ ọzọ===
===Bekee===
God made me a king
[[Òtù:wiki loves names]]
[[Category:Aha]]
[[Category: Mmadụ]]
8bdrhis0p0a9rfyxasy3lupzz521q7v
42514
42502
2026-06-23T13:36:50Z
Johnnybam
1153
/* Nkeji Asụsụ */
42514
wikitext
text/x-wiki
'''Chiemerumeze'''
===nkọwa===
Nke a bụ aha enwere na ala Igbo. Ọ Putara na chukwu emego m eze.
===NkejiAsụsụ===
Aha
===ọmụmaatụ===
Aha m bụ chiemerumeze
===mkpọputa===
Chi/eme/rum/eze
[[File:LL-Q33578 (ibo)-Lezechima404-Chiemerumeze.wav|LL-Q33578 (ibo)-Lezechima404-Chiemerumeze]]
===olumba===
===Ntughari na asụsụ ọzọ===
===Bekee===
God made me a king
[[Òtù:wiki loves names]]
[[Category:Aha]]
[[Category: Mmadụ]]
ialwronh4l51eemmkypvai3xj0ttqaa
42609
42514
2026-06-23T14:04:18Z
Akwugo
14
42609
wikitext
text/x-wiki
'''Chiemerumeze'''
===Nkọwa===
Nke a bụ aha enwere na ala Igbo. Ọ Putara na chukwu emego m eze.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Aha m bụ chiemerumeze
===Mkpọputa===
Chi/eme/rum/eze
[[File:LL-Q33578 (ibo)-Lezechima404-Chiemerumeze.wav|LL-Q33578 (ibo)-Lezechima404-Chiemerumeze]]
===olumba===
===Ntụghari n'asụsụ ọzọ===
===Bekee===
God made me a king
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
d1725bbw85l1v42a0yiv2kzegurtccr
42615
42609
2026-06-23T14:04:56Z
Akwugo
14
/* Mkpọputa */
42615
wikitext
text/x-wiki
'''Chiemerumeze'''
===Nkọwa===
Nke a bụ aha enwere na ala Igbo. Ọ Putara na chukwu emego m eze.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Aha m bụ chiemerumeze
===Mkpọpụta===
Chi/eme/rum/eze
[[File:LL-Q33578 (ibo)-Lezechima404-Chiemerumeze.wav|LL-Q33578 (ibo)-Lezechima404-Chiemerumeze]]
===olumba===
===Ntụghari n'asụsụ ọzọ===
===Bekee===
God made me a king
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
19w7j6mvn07n0266bk6e9dsanknfpfi
Chigozirim
0
326
42518
22598
2026-06-23T13:37:21Z
Johnnybam
1153
/* Nkeji asusu */
42518
wikitext
text/x-wiki
'''Chigozirim'''
===Nkowa===
Chukwugoziri mū
===Nkejiasusu===
Aha
===Omumaatu===
Chigoziri m bu aha mmadū
===Mkpoputa===
Chígòzírím
[[File:LL-Q33578 (ibo)-Lezechima404-Chigozirim.wav|LL-Q33578 (ibo)-Lezechima404-Chigozirim]]
===Olumba===
Chukwugoziri m
Chiagozie m
=Ntughari=
===Bekee===
https://en.wiktionary.org/wiki/God#English
===category===
[[Òtù:wiki loves names]]
ctmoi899lr30kyd2uty5241r5ra1wxa
42522
42518
2026-06-23T13:38:03Z
Johnnybam
1153
/* Bekee */
42522
wikitext
text/x-wiki
'''Chigozirim'''
===Nkowa===
Chukwugoziri mū
===Nkejiasusu===
Aha
===Omumaatu===
Chigoziri m bu aha mmadū
===Mkpoputa===
Chígòzírím
[[File:LL-Q33578 (ibo)-Lezechima404-Chigozirim.wav|LL-Q33578 (ibo)-Lezechima404-Chigozirim]]
===Olumba===
Chukwugoziri m
Chiagozie m
=Ntughari=
===Bekee===
[https://en.wiktionary.org/wiki/God#English God]
===category===
[[Òtù:wiki loves names]]
14cghl4whkodt7v8t6kt97s49luudbx
42524
42522
2026-06-23T13:38:29Z
Johnnybam
1153
/* category */
42524
wikitext
text/x-wiki
'''Chigozirim'''
===Nkowa===
Chukwugoziri mū
===Nkejiasusu===
Aha
===Omumaatu===
Chigoziri m bu aha mmadū
===Mkpoputa===
Chígòzírím
[[File:LL-Q33578 (ibo)-Lezechima404-Chigozirim.wav|LL-Q33578 (ibo)-Lezechima404-Chigozirim]]
===Olumba===
Chukwugoziri m
Chiagozie m
=Ntughari=
===Bekee===
[https://en.wiktionary.org/wiki/God#English God]
===category===
[[Òtù:Wiki Loves Names]]
6nau9zmf87emtz1sf489hgmppwqiefr
42528
42524
2026-06-23T13:39:20Z
Johnnybam
1153
/* category */
42528
wikitext
text/x-wiki
'''Chigozirim'''
===Nkowa===
Chukwugoziri mū
===Nkejiasusu===
Aha
===Omumaatu===
Chigoziri m bu aha mmadū
===Mkpoputa===
Chígòzírím
[[File:LL-Q33578 (ibo)-Lezechima404-Chigozirim.wav|LL-Q33578 (ibo)-Lezechima404-Chigozirim]]
===Olumba===
Chukwugoziri m
Chiagozie m
=Ntughari=
===Bekee===
[https://en.wiktionary.org/wiki/God#English God]
===category===
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
flo1cxzfug1alg2xlgt1qfn1enrzx4q
42533
42528
2026-06-23T13:40:55Z
Johnnybam
1153
/* Bekee */
42533
wikitext
text/x-wiki
'''Chigozirim'''
===Nkowa===
Chukwugoziri mū
===Nkejiasusu===
Aha
===Omumaatu===
Chigoziri m bu aha mmadū
===Mkpoputa===
Chígòzírím
[[File:LL-Q33578 (ibo)-Lezechima404-Chigozirim.wav|LL-Q33578 (ibo)-Lezechima404-Chigozirim]]
===Olumba===
Chukwugoziri m
Chiagozie m
=Ntughari=
===Bekee===
[https://en.wiktionary.org/wiki/God#English God]
===category===
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
ndplew4uepfmhg7a713ac5cd8jfefws
42549
42533
2026-06-23T13:45:49Z
Johnnybam
1153
/* Ntughari */
42549
wikitext
text/x-wiki
'''Chigozirim'''
===Nkowa===
Chukwugoziri mū
===Nkejiasusu===
Aha
===Omumaatu===
Chigoziri m bu aha mmadū
===Mkpoputa===
Chígòzírím
[[File:LL-Q33578 (ibo)-Lezechima404-Chigozirim.wav|LL-Q33578 (ibo)-Lezechima404-Chigozirim]]
===Olumba===
Chukwugoziri m
Chiagozie m
==Ntughari na asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/God#English God]
===category===
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
868ryxbxx40thmlhejce202ioifes7s
42564
42549
2026-06-23T13:50:03Z
Johnnybam
1153
/* Nkowa */
42564
wikitext
text/x-wiki
'''Chigozirim'''
===Nkowa===
Chukwu goziri mū
===Nkejiasusu===
Aha
===Omumaatu===
Chigoziri m bu aha mmadū
===Mkpoputa===
Chígòzírím
[[File:LL-Q33578 (ibo)-Lezechima404-Chigozirim.wav|LL-Q33578 (ibo)-Lezechima404-Chigozirim]]
===Olumba===
Chukwugoziri m
Chiagozie m
==Ntughari na asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/God#English God]
===category===
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
r9xt8njv1doee3tol5n9mxug6i4o17w
42576
42564
2026-06-23T13:52:36Z
Johnnybam
1153
/* category */
42576
wikitext
text/x-wiki
'''Chigozirim'''
===Nkowa===
Chukwu goziri mū
===Nkejiasusu===
Aha
===Omumaatu===
Chigoziri m bu aha mmadū
===Mkpoputa===
Chígòzírím
[[File:LL-Q33578 (ibo)-Lezechima404-Chigozirim.wav|LL-Q33578 (ibo)-Lezechima404-Chigozirim]]
===Olumba===
Chukwugoziri m
Chiagozie m
==Ntughari na asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/God#English God]
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
ojhji7zd971xtg5u8f931eqwo3xcnjr
42586
42576
2026-06-23T13:55:49Z
Johnnybam
1153
/* Mkpoputa */
42586
wikitext
text/x-wiki
'''Chigozirim'''
===Nkowa===
Chukwu goziri mū
===Nkejiasusu===
Aha
===Omumaatu===
Chigoziri m bu aha mmadū
===Mkpopụta===
Chígòzírím
[[File:LL-Q33578 (ibo)-Lezechima404-Chigozirim.wav|LL-Q33578 (ibo)-Lezechima404-Chigozirim]]
===Olumba===
Chukwugoziri m
Chiagozie m
==Ntughari na asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/God#English God]
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
74ug0xd1i25m85vens409q6b9ztf3q7
42591
42586
2026-06-23T13:57:53Z
Johnnybam
1153
/* Ntughari na asụsụ ọzọ */
42591
wikitext
text/x-wiki
'''Chigozirim'''
===Nkowa===
Chukwu goziri mū
===Nkejiasusu===
Aha
===Omumaatu===
Chigoziri m bu aha mmadū
===Mkpopụta===
Chígòzírím
[[File:LL-Q33578 (ibo)-Lezechima404-Chigozirim.wav|LL-Q33578 (ibo)-Lezechima404-Chigozirim]]
===Olumba===
Chukwugoziri m
Chiagozie m
==Ntughari n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/God#English God]
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
r5yqhlvobunxijwfeztpad62nbur02o
42596
42591
2026-06-23T13:59:26Z
Johnnybam
1153
/* Nkowa */
42596
wikitext
text/x-wiki
'''Chigozirim'''
===Nkowa===
A na eji ya gosi na mmadụ na ekele Chineke maka ngọzi ọ nwetara.
===Nkejiasusu===
Aha
===Omumaatu===
Chigoziri m bu aha mmadū
===Mkpopụta===
Chígòzírím
[[File:LL-Q33578 (ibo)-Lezechima404-Chigozirim.wav|LL-Q33578 (ibo)-Lezechima404-Chigozirim]]
===Olumba===
Chukwugoziri m
Chiagozie m
==Ntughari n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/God#English God]
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
k7fkomhi1sykk9c2dp429g4tb11rv6n
42605
42596
2026-06-23T14:02:41Z
Johnnybam
1153
42605
wikitext
text/x-wiki
'''Chigọzirim'''
===Nkowa===
A na eji ya gosi na mmadụ na ekele Chineke maka ngọzi ọ nwetara.
===Nkejiasusu===
Aha
===Omumaatu===
Chigọzirim m bu aha mmadụ
===Mkpopụta===
Chi/gọ/zi/ri/m
[[File:LL-Q33578 (ibo)-Lezechima404-Chigozirim.wav|LL-Q33578 (ibo)-Lezechima404-Chigozirim]]
===Olumba===
Chukwugoziri m
Chiagozie m
==Ntughari n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/God#English God]
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
8nwvdjcgi6msytvrlmqdh15f3ylrh8p
42613
42605
2026-06-23T14:04:40Z
Johnnybam
1153
/* Olumba */
42613
wikitext
text/x-wiki
'''Chigọzirim'''
===Nkowa===
A na eji ya gosi na mmadụ na ekele Chineke maka ngọzi ọ nwetara.
===Nkejiasusu===
Aha
===Omumaatu===
Chigọzirim m bu aha mmadụ
===Mkpopụta===
Chi/gọ/zi/ri/m
[[File:LL-Q33578 (ibo)-Lezechima404-Chigozirim.wav|LL-Q33578 (ibo)-Lezechima404-Chigozirim]]
===Olumba===
Chukwugọziri m
Chigọzie m
==Ntughari n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/God#English God]
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
gd6eey5urxix8uenky8r0z8o3n8a2ep
42616
42613
2026-06-23T14:05:02Z
Johnnybam
1153
/* Mkpopụta */
42616
wikitext
text/x-wiki
'''Chigọzirim'''
===Nkowa===
A na eji ya gosi na mmadụ na ekele Chineke maka ngọzi ọ nwetara.
===Nkejiasusu===
Aha
===Omumaatu===
Chigọzirim m bu aha mmadụ
===Mkpopụta===
Chi/gọ/zi/ri/m
[[File:LL-Q33578 (ibo)-Lezechima404-Chigozirim.wav|LL-Q33578 (ibo)-Lezechima404-Chigozirim]]
===Olumba===
Chukwugọziri m
Chigọzie m
==Ntughari n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/God#English God]
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
8pl8wg04fuwi1akor575fyxh479s1du
42631
42616
2026-06-23T14:07:13Z
Johnnybam
1153
/* Omumaatu */
42631
wikitext
text/x-wiki
'''Chigọzirim'''
===Nkowa===
A na eji ya gosi na mmadụ na ekele Chineke maka ngọzi ọ nwetara.
===Nkejiasusu===
Aha
===Omumaatu===
Chigọzirim bụ aha Igbo mara mma.
===Mkpopụta===
Chi/gọ/zi/ri/m
[[File:LL-Q33578 (ibo)-Lezechima404-Chigozirim.wav|LL-Q33578 (ibo)-Lezechima404-Chigozirim]]
===Olumba===
Chukwugọziri m
Chigọzie m
==Ntughari n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/God#English God]
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
5q0bubsrftjk4r5z9thm1g74xxg7t37
42638
42631
2026-06-23T14:08:27Z
Johnnybam
1153
/* Nkowa */
42638
wikitext
text/x-wiki
'''Chigọzirim'''
===Nkọwa===
A na eji ya gosi na mmadụ na ekele Chineke maka ngọzi ọ nwetara.
===Nkejiasusu===
Aha
===Omumaatu===
Chigọzirim bụ aha Igbo mara mma.
===Mkpopụta===
Chi/gọ/zi/ri/m
[[File:LL-Q33578 (ibo)-Lezechima404-Chigozirim.wav|LL-Q33578 (ibo)-Lezechima404-Chigozirim]]
===Olumba===
Chukwugọziri m
Chigọzie m
==Ntughari n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/God#English God]
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
qq479ofh251f8e29kdj26nzhajlkbbn
42646
42638
2026-06-23T14:09:45Z
Johnnybam
1153
42646
wikitext
text/x-wiki
'''Chigọzirim'''
===Nkọwa===
A na eji ya gosi na mmadụ na ekele Chineke maka ngọzi ọ nwetara.
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Chigọzirim bụ aha Igbo mara mma.
===Mkpopụta===
Chi/gọ/zi/ri/m
[[File:LL-Q33578 (ibo)-Lezechima404-Chigozirim.wav|LL-Q33578 (ibo)-Lezechima404-Chigozirim]]
===Olumba===
Chukwugọziri m
Chigọzie m
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/God#English God]
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
ayat2mej4w3i4nj6pjo8ltheradb20k
Chisomaga
0
400
42463
29384
2026-06-23T13:19:24Z
Ebube Clara
1134
42463
wikitext
text/x-wiki
'''Chisomaga'''
===Nkọwa===
Chisomaga bu aha n'egosi na Chukwu na edu m
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
Chisomaga bụ aha ụkọchukwu anyị
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Chisomaga.wav|áká_èkpè|thumb|Chisomaga ]]
===Olumba===
Chinedum
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[[https://en.wiktionary.org/ God(no direct translation except using the word God]]
[https://en.m.wiktionary.org/wiki/ God]
[[Òtù:Wiki Loves Names]]
[[Category: Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
g9s41yt0qw1t9r43la4xbyrux8wdh9q
42472
42463
2026-06-23T13:21:19Z
Ebube Clara
1134
42472
wikitext
text/x-wiki
'''Chisomaga'''
===Nkọwa===
Chisomaga bu aha n'egosi na Chukwu na edu m
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
Chisomaga bụ aha ụkọchukwu anyị
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Chisomaga.wav|áká_èkpè|thumb|Chisomaga ]]
===Olumba===
Chinedum
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[[https://en.wiktionary.org/ God(no direct translation except using the word God]]
[[https://en.m.wiktionary.org/wiki/ God]]
[[Òtù:Wiki Loves Names]]
[[Category: Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
5yl46ucmpzczjrpcquchy3bgb3i7m4m
42601
42472
2026-06-23T14:01:09Z
Ebube Clara
1134
42601
wikitext
text/x-wiki
'''Chisomaga'''
==Nkọwa==
Chisomaga bu aha n'egosi na Chukwu na edu m
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Chisomaga bụ aha ụkọchukwu anyị
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Chisomaga.wav|áká_èkpè|thumb|Chisomaga ]]
===Olumba===
Chinedum
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[[https://en.wiktionary.org/ God(no direct translation except using the word God]]
[[https://en.m.wiktionary.org/wiki/ God]]
[[Òtù:Wiki Loves Names]]
[[Category: Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
o9utuunyac4u0bgetrtupln6s348r3s
Chukadibia
0
414
42478
29346
2026-06-23T13:24:09Z
Ebube Clara
1134
42478
wikitext
text/x-wiki
'''Chukadibia'''
===Nkọwa===
Chukadibia bụ aha ndị Igbo n'akọwa na Chukwu ka dibia.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
*Chukwukadibia bụ aha a na-akpọ mmadụ n'ala Igbo.
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Chukadibia.wav|áká_èkpè|thumb|Chukadibia ]]
===Olumba===
*Chikadibia
*Chukwukadibia
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
[https://en.wiktionary.org/ God is greater than native doctor]
[[Òtù:Wiki Loves Names]]
[[Category: Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
hyg6q04b73n81ua01rw4krnbonxwulu
42597
42478
2026-06-23T14:00:04Z
Ebube Clara
1134
42597
wikitext
text/x-wiki
'''Chukadibia'''
==Nkọwa==
Chukadibia bụ aha ndị Igbo n'akọwa na Chukwu ka dibia.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
*Chukwukadibia bụ aha a na-akpọ mmadụ n'ala Igbo.
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Chukadibia.wav|áká_èkpè|thumb|Chukadibia ]]
===Olumba===
*Chikadibia
*Chukwukadibia
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/ God is greater than native doctor]
[[Òtù:Wiki Loves Names]]
[[Category: Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
30bxnvspbtu16xr06huoda3o1jl4uji
Chukwuebuka
0
429
42843
41959
2026-06-24T04:30:10Z
King ChristLike
964
added sitelink
42843
wikitext
text/x-wiki
'''Chukwuebuka'''
==Nkọwa==
Aha mmadụ n'ala Igbo pụtara na Chineke bụrụ ịbụ.
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
*Aha m bụ Chukwuebuka.
*Chukwuebuka karịa ka anyị chere
*Chukwuebuka bụ ọga m
===Mkpọpụta===
Chu/kwu/e/bu/ka
[[File:LL-Q33578 (ibo)-Lezechima404-Chukwuebuka.wav|LL-Q33578 (ibo)-Lezechima404-Chukwuebuka]]
===Olumba===
===Ntụgharị===
===Bekee===
[https://en.wiktionary.org/wiki/ God is Big]
{{wikidata lexeme|L1019545}}
[[Òtù:Wiki Loves Names]]
[[Òtù:aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
e9fpn50nmghmy5l0g1xehx0tli2434l
Chukwugaemezu
0
434
42543
29339
2026-06-23T13:43:56Z
Ebube Clara
1134
42543
wikitext
text/x-wiki
Chukwugaemezu
===Nkọwa===
Chukwugaemezu pụtara na nkwa chukwu Kwèrè anyị na ọ ga eḿezu ya
===NkejiAsụsụ===
Aha
===ọmụmaatụ===
Chukwugaemezu bu aha ana-kpo nwata nwoke na nwanyị na ala igbo
===mkpoputa===
Chukwugaémezu
[[File:LL-Q33578 (ibo)-Lezechima404-Chukwugaemezu.wav|LL-Q33578 (ibo)-Lezechima404-Chukwugaemezu]]
===olumba===
Chigaemezu
===Ntụgharị===
===Bekee===
God will fulfill
===category===
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
7kgq7y9mb258mapfupl2pn1hydjxgcg
42547
42543
2026-06-23T13:45:25Z
Ebube Clara
1134
42547
wikitext
text/x-wiki
Chukwugaemezu
===Nkọwa===
Chukwugaemezu pụtara na nkwa chukwu Kwèrè anyị na ọ ga eḿezu ya
===NkejiAsụsụ===
Aha
===ọmụmaatụ===
Chukwugaemezu bu aha ana-kpo nwata nwoke na nwanyị na ala igbo
===mkpoputa===
Chukwugaémezu
[[File:LL-Q33578 (ibo)-Lezechima404-Chukwugaemezu.wav|LL-Q33578 (ibo)-Lezechima404-Chukwugaemezu]]
===olumba===
Chigaemezu
===Ntụgharị n'asụsụ===
===Bekee===
God will fulfill
===category===
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
1bp7wdjmmg9kzxzhd1450y07hd2e8t2
42565
42547
2026-06-23T13:50:09Z
Ebube Clara
1134
42565
wikitext
text/x-wiki
Chukwugaemezu
==Nkọwa==
Chukwugaemezu pụtara na nkwa chukwu Kwèrè anyị na ọ ga eḿezu ya
===Nkejiasụsụ===
Aha
===ọmụmaatụ===
Chukwugaemezu bu aha ana-kpo nwata nwoke na nwanyị na ala igbo
===Mkpọpụta===
Chukwugaémezu
[[File:LL-Q33578 (ibo)-Lezechima404-Chukwugaemezu.wav|LL-Q33578 (ibo)-Lezechima404-Chukwugaemezu]]
===olumba===
Chigaemezu
==Ntụgharị n'asụsụ==
===Bekee===
God will fulfill
===category===
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
9yry6nyczowxw3g92o2k94lji03jckt
42567
42565
2026-06-23T13:50:34Z
Ebube Clara
1134
42567
wikitext
text/x-wiki
Chukwugaemezu
==Nkọwa==
Chukwugaemezu pụtara na nkwa chukwu Kwèrè anyị na ọ ga eḿezu ya
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Chukwugaemezu bu aha ana-kpo nwata nwoke na nwanyị na ala igbo
===Mkpọpụta===
Chukwugaémezu
[[File:LL-Q33578 (ibo)-Lezechima404-Chukwugaemezu.wav|LL-Q33578 (ibo)-Lezechima404-Chukwugaemezu]]
===olumba===
Chigaemezu
==Ntụgharị n'asụsụ==
===Bekee===
God will fulfill
===category===
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
ep1h5aty9ssjkcorkzaqdy56cwtjgi5
42571
42567
2026-06-23T13:51:11Z
Ebube Clara
1134
42571
wikitext
text/x-wiki
Chukwugaemezu
==Nkọwa==
Chukwugaemezu pụtara na nkwa chukwu Kwèrè anyị na ọ ga eḿezu ya
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Chukwugaemezu bu aha ana-kpo nwata nwoke na nwanyị na ala igbo
===Mkpọpụta===
Chukwugaémezu
[[File:LL-Q33578 (ibo)-Lezechima404-Chukwugaemezu.wav|LL-Q33578 (ibo)-Lezechima404-Chukwugaemezu]]
===Olumba===
Chigaemezu
==Ntụgharị n'asụsụ==
===Bekee===
God will fulfill
===category===
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
4352hj0uos9cpkb633qqwbed650n0l8
42580
42571
2026-06-23T13:53:33Z
Ebube Clara
1134
42580
wikitext
text/x-wiki
Chukwugaemezu
==Nkọwa==
Chukwugaemezu pụtara na nkwa chukwu Kwèrè anyị na ọ ga eḿezu ya
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Chukwugaemezu bu aha ana-kpo nwata nwoke na nwanyị na ala igbo
===Mkpọpụta===
Chukwugaémezu
[[File:LL-Q33578 (ibo)-Lezechima404-Chukwugaemezu.wav|LL-Q33578 (ibo)-Lezechima404-Chukwugaemezu]]
===Olumba===
Chigaemezu
==Ntụgharị n'asụsụ==
===Bekee===
God will fulfill.
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
k8p09wc35fnc8b084dbubb84bw54frn
Daberenachukwu
0
471
42444
18703
2026-06-23T13:13:19Z
Ebube Clara
1134
42444
wikitext
text/x-wiki
==Nkọwa==
Daberenachukwu bụ aha enwere na ala Igbo. Aha na-akowa ntukwasi obi na Chineke.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Aha m bụ Daberenachukwu.
===Mkpọpụta===
===Olumba===
Daberechi
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Lean on God
[[Òtù:Wiki Loves Names]]
[[Category :Aha]]
[[Category: Mmadu]]
98n9lb4lrf97gmdnvt3w8zbis4nwepq
Eberechukwu
0
495
42544
42278
2026-06-23T13:43:56Z
Senator Choko
98
/* Ntụgharị n'asụsụ ọzọ */
42544
wikitext
text/x-wiki
'''Eberechukwu'''
==Nkọwa==
Eberechukwu bụ aha mmadụ nke n'egosi na Chukwu nwere obi ebere.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
*Eberechukwu bụ aha ezigbo enyim nwanyị.
*Eberechukwu bụ aha dị mma na ala igbo.
===Mkpọpụta===
[[File:Ig-Eberechukwu.ogg]]
===Olumba===
*Eberenna
*Eberechukwu
*Eberechi
*Ebele
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/Mercy God’s mercy]
[[Òtù: Wiki Loves Names]]
[[Category: Aha]]
[[Òtù:Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
r24cqom5urnpu52ufo3grvmwb0oj1ej
Echefunachi
0
501
42506
22347
2026-06-23T13:35:00Z
Senator Choko
98
/* Olumba */
42506
wikitext
text/x-wiki
'''ECHEFUNACHi'''
===Nkọwa===
Echefunachi pụtara na gi echezona chukwu
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Echefunachi bu aha mmadụ na ala igbo
#Echefunachi bu ezigbo aha ya.
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Echefunachi.wav|áká_èkpè|thumb|Echefunachi]]
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Don't forget your God and your father
===Category===
[[Òtù:wiki loves names]]
mozdwjmspp6agugta0of76lpg9l1yi8
42509
42506
2026-06-23T13:35:50Z
Senator Choko
98
/* Category */
42509
wikitext
text/x-wiki
'''ECHEFUNACHi'''
===Nkọwa===
Echefunachi pụtara na gi echezona chukwu
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Echefunachi bu aha mmadụ na ala igbo
#Echefunachi bu ezigbo aha ya.
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Echefunachi.wav|áká_èkpè|thumb|Echefunachi]]
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Don't forget your God and your father
[[Òtù:Wiki Loves Names]]
cqdp612a4xzzo4oev2jrsh6dk154kem
42515
42509
2026-06-23T13:36:55Z
Senator Choko
98
42515
wikitext
text/x-wiki
===Nkọwa===
Echefunachi pụtara na gi echezona chukwu
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Echefunachi bu aha mmadụ na ala igbo
#Echefunachi bu ezigbo aha ya.
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Echefunachi.wav|áká_èkpè|thumb|Echefunachi]]
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Don't forget your God and your father
[[Òtù:Wiki Loves Names]]
ak2suehiuybank02rq5z4528skg1i8u
42600
42515
2026-06-23T14:00:59Z
Akwugo
14
42600
wikitext
text/x-wiki
===Nkọwa===
Echefunachi bụ aha Igbo nke pụtara na gị echezona chukwu.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Echefunachi bu aha mmadụ na ala igbo
#Echefunachi bu ezigbo aha ya.
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Echefunachi.wav|áká_èkpè|thumb|Echefunachi]]
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Don't forget your God and your father
[[Òtù:Wiki Loves Names]]
tn0b5x2wkli8s4jqk955thilc1m8399
42602
42600
2026-06-23T14:01:26Z
Akwugo
14
/* Ntụgharị n'asụsụ ọzọ */
42602
wikitext
text/x-wiki
===Nkọwa===
Echefunachi bụ aha Igbo nke pụtara na gị echezona chukwu.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Echefunachi bu aha mmadụ na ala igbo
#Echefunachi bu ezigbo aha ya.
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Echefunachi.wav|áká_èkpè|thumb|Echefunachi]]
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Don't forget your God and your father
[[Òtù:Wiki Loves Names]]
i4809igk6t6rrl9t3gr4o6s3rdnv8m4
42603
42602
2026-06-23T14:02:14Z
Akwugo
14
/* Ntụgharị n'asụsụ ọzọ */
42603
wikitext
text/x-wiki
===Nkọwa===
Echefunachi bụ aha Igbo nke pụtara na gị echezona chukwu.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Echefunachi bu aha mmadụ na ala igbo
#Echefunachi bu ezigbo aha ya.
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Echefunachi.wav|áká_èkpè|thumb|Echefunachi]]
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Don't forget your God and your father
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
sijaxut3lvkdpfilre2lixqhmyo2ekf
Echidime
0
506
42479
22306
2026-06-23T13:24:37Z
Senator Choko
98
42479
wikitext
text/x-wiki
==Nkọwa==
Ọ bụ aha ejiri mara mmadụ
===Nkjịasụsụ===
Aha
===Ọmụmaatụ===
#Echidime bu aha nwoke (mmadụ)
#Echidime bu ezigbo Atụmatụ na ala Igbo
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Echidime.wav|áká_èkpè|thumb|Echidime]]
===Ólúmba===
*Onyemaechi
*Amaechi
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
No one knows tomorrow
[[Òtù:Wiki Loves Names]]
eis3t9v63pm8s5v9wyot4xw0dzlwt6p
Eghu
0
517
42447
29515
2026-06-23T13:14:18Z
Senator Choko
98
/* ==Bekee */
42447
wikitext
text/x-wiki
"""Eghu"""
==Nkọwa==
Eghu bụ aha anụmanụ.Ọnwere ụkwụ anọ n'ebikwa n'ụlọ.
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
Enwere m eghu atọ n'ụlọ m.
===Mkpọpụta===
Éghú
[[File:LL-Q33578 (ibo)-Iwuala chisom-Eghu.wav|LL-Q33578 (ibo)-Iwuala chisom-Eghu]]
===Olumba===
Ewu
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[[Òtù:aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ụlọ]]
[[Òtù:Igbo Noun Project]]
[[Òtù:Wiki Loves Names]]
hjtln3pwx24gobxxc1z8geapndgdrtz
42452
42447
2026-06-23T13:16:23Z
Senator Choko
98
/* Bekee */
42452
wikitext
text/x-wiki
"""Eghu"""
==Nkọwa==
Eghu bụ aha anụmanụ.Ọnwere ụkwụ anọ n'ebikwa n'ụlọ.
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
Enwere m eghu atọ n'ụlọ m.
===Mkpọpụta===
Éghú
[[File:LL-Q33578 (ibo)-Iwuala chisom-Eghu.wav|LL-Q33578 (ibo)-Iwuala chisom-Eghu]]
===Olumba===
Ewu
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[[:en:goat|Goat]]
[[Òtù:aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ụlọ]]
[[Òtù:Igbo Noun Project]]
[[Òtù:Wiki Loves Names]]
q36w37j27ekn1zr9umjls24nyb7zj22
42455
42452
2026-06-23T13:17:05Z
Senator Choko
98
42455
wikitext
text/x-wiki
==Nkọwa==
Eghu bụ aha anụmanụ.Ọnwere ụkwụ anọ n'ebikwa n'ụlọ.
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
Enwere m eghu atọ n'ụlọ m.
===Mkpọpụta===
Éghú
[[File:LL-Q33578 (ibo)-Iwuala chisom-Eghu.wav|LL-Q33578 (ibo)-Iwuala chisom-Eghu]]
===Olumba===
Ewu
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[[:en:goat|Goat]]
[[Òtù:aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ụlọ]]
[[Òtù:Igbo Noun Project]]
[[Òtù:Wiki Loves Names]]
8tjf2wo9j3dfuezzrvvxzo7ansmn5ab
Eke na Egwurugwu
0
526
42424
20034
2026-06-23T13:04:12Z
Senator Choko
98
/* Ọmụmaatụ */
42424
wikitext
text/x-wiki
'''Egwurugwu'''
==Nkọwa==
Nke a bụ otu na ime ihe chineke Nna keputara na uwa.Ọ Na egosi anyi na chukwunna agaghi eji mmiri mebie uwa ozo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
[[Usòrò:Double-alaskan-rainbow-airbrushed.jpg|thumb|Egwurugwu]]
*Egwurugwu a mara mma na eluigwe.
===Mkpọpụta===
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Rainbow
[[Òtù:wiki loves names]]
ozp0k5dpin4m1stsl4ez5k411crwpul
42433
42424
2026-06-23T13:07:15Z
Senator Choko
98
/* Bekee */
42433
wikitext
text/x-wiki
'''Egwurugwu'''
==Nkọwa==
Nke a bụ otu na ime ihe chineke Nna keputara na uwa.Ọ Na egosi anyi na chukwunna agaghi eji mmiri mebie uwa ozo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
[[Usòrò:Double-alaskan-rainbow-airbrushed.jpg|thumb|Egwurugwu]]
*Egwurugwu a mara mma na eluigwe.
===Mkpọpụta===
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[[:en:rainbow|Rainbow]]
[[Òtù:Wiki Loves Names]]
9atcgyad3y04lrf35ljwroapdb6gayb
42445
42433
2026-06-23T13:13:31Z
Senator Choko
98
/* Mkpọpụta */
42445
wikitext
text/x-wiki
'''Egwurugwu'''
==Nkọwa==
Nke a bụ otu na ime ihe chineke Nna keputara na uwa.Ọ Na egosi anyi na chukwunna agaghi eji mmiri mebie uwa ozo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
[[Usòrò:Double-alaskan-rainbow-airbrushed.jpg|thumb|Egwurugwu]]
*Egwurugwu a mara mma na eluigwe.
===Mkpọpụta===
[[File:Ig-Eke na egwurugwu.ogg]]
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[[:en:rainbow|Rainbow]]
[[Òtù:Wiki Loves Names]]
h68fj0mtqe2lebeiegfg008ea5pmil5
42498
42445
2026-06-23T13:32:09Z
Senator Choko
98
Senator Choko moved page [[Egwurugwu]] to [[Eke na Egwurugwu]]: Misspelled title
42445
wikitext
text/x-wiki
'''Egwurugwu'''
==Nkọwa==
Nke a bụ otu na ime ihe chineke Nna keputara na uwa.Ọ Na egosi anyi na chukwunna agaghi eji mmiri mebie uwa ozo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
[[Usòrò:Double-alaskan-rainbow-airbrushed.jpg|thumb|Egwurugwu]]
*Egwurugwu a mara mma na eluigwe.
===Mkpọpụta===
[[File:Ig-Eke na egwurugwu.ogg]]
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[[:en:rainbow|Rainbow]]
[[Òtù:Wiki Loves Names]]
h68fj0mtqe2lebeiegfg008ea5pmil5
Ejiofor
0
531
42542
29295
2026-06-23T13:43:11Z
Ebube Clara
1134
42542
wikitext
text/x-wiki
'''Ejiofor'''
==Nkọwa==
Aha Igbo mmadụ pụtara na onye a na ekwu maka ya nwere ikike nke nke a na-ahụ na onye na jị ofor n'ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
*Aha nna m bu Ejiofor
*Nna m bu Ejiofor na ezinụlọ anyị.
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Ejiofor.wav|áká_èkpè|thumb|Ejiofor]]
Ējīōfór
===Olumba===
=Ntụgharị n'asụsụ ọzọ=
===Bekee===
Authority holder.
[[Òtù:Wiki Loves Names]]
[[Category: Aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
lc4sjqcnozkf2v63iildru3n84em78u
Ejula
0
532
42409
20026
2026-06-23T12:58:50Z
Senator Choko
98
42409
wikitext
text/x-wiki
===Nkọwa===
[[Usòrò:Snails, Makola Market, Accra, Ghana.JPG|thumb|ejula]]
Nke a bụ ntakiri anụmanụ nke na aga eje nwayọ nwayọ. E ji kwaya esi nri.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
*Ezinaulo anyi na eri Ejụla.
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Ejula.wav|áká_èkpè|thumb|Ejula]]
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Snail
[[Òtù: Wiki Loves Names]]
8r0wyc0iuchkuulf5p09eu0wd9pcws9
42420
42409
2026-06-23T13:02:17Z
Senator Choko
98
/* Bekee */
42420
wikitext
text/x-wiki
===Nkọwa===
[[Usòrò:Snails, Makola Market, Accra, Ghana.JPG|thumb|ejula]]
Nke a bụ ntakiri anụmanụ nke na aga eje nwayọ nwayọ. E ji kwaya esi nri.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
*Ezinaulo anyi na eri Ejụla.
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Ejula.wav|áká_èkpè|thumb|Ejula]]
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
[[:en:snail|snail]]
[[Òtù: Wiki Loves Names]]
99nn6srssu81r0jeajl2uuzr8dnrbx4
Ekenedilichukwu
0
537
42359
22498
2026-06-23T12:36:52Z
Senator Choko
98
42359
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ aha enwere nke pụtara Chukwu nara ekele.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Aha m bụ Ekenedilichukwu.
#A chọrọ m kà aha m bu ekenedilichukwu
===Mkpọpụta===
Ekenedilichukwu
[[File:LL-Q33578 (ibo)-Iwuala chisom-Ekenedilichukwu.wav|LL-Q33578 (ibo)-Iwuala chisom-Ekenedilichukwu]]
===Olumba===
===Ntụghari n'asụsụ ọzọ===
===Bekee===
Glory be to God
[[Òtù:wiki loves names]]
tkc2cz2ar6a58dxrf16fsowm3c7iies
42395
42359
2026-06-23T12:55:02Z
Senator Choko
98
42395
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ aha enwere nke pụtara Chukwu nara ekele.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Aha m bụ Ekenedilichukwu.
#A chọrọ m kà aha m bụ Ekenedilichukwu
===Mkpọpụta===
Ekenedilichukwu
[[File:LL-Q33578 (ibo)-Iwuala chisom-Ekenedilichukwu.wav|LL-Q33578 (ibo)-Iwuala chisom-Ekenedilichukwu]]
===Olumba===
===Ntụghari n'asụsụ ọzọ===
===Bekee===
Glory be to God
[[Òtù:wiki loves Names]]
n7j58e10gte8ak0fs79dll2g7njr12t
42397
42395
2026-06-23T12:55:22Z
Senator Choko
98
/* Bekee */
42397
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ aha enwere nke pụtara Chukwu nara ekele.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Aha m bụ Ekenedilichukwu.
#A chọrọ m kà aha m bụ Ekenedilichukwu
===Mkpọpụta===
Ekenedilichukwu
[[File:LL-Q33578 (ibo)-Iwuala chisom-Ekenedilichukwu.wav|LL-Q33578 (ibo)-Iwuala chisom-Ekenedilichukwu]]
===Olumba===
===Ntụghari n'asụsụ ọzọ===
===Bekee===
Glory be to God
[[Òtù:Wiki loves Names]]
bqlnxixl5jtmgun336xg9bsbgf1ggy0
42398
42397
2026-06-23T12:55:35Z
Senator Choko
98
/* Bekee */
42398
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ aha enwere nke pụtara Chukwu nara ekele.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Aha m bụ Ekenedilichukwu.
#A chọrọ m kà aha m bụ Ekenedilichukwu
===Mkpọpụta===
Ekenedilichukwu
[[File:LL-Q33578 (ibo)-Iwuala chisom-Ekenedilichukwu.wav|LL-Q33578 (ibo)-Iwuala chisom-Ekenedilichukwu]]
===Olumba===
===Ntụghari n'asụsụ ọzọ===
===Bekee===
Glory be to God
[[Òtù:Wiki Loves Names]]
8t9w8ai5eb4mg4fxnjtli0qvkxnn5nj
42521
42398
2026-06-23T13:37:54Z
Ebube Clara
1134
42521
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ aha enwere nke pụtara Chukwu nara ekele.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Aha m bụ Ekenedilichukwu.
#A chọrọ m kà aha m bụ Ekenedilichukwu
===Mkpọpụta===
Ekenedilichukwu
[[File:LL-Q33578 (ibo)-Iwuala chisom-Ekenedilichukwu.wav|LL-Q33578 (ibo)-Iwuala chisom-Ekenedilichukwu]]
===Olumba===
===Ntụghari n'asụsụ ọzọ===
===Bekee===
Glory be to God
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category:Mmadu]]
hsofz7icdlpgjqolo3q2ly3tv59ayc9
42594
42521
2026-06-23T13:58:46Z
Ebube Clara
1134
42594
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ aha enwere nke pụtara Chukwu nara ekele.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Aha m bụ Ekenedilichukwu.
#A chọrọ m kà aha m bụ Ekenedilichukwu
===Mkpọpụta===
Ekenedilichukwu
[[File:LL-Q33578 (ibo)-Iwuala chisom-Ekenedilichukwu.wav|LL-Q33578 (ibo)-Iwuala chisom-Ekenedilichukwu]]
===Olumba===
==Ntụghari n'asụsụ ọzọ==
===Bekee===
Glory be to God
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
[[Category:Mmadu]]
c1lgzuj7ch5tkt8iz6vv1m0jy3jjng4
Ekpereamaka
0
543
42546
22500
2026-06-23T13:45:15Z
Senator Choko
98
/* bekee */
42546
wikitext
text/x-wiki
'''EKPEREAMAKA'''
===nkọwa===
Nke a bụ aha putara na o di mma ka e na ikpe ekpere.
===nkejiasụsụ===
Aha
===ọmụmaatụ===
#Aha m bụ Ekpereamaka.
#Nwannem sị na aha ya bu ekpereamaka.
===mkpọpụta===
E/kpe/re/a/ma/ka
[[File:LL-Q33578 (ibo)-Iwuala chisom-Ekpereamaka.wav|LL-Q33578 (ibo)-Iwuala chisom-Ekpereamaka]]
===olumba===
===ntụghari===
===bekee===
Prayer is Good
[[Òtù: Wiki Loves Names]]
s5y5uzh1b11xqre1j2m2yks440fi95p
Ekpunobi
0
544
42538
29903
2026-06-23T13:42:06Z
Ebube Clara
1134
42538
wikitext
text/x-wiki
'''Ekpunobi'''
===Nkọwa===
Ekpunobi bụ afa mmadụ pụtara na ọ dịghị onye ma obi mmadụ
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
Ekpunobi bụ afa mmadụ
===Mkpọputa===
Ékpúńóbí
[[File:LL-Q33578 (ibo)-Chigozirim2005-Ekpunobi.wav]]
===Olumba===
Onyemobi
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Intents(of heart of man)
[https://en.wiktiinary.org/wiki"intent of man's heart" "intent of man's heart"]
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
[[Otú:Nkọwa okwu]]
[[Category:Mmadu]]
su9039f0zhmm1dxw6e0mjmba9uh1v4a
42556
42538
2026-06-23T13:47:53Z
Ebube Clara
1134
42556
wikitext
text/x-wiki
'''Ekpunobi'''
===Nkọwa===
Ekpunobi bụ afa mmadụ pụtara na ọ dịghị onye ma obi mmadụ
==Nkejiasụsụ==
Aha
===Ọmụmaatụ===
Ekpunobi bụ afa mmadụ
===Mkpọpụta===
Ékpúńóbí
[[File:LL-Q33578 (ibo)-Chigozirim2005-Ekpunobi.wav]]
===Olumba===
Onyemobi
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Intents(of heart of man)
[https://en.wiktiinary.org/wiki "intent of man's heart"]
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
[[Otú:Nkọwa okwu]]
[[Category:Mmadu]]
mcmizxdtbygtu8hfmfqwjf3k3kf70wf
Ekwe
0
545
42352
29797
2026-06-23T12:31:57Z
Senator Choko
98
/* ntụghari */
42352
wikitext
text/x-wiki
"""Ekwe"""
===nkọwa===
Nke a bụ ngwa egwu nke na ime egwu ka o di mma.
===nkejiasụsụ===
Nkowaaha
===ọmụmaatụ===
Ekwe a nwere ezigbo uda.
===mkpọpụta===
E/kwe
[[File:LL-Q33578 (ibo)-Iwuala chisom-Ekwe.wav|LL-Q33578 (ibo)-Iwuala chisom-Ekwe]]
===olumba===
===ntụgharị===
===bekee===
Wooden drum
[[Òtù:wiki loves names]]
[=category: wt/ig]]
[[Òtù:aha]]
[[Òtù:Ihe a na-ahụ anya]]
[[Òtù:Igbo Noun Project]]
anxgme9hwc1vbiq1ttiqrc9dfd1amtd
42354
42352
2026-06-23T12:32:23Z
Senator Choko
98
/* bekee */
42354
wikitext
text/x-wiki
"""Ekwe"""
===nkọwa===
Nke a bụ ngwa egwu nke na ime egwu ka o di mma.
===nkejiasụsụ===
Nkowaaha
===ọmụmaatụ===
Ekwe a nwere ezigbo uda.
===mkpọpụta===
E/kwe
[[File:LL-Q33578 (ibo)-Iwuala chisom-Ekwe.wav|LL-Q33578 (ibo)-Iwuala chisom-Ekwe]]
===olumba===
===ntụgharị===
===bekee===
Wooden drum
[[Òtù:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Ihe a na-ahụ anya]]
[[Òtù:Igbo Noun Project]]
pungfjykdcur4cgob2cp2g2385034o1
42356
42354
2026-06-23T12:33:54Z
Senator Choko
98
42356
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ ngwa egwu nke na ime egwu ka o di mma.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Ekwe a nwere ezigbo uda.
===Mkpọpụta===
E/kwe
[[File:LL-Q33578 (ibo)-Iwuala chisom-Ekwe.wav|LL-Q33578 (ibo)-Iwuala chisom-Ekwe]]
===Olumba===
===Ntụgharị===
===Bekee===
Wooden drum
[[Òtù:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Ihe a na-ahụ anya]]
[[Òtù:Igbo Noun Project]]
rhpk1i71wiprgmq2nxsr75mk54d4u0j
42548
42356
2026-06-23T13:45:39Z
Senator Choko
98
/* Bekee */
42548
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ ngwa egwu nke na ime egwu ka o di mma.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Ekwe a nwere ezigbo uda.
===Mkpọpụta===
E/kwe
[[File:LL-Q33578 (ibo)-Iwuala chisom-Ekwe.wav|LL-Q33578 (ibo)-Iwuala chisom-Ekwe]]
===Olumba===
===Ntụgharị===
===Bekee===
Wooden drum
[[Òtù:Wiki Loves Names]]
[[Òtù:aha]]
[[Òtù:Ihe a na-ahụ anya]]
[[Òtù:Igbo Noun Project]]
2tt80tvd7beg0rkk44uuwj0zzwkauqz
Elochukwu
0
557
42349
29799
2026-06-23T12:30:37Z
Senator Choko
98
42349
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ aha enwere na ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Aha m bụ Elochukwu.
#Ọ sị na aha ya bu elochukwu
===mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Elochukwu.wav|áká_èkpè|thumb|Elochukwu]]
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
God is kind
[[Òtù:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
r521grlvehcyfqnee97i9ujkpw36ds9
42552
42349
2026-06-23T13:46:34Z
Senator Choko
98
/* Ntụgharị n'asụsụ ọzọ */
42552
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ aha enwere na ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Aha m bụ Elochukwu.
#Ọ sị na aha ya bu elochukwu
===mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Elochukwu.wav|áká_èkpè|thumb|Elochukwu]]
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
God is kind
[[Òtù:Wiki Loves Names]]
[[Òtù:aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
sfb8auhr94lx24oo74e3f0wk9lrirpo
Eneke nti oba
0
562
42334
22568
2026-06-23T12:22:53Z
Senator Choko
98
42334
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ otụ na ime anụmanụ enwere na ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Eneke nti oba a bụrụ ibụ.
===mkpọpụta===
Eneke nti oba
[[File:LL-Q33578 (ibo)-Iwuala chisom-Eneke nti oba.wav|LL-Q33578 (ibo)-Iwuala chisom-Eneke nti oba]]
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[[Òtù:wiki loves names]]
3ax2jq2cer1nyhxt4pb04guirpd5nq7
42341
42334
2026-06-23T12:27:46Z
Senator Choko
98
/* Bekee */
42341
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ otụ na ime anụmanụ enwere na ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Eneke nti oba a bụrụ ibụ.
===mkpọpụta===
Eneke nti oba
[[File:LL-Q33578 (ibo)-Iwuala chisom-Eneke nti oba.wav|LL-Q33578 (ibo)-Iwuala chisom-Eneke nti oba]]
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
The bird that listens to (or obeys) the king.
[[Òtù:wiki loves names]]
5j5gk01khsxiwjohx9g1yutif0gxhn9
42554
42341
2026-06-23T13:47:02Z
Senator Choko
98
/* Bekee */
42554
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ otụ na ime anụmanụ enwere na ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Eneke nti oba a bụrụ ibụ.
===mkpọpụta===
Eneke nti oba
[[File:LL-Q33578 (ibo)-Iwuala chisom-Eneke nti oba.wav|LL-Q33578 (ibo)-Iwuala chisom-Eneke nti oba]]
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
The bird that listens to (or obeys) the king.
[[Òtù:Wiki Loves Names]]
q4woxg61h83j36my2ng5am0zem5wtgr
Enuma
0
565
42304
22559
2026-06-23T12:02:33Z
Senator Choko
98
/* Category */
42304
wikitext
text/x-wiki
'''Enuma'''
==Nkọwa==
Aha mmadụ
===Nkejasụsụ===
Aha
===Ọmụmaatụ===
Enuma bụ aha nwanyi
===Mkpọpụta===
Enuma
[[File:LL-Q33578 (ibo)-Iwuala chisom-Enuma.wav|LL-Q33578 (ibo)-Iwuala chisom-Enuma]]
===Ólúmba===
Chukwuma
Sochima
Chinekema
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Only God knows
[[Òtù:wiki loves names]]
[[Category:Aha]]
7a31bhtfvjtw1t93g5cn10y5ntawxkx
42313
42304
2026-06-23T12:04:58Z
Senator Choko
98
/* Ólúmba */
42313
wikitext
text/x-wiki
'''Enuma'''
==Nkọwa==
Aha mmadụ
===Nkejasụsụ===
Aha
===Ọmụmaatụ===
Enuma bụ aha nwanyi
===Mkpọpụta===
Enuma
[[File:LL-Q33578 (ibo)-Iwuala chisom-Enuma.wav|LL-Q33578 (ibo)-Iwuala chisom-Enuma]]
===Olumba===
*Chukwuma
*Sochima
*Chinekema
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Only God knows
[[Òtù:wiki loves names]]
[[Category:Aha]]
68sznr4wwknjad2pyuhuxccue31les1
42319
42313
2026-06-23T12:08:09Z
Senator Choko
98
/* Mkpọpụta */
42319
wikitext
text/x-wiki
'''Enuma'''
==Nkọwa==
Aha mmadụ
===Nkejasụsụ===
Aha
===Ọmụmaatụ===
Enuma bụ aha nwanyi
===Mkpọpụta===
Enuma
[[File:Ig-Enuma.ogg]]
===Olumba===
*Chukwuma
*Sochima
*Chinekema
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Only God knows
[[Òtù:wiki loves names]]
[[Category:Aha]]
n2y2q2rzr3xwb8zo7pdp3dou7kzafao
42555
42319
2026-06-23T13:47:36Z
Senator Choko
98
/* Bekee */
42555
wikitext
text/x-wiki
'''Enuma'''
==Nkọwa==
Aha mmadụ
===Nkejasụsụ===
Aha
===Ọmụmaatụ===
Enuma bụ aha nwanyi
===Mkpọpụta===
Enuma
[[File:Ig-Enuma.ogg]]
===Olumba===
*Chukwuma
*Sochima
*Chinekema
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Only God knows
[[Òtù:Wiki Loves Names]]
[[Category:Aha]]
nmo6wvejaxo1wv12pyck2q3doivnkwn
Enyinnaya
0
573
42302
17576
2026-06-23T12:00:15Z
Senator Choko
98
/* Olumba */
42302
wikitext
text/x-wiki
Enyinnaya
==Nkọwa==
Enyinnaya pụtara na onye a bụ oyi maọbu enyi nna ya
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Enyinnaya bu aha ana-kpo mmadụ na ala igbo
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Enyinnaya.wav|áká_èkpè|thumb|Enyinnaya]]
Enyịnnaya
===Olumba===
*Enyịnnia
*Enyịnna
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
His father's friend
===category===
[[Òtù:wiki loves names]]
gnk46njs78cnz7yc32yrxfsr3yht7va
42561
42302
2026-06-23T13:48:20Z
Senator Choko
98
/* category */
42561
wikitext
text/x-wiki
Enyinnaya
==Nkọwa==
Enyinnaya pụtara na onye a bụ oyi maọbu enyi nna ya
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Enyinnaya bu aha ana-kpo mmadụ na ala igbo
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Enyinnaya.wav|áká_èkpè|thumb|Enyinnaya]]
Enyịnnaya
===Olumba===
*Enyịnnia
*Enyịnna
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
His father's friend
[[Òtù:Wiki Loves Names]]
95fqmguo3rxc6nmg1uwm6cgamxe1bou
Enyionwu
0
576
42382
21878
2026-06-23T12:49:15Z
Ebube Clara
1134
42382
wikitext
text/x-wiki
==Nkọwa==
Enyionwu bụ aha mmadụ n'egosi na ọnwụ enweghị enyi ma ọ bụ na mmadụ eliela ọtụtụ ozi.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Enyionwu bụ afa mmadụ
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Enyionwu.wav|áká_èkpè|thumb|Enyionwu]]
Éńyíọ́ńwú
===Olumba===
Onwuenweghi enyi
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Death plea
https://en.m.wiktionary.org/wiki/Death
[[Òtù:Wiki Loves Names]]
oj7yd4oal44q6skr8l2u0f1tukext0l
42427
42382
2026-06-23T13:04:31Z
Ebube Clara
1134
42427
wikitext
text/x-wiki
==Nkọwa==
Enyionwu bụ aha mmadụ n'egosi na ọnwụ enweghị enyi ma ọ bụ na mmadụ eliela ọtụtụ ozi.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Enyionwu bụ afa mmadụ
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Enyionwu.wav|áká_èkpè|thumb|Enyionwu]]
Éńyíọ́ńwú
===Olumba===
Onwuenweghi enyi
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Death plea
[[https://en.m.wiktionary.org/wiki/Death| Death plea]]
[[Òtù:Wiki Loves Names]]
[[Category: Aha]]
[[Category: Mmadu]]
don31qh6hjy3acacyjc4fomnxuuiffj
42623
42427
2026-06-23T14:06:17Z
Ebube Clara
1134
42623
wikitext
text/x-wiki
==Nkọwa==
Enyionwu bụ aha mmadụ n'egosi na ọnwụ enweghị enyi ma ọ bụ na mmadụ eliela ọtụtụ ozi.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Enyionwu bụ afa mmadụ
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Enyionwu.wav|áká_èkpè|thumb|Enyionwu]]
Éńyíọ́ńwú
===Olumba===
Onwuenweghi enyi
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Death plea
[[https://en.m.wiktionary.org/wiki/Death| Death plea]]
[[Òtù:Wiki Loves Names]]
[[Category: Aha]]
[[Category: Mmadu]]
5rbdamhd2cjz4z71noxgia3vylfk8aa
Esomchi
0
581
42562
42299
2026-06-23T13:49:37Z
Senator Choko
98
/* Bekee */
42562
wikitext
text/x-wiki
===Nkọwa===
[[Usòrò:Follow up Edit-A-Thon For Corp Members 4.jpg|thumb|áká_ịậnạ|I rüwa Esomchi]]
Esomchi pụtara na esom Chukwu na-ga
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Esomchi bu aha mmadụ na aza na ala igbo
===Mkpọpụta===
Esomchi
[[File:LL-Q33578 (ibo)-Iwuala chisom-Esomchi.wav|LL-Q33578 (ibo)-Iwuala chisom-Esomchi]]
===Olumba===
Esomchukwu
===Ntụgharị===
===Bekee===
Walking with the lord/ I follow God
[[Òtù:Wiki Loves Names]]
0nkn07k5x6q4o7k2rs6upqfqixngti4
Ezennaya
0
590
42566
42287
2026-06-23T13:50:31Z
Senator Choko
98
/* Bekee */
42566
wikitext
text/x-wiki
'''EZENNAYA'''
==Nkọwa==
[[Usòrò:The King of Tonga With His Baby.jpg|thumb|áká_ịkẹngạ|I rüwa Ezennaya (nkeji)]]
Nke a bụ aha putara na Nna ya bụ eze.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Aha m bụ Ezennaya
#Ọ sị na aha ya bụ '''EZENNAYA'''.
===Mkpọpụta===
Ezennaya
[[File:LL-Q33578 (ibo)-Iwuala chisom-Ezennaya.wav|LL-Q33578 (ibo)-Iwuala chisom-Ezennaya]]
===Olumba===
==Ntụghari n'asụsụ ọzọ==
===Bekee===
Father of Kings
[[Òtù:Wiki Loves Names]]
gpxtfmkwlf96afgqnfyowmhfyfobzqz
Ezeugo
0
593
42570
42285
2026-06-23T13:50:57Z
Senator Choko
98
/* Bekee */
42570
wikitext
text/x-wiki
==Nkọwa==
[[Usòrò:King of asia from Cosmographia (1544) by Sebastian Münster.jpg|thumb|áká_ịkẹngạ|I rüwa Ezeugo (nkeji)]]
ke a bụ aha enwere na ala Igbo. Ọ putara na chineke mere mmadu eze na udi ya.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Aha m bụ Ezeugo
===Mkpọpụta===
Ezeugo
[[File:LL-Q33578 (ibo)-Iwuala chisom-Ezeugo.wav|LL-Q33578 (ibo)-Iwuala chisom-Ezeugo]]
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
King of Eagle
[[Òtù:Wiki Loves Names]]
a2djpcljf32fj21ui2lj77h6rix81fr
Ezinne
0
599
42575
42282
2026-06-23T13:52:04Z
Senator Choko
98
/* Bekee */
42575
wikitext
text/x-wiki
'''EZINNE'''
==Nkọwa==
[[Usòrò:Good Housekeeping 1964 - Mother Daughter Hairdos! (2474281739).jpg|thumb|áká_ịkẹngạ|I rüwa Ezinne (nkeji)]]
Nke a bụ aha nke na egosi ezigbo nne na agwa ọma ya.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Ezinne mara mma
#Ezinne bụ ezigbo aha na àlà igbo
===mkpọpụta===
Ezinne
[[File:LL-Q33578 (ibo)-Iwuala chisom-Ezinne.wav|LL-Q33578 (ibo)-Iwuala chisom-Ezinne]]
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Good mother
[[Òtù:Wiki Loves Names]]
qlpqdmhbk5lttug5prcm579sgvw5gun
Fiọ fiọ
0
602
42527
22522
2026-06-23T13:39:09Z
Senator Choko
98
/* ọmụmaatụ */
42527
wikitext
text/x-wiki
"""Fiọ Fiọ"""
===nkọwa===
Nke a bụ nri dika ngwa enwere na ala Igbo.
===nkejiasụsụ===
Aha
===ọmụmaatụ===
*A chọrọ m ịrị Fiọ fiọ
===mkpọpụta===
F/io/f/io
[[File:LL-Q33578 (ibo)-Iwuala chisom-Fio fio.wav|LL-Q33578 (ibo)-Iwuala chisom-Fio fio]]
===olumba===
===ntụghari===
===bekee===
pigeon pea
[[Òtù:wiki loves names]]
6pt3r99wggaholg5sm324uc20a4farz
42530
42527
2026-06-23T13:39:58Z
Senator Choko
98
Senator Choko moved page [[Fio fio]] to [[Fiọ fiọ]]: Misspelled title
42527
wikitext
text/x-wiki
"""Fiọ Fiọ"""
===nkọwa===
Nke a bụ nri dika ngwa enwere na ala Igbo.
===nkejiasụsụ===
Aha
===ọmụmaatụ===
*A chọrọ m ịrị Fiọ fiọ
===mkpọpụta===
F/io/f/io
[[File:LL-Q33578 (ibo)-Iwuala chisom-Fio fio.wav|LL-Q33578 (ibo)-Iwuala chisom-Fio fio]]
===olumba===
===ntụghari===
===bekee===
pigeon pea
[[Òtù:wiki loves names]]
6pt3r99wggaholg5sm324uc20a4farz
42541
42530
2026-06-23T13:42:57Z
Senator Choko
98
42541
wikitext
text/x-wiki
"""Fiọ Fiọ"""
===Nkọwa===
Nke a bụ nri dika ngwa enwere na ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
*A chọrọ m ịrị Fiọ fiọ
===Mkpọpụta===
F/io/f/io
[[File:LL-Q33578 (ibo)-Iwuala chisom-Fio fio.wav|LL-Q33578 (ibo)-Iwuala chisom-Fio fio]]
===Olumba===
===Ntụghari===
===Bekee===
[[:en:pigeon_pea|pigeon pea]]
[[Òtù: Wiki Loves Names]]
qlbb6ry8q3ywyvr8axjtkxr1g7q8ki7
42582
42541
2026-06-23T13:53:49Z
Akwugo
14
/* Ntụghari */
42582
wikitext
text/x-wiki
"""Fiọ Fiọ"""
===Nkọwa===
Nke a bụ nri dika ngwa enwere na ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
*A chọrọ m ịrị Fiọ fiọ
===Mkpọpụta===
F/io/f/io
[[File:LL-Q33578 (ibo)-Iwuala chisom-Fio fio.wav|LL-Q33578 (ibo)-Iwuala chisom-Fio fio]]
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
[[:en:pigeon_pea|pigeon pea]]
[[Òtù: Wiki Loves Names]]
drytpz4jgywnp609bvy0640la35k9m2
42584
42582
2026-06-23T13:54:25Z
Akwugo
14
/* Nkọwa */
42584
wikitext
text/x-wiki
"""Fiọ Fiọ"""
===Nkọwa===
Nke a bụ nri dịka ngwa enwere na ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
*A chọrọ m ịrị Fiọ fiọ
===Mkpọpụta===
F/io/f/io
[[File:LL-Q33578 (ibo)-Iwuala chisom-Fio fio.wav|LL-Q33578 (ibo)-Iwuala chisom-Fio fio]]
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
[[:en:pigeon_pea|pigeon pea]]
[[Òtù: Wiki Loves Names]]
dcx991a0u2r4b3b9vnbrfazmmbnofa7
Garri
0
610
42583
16678
2026-06-23T13:54:23Z
Senator Choko
98
/* bekee */
42583
wikitext
text/x-wiki
"""Garri"""
===nkọwa===
[[Usòrò:Nmili Ukwa A drink from special ukwa porridge from Igbo land Eastern part of Nigeria.jpg|thumb|áká_ịkẹngạ|I rüwa Garri (nkeji)]]
Nke a bụ otụ na ime nri enwere na ala Igbo.
===nkejiasụsụ===
Nkowaaha
===ọmụmaatụ===
Garri a Mara mma na anya.
===mkpọpụta===
Ga/rri
===olumba===
===ntụghari===
===bekee===
Cassava flour
[[Òtù:Wiki Loves Names]]
b3cnyo4fhkq38ufb806oeu1csk8ke9w
42592
42583
2026-06-23T13:58:10Z
10kdollz
1003
42592
wikitext
text/x-wiki
===Nkọwa===
[[Usòrò:Nmili Ukwa A drink from special ukwa porridge from Igbo land Eastern part of Nigeria.jpg|thumb|áká_ịkẹngạ|I rüwa Garri (nkeji)]]
Nke a bụ otụ na ime nri enwere na ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Garri a Mara mma na anya.
===Mkpọpụta===
Ga/rri
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Cassava flour
[[Òtù:Wiki Loves Names]]
ft359k8ikuwkprro2yb4pqj1o45hujz
42621
42592
2026-06-23T14:05:48Z
Senator Choko
98
42621
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụ na ime nri enwere na ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Garri a Mara mma na anya.
===Mkpọpụta===
Ga/rri
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Cassava flour
[[Òtù:Wiki Loves Names]]
r810jjkxc0cv4vgef44e4qayuu6t4j7
Gwongworo
0
621
42568
17450
2026-06-23T13:50:42Z
10kdollz
1003
42568
wikitext
text/x-wiki
===Nkọwa===
[[Usòrò:Fuel truck tanzania.jpg|thumb|áká_ịkẹngạ|I rüwa Gwongworo (nkeji)]]
Nke a bụ ugboala nke eji ebuko otutu ihe di iche iche.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Gwongworo a ebuka.
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Gwongworo.wav|thumb|Gwongworo ]]
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Truck
[[Òtù:Wiki Loves Names]]
[[òtù:Aha]]
g1zckfn1zt5wqsiocjhbm2p6glbweoh
Hanyechukwu
0
622
42604
17453
2026-06-23T14:02:30Z
10kdollz
1003
42604
wikitext
text/x-wiki
===Nkọwa===
[[Usòrò:Worshipping-god-2101347.jpg|thumb|áká_ịkẹngạ|I rüwa Hanyechukwu (nkeji)]]
Hanyechukwu pụtara ka anyị halu Chukwu ihe nile
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Hanyechukwu bu aha ana-kpo mmadụ na ala igbo
===Mkpoputa===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Hanyechukwu.wav|áká_èkpè|thumb|Hanyechukwu ]]
===Olumba===
Hanyechi
Haluchi
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Leave it for God
===category===
[[Òtù:Wiki Loves Names]]
1f70vm139b1ii4v0k5v16h2h1gupo5m
42641
42604
2026-06-23T14:08:46Z
Senator Choko
98
/* Mkpoputa */
42641
wikitext
text/x-wiki
===Nkọwa===
[[Usòrò:Worshipping-god-2101347.jpg|thumb|áká_ịkẹngạ|I rüwa Hanyechukwu (nkeji)]]
Hanyechukwu pụtara ka anyị halu Chukwu ihe nile
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Hanyechukwu bu aha ana-kpo mmadụ na ala igbo
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Hanyechukwu.wav|áká_èkpè|thumb|Hanyechukwu ]]
===Olumba===
Hanyechi
Haluchi
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Leave it for God
===category===
[[Òtù:Wiki Loves Names]]
cu2gcddu3ks6xr9wdzslk3liwr3m68s
42655
42641
2026-06-23T14:11:05Z
Senator Choko
98
42655
wikitext
text/x-wiki
==Nkọwa==
[[Usòrò:Worshipping-god-2101347.jpg|thumb|áká_ịkẹngạ|I rüwa Hanyechukwu (nkeji)]]
*Hanyechukwu pụtara ka anyị halu Chukwu ihe nile
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
*Hanyechukwu bu aha ana-kpo mmadụ na ala igbo
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Hanyechukwu.wav|áká_èkpè|thumb|Hanyechukwu ]]
===Olumba===
*Hanyechi
*Haluchi
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Leave it for God
[[Òtù:Wiki Loves Names]]
jqsb28foi8i08l4igayo7br3pgrjdcm
42657
42655
2026-06-23T14:12:20Z
Senator Choko
98
/* NkejiAsụsụ */
42657
wikitext
text/x-wiki
==Nkọwa==
[[Usòrò:Worshipping-god-2101347.jpg|thumb|áká_ịkẹngạ|I rüwa Hanyechukwu (nkeji)]]
*Hanyechukwu pụtara ka anyị halu Chukwu ihe nile
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
*Hanyechukwu bu aha ana-kpo mmadụ na ala igbo
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Hanyechukwu.wav|áká_èkpè|thumb|Hanyechukwu ]]
===Olumba===
*Hanyechi
*Haluchi
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Leave it for God
[[Òtù:Wiki Loves Names]]
ix0umk50o24xh29jgq48g37jm306jng
Jinwannu
0
796
42503
23015
2026-06-23T13:34:05Z
IfyClassique
950
42503
wikitext
text/x-wiki
"""Jinwannu"""
===Nkọwa===
Nke a bụ otụ na ime nri enwere na ala Igbo.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Jinwannu Mara mma na ahu.
===Mkpọpụta===
[[File:Ig-Jinwannu.ogg|thumb|Ig-Jinwannu|thumb|áká_èkpè|alt=Jinwannu|Jinwannu]]
Ji/nwa/n/nu
===Olumba===
===Ntụghari===
===Bekee===
Potato
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
#REDIRECT [[Jinwannụnụ]]
qzshfgcaief7s7xgvzsttnsvcbp7zbe
42505
42503
2026-06-23T13:34:56Z
IfyClassique
950
/* Ntụghari */
42505
wikitext
text/x-wiki
"""Jinwannu"""
===Nkọwa===
Nke a bụ otụ na ime nri enwere na ala Igbo.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Jinwannu Mara mma na ahu.
===Mkpọpụta===
[[File:Ig-Jinwannu.ogg|thumb|Ig-Jinwannu|thumb|áká_èkpè|alt=Jinwannu|Jinwannu]]
Ji/nwa/n/nu
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
Nduku
===Bekee===
Potato
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
#REDIRECT [[Jinwannụnụ]]
ftbeg5ooqh5hgfvaxgxaz47nv19dm00
42511
42505
2026-06-23T13:36:14Z
IfyClassique
950
/* Nkọwa */
42511
wikitext
text/x-wiki
"""Jinwannu"""
===Nkọwa===
Nke a bụ otu n'ime nri enwere n'ala Igbo.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Jinwannu Mara mma na ahu.
===Mkpọpụta===
[[File:Ig-Jinwannu.ogg|thumb|Ig-Jinwannu|thumb|áká_èkpè|alt=Jinwannu|Jinwannu]]
Ji/nwa/n/nu
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
Nduku
===Bekee===
Potato
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
#REDIRECT [[Jinwannụnụ]]
pmsqklvt2ewvy8ph5jeyage0mqt6ito
42519
42511
2026-06-23T13:37:22Z
IfyClassique
950
/* Bekee */
42519
wikitext
text/x-wiki
"""Jinwannu"""
===Nkọwa===
Nke a bụ otu n'ime nri enwere n'ala Igbo.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Jinwannu Mara mma na ahu.
===Mkpọpụta===
[[File:Ig-Jinwannu.ogg|thumb|Ig-Jinwannu|thumb|áká_èkpè|alt=Jinwannu|Jinwannu]]
Ji/nwa/n/nu
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
Nduku
===Bekee===
Potato
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
89hz638t296e018soezgk4g1f3vv0oy
42520
42519
2026-06-23T13:37:47Z
IfyClassique
950
42520
wikitext
text/x-wiki
"""Jinwannu"""
#REDIRECT [[Jinwannụnụ]]
===Nkọwa===
Nke a bụ otu n'ime nri enwere n'ala Igbo.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Jinwannu Mara mma na ahu.
===Mkpọpụta===
[[File:Ig-Jinwannu.ogg|thumb|Ig-Jinwannu|thumb|áká_èkpè|alt=Jinwannu|Jinwannu]]
Ji/nwa/n/nu
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
Nduku
===Bekee===
Potato
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
sxh34nlahc0lbpdzgn3bi5aotapcn7l
42593
42520
2026-06-23T13:58:33Z
Akwugo
14
Redirected page to [[Jinwannụnụ]]
42593
wikitext
text/x-wiki
#REDIRECT[[Jinwannụnụ]]
===Nkọwa===
Nke a bụ otu n'ime nri enwere n'ala Igbo.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Jinwannu Mara mma na ahu.
===Mkpọpụta===
[[File:Ig-Jinwannu.ogg|thumb|Ig-Jinwannu|thumb|áká_èkpè|alt=Jinwannu|Jinwannu]]
Ji/nwa/n/nu
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
Nduku
===Bekee===
Potato
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
ibknom6ufi1bw769m3o6ln5guy51mxu
42595
42593
2026-06-23T13:59:02Z
Akwugo
14
/* Ntụgharị n'asụsụ ọzọ */
42595
wikitext
text/x-wiki
#REDIRECT[[Jinwannụnụ]]
===Nkọwa===
Nke a bụ otu n'ime nri enwere n'ala Igbo.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Jinwannu Mara mma na ahu.
===Mkpọpụta===
[[File:Ig-Jinwannu.ogg|thumb|Ig-Jinwannu|thumb|áká_èkpè|alt=Jinwannu|Jinwannu]]
Ji/nwa/n/nu
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
Nduku
===Bekee===
Potato
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
rhqqsmo16ktdntrb4a8gpruu0vb0x1h
Kaobichukwume
0
811
42608
22977
2026-06-23T14:04:10Z
10kdollz
1003
42608
wikitext
text/x-wiki
===Nkọwa===
Kaobichukwume pụtara na, ka ihe dị Chukwu n'obi mëe
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
kaobichukwume bu aha ana-kpo mmadụ na ala igbo
===Mkpoputa===
[[File:Ig-Kaobichukwume.ogg|thumb|Ig-Kaobichukwume|thumb|áká_èkpè|alt=Kaobichukwume |Kaobichukwume]]
Kaobichukwumé
===Olumba===
Kobichukwume
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Let the will of God / heart of God be done
===Category===
[[Òtù:Wiki Loves Names]]
ae1u8dsgbd5voyjm2v2y983uwzsw51s
Kenechukwu
0
823
42625
42147
2026-06-23T14:06:34Z
10kdollz
1003
42625
wikitext
text/x-wiki
===Nkọwa===
Kenechukwu pụtara na ka anyi na ekene chineke
===Nkejiasusu===
Aha
===Ọmụmaatụ===
Kenechukwu bụ aha haa na aza na ala Igbo
===Mkpoputa===
[[File:Ig-kenechukwu.ogg|thumb|Ig-kenechukwu|thumb|áká_èkpè|alt=Kenechukwu |Kenechukwu]]
Kenechukwu
===Olumba===
Kelechukwu
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
https://en.m.wiktionary.org/wiki/thank_god
===Yoruba===
Adupe lowo olorun
===Hausa===
Godiya ga allah
===Category===
[[Òtù:Wiki Loves Names]]
[[Òtù:aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
5k74rdp16ftvd8yubmea5b689yi4mov
42633
42625
2026-06-23T14:07:33Z
10kdollz
1003
/* Ntụgharị n'asụsụ ọzọ */
42633
wikitext
text/x-wiki
===Nkọwa===
Kenechukwu pụtara na ka anyi na ekene chineke
===Nkejiasusu===
Aha
===Ọmụmaatụ===
Kenechukwu bụ aha haa na aza na ala Igbo
===Mkpoputa===
[[File:Ig-kenechukwu.ogg|thumb|Ig-kenechukwu|thumb|áká_èkpè|alt=Kenechukwu |Kenechukwu]]
Kenechukwu
===Olumba===
Kelechukwu
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.m.wiktionary.org/wiki/thank_god ThankGod]
===Yoruba===
Adupe lowo olorun
===Hausa===
Godiya ga allah
===Category===
[[Òtù:Wiki Loves Names]]
[[Òtù:aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
ahjkjxb3vojum6mt8w2h0xt4ta1hjkl
Kpakwụrụkpá
0
833
42647
3258
2026-06-23T14:09:55Z
10kdollz
1003
42647
wikitext
text/x-wiki
===Nkọwa===
Kpakwụrụkpá bụ ọya
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
Kpakwụrụkpá bụ ọ́ya ihe ọdụdọ́
===Mkpọputa===
Kpakwụrụkpá
===Olumba===
Akwụkwụ
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
*Epilepsy
*Seizure
[https://en.wiktionary.org/wiki Epilepsy]
[[Òtù:wiki loves names]]
r51s5pveaqb55yj0elm3he5b424wiec
42651
42647
2026-06-23T14:10:24Z
10kdollz
1003
42651
wikitext
text/x-wiki
===Nkọwa===
Kpakwụrụkpá bụ ọya
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
Kpakwụrụkpá bụ ọ́ya ihe ọdụdọ́
===Mkpọputa===
Kpakwụrụkpá
===Olumba===
Akwụkwụ
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
*Epilepsy
*Seizure
[https://en.wiktionary.org/wiki Epilepsy]
[[Òtù:Wiki Loves Names]]
2x5qui6jeen2bllkzstp6df4d16qun8
Lotachukwu
0
848
42658
29472
2026-06-23T14:12:49Z
10kdollz
1003
42658
wikitext
text/x-wiki
===Nkọwa===
Lotachukwu bụ aha ndị igbo a na-agụ mmadụ nke pụtara ka a na-elota Chukwu mgbe nile
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
# Lotachukwu bu aha a na-aza n'ala igbo
# Lotachukwu bụ aha enyi m nwoke
===Mkpọputa===
[[File:Ig-Lotachukwu.ogg|Ig-Lotachukwu]]
===Olumba===
# ChetaChukw(Imo)
# RotaChukwu(Anambra)
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Remember God
===Category===
[[Òtù:Aha]]
[[Otú:Wiki Loves Names]]
[[Otú:Mmadụ]]
[[Òtù:Igbo Noun Project]]
th7juxuc9822pf874xgahhlv6xb1i4j
42725
42658
2026-06-23T14:30:20Z
Senator Choko
98
/* Category */
42725
wikitext
text/x-wiki
===Nkọwa===
Lotachukwu bụ aha ndị igbo a na-agụ mmadụ nke pụtara ka a na-elota Chukwu mgbe nile
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
# Lotachukwu bu aha a na-aza n'ala igbo
# Lotachukwu bụ aha enyi m nwoke
===Mkpọputa===
[[File:Ig-Lotachukwu.ogg|Ig-Lotachukwu]]
===Olumba===
# ChetaChukw(Imo)
# RotaChukwu(Anambra)
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Remember God
[[Òtù:Aha]]
[[Otú:Wiki Loves Names]]
[[Otú:Mmadụ]]
[[Òtù:Igbo Noun Project]]
90wszt265y0626z016amkgbgzycjsbt
42727
42725
2026-06-23T14:30:47Z
Senator Choko
98
/* NkejiAsụsụ */
42727
wikitext
text/x-wiki
===Nkọwa===
Lotachukwu bụ aha ndị igbo a na-agụ mmadụ nke pụtara ka a na-elota Chukwu mgbe nile
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
# Lotachukwu bu aha a na-aza n'ala igbo
# Lotachukwu bụ aha enyi m nwoke
===Mkpọputa===
[[File:Ig-Lotachukwu.ogg|Ig-Lotachukwu]]
===Olumba===
# ChetaChukw(Imo)
# RotaChukwu(Anambra)
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Remember God
[[Òtù:Aha]]
[[Otú:Wiki Loves Names]]
[[Otú:Mmadụ]]
[[Òtù:Igbo Noun Project]]
dw7cs1jbyrawe5iq44q1dfftxpengrg
42729
42727
2026-06-23T14:31:14Z
Senator Choko
98
/* Nkọwa */
42729
wikitext
text/x-wiki
==Nkọwa==
Lotachukwu bụ aha ndị igbo a na-agụ mmadụ nke pụtara ka a na-elota Chukwu mgbe nile
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
# Lotachukwu bu aha a na-aza n'ala igbo
# Lotachukwu bụ aha enyi m nwoke
===Mkpọputa===
[[File:Ig-Lotachukwu.ogg|Ig-Lotachukwu]]
===Olumba===
# ChetaChukw(Imo)
# RotaChukwu(Anambra)
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Remember God
[[Òtù:Aha]]
[[Otú:Wiki Loves Names]]
[[Otú:Mmadụ]]
[[Òtù:Igbo Noun Project]]
qgnim1v5s78sdqcygv6nh5yggnlhnc6
Lotanna
0
849
42660
3297
2026-06-23T14:13:15Z
Senator Choko
98
/* olumba */
42660
wikitext
text/x-wiki
Lotanna
===Nkọwa===
Lotanna pụtara na e ga na echeta nna
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Lotanna bu aha mmadụ na aza na ala igbo
===Mkpoputa===
Lotanna
===Olumba===
*Chetanna
===Ntụgharị===
===Bekee===
Remember the father
===category===
[[Òtù:wiki loves names]]
7cfm22zdv30gcdco040u4lqqyronxsk
42661
42660
2026-06-23T14:14:02Z
Senator Choko
98
/* Ntụgharị */
42661
wikitext
text/x-wiki
Lotanna
===Nkọwa===
Lotanna pụtara na e ga na echeta nna
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Lotanna bu aha mmadụ na aza na ala igbo
===Mkpoputa===
Lotanna
===Olumba===
*Chetanna
==Ntụgharị n'asụsụ==
===Bekee===
Remember the father
===category===
[[Òtù:wiki loves names]]
4naz8yiuoiblteczcdu25cwuw9tulc9
42662
42661
2026-06-23T14:15:04Z
Senator Choko
98
/* Nkọwa */
42662
wikitext
text/x-wiki
Lotanna
==Nkọwa==
Lotanna pụtara na e ga na-echeta nna
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Lotanna bu aha mmadụ na aza na ala igbo
===Mkpoputa===
Lotanna
===Olumba===
*Chetanna
==Ntụgharị n'asụsụ==
===Bekee===
Remember the father
===category===
[[Òtù:wiki loves names]]
pf14kfa26zjo8wg8a6gfay9a8c1rnq0
42668
42662
2026-06-23T14:16:27Z
Senator Choko
98
/* category */
42668
wikitext
text/x-wiki
Lotanna
==Nkọwa==
Lotanna pụtara na e ga na-echeta nna
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Lotanna bu aha mmadụ na aza na ala igbo
===Mkpoputa===
Lotanna
===Olumba===
*Chetanna
==Ntụgharị n'asụsụ==
===Bekee===
Remember the father
[[Òtù: Wiki Loves Names]]
jwgk4yfch8z4garcpcyrjeh2ziv0aiu
42669
42668
2026-06-23T14:16:42Z
10kdollz
1003
42669
wikitext
text/x-wiki
===Nkọwa===
Lotanna pụtara na e ga na-echeta nna
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Lotanna bu aha mmadụ na aza na ala igbo
===Mkpoputa===
Lotanna
===Olumba===
*Chetanna
==Ntụgharị n'asụsụ==
===Bekee===
Remember the father
[[Òtù: Wiki Loves Names]]
qt02nxigb00s4442jh1re2cy0r6ysoy
42683
42669
2026-06-23T14:21:04Z
Senator Choko
98
/* NkejiAsụsụ */
42683
wikitext
text/x-wiki
===Nkọwa===
Lotanna pụtara na e ga na-echeta nna
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Lotanna bu aha mmadụ na aza na ala igbo
===Mkpoputa===
Lotanna
===Olumba===
*Chetanna
==Ntụgharị n'asụsụ==
===Bekee===
Remember the father
[[Òtù: Wiki Loves Names]]
gu9jjxch6xipv3qnvsf8kzbb7eh2idz
42685
42683
2026-06-23T14:21:20Z
Senator Choko
98
/* Nkọwa */
42685
wikitext
text/x-wiki
==Nkọwa==
Lotanna pụtara na e ga na-echeta nna
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Lotanna bu aha mmadụ na aza na ala igbo
===Mkpoputa===
Lotanna
===Olumba===
*Chetanna
==Ntụgharị n'asụsụ==
===Bekee===
Remember the father
[[Òtù: Wiki Loves Names]]
4qpq750krgtvh6wj2tyl6lejsvhaf6k
42689
42685
2026-06-23T14:21:57Z
Senator Choko
98
/* Mkpoputa */
42689
wikitext
text/x-wiki
==Nkọwa==
Lotanna pụtara na e ga na-echeta nna
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Lotanna bu aha mmadụ na aza na ala igbo
===Mkpọpụta===
Lotanna
===Olumba===
*Chetanna
==Ntụgharị n'asụsụ==
===Bekee===
Remember the father
[[Òtù: Wiki Loves Names]]
dah9alalyfu5uknmmsmp1ft3vyb0ow2
Mmiri ara
0
969
42653
22766
2026-06-23T14:10:31Z
IfyClassique
950
42653
wikitext
text/x-wiki
Mmiri Ara
===Nkọwa===
Mmiri ara bụ mmiri na-agbapụta n'ara nwanyị. Ọ bụ nri a na-enye ụmụntakịrị a mụrụ ọhụrụ.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Mmiri ara nwanyị mụrụ nwa ọhụrụ kwesịrị ịgba ofuma.
===Mkpọpụta===
[[File:Ig-Mmiri_ara.ogg]]
===Olumba===
Mmili ara (Anambra)
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Breast milk
[[Òtù:Wiki Loves Names]]
[[Category: Aha]]
[[Category: Mmadụ]]
64gpgyjf58lt4wphe6ggzvut8c8olut
Nwosu
0
1223
42361
16839
2026-06-23T12:37:26Z
Egbezomo Florence Eguono
1904
E wepurum ihe na ekwesighi I di nà ya.
42361
wikitext
text/x-wiki
===Nkọwa===
Nke a putara nwa a muru na osu oge mgbe ochie.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Aha m bụ Nwosu.
===Mkpọpụta===
N/w/o/su
[[Usòrò:LL-Q33578 (ibo)-Iwuala Lucy-Nwosu.wav|left|thumb|Nwosu]]
===Olumba===
===Ntụghari===
===bekee===
Outcast child
[[Òtù:wiki loves names]]
32f8t516qfrsop34algwe0c4v1oyjj2
Obianamma
0
1254
42311
23096
2026-06-23T12:04:26Z
IfyClassique
950
42311
wikitext
text/x-wiki
Obianamma
===Nkowa===
Obianamma pụtara na onye a biara mgbe ihe di n'uju.
===Nkejiasusu===
Aha
===ọmụmaatụ===
Obianamma bu aha ejiri mara mmadu na ala igbo
===Mkpọpụta===
ọ́bianamma
[[File:LL-Q33578 (ibo)-Aminwa 21-Obianamma.wav|LL-Q33578 (ibo)-Aminwa 21-Obianamma]]
===Olumba===
obialunamma
Obianuju
obiageli
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
A child that came in time of wealth.
qhd09iyxi3n0nuezik5a72i8r5h3yyb
42312
42311
2026-06-23T12:04:52Z
IfyClassique
950
/* Ntụgharị n'asụsụ ọzọ */
42312
wikitext
text/x-wiki
Obianamma
===Nkowa===
Obianamma pụtara na onye a biara mgbe ihe di n'uju.
===Nkejiasusu===
Aha
===ọmụmaatụ===
Obianamma bu aha ejiri mara mmadu na ala igbo
===Mkpọpụta===
ọ́bianamma
[[File:LL-Q33578 (ibo)-Aminwa 21-Obianamma.wav|LL-Q33578 (ibo)-Aminwa 21-Obianamma]]
===Olumba===
obialunamma
Obianuju
obiageli
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
A child that came in time of wealth.
0mbdrb9kmoso5y3k4msyx7yzirfoppg
42326
42312
2026-06-23T12:13:20Z
IfyClassique
950
42326
wikitext
text/x-wiki
Obianamma
===Nkowa===
Obianamma pụtara na onye a biara mgbe ihe di n'uju.
===Nkejiasusu===
Aha
===ọmụmaatụ===
Obianamma bu aha ejiri mara mmadu na ala igbo
===Mkpọpụta===
ọ́bianamma
[[File:LL-Q33578 (ibo)-Aminwa 21-Obianamma.wav|LL-Q33578 (ibo)-Aminwa 21-Obianamma]]
===Olumba===
obialunamma
Obianuju
obiageli
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
A child that came in time of wealth.
[[Category: Aha]]
[[Category: Mmadụ]]
5q8gbts2rm5ykw2zj0uug7zrrhns07j
42414
42326
2026-06-23T12:59:43Z
IfyClassique
950
42414
wikitext
text/x-wiki
Obianamma
===Nkowa===
Obianamma pụtara na onye a biara mgbe ihe di n'uju.
===Nkejiasusu===
Aha
===ọmụmaatụ===
Obianamma bu aha ejiri mara mmadu na ala igbo
===Mkpọpụta===
ọ́bianamma
[[File:LL-Q33578 (ibo)-Aminwa 21-Obianamma.wav|LL-Q33578 (ibo)-Aminwa 21-Obianamma]]
===Olumba===
obialunamma
Obianuju
obiageli
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
A child that came in time of wealth.
[[Category: Wiki Loves Names]]
[[Category: Aha]]
[[Category: Mmadụ]]
8rh3ym5ktvubzobvj69g5jrbs22zhxc
Ọbọgwu
0
1265
42381
29777
2026-06-23T12:47:56Z
Egbezomo Florence Eguono
1904
E wepurum ihe na ekwesighi I di nà ya
42381
wikitext
text/x-wiki
===nkọwa===
Nke a bụ otụ na ime anumanu chineke Nna kere na uwa.
===nkejiasụsụ===
Nkowaaha
===ọmụmaatụ===
Obogwu a Mara mma.
===mkpọpụta===
O/bo/gwu
[[File:LL-Q33578 (ibo)-Aminwa 21-Obogwu.wav|LL-Q33578 (ibo)-Aminwa 21-Obogwu]]
===olumba===
===ntụghari===
===bekee===
Duck
[[Òtù:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ụlọ]]
[[Òtù:Igbo Noun Project]]
m3aig8wbb0okld4ck9be9ot991huuli
42385
42381
2026-06-23T12:50:59Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42385
wikitext
text/x-wiki
===nkọwa===
Nke a bụ otụ na ime anumanu chineke Nna kere na uwa.
===nkejiasụsụ===
Nkowaaha
===ọmụmaatụ===
Obogwu a mara mma.
===mkpọpụta===
O/bo/gwu
[[File:LL-Q33578 (ibo)-Aminwa 21-Obogwu.wav|LL-Q33578 (ibo)-Aminwa 21-Obogwu]]
===olumba===
===ntụghari===
===bekee===
Duck
[[Òtù:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ụlọ]]
[[Òtù:Igbo Noun Project]]
nfvj6l8nf5f40plucjm3loznaag94sv
42449
42385
2026-06-23T13:15:20Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42449
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụ na ime anumanu chineke Nna kere na uwa.
===nkejiasụsụ===
Nkowaaha
===ọmụmaatụ===
Obogwu a mara mma.
===mkpọpụta===
O/bo/gwu
[[File:LL-Q33578 (ibo)-Aminwa 21-Obogwu.wav|LL-Q33578 (ibo)-Aminwa 21-Obogwu]]
===olumba===
===ntụghari===
===bekee===
Duck
[[Òtù:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ụlọ]]
[[Òtù:Igbo Noun Project]]
oibzvpq3qif88zfgq9tc41dpusvalld
42451
42449
2026-06-23T13:16:15Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42451
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụ na ime anumanu chineke Nna kere na uwa.
===Nkejiasụsụ===
Nkowaaha
===ọmụmaatụ===
Obogwu a mara mma.
===mkpọpụta===
O/bo/gwu
[[File:LL-Q33578 (ibo)-Aminwa 21-Obogwu.wav|LL-Q33578 (ibo)-Aminwa 21-Obogwu]]
===olumba===
===ntụghari===
===bekee===
Duck
[[Òtù:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ụlọ]]
[[Òtù:Igbo Noun Project]]
r1q9th920che60b2inwbw5gx3i1aayp
42454
42451
2026-06-23T13:17:03Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42454
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụ na ime anumanu chineke Nna kere na uwa.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Obogwu a mara mma.
===mkpọpụta===
O/bo/gwu
[[File:LL-Q33578 (ibo)-Aminwa 21-Obogwu.wav|LL-Q33578 (ibo)-Aminwa 21-Obogwu]]
===olumba===
===ntụghari===
===bekee===
Duck
[[Òtù:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ụlọ]]
[[Òtù:Igbo Noun Project]]
019ik266s1nvrgp0wjdj1hc35jj57ju
42458
42454
2026-06-23T13:17:46Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42458
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụ na ime anumanu chineke Nna kere na uwa.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Obogwu a mara mma.
===Mkpọpụta===
O/bo/gwu
[[File:LL-Q33578 (ibo)-Aminwa 21-Obogwu.wav|LL-Q33578 (ibo)-Aminwa 21-Obogwu]]
===olumba===
===ntụghari===
===bekee===
Duck
[[Òtù:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ụlọ]]
[[Òtù:Igbo Noun Project]]
dy1nom0gcpkoik49ipk14m1y9ghgl13
42460
42458
2026-06-23T13:18:45Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42460
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụ na ime anumanu chineke Nna kere na uwa.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Obogwu a mara mma.
===Mkpọpụta===
O/bo/gwu
[[File:LL-Q33578 (ibo)-Aminwa 21-Obogwu.wav|LL-Q33578 (ibo)-Aminwa 21-Obogwu]]
===Olumba===
===ntụghari===
===bekee===
Duck
[[Òtù:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ụlọ]]
[[Òtù:Igbo Noun Project]]
ler418fv52wnrp1xycd5785soj9lexn
42466
42460
2026-06-23T13:19:51Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42466
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụ na ime anumanu chineke Nna kere na uwa.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Obogwu a mara mma.
===Mkpọpụta===
O/bo/gwu
[[File:LL-Q33578 (ibo)-Aminwa 21-Obogwu.wav|LL-Q33578 (ibo)-Aminwa 21-Obogwu]]
===Olumba===
===Ntụghari===
===bekee===
Duck
[[Òtù:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ụlọ]]
[[Òtù:Igbo Noun Project]]
sv9lntmwbil0iw2g39vs426nrcmelv3
42468
42466
2026-06-23T13:20:34Z
Egbezomo Florence Eguono
1904
/* Bekee */
42468
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụ na ime anumanu chineke Nna kere na uwa.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Obogwu a mara mma.
===Mkpọpụta===
O/bo/gwu
[[File:LL-Q33578 (ibo)-Aminwa 21-Obogwu.wav|LL-Q33578 (ibo)-Aminwa 21-Obogwu]]
===Olumba===
===Ntụghari===
===Bekee===
Duck
[[Òtù:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ụlọ]]
[[Òtù:Igbo Noun Project]]
8zhjs0v3wz9usp0q0s7ii0d4fk3atbn
42473
42468
2026-06-23T13:21:52Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42473
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụ na ime anumanu Chineke Nna kere na uwa.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Obogwu a mara mma.
===Mkpọpụta===
O/bo/gwu
[[File:LL-Q33578 (ibo)-Aminwa 21-Obogwu.wav|LL-Q33578 (ibo)-Aminwa 21-Obogwu]]
===Olumba===
===Ntụghari===
===Bekee===
Duck
[[Òtù:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ụlọ]]
[[Òtù:Igbo Noun Project]]
emsa3069pmwriftqcbuv8drks3acl85
42481
42473
2026-06-23T13:25:51Z
Egbezomo Florence Eguono
1904
Emekwara
42481
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụ na ime anumanu Chineke Nna kere na uwa.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Obogwu a mara mma.
===Mkpọpụta===
O/bo/gwu
[[File:LL-Q33578 (ibo)-Aminwa 21-Obogwu.wav|LL-Q33578 (ibo)-Aminwa 21-Obogwu]]
===Olumba===
===Ntụghari===
===Bekee===
[[https://en.wiktionary.org/wiki/duck duck]]
[[Òtù:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Anụmanụ]]
[[Òtù:Anụ ụlọ]]
[[Òtù:Igbo Noun Project]]
4p3aapycjt38waom99ksxzlltqr5trw
Ochicha
0
1269
42590
23872
2026-06-23T13:57:52Z
Egbezomo Florence Eguono
1904
E wepurum ihe na ekwesighi i di nà ya
42590
wikitext
text/x-wiki
===nkọwa===
Nke a bụ obere ariri nke na agahari na ebe obula.
===nkejiasụsụ===
Aha
[[File:Blatta orientalis male from Botevgrad, Bulgaria 01.jpg|thumb|Blatta orientalis male from Botevgrad, Bulgaria]]
===ọmụmaatụ===
Ochicha nọ na ulọ m.
===mkpọpụta===
O/chi/cha
[[File:LL-Q33578 (ibo)-Aminwa 21-Ochicha.wav|LL-Q33578 (ibo)-Aminwa 21-Ochicha]]
===olumba===
===ntụghari===
===bekee===
Cockroach
[[Òtù:wiki loves names]]
kuveihjirdf27dvr3vojbjzx60lrbso
42606
42590
2026-06-23T14:03:12Z
Egbezomo Florence Eguono
1904
Mbiputa
42606
wikitext
text/x-wiki
===nkọwa===
Nke a bụ obere ariri nke na agahari na ebe obula.
===nkejiasụsụ===
Aha
[[File:Blatta orientalis male from Botevgrad, Bulgaria 01.jpg|thumb|Blatta orientalis male from Botevgrad, Bulgaria]]
===ọmụmaatụ===
Ochicha nọ na ulọ m.
===mkpọpụta===
O/chi/cha
[[File:LL-Q33578 (ibo)-Aminwa 21-Ochicha.wav|LL-Q33578 (ibo)-Aminwa 21-Ochicha]]
===olumba===
===ntụghari===
===bekee===
[[https://en.wiktionary.org/wiki/cockroach cockroach]]
[[Òtù:wiki loves names]]
52khxlo11rvke8v1q0fk6p9jw7p7pth
42611
42606
2026-06-23T14:04:31Z
Egbezomo Florence Eguono
1904
Mgbakwunye
42611
wikitext
text/x-wiki
===nkọwa===
Nke a bụ obere ariri nke na agahari na ebe obula.
===nkejiasụsụ===
Aha
[[File:Blatta orientalis male from Botevgrad, Bulgaria 01.jpg|thumb|Blatta orientalis male from Botevgrad, Bulgaria]]
===ọmụmaatụ===
Ochicha nọ na ulọ m.
===mkpọpụta===
O/chi/cha
[[File:LL-Q33578 (ibo)-Aminwa 21-Ochicha.wav|LL-Q33578 (ibo)-Aminwa 21-Ochicha]]
===olumba===
===Ntụghari na asụsụ ọzọ ===
===bekee===
[[https://en.wiktionary.org/wiki/cockroach cockroach]]
[[Òtù:wiki loves names]]
bjlhf29c8d86vtvsn2khdyg5qskci8h
42618
42611
2026-06-23T14:05:14Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42618
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ obere ariri nke na agahari na ebe obula.
===nkejiasụsụ===
Aha
[[File:Blatta orientalis male from Botevgrad, Bulgaria 01.jpg|thumb|Blatta orientalis male from Botevgrad, Bulgaria]]
===ọmụmaatụ===
Ochicha nọ na ulọ m.
===mkpọpụta===
O/chi/cha
[[File:LL-Q33578 (ibo)-Aminwa 21-Ochicha.wav|LL-Q33578 (ibo)-Aminwa 21-Ochicha]]
===olumba===
===Ntụghari na asụsụ ọzọ ===
===bekee===
[[https://en.wiktionary.org/wiki/cockroach cockroach]]
[[Òtù:wiki loves names]]
auqext9iztw1qxmszyhcb6bv6cudj6u
42624
42618
2026-06-23T14:06:33Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42624
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ obere ariri nke na agahari na ebe obula.
===Nkejiasụsụ===
Aha
[[File:Blatta orientalis male from Botevgrad, Bulgaria 01.jpg|thumb|Blatta orientalis male from Botevgrad, Bulgaria]]
===ọmụmaatụ===
Ochicha nọ na ulọ m.
===mkpọpụta===
O/chi/cha
[[File:LL-Q33578 (ibo)-Aminwa 21-Ochicha.wav|LL-Q33578 (ibo)-Aminwa 21-Ochicha]]
===olumba===
===Ntụghari na asụsụ ọzọ ===
===bekee===
[[https://en.wiktionary.org/wiki/cockroach cockroach]]
[[Òtù:wiki loves names]]
sot4sy8x32w9d6f92b9enefgbrjatm6
42635
42624
2026-06-23T14:07:48Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42635
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ obere ariri nke na agahari na ebe obula.
===Nkejiasụsụ===
Aha
[[File:Blatta orientalis male from Botevgrad, Bulgaria 01.jpg|thumb|Blatta orientalis male from Botevgrad, Bulgaria]]
===Ọmụmaatụ===
Ochicha nọ na ulọ m.
===mkpọpụta===
O/chi/cha
[[File:LL-Q33578 (ibo)-Aminwa 21-Ochicha.wav|LL-Q33578 (ibo)-Aminwa 21-Ochicha]]
===olumba===
===Ntụghari na asụsụ ọzọ ===
===bekee===
[[https://en.wiktionary.org/wiki/cockroach cockroach]]
[[Òtù:wiki loves names]]
a8kabq5zf45upkz4q1rckx3qoklq7sy
42640
42635
2026-06-23T14:08:37Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42640
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ obere ariri nke na agahari na ebe obula.
===Nkejiasụsụ===
Aha
[[File:Blatta orientalis male from Botevgrad, Bulgaria 01.jpg|thumb|Blatta orientalis male from Botevgrad, Bulgaria]]
===Ọmụmaatụ===
Ochicha nọ na ulọ m.
===Mkpọpụta===
O/chi/cha
[[File:LL-Q33578 (ibo)-Aminwa 21-Ochicha.wav|LL-Q33578 (ibo)-Aminwa 21-Ochicha]]
===olumba===
===Ntụghari na asụsụ ọzọ ===
===bekee===
[[https://en.wiktionary.org/wiki/cockroach cockroach]]
[[Òtù:wiki loves names]]
8kmdywvuylfsz16ruiaan8km7stclc2
42645
42640
2026-06-23T14:09:34Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42645
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ obere ariri nke na agahari na ebe obula.
===Nkejiasụsụ===
Aha
[[File:Blatta orientalis male from Botevgrad, Bulgaria 01.jpg|thumb|Blatta orientalis male from Botevgrad, Bulgaria]]
===Ọmụmaatụ===
Ochicha nọ na ulọ m.
===Mkpọpụta===
O/chi/cha
[[File:LL-Q33578 (ibo)-Aminwa 21-Ochicha.wav|LL-Q33578 (ibo)-Aminwa 21-Ochicha]]
===Olumba===
===Ntụghari na asụsụ ọzọ ===
===bekee===
[[https://en.wiktionary.org/wiki/cockroach cockroach]]
[[Òtù:wiki loves names]]
6t41udqm64yqg0jbi1osvunuw6359az
42650
42645
2026-06-23T14:10:21Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42650
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ obere ariri nke na agahari na ebe obula.
===Nkejiasụsụ===
Aha
[[File:Blatta orientalis male from Botevgrad, Bulgaria 01.jpg|thumb|Blatta orientalis male from Botevgrad, Bulgaria]]
===Ọmụmaatụ===
Ochicha nọ na ulọ m.
===Mkpọpụta===
O/chi/cha
[[File:LL-Q33578 (ibo)-Aminwa 21-Ochicha.wav|LL-Q33578 (ibo)-Aminwa 21-Ochicha]]
===Olumba===
===Ntụghari na asụsụ ọzọ ===
===Bekee===
[[https://en.wiktionary.org/wiki/cockroach cockroach]]
[[Òtù:wiki loves names]]
feiajlo92j3dubf8tcyin9t7kwspipt
Ochinanwata
0
1270
42747
22823
2026-06-23T14:58:25Z
Goodymeraj
496
/* Bekee */
42747
wikitext
text/x-wiki
"""Ochinanwata"""
===Nkọwa===
Ochinanwata bụ afa mmadụ pụtara onye kpatalu ego osisi mgbe ọ kadị na nwata.
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
Ochinanwata bụ afa mmadụ
===Mkpọputa===
Óchíńàǹwátá
[[File:LL-Q33578 (ibo)-Lezechima404-Ochinanwata.wav|LL-Q33578 (ibo)-Lezechima404-Ochinanwata]]
===Olumba===
Akụnwata
===Ntụgharị===
===Bekee===
[https://en.m.wiktionary.org/wiki/Early success]
[[Òtù:Wiki Loves Names]]
d5bv1wv2f7vmns4nz5q52x01ifmgyug
Ochịabụtọ
0
1271
42746
22836
2026-06-23T14:56:54Z
Goodymeraj
496
/* Bekee */ e mere m ndezi
42746
wikitext
text/x-wiki
'''Ochịabụtọ'''
==Nkọwa==
Aha mmadụ n'ala Igbo pụtara ajụjụ nke ahụ chọrọ ịma ma Ọchị bụ ihe ịrịba ama nke ọñụ
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
Nna m bara m Ochịabụtọ maka ụbọchị ya gara aga ọ tàrà ahụhụ.
===Mkpọpụta===
[[File:LL-Q33578 (ibo)-Lezechima404-Ochịabụtọ.wav|LL-Q33578 (ibo)-Lezechima404-Ochịabụtọ]]
===Olumba===
===Ntụgharị===
===Bekee===
Laughter is not friendship
[[Òtù:Wiki Loves Names]]
arotpj4pcm9twt0u1iqyr5y7029u3mm
Ododo
0
1279
42497
23094
2026-06-23T13:31:53Z
Egbezomo Florence Eguono
1904
E wepurum ihe na ekwesighi i di nà ya
42497
wikitext
text/x-wiki
===nkọwa===
Nke a bụ nke na emuke emuke na agwa.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Akwa a na acha ododo.
===mkpọpụta===
O/do/do
[[File:LL-Q33578 (ibo)-Aminwa 21-Ododo.wav|LL-Q33578 (ibo)-Aminwa 21-Ododo]]
===olumba===
Ọyọọyọ
===ntụghari===
===bekee===
Purple
[[Òtù:wiki loves names]]
m3v1fzseeulk2vmsgvd0erfd0mb861t
42516
42497
2026-06-23T13:37:04Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42516
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ nke na emuke emuke na agwa.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Akwa a na acha ododo.
===mkpọpụta===
O/do/do
[[File:LL-Q33578 (ibo)-Aminwa 21-Ododo.wav|LL-Q33578 (ibo)-Aminwa 21-Ododo]]
===olumba===
Ọyọọyọ
===ntụghari===
===bekee===
Purple
[[Òtù:wiki loves names]]
3uiaeivyi7zzb4py994ydjcrx10kvl9
42525
42516
2026-06-23T13:38:33Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42525
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ nke na emuke emuke na agwa.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Akwa a na acha ododo.
===Mkpọpụta===
O/do/do
[[File:LL-Q33578 (ibo)-Aminwa 21-Ododo.wav|LL-Q33578 (ibo)-Aminwa 21-Ododo]]
===olumba===
Ọyọọyọ
===ntụghari===
===bekee===
Purple
[[Òtù:wiki loves names]]
pqntqriba8yaa18iolwc9x5a9jz3d3y
42532
42525
2026-06-23T13:40:22Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42532
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ nke na emuke emuke na agwa.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Akwa a na acha ododo.
===Mkpọpụta===
O/do/do
[[File:LL-Q33578 (ibo)-Aminwa 21-Ododo.wav|LL-Q33578 (ibo)-Aminwa 21-Ododo]]
===Olumba===
Ọyọọyọ
===ntụghari===
===bekee===
Purple
[[Òtù:wiki loves names]]
p47a1fok4cr9otfcgr5jj0p8ixmfb0t
42536
42532
2026-06-23T13:41:42Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42536
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ nke na emuke emuke na agwa.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Akwa a na acha ododo.
===Mkpọpụta===
O/do/do
[[File:LL-Q33578 (ibo)-Aminwa 21-Ododo.wav|LL-Q33578 (ibo)-Aminwa 21-Ododo]]
===Olumba===
Ọyọọyọ
===Ntụghari===
===bekee===
Purple
[[Òtù:wiki loves names]]
96ms3igbvey7sllepubnbizhyjhioj6
42539
42536
2026-06-23T13:42:18Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42539
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ nke na emuke emuke na agwa.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Akwa a na acha ododo.
===Mkpọpụta===
O/do/do
[[File:LL-Q33578 (ibo)-Aminwa 21-Ododo.wav|LL-Q33578 (ibo)-Aminwa 21-Ododo]]
===Olumba===
Ọyọọyọ
===Ntụghari===
===Bekee===
Purple
[[Òtù:wiki loves names]]
morm81fsssi6jq9zf0j9yqam0wjefpm
42550
42539
2026-06-23T13:46:05Z
Egbezomo Florence Eguono
1904
Mmekuwata
42550
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ nke na emuke emuke na agwa.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Akwa a na acha ododo.
===Mkpọpụta===
O/do/do
[[File:LL-Q33578 (ibo)-Aminwa 21-Ododo.wav|LL-Q33578 (ibo)-Aminwa 21-Ododo]]
===Olumba===
Ọyọọyọ
===Ntụghari===
===Bekee===
[[https://en.wiktionary.org/wiki/purple purple]]
[[Òtù:wiki loves names]]
dk5h4g09vp0zimjezvhmdgztdhdoevu
42557
42550
2026-06-23T13:48:04Z
Egbezomo Florence Eguono
1904
Mgbakwunye
42557
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ nke na emuke emuke na agwa.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Akwa a na acha ododo.
===Mkpọpụta===
O/do/do
[[File:LL-Q33578 (ibo)-Aminwa 21-Ododo.wav|LL-Q33578 (ibo)-Aminwa 21-Ododo]]
===Olumba===
Ọyọọyọ
===Ntụghari na asụsụ ọzọ.===
===Bekee===
[[https://en.wiktionary.org/wiki/purple purple]]
[[Òtù:wiki loves names]]
s4vvsqz7olnipyau2yy0mrusv6duibp
Ofe
0
1285
42659
23098
2026-06-23T14:12:55Z
Egbezomo Florence Eguono
1904
Mgbakwunye
42659
wikitext
text/x-wiki
"""Ofe"""
===Nkọwa===
Ofe bụ ihe eji eri ụtara.
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
Ofe nnem tere tọrọ ụtọ nke ukwu.
===Mkpọpụta===
Ófè
[[File:LL-Q33578 (ibo)-Aminwa 21-Ofe.wav|LL-Q33578 (ibo)-Aminwa 21-Ofe]]
===Olumba===
Ohe
=== Ntugharï na asụsụ ọzọ ===
===Bekee===
Soup
https://en.m.wiktionary.org/wiki/soup
===Category===
[[Òtù:wiki loves names]]
py41zwti35i8636z0t9bh9cd7tba79k
Ofe egusi
0
1287
42665
29192
2026-06-23T14:15:19Z
Egbezomo Florence Eguono
1904
E wepurum ihe na ekwesighi i di nà ya
42665
wikitext
text/x-wiki
===nkọwa===
Nke a bụ otụ na ime ihe oriri anyi nwere na ala Igbo.
===nkejiasụsụ===
Nkowaaha
[[File:Melon soup with wheat.jpg|thumb|ofe egusi na utara]]
===ọmụmaatụ===
Ofe egusi a tọrọ utọ.
===mkpọpụta===
O/fe/e/gu/si
[[File:LL-Q33578 (ibo)-Aminwa 21-Ofe egusi.wav|LL-Q33578 (ibo)-Aminwa 21-Ofe egusi]]
===olumba===
===ntụghari===
===bekee===
Melon Soup
[[Òtù:wiki loves names]]
[[Òtù:Aha]]
[[Òtù:Ihe oriri]]
[[Òtù:Igbo Noun Project]]
s35ivp0b9n8cons9tje5v6un967znjv
42694
42665
2026-06-23T14:23:46Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42694
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụ na ime ihe oriri anyi nwere na ala Igbo.
===nkejiasụsụ===
Nkowaaha
[[File:Melon soup with wheat.jpg|thumb|ofe egusi na utara]]
===ọmụmaatụ===
Ofe egusi a tọrọ utọ.
===mkpọpụta===
O/fe/e/gu/si
[[File:LL-Q33578 (ibo)-Aminwa 21-Ofe egusi.wav|LL-Q33578 (ibo)-Aminwa 21-Ofe egusi]]
===olumba===
===ntụghari===
===bekee===
Melon Soup
[[Òtù:wiki loves names]]
[[Òtù:Aha]]
[[Òtù:Ihe oriri]]
[[Òtù:Igbo Noun Project]]
4c5stt9ae8m3zz3xz0hgxwa0w2lnffp
42701
42694
2026-06-23T14:25:42Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42701
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụ na ime ihe oriri anyi nwere na ala Igbo.
===Nkejiasụsụ===
Nkowaaha
[[File:Melon soup with wheat.jpg|thumb|ofe egusi na utara]]
===ọmụmaatụ===
Ofe egusi a tọrọ utọ.
===mkpọpụta===
O/fe/e/gu/si
[[File:LL-Q33578 (ibo)-Aminwa 21-Ofe egusi.wav|LL-Q33578 (ibo)-Aminwa 21-Ofe egusi]]
===olumba===
===ntụghari===
===bekee===
Melon Soup
[[Òtù:wiki loves names]]
[[Òtù:Aha]]
[[Òtù:Ihe oriri]]
[[Òtù:Igbo Noun Project]]
n7jro3z58ah16lrbgdupz8vtld23tyl
42711
42701
2026-06-23T14:27:08Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42711
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụ na ime ihe oriri anyi nwere na ala Igbo.
===Nkejiasụsụ===
Nkowaaha
[[File:Melon soup with wheat.jpg|thumb|ofe egusi na utara]]
===Ọmụmaatụ===
Ofe egusi a tọrọ utọ.
===mkpọpụta===
O/fe/e/gu/si
[[File:LL-Q33578 (ibo)-Aminwa 21-Ofe egusi.wav|LL-Q33578 (ibo)-Aminwa 21-Ofe egusi]]
===olumba===
===ntụghari===
===bekee===
Melon Soup
[[Òtù:wiki loves names]]
[[Òtù:Aha]]
[[Òtù:Ihe oriri]]
[[Òtù:Igbo Noun Project]]
pbi2xo47j7ktmnsd0hl0xy82q4x0y0r
42721
42711
2026-06-23T14:29:21Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42721
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụ na ime ihe oriri anyi nwere na ala Igbo.
===Nkejiasụsụ===
Nkowaaha
[[File:Melon soup with wheat.jpg|thumb|ofe egusi na utara]]
===Ọmụmaatụ===
Ofe egusi a tọrọ utọ.
===Mkpọpụta===
O/fe/e/gu/si
[[File:LL-Q33578 (ibo)-Aminwa 21-Ofe egusi.wav|LL-Q33578 (ibo)-Aminwa 21-Ofe egusi]]
===olumba===
===ntụghari===
===bekee===
Melon Soup
[[Òtù:wiki loves names]]
[[Òtù:Aha]]
[[Òtù:Ihe oriri]]
[[Òtù:Igbo Noun Project]]
hvf1x6yj3e5ayc3pw79nw2h55dwsn25
42724
42721
2026-06-23T14:30:08Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42724
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụ na ime ihe oriri anyi nwere na ala Igbo.
===Nkejiasụsụ===
Nkowaaha
[[File:Melon soup with wheat.jpg|thumb|ofe egusi na utara]]
===Ọmụmaatụ===
Ofe egusi a tọrọ utọ.
===Mkpọpụta===
O/fe/e/gu/si
[[File:LL-Q33578 (ibo)-Aminwa 21-Ofe egusi.wav|LL-Q33578 (ibo)-Aminwa 21-Ofe egusi]]
===Olumba===
===ntụghari===
===bekee===
Melon Soup
[[Òtù:wiki loves names]]
[[Òtù:Aha]]
[[Òtù:Ihe oriri]]
[[Òtù:Igbo Noun Project]]
egrckvf447hgestoiryu8wxd3y9uz9l
42728
42724
2026-06-23T14:31:05Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42728
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụ na ime ihe oriri anyi nwere na ala Igbo.
===Nkejiasụsụ===
Nkowaaha
[[File:Melon soup with wheat.jpg|thumb|ofe egusi na utara]]
===Ọmụmaatụ===
Ofe egusi a tọrọ utọ.
===Mkpọpụta===
O/fe/e/gu/si
[[File:LL-Q33578 (ibo)-Aminwa 21-Ofe egusi.wav|LL-Q33578 (ibo)-Aminwa 21-Ofe egusi]]
===Olumba===
===Ntụghari===
===bekee===
Melon Soup
[[Òtù:wiki loves names]]
[[Òtù:Aha]]
[[Òtù:Ihe oriri]]
[[Òtù:Igbo Noun Project]]
ogs3vr5insxsn4pkh6g47f7t84u7064
42732
42728
2026-06-23T14:31:54Z
Egbezomo Florence Eguono
1904
E degharim mkpụrụedemede nta
42732
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụ na ime ihe oriri anyi nwere na ala Igbo.
===Nkejiasụsụ===
Nkowaaha
[[File:Melon soup with wheat.jpg|thumb|ofe egusi na utara]]
===Ọmụmaatụ===
Ofe egusi a tọrọ utọ.
===Mkpọpụta===
O/fe/e/gu/si
[[File:LL-Q33578 (ibo)-Aminwa 21-Ofe egusi.wav|LL-Q33578 (ibo)-Aminwa 21-Ofe egusi]]
===Olumba===
===Ntụghari===
===Bekee===
Melon Soup
[[Òtù:wiki loves names]]
[[Òtù:Aha]]
[[Òtù:Ihe oriri]]
[[Òtù:Igbo Noun Project]]
3oaz3yx6x5ty7xk1b66cawka3ctsao1
Ogbunku
0
1302
42744
23100
2026-06-23T14:49:05Z
Egbezomo Florence Eguono
1904
/* Ntụgharị */
42744
wikitext
text/x-wiki
"""Ogbunkụ"""
===Nkọwa===
Ogbunkụ bụ ihe eji akpọwa nkụ. E jikwa ya egbutu nnukwu osisi.
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
Ejim ogbunkụ kpọwaa nkụ n'oge mgbede.
===Mkpọpụta===
Ògbúnkú
[[File:LL-Q33578 (ibo)-Aminwa 21-Ogbunku.wav|LL-Q33578 (ibo)-Aminwa 21-Ogbunku]]
===Olumba===
Ụgama
===Ntụgharị na asụsụ ọzọ ===
===Bekee===
Axe
https://en.m.wiktionary.org/wiki/Axe
===Category===
[[Òtù:wiki loves names]]
fkgirf1q3mgwrddepzoriyeppxdgna2
Sombili
0
1555
42545
22734
2026-06-23T13:44:26Z
10kdollz
1003
42545
wikitext
text/x-wiki
Sombili
===Nkọwa===
Sombili pụtara ka ha binye lu gi
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Sombili bu aha ana-kpo mmadụ na ala igbo
===Mkpoputa===
Sọmbili
[[File:LL-Q33578 (ibo)-Celetex-Sombili.wav|LL-Q33578 (ibo)-Celetex-Sombili]]
===Olumba===
Dumbili
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Live with me
===category===
[[Òtù:Wiki Loves Names]]
7gljdwoomhx1b2l701qt56apf037sxd
42553
42545
2026-06-23T13:46:36Z
10kdollz
1003
42553
wikitext
text/x-wiki
===Nkọwa===
Sombili pụtara ka ha binye lu gi
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Sombili bu aha ana-kpo mmadụ na ala igbo
===Mkpoputa===
Sọmbili
[[File:LL-Q33578 (ibo)-Celetex-Sombili.wav|LL-Q33578 (ibo)-Celetex-Sombili]]
===Olumba===
Dumbili
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Live with me
===category===
[[Òtù:Wiki Loves Names]]
[[Òtù:Aha]]
ti5afyfzzjzyxfmhx479z1o7itblxo8
Tatambeneke
0
1562
42558
22732
2026-06-23T13:48:08Z
IfyClassique
950
42558
wikitext
text/x-wiki
"""Tatambeneke"""
===Nkọwa===
Nke a bụ anụmanụ. O nwere anya ọkpụrụkpụ abụọ.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Tatambeneke a buru ibu.
===Mkpọpụta===
Ta/tam/be/ne/ke
[[File:LL-Q33578 (ibo)-Celetex-Tatambeneke.wav|LL-Q33578 (ibo)-Celetex-Tatambeneke]]
===Olumba===
Ojiikere
Ojiọdụdụ
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Dragonfly
[[Òtù:Wiki Loves Names]]
[[Category: Aha]]
[[Category: Mmadụ]]
qk184rtte0gqz2iuucqnu4xbxila8ir
Tobechukwu
0
1565
42391
22730
2026-06-23T12:53:42Z
IfyClassique
950
42391
wikitext
text/x-wiki
'''TOBECHUKWU'''
===Nkowa===
Tobechukwu pụtara ka anyi na-eto Chukwu mgbe nile
===Nkejiasusu===
Aha
===Ọmumaatu===
Tobechukwu bu aha a-na aza n'ala Igbo
===Mkpoputa===
[[File:LL-Q33578 (ibo)-Celetex-Tobechukwu.wav|LL-Q33578 (ibo)-Celetex-Tobechukwu]]
#Tobechukwu
#Tobechukwu bu aha nne na nna gụrụ m
===Olumba===
Tobenna
Tobechi
Tochi
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Praise God
===Hausa===
Godiya ga allah
===Category===
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
f4qxmsw7z7sjrdp9bhsudncn53r1ti9
42393
42391
2026-06-23T12:54:16Z
IfyClassique
950
/* Category */
42393
wikitext
text/x-wiki
'''TOBECHUKWU'''
===Nkowa===
Tobechukwu pụtara ka anyi na-eto Chukwu mgbe nile
===Nkejiasusu===
Aha
===Ọmumaatu===
Tobechukwu bu aha a-na aza n'ala Igbo
===Mkpoputa===
[[File:LL-Q33578 (ibo)-Celetex-Tobechukwu.wav|LL-Q33578 (ibo)-Celetex-Tobechukwu]]
#Tobechukwu
#Tobechukwu bu aha nne na nna gụrụ m
===Olumba===
Tobenna
Tobechi
Tochi
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Praise God
===Hausa===
Godiya ga allah
==Category==
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
gv4oy3s1o2pwgz4o0noa2mo2h3nqnkj
42400
42393
2026-06-23T12:55:49Z
IfyClassique
950
/* Category */
42400
wikitext
text/x-wiki
'''TOBECHUKWU'''
===Nkowa===
Tobechukwu pụtara ka anyi na-eto Chukwu mgbe nile
===Nkejiasusu===
Aha
===Ọmumaatu===
Tobechukwu bu aha a-na aza n'ala Igbo
===Mkpoputa===
[[File:LL-Q33578 (ibo)-Celetex-Tobechukwu.wav|LL-Q33578 (ibo)-Celetex-Tobechukwu]]
#Tobechukwu
#Tobechukwu bu aha nne na nna gụrụ m
===Olumba===
Tobenna
Tobechi
Tochi
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Praise God
===Hausa===
Godiya ga allah
[[Òtù:Wiki Loves Names]]
[[Category: Aha]]
[[Category: Mmadụ]]
fcs5iac5x3siwxqxhvorwsyxfbyp02t
Toochukwu
0
1567
42333
22729
2026-06-23T12:21:59Z
IfyClassique
950
42333
wikitext
text/x-wiki
'''TOOCHUKWU'''
===nkọwa===
Nke a bụ aha putara ka anyi kele chukwu nna.
===nkejiasụsụ===
Aha
===ọmụmaatụ===
#Aha m bụ Toochukwu
#Aha nnam bụ Toochukwu
===mkpọpụta===
Too/chu/kwu
[[File:LL-Q33578 (ibo)-Celetex-Toochukwu.wav|LL-Q33578 (ibo)-Celetex-Toochukwu]]
===olumba===
Toochi
==ntụghari n'asụsụ ọzọ==
===bekee===
Praise God
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
7i576oujc3oep33xu6ctu8agriiwmj1
42343
42333
2026-06-23T12:28:40Z
IfyClassique
950
/* nkọwa */
42343
wikitext
text/x-wiki
'''TOOCHUKWU'''
===nkọwa===
Nke a bu aha pụtara ka anyi kelee chukwu nna.
===nkejiasụsụ===
Aha
===ọmụmaatụ===
#Aha m bụ Toochukwu
#Aha nnam bụ Toochukwu
===mkpọpụta===
Too/chu/kwu
[[File:LL-Q33578 (ibo)-Celetex-Toochukwu.wav|LL-Q33578 (ibo)-Celetex-Toochukwu]]
===olumba===
Toochi
==ntụghari n'asụsụ ọzọ==
===bekee===
Praise God
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
820rppc6ivi39fvap8pk63xcn923wp9
42376
42343
2026-06-23T12:46:19Z
IfyClassique
950
42376
wikitext
text/x-wiki
'''TOOCHUKWU'''
===Nkọwa===
Nke a bu aha pụtara ka anyi kelee chukwu nna.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Aha m bụ Toochukwu
#Aha nnam bụ Toochukwu
===mkpọpụta===
Too/chu/kwu
[[File:LL-Q33578 (ibo)-Celetex-Toochukwu.wav|LL-Q33578 (ibo)-Celetex-Toochukwu]]
===Olumba===
Toochi
==ntụghari n'asụsụ ọzọ==
===Bekee===
Praise God
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
146fhm4vrnaemby7uebqvk5nvc4qtj9
42378
42376
2026-06-23T12:46:49Z
IfyClassique
950
/* mkpọpụta */
42378
wikitext
text/x-wiki
'''TOOCHUKWU'''
===Nkọwa===
Nke a bu aha pụtara ka anyi kelee chukwu nna.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Aha m bụ Toochukwu
#Aha nnam bụ Toochukwu
===Mkpọpụta===
Too/chu/kwu
[[File:LL-Q33578 (ibo)-Celetex-Toochukwu.wav|LL-Q33578 (ibo)-Celetex-Toochukwu]]
===Olumba===
Toochi
==ntụghari n'asụsụ ọzọ==
===Bekee===
Praise God
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
7wi7hwquxkptl2d2rwec23k22ex6i63
42407
42378
2026-06-23T12:57:56Z
IfyClassique
950
42407
wikitext
text/x-wiki
'''TOOCHUKWU'''
===Nkọwa===
Nke a bu aha pụtara ka anyi kelee chukwu nna.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Aha m bụ Toochukwu
#Aha nnam bụ Toochukwu
===Mkpọpụta===
Too/chu/kwu
[[File:LL-Q33578 (ibo)-Celetex-Toochukwu.wav|LL-Q33578 (ibo)-Celetex-Toochukwu]]
===Olumba===
Toochi
==ntụghari n'asụsụ ọzọ==
===Bekee===
Praise God
[[Òtù:Wiki Loves Names]]
[[Category: Aha]]
[[Category: Mmadụ]]
scqmnaagalf2ji174kzl1erotn7zwq2
42408
42407
2026-06-23T12:58:27Z
IfyClassique
950
/* ntụghari n'asụsụ ọzọ */
42408
wikitext
text/x-wiki
'''TOOCHUKWU'''
===Nkọwa===
Nke a bu aha pụtara ka anyi kelee chukwu nna.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
#Aha m bụ Toochukwu
#Aha nnam bụ Toochukwu
===Mkpọpụta===
Too/chu/kwu
[[File:LL-Q33578 (ibo)-Celetex-Toochukwu.wav|LL-Q33578 (ibo)-Celetex-Toochukwu]]
===Olumba===
Toochi
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Praise God
[[Òtù:Wiki Loves Names]]
[[Category: Aha]]
[[Category: Mmadụ]]
i5sgx96i446jaotbfsgkk44k02080wn
Torotoro
0
1571
42362
22727
2026-06-23T12:37:52Z
IfyClassique
950
42362
wikitext
text/x-wiki
'''TOROTORO'''
===Nkọwa===
Nke a bụ otu n'ime anụmanụ Chineke nna kere. A na erikwa anụ ya eri.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Torotoro a buru ibu.
===Mkpọpụta===
To/ro/to/ro
[[File:LL-Q33578 (ibo)-Celetex-Torotoro.wav|LL-Q33578 (ibo)-Celetex-Torotoro]]
===olumba===
==Ntụgharị n'asụsụ ọzọ==
===bekee===
Turkey
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
hbl756guykcm4q5i8927lsz4cmloje7
42366
42362
2026-06-23T12:42:04Z
IfyClassique
950
/* bekee */
42366
wikitext
text/x-wiki
'''TOROTORO'''
===Nkọwa===
Nke a bụ otu n'ime anụmanụ Chineke nna kere. A na erikwa anụ ya eri.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Torotoro a buru ibu.
===Mkpọpụta===
To/ro/to/ro
[[File:LL-Q33578 (ibo)-Celetex-Torotoro.wav|LL-Q33578 (ibo)-Celetex-Torotoro]]
===olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Turkey
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
7tsvmy0zj9btl1orm49dsywcv7zbg8f
42372
42366
2026-06-23T12:44:34Z
IfyClassique
950
/* olumba */
42372
wikitext
text/x-wiki
'''TOROTORO'''
===Nkọwa===
Nke a bụ otu n'ime anụmanụ Chineke nna kere. A na erikwa anụ ya eri.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Torotoro a buru ibu.
===Mkpọpụta===
To/ro/to/ro
[[File:LL-Q33578 (ibo)-Celetex-Torotoro.wav|LL-Q33578 (ibo)-Celetex-Torotoro]]
===olumba===
Tolotolo (Anambra, Enugu)
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Turkey
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mmadụ]]
4lqol11ac5v1oay9zipdcif05ggaust
42403
42372
2026-06-23T12:57:09Z
IfyClassique
950
42403
wikitext
text/x-wiki
'''TOROTORO'''
===Nkọwa===
Nke a bụ otu n'ime anụmanụ Chineke nna kere. A na erikwa anụ ya eri.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Torotoro a buru ibu.
===Mkpọpụta===
To/ro/to/ro
[[File:LL-Q33578 (ibo)-Celetex-Torotoro.wav|LL-Q33578 (ibo)-Celetex-Torotoro]]
===olumba===
Tolotolo (Anambra, Enugu)
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Turkey
[[Òtù:Wiki Loves Names]]
[[Category: Aha]]
[[Category: Mmadụ]]
irzl85ly684dk3vkzpaepsd2fhe8phl
Ubahsinachi
0
1575
42540
22658
2026-06-23T13:42:54Z
10kdollz
1003
42540
wikitext
text/x-wiki
===Nkọwa===
Ubahsinachi pụtara na akụ maọbu uba si na áká Chukwu a bịa
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Ubahsinachi bu aha ana-kpo mmadụ na ala igbo
===Mkpoputa===
Ubahsinachi
[[File:LL-Q33578 (ibo)-Celetex-Ubasinachi.wav|LL-Q33578 (ibo)-Celetex-Ubasinachi]]
===Olumba===
Akusinachi
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Wealth comes from God
===Category===
[[Òtù:Wiki Loves Names]]
bdpd2hr38gajm44ft54ftcdgdactgmv
Ubo
0
1578
42425
22725
2026-06-23T13:04:18Z
10kdollz
1003
42425
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ ihe eji aku egwu di iche iche.
===Nkejiasụsụ===
Aha
===Ọ̀mụ̀màatụ̀===
Ụbọ a Mara mma.
===Mkpọpụta===
U/bọ
[[File:LL-Q33578 (ibo)-Celetex-Ubo.wav|LL-Q33578 (ibo)-Celetex-Ubo]]
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
[[https://en.wiktionary.org/wiki/guitar Guitar]]
[[Òtù:Wiki Loves Names]]
jrhfyazup3glddtz86agzvsevx2w4xt
Ubu
0
1579
42392
6529
2026-06-23T12:53:50Z
10kdollz
1003
42392
wikitext
text/x-wiki
===Nkowa===
Ubu bu Mpakala ahu mmadụ
===Nkejiasusu===
Aha
===Omumaatu===
Ubu bu Mpakala ahu eji e bu ibu ma kulu kwa nwatakiri
===Mkpoputa===
Ubu
===Olumba===
Okú ubu
===Ntughari===
===Bekee===
https://en.m.wiktionary.org/wiki/shoulder
===Yoruba===
Ejika
===hausa===
Kafada
===Category===
[[Òtù:wiki loves names]]
7cjzau9kjt0y2azcur3mh3jh8r9c7el
Ububa
0
1580
42384
22659
2026-06-23T12:50:13Z
10kdollz
1003
42384
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụ na ime anụmanụ chineke Nna kere.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Ụbụba a Mara mma.
===Mkpọpụta===
Ụ/bụ/ba
[[File:LL-Q33578 (ibo)-Celetex-Ububa.wav|LL-Q33578 (ibo)-Celetex-Ububa]]
===Olumba===
===Ntụghari===
===Bekee===
Butterfly
[[Òtù:wiki loves names]]
rlvwl1s9tgx53j12d5rp4fwo4vqwdk1
Uchaga
0
1582
42379
23063
2026-06-23T12:46:51Z
10kdollz
1003
42379
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụtụ agwaga di iche iche enwe gaziri na ala Igbo.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Uchaga mara mma.
===Mkpọpụta===
U/cha/ga
[[File:LL-Q33578 (ibo)-Sayvhior-Uchaga.wav|LL-Q33578 (ibo)-Sayvhior-Uchaga]]
===Olumba===
Agwaga
===Ntụghari===
===Bekee===
Colours
[[Òtù:wiki loves names]]
i1injydk64pruc43ysde0zfzto3ckxh
42523
42379
2026-06-23T13:38:18Z
10kdollz
1003
42523
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụtụ agwaga di iche iche enwe gaziri na ala Igbo.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Uchaga mara mma.
===Mkpọpụta===
U/cha/ga
[[File:LL-Q33578 (ibo)-Sayvhior-Uchaga.wav|LL-Q33578 (ibo)-Sayvhior-Uchaga]]
===Olumba===
Agwaga
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
[[https://en.wikipedia.org/wiki/Color Colours]]
[[Òtù:Wiki Loves Names]]
b31s0h63p987827iexpdq3rfwu96feb
42587
42523
2026-06-23T13:56:56Z
10kdollz
1003
/* Bekee */ edit made
42587
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụtụ agwaga di iche iche enwe gaziri na ala Igbo.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Uchaga mara mma.
===Mkpọpụta===
U/cha/ga
[[File:LL-Q33578 (ibo)-Sayvhior-Uchaga.wav|LL-Q33578 (ibo)-Sayvhior-Uchaga]]
===Olumba===
Agwaga
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
[https://en.wikipedia.org/wiki/Color Colours]
[[Òtù:Wiki Loves Names]]
4x4shmwuq72h7om1luh52xlm801m78g
42589
42587
2026-06-23T13:57:14Z
10kdollz
1003
/* Ntụgharị n'asụsụ ọzọ */
42589
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ otụtụ agwaga di iche iche enwe gaziri na ala Igbo.
===Nkejiasụsụ===
Nkowaaha
===Ọmụmaatụ===
Uchaga mara mma.
===Mkpọpụta===
U/cha/ga
[[File:LL-Q33578 (ibo)-Sayvhior-Uchaga.wav|LL-Q33578 (ibo)-Sayvhior-Uchaga]]
===Olumba===
Agwaga
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wikipedia.org/wiki/Color Colours]
[[Òtù:Wiki Loves Names]]
ilw1foms6zwu37qhp1rhp6abtskdo9o
Udara
0
1591
42323
42291
2026-06-23T12:10:58Z
10kdollz
1003
Edit made
42323
wikitext
text/x-wiki
<nowiki>'''nkọwa'''</nowiki>
Nke a bụ otụ na ime mkpụrụosisi na eto na ala Igbo.
===nkejiasụsụ===
Aha
===ọmụmaatụ====
Udara a tọrọ Ụtọ
===mkpọpụta===
U/da/ra
[[File:LL-Q33578 (ibo)-Celetex-Udara.wav|LL-Q33578 (ibo)-Celetex-Udara]]
===olumba===
===ntụghari===
===bekee===
African star apple
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mkpụrụ Osisi]]
[[Òtù:Igbo Noun Project]]
553md08pzb4bqd5a3c8wmtb7yztucx3
42325
42323
2026-06-23T12:11:31Z
10kdollz
1003
42325
wikitext
text/x-wiki
<nowiki>===nkọwa===</nowiki>
Nke a bụ otụ na ime mkpụrụosisi na eto na ala Igbo.
===nkejiasụsụ===
Aha
===ọmụmaatụ====
Udara a tọrọ Ụtọ
===mkpọpụta===
U/da/ra
[[File:LL-Q33578 (ibo)-Celetex-Udara.wav|LL-Q33578 (ibo)-Celetex-Udara]]
===olumba===
===ntụghari===
===bekee===
African star apple
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mkpụrụ Osisi]]
[[Òtù:Igbo Noun Project]]
bor2ki3odti3tcywkuhfysf4z9qgauj
42327
42325
2026-06-23T12:13:26Z
10kdollz
1003
42327
wikitext
text/x-wiki
<nowiki>nkọwa</nowiki>
Nke a bụ otụ na ime mkpụrụosisi na eto na ala Igbo.
===nkejiasụsụ===
Aha
===ọmụmaatụ====
Udara a tọrọ Ụtọ
===mkpọpụta===
U/da/ra
[[File:LL-Q33578 (ibo)-Celetex-Udara.wav|LL-Q33578 (ibo)-Celetex-Udara]]
===olumba===
===ntụghari===
===bekee===
African star apple
[[Òtù:wiki loves names]]
[[Category: Aha]]
[[Category: Mkpụrụ Osisi]]
[[Òtù:Igbo Noun Project]]
301an5sx9phh8cjmiiyw7q4tjm4035h
42442
42327
2026-06-23T13:12:40Z
10kdollz
1003
42442
wikitext
text/x-wiki
Nkowa
Nke a bụ otụ na ime mkpụrụosisi na eto na ala Igbo.
===Nkejiasụsụ===
Aha
===Ọ̀mụ̀màatụ̀===
Udara a tọrọ Ụtọ
===Mkpọpụta===
U/da/ra
[[File:LL-Q33578 (ibo)-Celetex-Udara.wav|LL-Q33578 (ibo)-Celetex-Udara]]
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
African star apple
[[Òtù:Wiki Loves Names]]
[[Category: Aha]]
[[Category: Mkpụrụ Osisi]]
[[Òtù:Igbo Noun Project]]
6pb0g14rrn9sl7avmln8ytoo1glgfs3
Udo
0
1595
42371
22715
2026-06-23T12:43:49Z
10kdollz
1003
42371
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ ihe eji ekosa akwa na ulo.
===Nkejiasụsụ===
Aha
===Omụmaatụ===
Ụdọ a bụrụ ibụ.
===Mkpọpụta===
Ụ/dọ
[[File:LL-Q33578 (ibo)-Celetex-Udo.wav|LL-Q33578 (ibo)-Celetex-Udo]]
===Olumba===
Eriri
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Rope
[[Òtù:wiki loves names]]
kgtqctg31fwy1nroclgu6xnwljh2566
42500
42371
2026-06-23T13:32:31Z
10kdollz
1003
42500
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ ihe eji ekosa akwa na ulo.
===Nkejiasụsụ===
Aha
===Omụmaatụ===
Ụdọ a bụrụ ibụ.
===Mkpọpụta===
Ụ/dọ
[[File:LL-Q33578 (ibo)-Celetex-Udo.wav|LL-Q33578 (ibo)-Celetex-Udo]]
===Olumba===
Eriri
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
[[https://en.wikipedia.org/wiki/Rope Rope]]
[[Òtù:Wiki Loves Names]]
roy6ugy7iuek1yqk9wf5psj3fwffqh7
Ugbene
0
1607
42345
23175
2026-06-23T12:28:59Z
10kdollz
1003
42345
wikitext
text/x-wiki
===nkọwa===
Nke a bụ ihe na esi na ahu okuko maobu anumanu ozo puta.
===nkejiasụsụ===
Aha
===ọmụmaatụ===
Ugbene a Mara mma.
===mkpọpụta===
U/gbe/nke
[[File:LL-Q33578 (ibo)-Celetex-Ugbene.wav|LL-Q33578 (ibo)-Celetex-Ugbene]]
===olumba===
Abụba
===ntụghari===
===bekee===
Feathers
[[Òtù:wiki loves names]]
kjenzb1quewv06qmxtqnapnjlezv1aq
42495
42345
2026-06-23T13:30:04Z
10kdollz
1003
42495
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ ihe na esi na ahu okuko maobu anumanu ozo puta.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Ugbene a Mara mma.
===Mkpọpụta===
U/gbe/nke
[[File:LL-Q33578 (ibo)-Celetex-Ugbene.wav|LL-Q33578 (ibo)-Celetex-Ugbene]]
===Olumba===
Abụba
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
[[https://en.wikipedia.org/wiki/Feather Feathers]]
[[Òtù:Wiki Loves Names]]
mxm3koqz6mhlz1gc06tnz855r7rdovh
Ugbo àlà
0
1610
42306
22705
2026-06-23T12:03:02Z
~2026-36380-38
1903
Edit made
42306
wikitext
text/x-wiki
===Nkọwa===
Ụgbọ ala bu ihe eji e buga mmadụ, ihe, anumanu site na otu ebe rue otu ebe
===NkejiAsụsụ===
Aha
===Ọmụmaatụ===
Ụgbọ ala bu ihe na e buga anyị ebe anyị na gaa, ọ na ebu mmadụ na ala
===Mkpoputa===
Ụgbọ ala
[[File:LL-Q33578 (ibo)-Celetex-Ụgbọ ala.wav|LL-Q33578 (ibo)-Celetex-Ụgbọ ala]]
===Olumba===
Ụgbọ ala
===Ntụgharị===
===Bekee===
https://en.m.wiktionary.org/wiki/Car
===Igbo===
Ụgbọ ala
===Yoruba===
Ọkọ ayokele
===Hausa===
Mota
===Category===
[[Òtù:wiki loves names]]
ezwgf3f7dqs893mkadl5o5yb0zar8y2
Ugbommiri
0
1612
42338
22704
2026-06-23T12:26:06Z
10kdollz
1003
42338
wikitext
text/x-wiki
===nkọwa===
Nke a bụ ugbo na ebu nnukwu ibu maobu mmadu nke na aga na elu mmiri.
===nkejiasụsụ===
Aha
===ọmụmaatụ===
Ụgbommiri a bụrụ ibụ.
===mkpọpụta===
Ụ/gbọ/m/mi/ri
[[File:LL-Q33578 (ibo)-Celetex-Ụgbọ mmiri.wav|LL-Q33578 (ibo)-Celetex-Ụgbọ mmiri]]
===olumba===
===ntụghari===
===bekee===
Ship
[[Òtù:wiki loves names]]
kbzeophdzg8xhpbcv8synmoc27hqkru
42487
42338
2026-06-23T13:26:51Z
10kdollz
1003
42487
wikitext
text/x-wiki
===Nkọwa===
Nke a bụ ugbo na ebu nnukwu ibu maobu mmadu nke na aga na elu mmiri.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Ụgbommiri a bụrụ ibụ.
===Mkpọpụta===
Ụ/gbọ/m/mi/ri
[[File:LL-Q33578 (ibo)-Celetex-Ụgbọ mmiri.wav|LL-Q33578 (ibo)-Celetex-Ụgbọ mmiri]]
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
[[https://en.wikipedia.org/wiki/Ship Ship]]
[[Òtù:wiki loves names]]
rhxl31i2d2798vvzlzderzmgezve677
Uhiodo
0
1629
42330
22702
2026-06-23T12:19:26Z
10kdollz
1003
42330
wikitext
text/x-wiki
===nkọwa===
Nkea a bụ etu ihe si acha enwere na ala Igbo.
===nkejiasụsụ===
Nkowaha
===ọmụmaatụ===
Uhiodo Mara mma.
===mkpọpụta===
U/hi/o/do
[[File:LL-Q33578 (ibo)-Celetex-Uhiodo.wav|LL-Q33578 (ibo)-Celetex-Uhiodo]]
===Olumba===
===ntụghari===
===Bekee===
Orange colour
[[Òtù:wiki loves names]]
lownq930xo7772z6obw49oap2dkl1mz
42469
42330
2026-06-23T13:20:35Z
10kdollz
1003
42469
wikitext
text/x-wiki
===Nkọwa===
Nkea a bụ etu ihe si acha enwere na ala Igbo.
===Nkejiasụsụ===
Nkowaha
===Ọmụmaatụ===
Uhiodo Mara mma.
===Mkpọpụta===
U/hi/o/do
[[File:LL-Q33578 (ibo)-Celetex-Uhiodo.wav|LL-Q33578 (ibo)-Celetex-Uhiodo]]
===Olumba===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
[[https://en.wikipedia.org/wiki/Orange_(colour) Orange colour]]
[[Òtù:Wiki Loves Names]]
9ho454pxs09xanbrfb02jrlbekocgyi
Ụkamaka
0
1630
42760
22499
2026-06-23T15:58:01Z
Geraldine Kene
966
42760
wikitext
text/x-wiki
"""Ụkamaka"""
===Nkọwa===
Ụkamaka bụ aha e nwere n'ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Aha m bụ Ụkamaka.
===Mkpọpụta===
Ụ/ka/ma/ka
[[File:Ig-Ukamaka.ogg|Pronunciation of Ukamaka]]
===Olumba===
===Ntụgharị===
===Bekee===
Church is good
[[Òtù:Wiki Loves Names]]
abxh4rfrlsmjfsi8woezgvfuy9dfy8a
42761
42760
2026-06-23T15:58:15Z
Geraldine Kene
966
Geraldine Kene moved page [[Ukamaka]] to [[Ụkamaka]]
42760
wikitext
text/x-wiki
"""Ụkamaka"""
===Nkọwa===
Ụkamaka bụ aha e nwere n'ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Aha m bụ Ụkamaka.
===Mkpọpụta===
Ụ/ka/ma/ka
[[File:Ig-Ukamaka.ogg|Pronunciation of Ukamaka]]
===Olumba===
===Ntụgharị===
===Bekee===
Church is good
[[Òtù:Wiki Loves Names]]
abxh4rfrlsmjfsi8woezgvfuy9dfy8a
Ụkandụ
0
1631
42757
22501
2026-06-23T15:56:13Z
Geraldine Kene
966
42757
wikitext
text/x-wiki
"""Ụkandụ"""
===Nkọwa===
Ụkandụ bụ aha mmadụ nke pụtara okwu na-enye ndụ
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Ukandu bụ aha mmadụ
===Mkpọputa===
Ụ́káńdụ́
[[File:Ig-Ukandu.ogg|Ig-Ukandu]]
===Olumba===
Okwuchukwu
===Ntụgharị===
===Bekee===
Word of wisdom
https://en.m.wiktionary.org/wiki/Wisdom
[[Òtù:Wiki Loves Names]]
0nmtm54odw2g0vxrdxxqmjbh96s1vxk
42758
42757
2026-06-23T15:56:28Z
Geraldine Kene
966
Geraldine Kene moved page [[Ukandu]] to [[Ụkandụ]]
42757
wikitext
text/x-wiki
"""Ụkandụ"""
===Nkọwa===
Ụkandụ bụ aha mmadụ nke pụtara okwu na-enye ndụ
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Ukandu bụ aha mmadụ
===Mkpọputa===
Ụ́káńdụ́
[[File:Ig-Ukandu.ogg|Ig-Ukandu]]
===Olumba===
Okwuchukwu
===Ntụgharị===
===Bekee===
Word of wisdom
https://en.m.wiktionary.org/wiki/Wisdom
[[Òtù:Wiki Loves Names]]
0nmtm54odw2g0vxrdxxqmjbh96s1vxk
dịna
0
1971
42739
29357
2026-06-23T14:38:05Z
Celetex
55
/* Olumba */
42739
wikitext
text/x-wiki
[[dị́nà]]
===Nkọwa===
“Dị́nà” bu idobe onwe ya ma ọ bụ nọrọ n'ọnọdụ a na-akpọ isiala iji zuru ike ma ọ bụ hie ụra.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
# o dina n'elu akwa ma gbalịa izu ike
===Mkpọpụta===
[[File:Nl-Dina.ogg|Nl-Dina]]
===Olumba===
done (Ukpor, Anambra)
=Ntụgharị n'asụsụ ọzọ=
===Bekee===
[https://en.wiktionary.org/wiki/liedown lie down]
[[Òtù:aha]]
de9vhj2j36i17zskw4gyn6nhr5ehbwk
42741
42739
2026-06-23T14:38:55Z
Celetex
55
/* Mkpọpụta */
42741
wikitext
text/x-wiki
[[dị́nà]]
===Nkọwa===
“Dị́nà” bu idobe onwe ya ma ọ bụ nọrọ n'ọnọdụ a na-akpọ isiala iji zuru ike ma ọ bụ hie ụra.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
# o dina n'elu akwa ma gbalịa izu ike
===Mkpọpụta===
Di/na
[[File:Nl-Dina.ogg|Nl-Dina]]
===Olumba===
done (Ukpor, Anambra)
=Ntụgharị n'asụsụ ọzọ=
===Bekee===
[https://en.wiktionary.org/wiki/liedown lie down]
[[Òtù:aha]]
2rlyk9uy840wvxta9bo72dmdrkaz8ea
efere
0
1989
42735
29194
2026-06-23T14:34:42Z
Celetex
55
/* Olumba */
42735
wikitext
text/x-wiki
<b>Efere</b>
=Nkọwa=
# '''''Efere''''' bụ ihe eji etinye ihe oriri. Efere nwere ike saa-asa ma ọ bụ mie-emie. Efere na-abia na ụdi di ichiche, dika efere nkụwa, rọba maọbụ alụminum.
[[Usòrò:Efere nri.jpg|thumb|Efere ]]
===Nkejịasųsų===
Aha
===Ǫmụmaatụ===
# Tiyerem anụ n' '''''efere'''''
#'''''Efere''''' nri m juru eju
===Mkpọpụta===
[[Usòrò:Efere.ogg|thumb|left|efere]]
===Olumba===
Afele (Onitsha, Anambra)
[[Ewhele]]
=Ntụgharị n'asųsų ọzọ=
===Bekee===
[https://en.wiktionary.org/wiki/plate plate]
[[Òtù:aha]]
[[Òtù:Ihe a na-ahụ anya]]
[[Òtù:Igbo Noun Project]]
2jqw3jszqg8bluqal4w5h6sexx596fp
42736
42735
2026-06-23T14:35:27Z
Celetex
55
/* Mkpọpụta */
42736
wikitext
text/x-wiki
<b>Efere</b>
=Nkọwa=
# '''''Efere''''' bụ ihe eji etinye ihe oriri. Efere nwere ike saa-asa ma ọ bụ mie-emie. Efere na-abia na ụdi di ichiche, dika efere nkụwa, rọba maọbụ alụminum.
[[Usòrò:Efere nri.jpg|thumb|Efere ]]
===Nkejịasųsų===
Aha
===Ǫmụmaatụ===
# Tiyerem anụ n' '''''efere'''''
#'''''Efere''''' nri m juru eju
===Mkpọpụta===
E/fe/re
[[Usòrò:Efere.ogg|thumb|left|efere]]
===Olumba===
Afele (Onitsha, Anambra)
[[Ewhele]]
=Ntụgharị n'asųsų ọzọ=
===Bekee===
[https://en.wiktionary.org/wiki/plate plate]
[[Òtù:aha]]
[[Òtù:Ihe a na-ahụ anya]]
[[Òtù:Igbo Noun Project]]
pazqogy2ghcpwtdpfg6c383izd2fp18
mmanye
0
2388
42607
10917
2026-06-23T14:03:54Z
Celetex
55
/* Mkpọpụta */
42607
wikitext
text/x-wiki
'''Mmanye'''
==Nkọwa==
Ịme mmadụ ka ome ihe n'amasighi ya ma ọ bu ihe ọ chọrọ ịme
==Nkejịasụsụ==
Ngwaa
=== Ọmụmaatụ ===
Biko amanyela m ime ihe a chọrọ m ime
=== Mkpọpụta ===
M/ma/nye
[[Usòrò:LL-Q33578 (ibo)-Olugold-Mmanye.wav|left|thumb|LL-Q33578 (ibo)-Olugold-Mmanye]]
=== Olumba ===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/compel Compel]
[[Òtù:Ngwaa]]
isgo85mdx7tfwrz2f95bypf09ma4mml
42614
42607
2026-06-23T14:04:48Z
Celetex
55
/* Olumba */
42614
wikitext
text/x-wiki
'''Mmanye'''
==Nkọwa==
Ịme mmadụ ka ome ihe n'amasighi ya ma ọ bu ihe ọ chọrọ ịme
==Nkejịasụsụ==
Ngwaa
=== Ọmụmaatụ ===
Biko amanyela m ime ihe a chọrọ m ime
=== Mkpọpụta ===
M/ma/nye
[[Usòrò:LL-Q33578 (ibo)-Olugold-Mmanye.wav|left|thumb|LL-Q33578 (ibo)-Olugold-Mmanye]]
=== Olumba ===
Nkwanye( Ukporo, Anambra)
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/compel Compel]
[[Òtù:Ngwaa]]
awgi3u9icjk4spoi4enwevi62nwvrib
ntọala
0
2685
42710
19470
2026-06-23T14:26:56Z
Celetex
55
/* Mkpọpụta */
42710
wikitext
text/x-wiki
'''ntọala '''
[[Usòrò:Dülmen, Münsterstraße, Fundamente -- 2016 -- 1846.jpg|Dülmen,_Münsterstraße,_Fundamente_--_2016_--_1846|thumb|right|ntọala]]
=Nkọwa=
# ebe kachasị ịdị ala ma bụrụ kwa ebe kachasị ebu ịbụ n'ụlọ a na-arụ, Ọ na anọkarị n'okpuru ala.
# ụlọ ọrụ emepere maka ịtụta ego eji e nyere ndị mmadụ maọbụ otú aka maọbụ maka ị kwado nchọpụta.
===Nkejiasụsụ===
aha
===Ọmụmaatụ===
# ntọala ụlọ a siri ike
# anyị n'atụ ntọala maka nkwado nka n'ụzụ
===Mkpọpụta===
Ntọana (Nnewi, Anambra)
[[Usòrò:LL-Q33578 (ibo)-Akwugo-ntọala.wav|thumb|áká_èkpè]]
===Olumba===
ntọani
=Ntụgharị n'asụsụ ọzọ=
===Bekee===
[https://en.m.wiktionary.org/wiki/foundation Foundation]
[[Òtù:aha]]
fuz7v2so4nc7mwul99ac1pvy2uu34wz
42720
42710
2026-06-23T14:28:31Z
Celetex
55
/* Mkpọpụta */
42720
wikitext
text/x-wiki
'''ntọala '''
[[Usòrò:Dülmen, Münsterstraße, Fundamente -- 2016 -- 1846.jpg|Dülmen,_Münsterstraße,_Fundamente_--_2016_--_1846|thumb|right|ntọala]]
=Nkọwa=
# ebe kachasị ịdị ala ma bụrụ kwa ebe kachasị ebu ịbụ n'ụlọ a na-arụ, Ọ na anọkarị n'okpuru ala.
# ụlọ ọrụ emepere maka ịtụta ego eji e nyere ndị mmadụ maọbụ otú aka maọbụ maka ị kwado nchọpụta.
===Nkejiasụsụ===
aha
===Ọmụmaatụ===
# ntọala ụlọ a siri ike
# anyị n'atụ ntọala maka nkwado nka n'ụzụ
===Mkpọpụta===
n/tọ/ala
[[Usòrò:LL-Q33578 (ibo)-Akwugo-ntọala.wav|thumb|áká_èkpè]]
===Olumba===
ntọani
=Ntụgharị n'asụsụ ọzọ=
===Bekee===
[https://en.m.wiktionary.org/wiki/foundation Foundation]
[[Òtù:aha]]
slfoallb5ibrj0ot7ku4mfsfcv8t7w7
42723
42720
2026-06-23T14:30:07Z
Celetex
55
/* Olumba */
42723
wikitext
text/x-wiki
'''ntọala '''
[[Usòrò:Dülmen, Münsterstraße, Fundamente -- 2016 -- 1846.jpg|Dülmen,_Münsterstraße,_Fundamente_--_2016_--_1846|thumb|right|ntọala]]
=Nkọwa=
# ebe kachasị ịdị ala ma bụrụ kwa ebe kachasị ebu ịbụ n'ụlọ a na-arụ, Ọ na anọkarị n'okpuru ala.
# ụlọ ọrụ emepere maka ịtụta ego eji e nyere ndị mmadụ maọbụ otú aka maọbụ maka ị kwado nchọpụta.
===Nkejiasụsụ===
aha
===Ọmụmaatụ===
# ntọala ụlọ a siri ike
# anyị n'atụ ntọala maka nkwado nka n'ụzụ
===Mkpọpụta===
n/tọ/ala
[[Usòrò:LL-Q33578 (ibo)-Akwugo-ntọala.wav|thumb|áká_èkpè]]
===Olumba===
Ntọana (Ukpor, Anambra)
ntọani
=Ntụgharị n'asụsụ ọzọ=
===Bekee===
[https://en.m.wiktionary.org/wiki/foundation Foundation]
[[Òtù:aha]]
3kai5oaor94crxp23d79cfntf5xdq0r
Utari
0
3157
42671
29683
2026-06-23T14:16:54Z
IfyClassique
950
42671
wikitext
text/x-wiki
"""Ụtarị""'
===Nkọwa===
Ụtarị bụ ogologo osisi nke a na-apia mmadụ maọbụ anụmanụ.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Onye nkuzi pịara nwata akwụkwọ ụtarị.
===Mkpọpụta===
Útàrí
[[File:LL-Q33578 (ibo)-Celetex-Ụtarị.wav|LL-Q33578 (ibo)-Celetex-Ụtarị]]
===Olumba===
Apịpịa
Ụtali
Mgbajara
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Cane
https://en.m.wiktionary.org/wiki/Cane
===Category===
[[Òtù:Wiki Loves Names]]
[[Òtù:aha]]
[[Òtù:Ihe a na-ahụ anya]]
[[Òtù:Igbo Noun Project]]
[[Category: Mmadụ]]
5n1ds7h00w8ewn8lizohzuirmancoyr
42672
42671
2026-06-23T14:17:18Z
IfyClassique
950
/* Category */
42672
wikitext
text/x-wiki
"""Ụtarị""'
===Nkọwa===
Ụtarị bụ ogologo osisi nke a na-apia mmadụ maọbụ anụmanụ.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Onye nkuzi pịara nwata akwụkwọ ụtarị.
===Mkpọpụta===
Útàrí
[[File:LL-Q33578 (ibo)-Celetex-Ụtarị.wav|LL-Q33578 (ibo)-Celetex-Ụtarị]]
===Olumba===
Apịpịa
Ụtali
Mgbajara
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Cane
https://en.m.wiktionary.org/wiki/Cane
[[Òtù:Wiki Loves Names]]
[[Òtù:aha]]
[[Òtù:Ihe a na-ahụ anya]]
[[Òtù:Igbo Noun Project]]
[[Category: Mmadụ]]
gb3rwttj7jaevdvna25kd6s3kezjqj5
42677
42672
2026-06-23T14:19:52Z
IfyClassique
950
42677
wikitext
text/x-wiki
"""Ụtarị""'
===Nkọwa===
Ụtarị bụ ogologo osisi nke a na-apia mmadụ maọbụ anụmanụ.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Onye nkuzi pịara nwata akwụkwọ ụtarị.
===Mkpọpụta===
Útàrí
[[File:LL-Q33578 (ibo)-Celetex-Ụtarị.wav|LL-Q33578 (ibo)-Celetex-Ụtarị]]
===Olumba===
Apịpịa
Ụtali
Mgbajara
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Cane
[[https://en.m.wiktionary.org/wiki/Cane Cane]]
[[Òtù:Wiki Loves Names]]
[[Òtù:aha]]
[[Òtù:Ihe a na-ahụ anya]]
[[Òtù:Igbo Noun Project]]
[[Category: Mmadụ]]
946jvufweb5jxwzyrp3gdp15es7bah9
42684
42677
2026-06-23T14:21:08Z
IfyClassique
950
/* Olumba */
42684
wikitext
text/x-wiki
"""Ụtarị""'
===Nkọwa===
Ụtarị bụ ogologo osisi nke a na-apia mmadụ maọbụ anụmanụ.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Onye nkuzi pịara nwata akwụkwọ ụtarị.
===Mkpọpụta===
Útàrí
[[File:LL-Q33578 (ibo)-Celetex-Ụtarị.wav|LL-Q33578 (ibo)-Celetex-Ụtarị]]
===Olumba===
#Apịpịa
#Ụtali
#Mgbajara
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Cane
[[https://en.m.wiktionary.org/wiki/Cane Cane]]
[[Òtù:Wiki Loves Names]]
[[Òtù:aha]]
[[Òtù:Ihe a na-ahụ anya]]
[[Òtù:Igbo Noun Project]]
[[Category: Mmadụ]]
m4lozsj586ummg64o5txpq9xew3e7dz
42686
42684
2026-06-23T14:21:33Z
IfyClassique
950
/* Bekee */
42686
wikitext
text/x-wiki
"""Ụtarị""'
===Nkọwa===
Ụtarị bụ ogologo osisi nke a na-apia mmadụ maọbụ anụmanụ.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Onye nkuzi pịara nwata akwụkwọ ụtarị.
===Mkpọpụta===
Útàrí
[[File:LL-Q33578 (ibo)-Celetex-Ụtarị.wav|LL-Q33578 (ibo)-Celetex-Ụtarị]]
===Olumba===
#Apịpịa
#Ụtali
#Mgbajara
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[[https://en.m.wiktionary.org/wiki/Cane Cane]]
[[Òtù:Wiki Loves Names]]
[[Òtù:aha]]
[[Òtù:Ihe a na-ahụ anya]]
[[Òtù:Igbo Noun Project]]
[[Category: Mmadụ]]
s7gl6yahif341f8928yhdkc0tbdkn2g
42692
42686
2026-06-23T14:23:25Z
IfyClassique
950
/* Olumba */
42692
wikitext
text/x-wiki
"""Ụtarị""'
===Nkọwa===
Ụtarị bụ ogologo osisi nke a na-apia mmadụ maọbụ anụmanụ.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Onye nkuzi pịara nwata akwụkwọ ụtarị.
===Mkpọpụta===
Útàrí
[[File:LL-Q33578 (ibo)-Celetex-Ụtarị.wav|LL-Q33578 (ibo)-Celetex-Ụtarị]]
===Olumba===
#Apịpịa (Imo)
#Ụtali
#Mgbajara(Anambra)
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[[https://en.m.wiktionary.org/wiki/Cane Cane]]
[[Òtù:Wiki Loves Names]]
[[Òtù:aha]]
[[Òtù:Ihe a na-ahụ anya]]
[[Òtù:Igbo Noun Project]]
[[Category: Mmadụ]]
993a7nz563v7so2wi602c34ivou90cn
42704
42692
2026-06-23T14:25:54Z
IfyClassique
950
IfyClassique moved page [[Ūtarï]] to [[Utari]]
42692
wikitext
text/x-wiki
"""Ụtarị""'
===Nkọwa===
Ụtarị bụ ogologo osisi nke a na-apia mmadụ maọbụ anụmanụ.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Onye nkuzi pịara nwata akwụkwọ ụtarị.
===Mkpọpụta===
Útàrí
[[File:LL-Q33578 (ibo)-Celetex-Ụtarị.wav|LL-Q33578 (ibo)-Celetex-Ụtarị]]
===Olumba===
#Apịpịa (Imo)
#Ụtali
#Mgbajara(Anambra)
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[[https://en.m.wiktionary.org/wiki/Cane Cane]]
[[Òtù:Wiki Loves Names]]
[[Òtù:aha]]
[[Òtù:Ihe a na-ahụ anya]]
[[Òtù:Igbo Noun Project]]
[[Category: Mmadụ]]
993a7nz563v7so2wi602c34ivou90cn
Ụzọchikwa
0
3506
42748
16942
2026-06-23T14:59:50Z
Goodymeraj
496
/* Nkọwa */ e mere m ndezi
42748
wikitext
text/x-wiki
'''Ụzọchikwa'''
===Nkọwa===
Ụzọchikwa bụ aha mmadụ pụtara ụzọ Chineke kwara
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
Ụzọchikwa bụ afa mmadụ
===Mkpọputa===
Ụ́zọ́chíkwá
===Olumba===
Ụzọchukwu
===Ntụgharị===
===Bekee===
Blessed
https://en.m.wiktionary.org/wiki/Blessed
[[Òtù:Wiki Loves Names]]
a9eo3b68b4eziesetwyg67uevywn842
42749
42748
2026-06-23T15:03:06Z
Goodymeraj
496
/* Mkpọputa */
42749
wikitext
text/x-wiki
'''Ụzọchikwa'''
===Nkọwa===
Ụzọchikwa bụ aha mmadụ pụtara ụzọ Chineke kwara
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
Ụzọchikwa bụ afa mmadụ
===Mkpọputa===
===Olumba===
Ụzọchukwu
===Ntụgharị===
===Bekee===
Blessed
https://en.m.wiktionary.org/wiki/Blessed
[[Òtù:Wiki Loves Names]]
sg5vvp4y3tu81h3pjokdkcq4uvcj2s6
42750
42749
2026-06-23T15:04:10Z
Goodymeraj
496
/* Ọmụmaatụ */
42750
wikitext
text/x-wiki
'''Ụzọchikwa'''
===Nkọwa===
Ụzọchikwa bụ aha mmadụ pụtara ụzọ Chineke kwara
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
Ụzọchikwa bụ aha mmadụ
===Mkpọputa===
===Olumba===
Ụzọchukwu
===Ntụgharị===
===Bekee===
Blessed
https://en.m.wiktionary.org/wiki/Blessed
[[Òtù:Wiki Loves Names]]
9rqu3kxi7fzg6fsoyj01bmwe6kxg46p
42751
42750
2026-06-23T15:04:38Z
Goodymeraj
496
/* Ntụgharị */
42751
wikitext
text/x-wiki
'''Ụzọchikwa'''
===Nkọwa===
Ụzọchikwa bụ aha mmadụ pụtara ụzọ Chineke kwara
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
Ụzọchikwa bụ aha mmadụ
===Mkpọputa===
===Olumba===
Ụzọchukwu
===Ntụgharị N'asụsụ Ọzọ===
===Bekee===
Blessed
https://en.m.wiktionary.org/wiki/Blessed
[[Òtù:Wiki Loves Names]]
ecn2yorqw6h5gn0krh051gend7un822
42752
42751
2026-06-23T15:05:13Z
Goodymeraj
496
/* Bekee */
42752
wikitext
text/x-wiki
'''Ụzọchikwa'''
===Nkọwa===
Ụzọchikwa bụ aha mmadụ pụtara ụzọ Chineke kwara
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
Ụzọchikwa bụ aha mmadụ
===Mkpọputa===
===Olumba===
Ụzọchukwu
===Ntụgharị N'asụsụ Ọzọ===
===Bekee===
[https://en.m.wiktionary.org/wiki/Blessed]
[[Òtù:Wiki Loves Names]]
ti1uwnoy40r1rb89k0g34azgy58lci8
42753
42752
2026-06-23T15:07:13Z
Goodymeraj
496
/* Bekee */ e mere m ndezi
42753
wikitext
text/x-wiki
'''Ụzọchikwa'''
===Nkọwa===
Ụzọchikwa bụ aha mmadụ pụtara ụzọ Chineke kwara
===Nkeji Asụsụ===
Aha
===Ọmụmaatụ===
Ụzọchikwa bụ aha mmadụ
===Mkpọputa===
===Olumba===
Ụzọchukwu
===Ntụgharị N'asụsụ Ọzọ===
===Bekee===
[https://en.m.wiktionary.org/wiki/ Blessed]
[[Òtù:Wiki Loves Names]]
28fgij8gt19uldxygcf2ds4jdqq5uri
Chiadigo
0
3659
42386
29278
2026-06-23T12:51:42Z
Chrysella
166
42386
wikitext
text/x-wiki
==Nkọwa==
* Nke a pụtara na chukwu nọ ya nke mgbe ri ụwa
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Aha m bụ Chiadigo.
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Chiadigo.wav|áká_èkpè|thumb|Chiadigo]]
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
There is God
[[Category:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
9kbly2dsx2toasuvh7ntms56nh2sztx
42401
42386
2026-06-23T12:56:09Z
Chrysella
166
42401
wikitext
text/x-wiki
==Nkọwa==
* Nke a pụtara na chukwu nọ ya nke mgbe ri ụwa
* Nke a bụ aha pụtara na ya enweela chi
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Aha m bụ Chiadigo.
===Mkpọpụta===
[[Usòrò:LL-Q33578 (ibo)-Lebron jay-Chiadigo.wav|áká_èkpè|thumb|Chiadigo]]
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
There is God
[[Category:wiki loves names]]
[[Òtù:aha]]
[[Òtù:Mmadụ]]
[[Òtù:Igbo Noun Project]]
o61guziilbshwgg1ice6dvg0n34zfnr
Templeeti:delete
10
3682
42913
2005-06-30T15:45:36Z
Yann
1911
#REDIRECT [[Template:Rfd]]
42913
wikitext
text/x-wiki
#REDIRECT [[Template:Rfd]]
42w0rmwr7ao81vwq3l30c7j2k9ofbw3
42914
42913
2006-01-22T06:58:54Z
Gmcfoley
1912
New speedy delete template
42914
wikitext
text/x-wiki
<div style="background-color: #fee; border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%;">
[[Image:Icono aviso borrar.png|60px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]].''<br style="clear:left">
</div>
<includeonly>[[Category:Candidates for speedy deletion]]</includeonly>
nruaj01qjyzvp9uf8rra8c6koj3rwca
42915
42914
2006-01-27T00:57:04Z
Connel MacKenzie
1302
42915
wikitext
text/x-wiki
<div style="background-color: #fee; border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%;">
[[Image:Icono aviso borrar.png|60px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]].''<br style="clear:left">
</div>
<includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
===Usage===
This template is intended to notify [[WS:A|sysops]] that there is junk that very obviously should be removed. If there is any question possible, that the entry should maybe be retained for any reason whatsoever, then use <nowiki>{{rfd}}</nowiki> instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WS:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
====Some examples====
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|The entry says it is a word in Swahilli but I have never heard it and it is not listed in my dictionary.}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
</noinclude>
qt77mybv5ja2j7vmhpvdg40xzcedzs7
42916
42915
2006-01-27T01:02:25Z
Connel MacKenzie
1302
removed bad example (that sort of thing goes to rfd or rfv)
42916
wikitext
text/x-wiki
<div style="background-color: #fee; border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%;">
[[Image:Icono aviso borrar.png|60px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]].''<br style="clear:left">
</div>
<includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
===Usage===
This template is intended to notify [[WS:A|sysops]] that there is junk that very obviously should be removed. If there is any question possible, that the entry should maybe be retained for any reason whatsoever, then use <nowiki>{{rfd}}</nowiki> instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WS:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
====Some examples====
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
</noinclude>
f5acok4oy3u2xcojt9zmp6dephj1tmy
42917
42916
2006-01-29T06:19:56Z
Connel MacKenzie
1302
make category visible here.
42917
wikitext
text/x-wiki
<div style="background-color: #fee; border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%;">
[[Image:Icono aviso borrar.png|60px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]].''<br style="clear:left">
</div>
<includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
===Usage===
This template is intended to notify [[WS:A|sysops]] that there is junk that very obviously should be removed. If there is any question possible, that the entry should maybe be retained for any reason whatsoever, then use <nowiki>{{rfd}}</nowiki> instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>. Some sysops periodically check [[:Category:Candidates for speedy deletion]].
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WS:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
====Some examples====
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
</noinclude>
rz17l3tje5fofcwexomegq56rrc7834
42918
42917
2006-02-17T22:32:13Z
Connel MacKenzie
1302
red to indicate something bad will happen to this article
42918
wikitext
text/x-wiki
<div style="background-color: #ff5555; border:3px solid #000000; margin: 0 auto; padding: 5px 10px 5px; width: 95%;">
[[Image:Icono aviso borrar.png|60px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]].''<br style="clear:left">
</div>
<includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
===Usage===
This template is intended to notify [[WS:A|sysops]] that there is junk that very obviously should be removed. If there is any question possible, that the entry should maybe be retained for any reason whatsoever, then use <nowiki>{{rfd}}</nowiki> instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>. Some sysops periodically check [[:Category:Candidates for speedy deletion]].
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WS:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
====Some examples====
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
</noinclude>
qnmkpivltdwz4sowln6rz5o9llano1y
42919
42918
2006-02-19T01:32:04Z
Gmcfoley
1912
Dam, those colors have to go, sorry
42919
wikitext
text/x-wiki
<div style="background-color: #fee; border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%;">
[[Image:Icono aviso borrar.png|60px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]].''<br style="clear:left">
</div>
<includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
===Usage===
This template is intended to notify [[WS:A|sysops]] that there is junk that very obviously should be removed. If there is any question possible, that the entry should maybe be retained for any reason whatsoever, then use <nowiki>{{rfd}}</nowiki> instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>. Some sysops periodically check [[:Category:Candidates for speedy deletion]].
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WS:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
====Some examples====
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
</noinclude>
rz17l3tje5fofcwexomegq56rrc7834
42920
42919
2006-02-19T21:55:58Z
Connel MacKenzie
1302
pink conveys nothing; red actually ''means'' something.
42920
wikitext
text/x-wiki
<div style="background-color: #f55; border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%;">
[[Image:Icono aviso borrar.png|60px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]].''<br style="clear:left">
</div>
<includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
===Usage===
This template is intended to notify [[WS:A|sysops]] that there is junk that very obviously should be removed. If there is any question possible, that the entry should maybe be retained for any reason whatsoever, then use <nowiki>{{rfd}}</nowiki> instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>. Some sysops periodically check [[:Category:Candidates for speedy deletion]].
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WS:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
====Some examples====
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
</noinclude>
7tpzx2l2mn7xv5rj880uaijlw085g4f
42921
42920
2006-04-07T08:48:08Z
Vildricianus
1301
merge with [[Template:Deletebecause]]
42921
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata" id="delete" style="background-color: #f55; border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%;">
[[Image:Icono aviso borrar.png|60px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{NAMESPACE}}:{{PAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div>
<includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
===Usage===
This template is intended to notify [[WS:A|sysops]] that there is junk that very obviously should be removed. If there is any question possible, that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>. Some sysops periodically check [[:Category:Candidates for speedy deletion]].
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WS:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
====Some examples====
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
</noinclude>
27oq1ivdxf3u9h8l0vblc64810s4mal
42922
42921
2006-04-07T08:52:30Z
Vildricianus
1301
tweak
42922
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata" id="delete" style="background-color: #f55; border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%;">
[[Image:Icono aviso borrar.png|60px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div>
<includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
===Usage===
This template is intended to notify [[WS:A|sysops]] that there is junk that very obviously should be removed. If there is any question possible, that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>. Some sysops periodically check [[:Category:Candidates for speedy deletion]].
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WS:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
====Some examples====
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
</noinclude>
d6xmmw427z53dneqm2ukcjc0pc8x7yw
42923
42922
2006-04-07T09:11:57Z
Vildricianus
1301
42923
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata" id="delete" style="background-color: #f55; border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Icono aviso borrar.png|60px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div>
<includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
===Usage===
This template is intended to notify [[WS:A|sysops]] that there is junk that very obviously should be removed. If there is any question possible, that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>. Some sysops periodically check [[:Category:Candidates for speedy deletion]].
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WS:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
====Some examples====
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
</noinclude>
4bi1jquk21lokne6kmzgltogms125oo
42924
42923
2006-04-25T19:01:39Z
Vildricianus
1301
42924
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata" id="delete" style="background-color: #f55; border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Icono aviso borrar.png|60px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div>
<includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
===Usage===
This template is intended to notify [[WS:A|sysops]] that there is junk that very obviously should be removed. If there is any question possible, that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>. Some sysops periodically check [[:Category:Candidates for speedy deletion]].
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WS:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
====Some examples====
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
[[Category:Deletion templates|delete]]
</noinclude>
km5cyelkbgehaml37fs7obvx3988btv
42925
42924
2006-05-27T17:52:46Z
Jon Harald Søby
4
changing image
42925
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata" id="delete" style="background-color:#f88;border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Crystal Clear filesystem trashcan full.png|80px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div>
<includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
===Usage===
This template is intended to notify [[WS:A|sysops]] that there is junk that very obviously should be removed. If there is any question possible, that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>. Some sysops periodically check [[:Category:Candidates for speedy deletion]].
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WS:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
====Some examples====
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
[[Category:Deletion templates|delete]]
</noinclude>
r9cxnkx4nb6dli5c7kbzah1xcy20aof
42926
42925
2006-06-28T23:29:01Z
Connel MacKenzie
1302
WS --> WT
42926
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata" id="delete" style="background-color:#f88;border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Crystal Clear filesystem trashcan full.png|80px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div>
<includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
===Usage===
This template is intended to notify [[WT:A|sysops]] that there is junk that very obviously should be removed. If there is any question possible, that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>. Some sysops periodically check [[:Category:Candidates for speedy deletion]].
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
====Some examples====
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
[[Category:Deletion templates|delete]]
</noinclude>
t9sab0mmdwg6rb9szrk3g99sjenns2g
42927
42926
2006-08-15T02:57:18Z
Pathoschild
398
added optional named parameter (more flexible)
42927
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata" id="delete" style="background-color:#f88;border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Crystal Clear filesystem trashcan full.png|80px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{reason|{{{1}}}}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div>
<includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
===Usage===
This template is intended to notify [[WT:A|sysops]] that there is junk that very obviously should be removed. If there is any question possible, that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>. Some sysops periodically check [[:Category:Candidates for speedy deletion]].
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
====Some examples====
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
[[Category:Deletion templates|delete]]
</noinclude>
ihs7kkqu1gnplm3y3i8pet9cer0e8gx
42928
42927
2006-12-12T04:27:46Z
Connel MacKenzie
1302
put maint template in category
42928
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata" id="delete" style="background-color:#f88;border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Crystal Clear filesystem trashcan full.png|80px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{reason|{{{1}}}}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div>
[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]<noinclude>
----
===Usage===
This template is intended to notify [[WT:A|sysops]] that there is junk that very obviously should be removed. If there is any question possible, that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>. Some sysops periodically check [[:Category:Candidates for speedy deletion]].
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
====Some examples====
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
[[Category:Deletion templates|delete]]
</noinclude>
t4nw087oiww9y6thnys21nbf722g1fu
42929
42928
2007-03-31T19:08:12Z
BD2412
1913
/* Some examples */ can be used for self-error too
42929
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata" id="delete" style="background-color:#f88;border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Crystal Clear filesystem trashcan full.png|80px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{reason|{{{1}}}}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div>
[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]<noinclude>
----
===Usage===
This template is intended to notify [[WT:A|sysops]] that there is junk that very obviously should be removed. If there is any question possible, that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>. Some sysops periodically check [[:Category:Candidates for speedy deletion]].
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
====Some examples====
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
[[Category:Deletion templates|delete]]
</noinclude>
3msc1pa02q7bi3i2dn80ys17mcub98b
42930
42929
2007-04-05T08:44:42Z
J Di
1914
added plainlinks class and changed background colour
42930
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata plainlinks" id="delete" style="background-color:#fbb;border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Crystal Clear filesystem trashcan full.png|80px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{reason|{{{1}}}}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div>
[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]<noinclude>
----
===Usage===
This template is intended to notify [[WT:A|sysops]] that there is junk that very obviously should be removed. If there is any question possible, that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>. Some sysops periodically check [[:Category:Candidates for speedy deletion]].
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
====Some examples====
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
[[Category:Deletion templates|delete]]
</noinclude>
rn5l308lje20u5z6n3dhrhdkzgxjh1f
42931
42930
2007-05-26T01:55:00Z
Picaroon
1915
no objections on talk page after a month and five days
42931
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata plainlinks" id="delete" style="background-color:#fbb;border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Crystal Clear filesystem trashcan full.png|80px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{reason|{{{1}}}}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div><includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
===Usage===
This template is intended to notify [[WT:A|sysops]] that there is junk that very obviously should be removed. If there is any question possible, that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>. Some sysops periodically check [[:Category:Candidates for speedy deletion]].
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
====Some examples====
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
[[Category:Deletion templates|delete]]
</noinclude>
rc355u6juffscanj15r6s1q0pnbsqyt
42932
42931
2007-06-03T10:56:16Z
Derbeth
1916
interwiki
42932
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata plainlinks" id="delete" style="background-color:#fbb;border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Crystal Clear filesystem trashcan full.png|80px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{reason|{{{1}}}}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div><includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
===Usage===
This template is intended to notify [[WT:A|sysops]] that there is junk that very obviously should be removed. If there is any question possible, that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>. Some sysops periodically check [[:Category:Candidates for speedy deletion]].
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
====Some examples====
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
[[Category:Deletion templates|delete]]
[[de:Vorlage:löschen]]
[[pl:Szablon:ek]]
</noinclude>
kdhg2bobjbq21a8w6pdqnlw57ftgk5v
42933
42932
2007-06-05T16:17:57Z
Ruakh
1334
mv doc to talk-page so {{temp}} will work properly. (Fortunately this template is transcluded in only other page at the moment!)
42933
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata plainlinks" id="delete" style="background-color:#fbb;border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Crystal Clear filesystem trashcan full.png|80px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{reason|{{{1}}}}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div><includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
[[de:Vorlage:löschen]]
[[pl:Szablon:ek]]
</noinclude>
0lm6ucg2bycp5xb55zaaemevrv14ho8
42934
42933
2007-07-29T08:31:16Z
Sadik Khalid
1917
42934
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata plainlinks" id="delete" style="background-color:#fbb;border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Crystal Clear filesystem trashcan full.png|80px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{reason|{{{1}}}}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div><includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
[[de:Vorlage:löschen]]
[[pl:Szablon:ek]]
[[ml:ഫലകം:മായ്ക്കുക]]
</noinclude>
asd4svh4blppp4py0p5l8vohq28effs
42935
42934
2007-07-29T08:42:46Z
EncycloPetey
1321
Reverted edits by [[Special:Contributions/Sadik Khalid|Sadik Khalid]] ([[User_talk:Sadik Khalid|Talk]]); changed back to last version by [[User:Ruakh|Ruakh]]
42935
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata plainlinks" id="delete" style="background-color:#fbb;border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Crystal Clear filesystem trashcan full.png|80px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{reason|{{{1}}}}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div><includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
[[de:Vorlage:löschen]]
[[pl:Szablon:ek]]
</noinclude>
0lm6ucg2bycp5xb55zaaemevrv14ho8
42936
42935
2007-07-29T08:43:23Z
EncycloPetey
1321
rm iw; we don't include iw on template pages
42936
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata plainlinks" id="delete" style="background-color:#fbb;border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Crystal Clear filesystem trashcan full.png|80px|left|Delete]]
'''This page is a candidate for speedy deletion. The user who listed it for deletion gave the following explanation: ''"{{{reason|{{{1}}}}}}"'''''
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div><includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
----
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
</noinclude>
iaziu2qxlk4ukwinjk8k2buhoh635kd
42937
42936
2007-09-02T16:37:45Z
Salaskan
1918
adding parserfunctions
42937
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata plainlinks" id="delete" style="background-color:#fbb;border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Crystal Clear filesystem trashcan full.png|80px|left|Delete]]
'''This page is a candidate for speedy deletion.{{{#if:{{{1|}}}| The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''}}
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div>{{#ifeq:{{PAGENAME}}|Maintenance templates||<includeonly>[[Category:Candidates for speedy deletion]]</includeonly>}}<noinclude>
----
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
</noinclude>
74j91lg1wsn63dw0oe3mk39c5xgjmou
42938
42937
2007-09-02T16:37:56Z
Salaskan
1918
typo
42938
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata plainlinks" id="delete" style="background-color:#fbb;border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Crystal Clear filesystem trashcan full.png|80px|left|Delete]]
'''This page is a candidate for speedy deletion.{{#if:{{{1|}}}| The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''}}
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div>{{#ifeq:{{PAGENAME}}|Maintenance templates||<includeonly>[[Category:Candidates for speedy deletion]]</includeonly>}}<noinclude>
----
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
</noinclude>
hpsnvmz4jm2anrk13xo2iz5wk0e8nvo
42939
42938
2007-09-02T18:06:18Z
Ruakh
1334
Protected "[[Template:delete]]": A natural target for vandalism. [edit=sysop:move=sysop] [cascading]
42938
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata plainlinks" id="delete" style="background-color:#fbb;border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Crystal Clear filesystem trashcan full.png|80px|left|Delete]]
'''This page is a candidate for speedy deletion.{{#if:{{{1|}}}| The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''}}
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div>{{#ifeq:{{PAGENAME}}|Maintenance templates||<includeonly>[[Category:Candidates for speedy deletion]]</includeonly>}}<noinclude>
----
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
</noinclude>
hpsnvmz4jm2anrk13xo2iz5wk0e8nvo
42940
42939
2007-09-02T18:06:41Z
Ruakh
1334
Changed protection level for "[[Template:delete]]": On second thought, it's not widely transcluded or anything. [edit=autoconfirmed:move=autoconfirmed]
42938
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata plainlinks" id="delete" style="background-color:#fbb;border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Crystal Clear filesystem trashcan full.png|80px|left|Delete]]
'''This page is a candidate for speedy deletion.{{#if:{{{1|}}}| The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''}}
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div>{{#ifeq:{{PAGENAME}}|Maintenance templates||<includeonly>[[Category:Candidates for speedy deletion]]</includeonly>}}<noinclude>
----
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
</noinclude>
hpsnvmz4jm2anrk13xo2iz5wk0e8nvo
42941
42940
2007-09-04T23:46:55Z
Connel MacKenzie
1302
Restore template to the category again: this is used for sysop navigation too, dammit!
42941
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata plainlinks" id="delete" style="background-color:#fbb;border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Crystal Clear filesystem trashcan full.png|80px|left|Delete]]
'''This page is a candidate for speedy deletion.{{#if:{{{1|}}}| The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''}}
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div>{{#ifeq:{{PAGENAME}}|Maintenance templates||[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}<noinclude>
----
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
</noinclude>
ro0w7dh9l5b8hgbehi03zfksjtsm2gu
42942
42941
2007-11-18T02:21:02Z
190.30.182.170
es
42942
wikitext
text/x-wiki
<div name="Deletion notice" class="boilerplate metadata plainlinks" id="delete" style="background-color:#fbb;border:1px solid #aaa; margin: 0 auto; padding: 5px 10px 5px; width: 95%; font-size:95%;">
[[Image:Crystal Clear filesystem trashcan full.png|80px|left|Delete]]
'''This page is a candidate for speedy deletion.{{#if:{{{1|}}}| The user who listed it for deletion gave the following explanation: ''"{{{1}}}"'''''}}
''If you disagree that the page should be speedily deleted, please explain why on [[Wiktionary:Requests for deletion]] or on its [[{{NAMESPACE}} talk:{{PAGENAME}}|talk page]].''
''[[Wiktionary:Administrators|Administrators]] - Remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=history}} the page history] ([{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|diff=0}} last edit]) before deleting.''<br style="clear:left">
</div>{{#ifeq:{{PAGENAME}}|Maintenance templates||[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}<noinclude>
----
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
ry14tbp95sh2lqevyrf00nfieejcv1s
42943
42942
2008-02-26T13:20:55Z
Conrad.Irwin
1315
complete re-jig
42943
wikitext
text/x-wiki
{| style="background-color:#FFE7DD;border: 3px solid #B40204;width:90%;margin:auto;text-align:left;"
| rowspan="2"| [[Image:Icono_aviso_borrar.png|50px]]
! This page has been marked for imminent deletion.
|-
| If it should be kept then replace {{temp|delete}} with {{temp|rfd}} and explain why {{#if:{{{1|}}}|the given reason, "'''{{{1}}}'''", does not apply}} on '''[[Wiktionary:Requests for deletion]]'''.
|} [[Category:Candidates for speedy deletion]]<noinclude>
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
ji9madylvol642579sdx6gboyclf4mm
42944
42943
2008-02-26T13:56:32Z
Conrad.Irwin
1315
rm category
42944
wikitext
text/x-wiki
{| style="background-color:#FFE7DD;border: 3px solid #B40204;width:90%;margin:auto;text-align:left;"
| rowspan="2"| [[Image:Icono_aviso_borrar.png|50px]]
! This page has been marked for imminent deletion.
|-
| If it should be kept then replace {{temp|delete}} with {{temp|rfd}} and explain why {{#if:{{{1|}}}|the given reason, "'''{{{1}}}'''", does not apply}} on '''[[Wiktionary:Requests for deletion]]'''.
|} <includeonly>[[Category:Candidates for speedy deletion]]</includeonly><noinclude>
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
lc3i6nr39tenqgrd58nethqv0fyzwd7
42945
42944
2008-02-26T15:30:24Z
Conrad.Irwin
1315
add a "demo" param
42945
wikitext
text/x-wiki
{| style="background-color:#FFE7DD;border: 3px solid #B40204;width:90%;margin:auto;text-align:left;"
| rowspan="2"| [[Image:Icono_aviso_borrar.png|50px]]
! This page has been marked for imminent deletion.
|-
| If it should be kept then replace {{temp|delete}} with {{temp|rfd}} and explain why {{#if:{{{1|}}}|the given reason, "'''{{{1}}}'''", does not apply}} on '''[[Wiktionary:Requests for deletion]]'''.
|} <includeonly>{{{demo|[[Category:Candidates for speedy deletion]]}}}</includeonly><noinclude>
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
1f85b05rl0ux3udhq75j055r20pdqt6
42946
42945
2008-02-26T17:15:52Z
Conrad.Irwin
1315
dashed border
42946
wikitext
text/x-wiki
{| style="background-color:#FFE7DD;border: 1px dashed #884444;width:90%;margin:auto;text-align:left;"
| rowspan="2"| [[Image:Icono_aviso_borrar.png|50px]]
! This page has been marked for imminent deletion.
|-
| If it should be kept then replace {{temp|delete}} with {{temp|rfd}} and explain why {{#if:{{{1|}}}|the given reason, "'''{{{1}}}'''", does not apply}} on '''[[Wiktionary:Requests for deletion]]'''.
|} <includeonly>{{{demo|[[Category:Candidates for speedy deletion]]}}}</includeonly><noinclude>
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
dqoz5pcv63pogpm0a04nifu82y8eewv
42947
42946
2008-02-27T00:00:41Z
Ruakh
1334
call an entry an entry.
42947
wikitext
text/x-wiki
{| style="background-color:#FFE7DD;border: 1px dashed #884444;width:90%;margin:auto;text-align:left;"
| rowspan="2"| [[Image:Icono_aviso_borrar.png|50px]]
! This {{#if:{{NAMESPACE}}|page|entry}} has been marked for imminent deletion.
|-
| If it should be kept then replace {{temp|delete}} with {{temp|rfd}} and explain why {{#if:{{{1|}}}|the given reason, "'''{{{1}}}'''", does not apply}} on '''[[Wiktionary:Requests for deletion]]'''.
|} <includeonly>{{{demo|[[Category:Candidates for speedy deletion]]}}}</includeonly><noinclude>
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
8ahhzs1lpq69ba10tqma4ivt4vviwt3
42948
42947
2008-02-27T00:09:27Z
Ruakh
1334
rm requirement that the given reason be shown not to apply: it might just not be a valid reason. And, various wording changes to make that work.
42948
wikitext
text/x-wiki
{| style="background-color:#FFE7DD;border: 1px dashed #884444;width:90%;margin:auto;text-align:left;"
| rowspan="2"| [[Image:Icono_aviso_borrar.png|50px]]
! A user has marked this {{#if:{{NAMESPACE}}|page|entry}} for imminent deletion{{#if:{{{1}}}|, giving the reason, “{{{1}}}”}}.
|-
| If it should be kept, or at least discussed, then please replace {{temp|delete}} with {{temp|rfd}} and explain why on '''[[Wiktionary:Requests for deletion]]'''.
|} <includeonly>{{{demo|[[Category:Candidates for speedy deletion]]}}}</includeonly><noinclude>
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
dssepkf55ojwbkrjnr501vjyxzpy2ch
42949
42948
2008-02-27T00:16:27Z
Ruakh
1334
+helpful links
42949
wikitext
text/x-wiki
{| style="background-color:#FFE7DD;border: 1px dashed #884444;width:90%;margin:auto;text-align:left;"
| rowspan="2"| [[Image:Icono_aviso_borrar.png|50px]]
! A user has marked this {{#if:{{NAMESPACE}}|page|entry}} for imminent deletion{{#if:{{{1|}}}|, giving the reason, “{{{1}}}”}}.
|-
| If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replacing {{temp|delete}} with {{temp|rfd}}, and [{{fullurl:Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} add a section to Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}] explaining why.
|} <includeonly>{{{demo|[[Category:Candidates for speedy deletion]]}}}</includeonly><noinclude>
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
s3vr9f9aciztsit13c9o4p9ksrjaec5
42950
42949
2008-02-27T20:53:12Z
Msh210
1325
42950
wikitext
text/x-wiki
{| style="background-color:#FFE7DD;border: 1px dashed #884444;width:90%;margin:auto;text-align:left;"
| rowspan="2"| [[Image:Icono_aviso_borrar.png|50px]]
! A user has marked this {{#if:{{NAMESPACE}}|page|entry}} for imminent deletion{{#if:{{{1|}}}|, giving the reason, “{{{1}}}”}}.
|-
| If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replacing {{temp|delete}} (or {{temp|d}}) with {{temp|rfd}}, and [{{fullurl:Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} add a section to Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}] explaining why.
|} <includeonly>{{{demo|[[Category:Candidates for speedy deletion]]}}}</includeonly><noinclude>
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
o515m4ovffcvlk4fy3jfsggyj141lu7
42951
42950
2008-02-27T21:07:11Z
Conrad.Irwin
1315
proper quote chars, rm edit link to rfd (its on {rfd}) and changing {delete} ( or {d}) to "this template"
42951
wikitext
text/x-wiki
{| class="plainlinks" style="background-color:#FFE7DD;border: 1px dashed #884444;width:90%;margin:auto;text-align:left;"
| rowspan="2"| [[Image:Icono_aviso_borrar.png|50px]]
! A user has marked this {{#if:{{NAMESPACE}}|page|entry}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|-
| If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
|} <includeonly>{{{demo|[[Category:Candidates for speedy deletion]]}}}</includeonly><noinclude>
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
f93psupph2w7w2yjaakp3wywtyw7qwr
42952
42951
2008-02-27T21:12:14Z
Conrad.Irwin
1315
use {{pagetype}}
42952
wikitext
text/x-wiki
{| class="plainlinks" style="background-color:#FFE7DD;border: 1px dashed #884444;width:90%;margin:auto;text-align:left;"
| rowspan="2"| [[Image:Icono_aviso_borrar.png|50px]]
! A user has marked this {{pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|-
| If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
|} <includeonly>{{{demo|[[Category:Candidates for speedy deletion]]}}}</includeonly><noinclude>
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
6c9qqlhxo9y0dl0uhx00blayphhbd6l
42953
42952
2008-03-28T07:46:43Z
Connel MacKenzie
1302
restore navigation category
42953
wikitext
text/x-wiki
{| class="plainlinks" style="background-color:#FFE7DD;border: 1px dashed #884444;width:90%;margin:auto;text-align:left;"
| rowspan="2"| [[Image:Icono_aviso_borrar.png|50px]]
! A user has marked this {{pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|-
| If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
|} [[Category:Candidates for speedy deletion]]<noinclude>
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
dmav0vaejglptpgcl19k8rhdxbm89f3
42954
42953
2008-03-28T07:49:37Z
Connel MacKenzie
1302
sort
42954
wikitext
text/x-wiki
{| class="plainlinks" style="background-color:#FFE7DD;border: 1px dashed #884444;width:90%;margin:auto;text-align:left;"
| rowspan="2"| [[Image:Icono_aviso_borrar.png|50px]]
! A user has marked this {{pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|-
| If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
|} [[Category:Candidates for speedy deletion<includeonly>|*</includeonly>]]<noinclude>
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
h1om8tore9bah85rkp89oqfoaghua89
42955
42954
2008-03-28T12:06:39Z
Ruakh
1334
restore {{{demo}}} so we can control whether pages get categorized
42955
wikitext
text/x-wiki
{| class="plainlinks" style="background-color:#FFE7DD;border: 1px dashed #884444;width:90%;margin:auto;text-align:left;"
| rowspan="2"| [[Image:Icono_aviso_borrar.png|50px]]
! A user has marked this {{pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|-
| If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
|} {{{demo|[[Category:Candidates for speedy deletion<includeonly>|*</includeonly>]]}}}<noinclude>
Please see this template's discussion page ([[Template talk:delete]]) for documentation.
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
950gqs0j3dwzzj43nvfrsnfxe35xmla
42956
42955
2008-04-26T14:47:22Z
Conrad.Irwin
1315
move template to * in the Category
42956
wikitext
text/x-wiki
{| class="plainlinks" style="background-color:#FFE7DD;border: 1px dashed #884444;width:90%;margin:auto;text-align:left;"
| rowspan="2"| [[Image:Icono_aviso_borrar.png|50px]]
! A user has marked this {{pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|-
| If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
|} {{{demo|[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}}<noinclude>
{{seeTalk}}
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
bwlx15p805idogg3zmhlaifnxx5qz9r
42957
42956
2008-04-26T14:47:59Z
Conrad.Irwin
1315
clarify {{pagetype}}
42957
wikitext
text/x-wiki
{| class="plainlinks" style="background-color:#FFE7DD;border: 1px dashed #884444;width:90%;margin:auto;text-align:left;"
| rowspan="2"| [[Image:Icono_aviso_borrar.png|50px]]
! A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|-
| If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
|} {{{demo|[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}}<noinclude>
{{seeTalk}}
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
mm444zpz0tb1kkid2cxhbb0m8ki71ii
42958
42957
2008-07-28T09:07:07Z
81.110.172.127
Removing all content from page
42958
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
42959
42958
2008-07-28T09:51:27Z
EivindJ
1919
Undo revision 4901761 by [[Special:Contributions/81.110.172.127|81.110.172.127]] ([[User talk:81.110.172.127|Talk]])
42959
wikitext
text/x-wiki
{| class="plainlinks" style="background-color:#FFE7DD;border: 1px dashed #884444;width:90%;margin:auto;text-align:left;"
| rowspan="2"| [[Image:Icono_aviso_borrar.png|50px]]
! A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|-
| If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
|} {{{demo|[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}}<noinclude>
{{seeTalk}}
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
mm444zpz0tb1kkid2cxhbb0m8ki71ii
42960
42959
2008-07-28T11:26:35Z
Conrad.Irwin
1315
use {{maintenance box}}
42960
wikitext
text/x-wiki
{{maintenance box|red
|image=[[Image:Icono_aviso_borrar.png|50px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|text= If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} {{{demo|[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}}<noinclude>
{{seeTalk}}
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
2p0fv4knl6buq5myxmjtjy3gxnzhlpu
42961
42960
2008-08-14T12:55:38Z
Gauss
1920
why does sometimes a given reason not show up on the page?
42961
wikitext
text/x-wiki
{{maintenance box|red
|image=[[Image:Icono_aviso_borrar.png|50px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"|}}.
|text= If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} {{{demo|[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}}<noinclude>
{{seeTalk}}
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
43etk3xyzxcuwvyr2ouf90dgu69emg8
42962
42961
2008-09-17T02:53:27Z
EVula
1921
tweaking template so it doesn't show up in the speedy deletion category
42962
wikitext
text/x-wiki
{{maintenance box|red
|image=[[Image:Icono_aviso_borrar.png|50px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"|}}.
|text= If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} {{{demo|[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}}<noinclude>
{{seeTalk}}
[[es:Plantilla:destruir]]
</noinclude>
<includeonly>[[Category:Deletion templates|delete]]</includeonly>
t689fm6y3hdpgbr263nbf7s0t5hk8cm
42963
42962
2008-09-17T02:57:01Z
Robert Ullmann
1308
Undo revision 5153313 by [[Special:Contributions/EVula|EVula]] ([[User talk:EVula|Talk]]) no, the "deletion templates" cat should contain this; it also should show in the cleanup cat under *
42963
wikitext
text/x-wiki
{{maintenance box|red
|image=[[Image:Icono_aviso_borrar.png|50px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"|}}.
|text= If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} {{{demo|[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}}<noinclude>
{{seeTalk}}
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
43etk3xyzxcuwvyr2ouf90dgu69emg8
42964
42963
2009-01-16T16:25:34Z
Visviva
1922
think this would keep everyone happy...
42964
wikitext
text/x-wiki
{{maintenance box|red
|image=[[Image:Icono_aviso_borrar.png|50px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"|}}.
|text= If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} <includeonly>{{{demo|[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}}</includeonly><noinclude>
{{seeTalk}}
See [[:Category:Candidates for speedy deletion]]
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
abp630pbh7n82bed3ly8ibj0a38ybfh
42965
42964
2009-02-28T01:41:46Z
76.67.158.16
Replaced content with '{{{rfd}}}'
42965
wikitext
text/x-wiki
{{{rfd}}}
nnhy5drtsywt7git7en2s12yqrolqaq
42966
42965
2009-02-28T01:43:20Z
Conrad.Irwin
1315
Reverted edits by [[Special:Contributions/76.67.158.16|76.67.158.16]] ([[User_talk:76.67.158.16|Talk]]); changed back to last version by [[User:Visviva|Visviva]]
42966
wikitext
text/x-wiki
{{maintenance box|red
|image=[[Image:Icono_aviso_borrar.png|50px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"|}}.
|text= If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} <includeonly>{{{demo|[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}}</includeonly><noinclude>
{{seeTalk}}
See [[:Category:Candidates for speedy deletion]]
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
abp630pbh7n82bed3ly8ibj0a38ybfh
42967
42966
2009-03-02T16:53:20Z
Msh210
1325
Protected "[[Template:delete]]": High traffic page: Oddly, the log says this has been protected and not unprotected, yet it's not currently protected. Go figure. ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite))
42966
wikitext
text/x-wiki
{{maintenance box|red
|image=[[Image:Icono_aviso_borrar.png|50px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"|}}.
|text= If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} <includeonly>{{{demo|[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}}</includeonly><noinclude>
{{seeTalk}}
See [[:Category:Candidates for speedy deletion]]
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
abp630pbh7n82bed3ly8ibj0a38ybfh
42968
42967
2009-04-06T03:03:56Z
Letsdrinktea
1923
diction fix
42968
wikitext
text/x-wiki
{{maintenance box|red
|image=[[Image:Icono_aviso_borrar.png|50px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for immediate deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"|}}.
|text= If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} <includeonly>{{{demo|[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}}</includeonly><noinclude>
{{seeTalk}}
See [[:Category:Candidates for speedy deletion]]
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
au1pavzipnopgb6jc1y9ojw1z0fety6
42969
42968
2009-04-06T03:04:32Z
Equinox
1697
Undo revision 6375172 by [[Special:Contributions/Letsdrinktea|Letsdrinktea]] ([[User talk:Letsdrinktea|Talk]]) undo troll
42969
wikitext
text/x-wiki
{{maintenance box|red
|image=[[Image:Icono_aviso_borrar.png|50px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"|}}.
|text= If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} <includeonly>{{{demo|[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}}</includeonly><noinclude>
{{seeTalk}}
See [[:Category:Candidates for speedy deletion]]
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
abp630pbh7n82bed3ly8ibj0a38ybfh
42970
42969
2009-06-26T10:21:13Z
CyberSkull
1480
svg image
42970
wikitext
text/x-wiki
{{maintenance box|red
|image=[[File:Icono aviso borrar.svg|48px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"|}}.
|text= If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} <includeonly>{{{demo|[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}}</includeonly><noinclude>
{{seeTalk}}
See [[:Category:Candidates for speedy deletion]]
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
</noinclude>
56p8efz3gyyu47dcd71zrmyevaishwf
42971
42970
2009-07-05T13:19:29Z
Mglovesfun
1369
iw +fr
42971
wikitext
text/x-wiki
{{maintenance box|red
|image=[[File:Icono aviso borrar.svg|48px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"|}}.
|text= If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} <includeonly>{{{demo|[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}}</includeonly><noinclude>
{{seeTalk}}
See [[:Category:Candidates for speedy deletion]]
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
[[fr:Modèle:supp]]
</noinclude>
51mhfrbbm82cmakiq2qcc1a51q8lh2f
42972
42971
2010-04-24T21:10:53Z
Bequw
1408
use {{documentation}}
42972
wikitext
text/x-wiki
{{maintenance box|red
|image=[[File:Icono aviso borrar.svg|48px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"|}}.
|text= If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} <includeonly>{{{demo|[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}}</includeonly><noinclude>{{documentation}}
</noinclude>
avg3a4pk912cj8xuqcaf5gq1gfyr1vd
42973
42972
2010-05-26T10:50:41Z
Mglovesfun
1369
nocat option
42973
wikitext
text/x-wiki
{{maintenance box|red
|image=[[File:Icono aviso borrar.svg|48px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"|}}.
|text= If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} <includeonly>{{#if:{{{nocat|}}}||[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}</includeonly><noinclude>{{documentation}}
</noinclude>
h678rsqa9zjriwrjggb5vmoumap35oc
42974
42973
2010-10-09T23:46:57Z
TeleComNasSprVen
1861
changing icon per [http://en.wikipedia.org/wiki/Template_talk:AfD-notice#CENTRALIZED_DISCUSSION_-_Replacing_icon_.28File:Ambox_warning_pn.svg.29]
42974
wikitext
text/x-wiki
{{maintenance box|red
|image=[[File:Icon delete.svg|48px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"|}}.
|text= If it should be kept, or at least discussed, then please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page], replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} <includeonly>{{#if:{{{nocat|}}}||[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}</includeonly><noinclude>{{documentation}}
</noinclude>
26r60st2nv3gyaeys6q4fxhup7pq90m
42975
42974
2013-03-23T23:26:01Z
Eyesnore
1415
plain link
42975
wikitext
text/x-wiki
{{maintenance box|red
|image=[[File:Icon delete.svg|48px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"|}}.
|text= If it should be kept, or at least discussed, then please <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]</span>, replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} <includeonly>{{#if:{{{nocat|}}}||[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}</includeonly><noinclude>{{documentation}}
</noinclude>
ny7rsd25xohhb5363a1lkmieytyv3tb
42976
42975
2014-04-22T21:07:15Z
LalalalaSta
1924
42976
wikitext
text/x-wiki
{{maintenance box|red
|image=[[File:Icon delete.svg|48px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, and for no reason at all: "{{{1}}}"|}}.
|text= If it should be kept, or at least discussed, then please <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]</span>, replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} <includeonly>{{#if:{{{nocat|}}}||[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}</includeonly><noinclude>{{documentation}}
</noinclude>
39yj56wjx5hzchcstvv6wlcf5logv9w
42977
42976
2014-04-22T21:07:45Z
LalalalaSta
1924
Undo revision 26466624 by [[Special:Contributions/LalalalaSta|LalalalaSta]] ([[User talk:LalalalaSta|talk]]) Vandalism
42977
wikitext
text/x-wiki
{{maintenance box|red
|image=[[File:Icon delete.svg|48px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"|}}.
|text= If it should be kept, or at least discussed, then please <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]</span>, replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} <includeonly>{{#if:{{{nocat|}}}||[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}</includeonly><noinclude>{{documentation}}
</noinclude>
ny7rsd25xohhb5363a1lkmieytyv3tb
42978
42977
2016-10-17T01:49:19Z
Renamed user 23o2iqy4ewqoiudh
1925
42978
wikitext
text/x-wiki
{{maintenance box|red
|image=[[File:Icon delete.svg|48px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”|}}.
|text= If it should be kept, or at least discussed, then please <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]</span>, replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} <includeonly>{{#if:{{{nocat|}}}||[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}</includeonly><noinclude>{{documentation}}
</noinclude>
26pl4tiwais8y6osgdorpc9ighx09jt
42979
42978
2016-10-31T05:59:48Z
Giorgi Eufshi
1474
42979
wikitext
text/x-wiki
{{maintenance box|red
|image=[[File:Icon delete.svg|48px]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: <q>{{{1}}}</q>|}}.
|text= If it should be kept, or at least discussed, then please <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]</span>, replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} <includeonly>{{#if:{{{nocat|}}}||[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}</includeonly><noinclude>{{documentation}}
</noinclude>
deox61zaporsvikowy4813rhgoej6na
42980
42979
2017-02-15T11:32:09Z
NotThatAnonymous
1926
Unlinked image.
42980
wikitext
text/x-wiki
{{maintenance box|red
|image=[[File:Icon delete.svg|48px|link=]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: <q>{{{1}}}</q>|}}.
|text= If it should be kept, or at least discussed, then please <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]</span>, replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} <includeonly>{{#if:{{{nocat|}}}||[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}</includeonly><noinclude>{{documentation}}
</noinclude>
0pe7liw17vmr4y68ze7q2ej4ju1ry2x
42981
42980
2017-02-15T11:32:56Z
NotThatAnonymous
1926
42981
wikitext
text/x-wiki
{{maintenance box|red
|image=[[File:Icon delete.svg|48px|link=]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: “{{{1}}}.”|.}}
|text= If it should be kept, or at least discussed, then please <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]</span>, replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} <includeonly>{{#if:{{{nocat|}}}||[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}</includeonly><noinclude>{{documentation}}
</noinclude>
9tjehvdbgnn6vto81ncboxxogxi4sz4
42982
42981
2017-05-28T07:10:06Z
Erutuon
1339
only add period to first parameter (reason) if it doesn't have a period at the end
42982
wikitext
text/x-wiki
{{maintenance box|red
|image=[[File:Icon delete.svg|48px|link=]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: “{{{1}}}{{#ifeq:{{#invoke:string|sub|{{{1}}}|-1}}|.||.}}”|.}}
|text= If it should be kept, or at least discussed, then please <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]</span>, replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}} <includeonly>{{#if:{{{nocat|}}}||[[Category:Candidates for speedy deletion<noinclude>|*</noinclude>]]}}</includeonly><noinclude>{{documentation}}
</noinclude>
1fi9ralt0dwax6lv8okiv5l5glxpuk7
42983
42982
2019-10-13T15:48:48Z
WingerBot
1359
Manually clean up request templates; if problems, contact [[User:Benwing2]]
42983
wikitext
text/x-wiki
{{maintenance box|red
|image=[[File:Icon delete.svg|48px|link=]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: “{{{1}}}{{#ifeq:{{#invoke:string|sub|{{{1}}}|-1}}|.||.}}”|.}}
|text= If it should be kept, or at least discussed, then please <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]</span>, replace this template with {{temp|rfd}}, and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] explaining why.
}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->[[Category:Candidates for speedy deletion|{{#if:{{{sort|}}}|{{{sort|}}}|{{PAGENAME}}}}]]<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
r3axmsgqhwya976t2xxrycc0urbz03u
42984
42983
2022-01-11T06:52:00Z
Svartava
428
E.g. at [[just assume]], {{d}} was [[special:MobileDiff/65163402|changed]] to {{rfv}}
42984
wikitext
text/x-wiki
{{maintenance box|red
|image=[[File:Icon delete.svg|48px|link=]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: “{{{1}}}{{#ifeq:{{#invoke:string|sub|{{{1}}}|-1}}|.||.}}”|.}}
|text= If you think it should be kept, or at least discussed, then please <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]</span>, replace this template with {{temp|rfd}} or {{temp|rfv}} (as appropriate), and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] or [[Wiktionary:Requests for verification]] explaining why.
}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->[[Category:Candidates for speedy deletion|{{#if:{{{sort|}}}|{{{sort|}}}|{{PAGENAME}}}}]]<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
qpjlxjgmrdj7kmn6amyy1oh5hb3vdfe
42985
16165
2024-04-17T03:36:28Z
Theknightwho
1347
Validate template parameters.
42985
wikitext
text/x-wiki
{{#invoke:checkparams|warn}}<!-- Validate template parameters
-->{{maintenance box|red
|image=[[File:Icon delete.svg|48px|link=]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: “{{{1}}}{{#ifeq:{{#invoke:string|sub|{{{1}}}|-1}}|.||.}}”|.}}
|text= If you think it should be kept, or at least discussed, then please <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]</span>, replace this template with {{temp|rfd}} or {{temp|rfv}} (as appropriate), and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] or [[Wiktionary:Requests for verification]] explaining why.
}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->[[Category:Candidates for speedy deletion|{{#if:{{{sort|}}}|{{{sort|}}}|{{PAGENAME}}}}]]<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
qf6jfj4ta8u231fcazbz2njiuhkalp5
42986
42985
2025-04-05T18:55:44Z
SurjectionBot
1386
(bot) rename [[Module:string]] to [[Module:string/templates]]
42986
wikitext
text/x-wiki
{{#invoke:checkparams|warn}}<!-- Validate template parameters
-->{{maintenance box|red
|image=[[File:Icon delete.svg|48px|link=]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: “{{{1}}}{{#ifeq:{{#invoke:string/templates|sub|{{{1}}}|-1}}|.||.}}”|.}}
|text= If you think it should be kept, or at least discussed, then please <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]</span>, replace this template with {{temp|rfd}} or {{temp|rfv}} (as appropriate), and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] or [[Wiktionary:Requests for verification]] explaining why.
}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->[[Category:Candidates for speedy deletion|{{#if:{{{sort|}}}|{{{sort|}}}|{{PAGENAME}}}}]]<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
4lry4iboapccgsm42cowfbdjbau7y5v
42987
42986
2025-09-05T15:03:55Z
AutoDooz
1452
no existing calls with bad parameters, throw error instead of warning to avoid future misuse
42987
wikitext
text/x-wiki
{{#invoke:checkparams|error}}<!-- Validate template parameters
-->{{maintenance box|red
|image=[[File:Icon delete.svg|48px|link=]]
|title=A user has marked this {{<noinclude>temp|</noinclude>pagetype}} for imminent deletion{{#if:{{{1|}}}|, giving the reason: “{{{1}}}{{#ifeq:{{#invoke:string/templates|sub|{{{1}}}|-1}}|.||.}}”|.}}
|text= If you think it should be kept, or at least discussed, then please <span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]</span>, replace this template with {{temp|rfd}} or {{temp|rfv}} (as appropriate), and add a section to [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] or [[Wiktionary:Requests for verification]] explaining why.
}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->[[Category:Candidates for speedy deletion|{{#if:{{{sort|}}}|{{{sort|}}}|{{PAGENAME}}}}]]<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
n0yk2xdbf1y3dw51sbh0o0zaxcozd6q
42988
42987
2025-09-27T10:57:39Z
Juwan
804
42988
wikitext
text/x-wiki
{{#invoke:checkparams|error}}<!-- Validate template parameters
-->{{maintenance box|red
| image = [[File:Codex icon clock color-error.svg|48px|alt=speedy deletion|link=]]
| title = This {{<noinclude>temp|</noinclude>pagetype}} has been marked for [[meta:Speedy deletion|speedy deletion]]{{#if:{{{1|}}}|, with the reason given: “{{{1}}}{{#ifeq:{{#invoke:string/templates|sub|{{{1}}}|-1}}|.||.}}”|.}}
| text = If you think it should be kept or discussed, then please replace with notice with {{temp|rfd}} or {{temp|rfv}} (as appropriate) and start a discusson at [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] or [[Wiktionary:Requests for verification]] to contest the deletion.
}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->[[Category:Candidates for speedy deletion|{{#if:{{{sort|}}}|{{{sort|}}}|{{PAGENAME}}}}]]<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
pg3geex5npyyhka11h3g7r5rlkguqa4
42989
42988
2025-09-27T10:59:43Z
Juwan
804
42989
wikitext
text/x-wiki
{{#invoke:checkparams|error}}<!-- Validate template parameters
-->{{maintenance box|red
| image = [[File:Codex icon clock color-error.svg|48px|alt=speedy deletion|link=]]
| title = This {{<noinclude>temp|</noinclude>pagetype}} has been marked for [[meta:Speedy deletion|speedy deletion]]{{#if:{{{1|}}}|, with the reason given: “{{{1}}}{{#ifeq:{{#invoke:string/templates|sub|{{{1}}}|-1}}|.||.}}”|.}}
| text = If you think it should be kept or discussed, then please replace this notice with {{temp|rfd}} or {{temp|rfv}} (as appropriate) and start a discusson at [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] or [[Wiktionary:Requests for verification]] to contest the deletion.
}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->[[Category:Candidates for speedy deletion|{{#if:{{{sort|}}}|{{{sort|}}}|{{PAGENAME}}}}]]<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
qnf1mlvgd8vl8i298mpj6ccd9gjslx0
42990
42989
2025-09-27T19:06:34Z
Surjection
380
42990
wikitext
text/x-wiki
{{#invoke:checkparams|error}}<!-- Validate template parameters
-->{{maintenance box|red
| image = [[File:Codex icon close color-error.svg|48px|alt=speedy deletion|link=]]
| title = This {{<noinclude>temp|</noinclude>pagetype}} has been marked for [[meta:Speedy deletion|speedy deletion]]{{#if:{{{1|}}}|, with the reason given: “{{{1}}}{{#ifeq:{{#invoke:string/templates|sub|{{{1}}}|-1}}|.||.}}”|.}}
| text = If you think it should be kept or discussed, then please replace this notice with {{temp|rfd}} or {{temp|rfv}} (as appropriate) and start a discussion at [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] or [[Wiktionary:Requests for verification]] to contest the deletion.
}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->[[Category:Candidates for speedy deletion|{{#if:{{{sort|}}}|{{{sort|}}}|{{PAGENAME}}}}]]<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
5v4s5997n4w8y6s7rrg60xp1lcd3cc4
42991
42990
2025-09-30T22:54:53Z
Juwan
804
revert icon
42991
wikitext
text/x-wiki
{{#invoke:checkparams|error}}<!-- Validate template parameters
-->{{maintenance box|red
| image = [[File:Codex icon clock color-error.svg|48px|alt=Speedy deletion|link=]]
| title = This {{<noinclude>temp|</noinclude>pagetype}} has been marked for [[meta:Speedy deletion|speedy deletion]]{{#if:{{{1|}}}|, with the reason given: “{{{1}}}{{#ifeq:{{#invoke:string/templates|sub|{{{1}}}|-1}}|.||.}}”|.}}
| text = If you think it should be kept or discussed, then please replace this notice with {{temp|rfd}} or {{temp|rfv}} (as appropriate) and start a discussion at [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] or [[Wiktionary:Requests for verification]] to contest the deletion.
}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->[[Category:Candidates for speedy deletion|{{#if:{{{sort|}}}|{{{sort|}}}|{{PAGENAME}}}}]]<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
0pw0453djjavdlsdsw57hjrfhqlp518
42992
42991
2025-10-01T04:26:43Z
Surjection
380
Reverted edits by [[Special:Contributions/Juwan|Juwan]]. If you think this rollback is in error, please leave a message on my [[User talk:Surjection|talk page]].
42992
wikitext
text/x-wiki
{{#invoke:checkparams|error}}<!-- Validate template parameters
-->{{maintenance box|red
| image = [[File:Codex icon close color-error.svg|48px|alt=speedy deletion|link=]]
| title = This {{<noinclude>temp|</noinclude>pagetype}} has been marked for [[meta:Speedy deletion|speedy deletion]]{{#if:{{{1|}}}|, with the reason given: “{{{1}}}{{#ifeq:{{#invoke:string/templates|sub|{{{1}}}|-1}}|.||.}}”|.}}
| text = If you think it should be kept or discussed, then please replace this notice with {{temp|rfd}} or {{temp|rfv}} (as appropriate) and start a discussion at [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] or [[Wiktionary:Requests for verification]] to contest the deletion.
}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->[[Category:Candidates for speedy deletion|{{#if:{{{sort|}}}|{{{sort|}}}|{{PAGENAME}}}}]]<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
5v4s5997n4w8y6s7rrg60xp1lcd3cc4
42993
42992
2025-10-01T04:27:18Z
Surjection
380
Reverted edits by [[Special:Contributions/Surjection|Surjection]]. If you think this rollback is in error, please leave a message on my [[User talk:Surjection|talk page]].
42993
wikitext
text/x-wiki
{{#invoke:checkparams|error}}<!-- Validate template parameters
-->{{maintenance box|red
| image = [[File:Codex icon clock color-error.svg|48px|alt=Speedy deletion|link=]]
| title = This {{<noinclude>temp|</noinclude>pagetype}} has been marked for [[meta:Speedy deletion|speedy deletion]]{{#if:{{{1|}}}|, with the reason given: “{{{1}}}{{#ifeq:{{#invoke:string/templates|sub|{{{1}}}|-1}}|.||.}}”|.}}
| text = If you think it should be kept or discussed, then please replace this notice with {{temp|rfd}} or {{temp|rfv}} (as appropriate) and start a discussion at [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] or [[Wiktionary:Requests for verification]] to contest the deletion.
}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->[[Category:Candidates for speedy deletion|{{#if:{{{sort|}}}|{{{sort|}}}|{{PAGENAME}}}}]]<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
0pw0453djjavdlsdsw57hjrfhqlp518
42994
42993
2026-04-15T19:06:58Z
Surjection
380
Changed protection settings for "[[Template:delete]]" ([Edit=Allow only autopatrollers] (indefinite) [Move=Allow only autopatrollers] (indefinite))
42993
wikitext
text/x-wiki
{{#invoke:checkparams|error}}<!-- Validate template parameters
-->{{maintenance box|red
| image = [[File:Codex icon clock color-error.svg|48px|alt=Speedy deletion|link=]]
| title = This {{<noinclude>temp|</noinclude>pagetype}} has been marked for [[meta:Speedy deletion|speedy deletion]]{{#if:{{{1|}}}|, with the reason given: “{{{1}}}{{#ifeq:{{#invoke:string/templates|sub|{{{1}}}|-1}}|.||.}}”|.}}
| text = If you think it should be kept or discussed, then please replace this notice with {{temp|rfd}} or {{temp|rfv}} (as appropriate) and start a discussion at [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] or [[Wiktionary:Requests for verification]] to contest the deletion.
}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->[[Category:Candidates for speedy deletion|{{#if:{{{sort|}}}|{{{sort|}}}|{{PAGENAME}}}}]]<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
0pw0453djjavdlsdsw57hjrfhqlp518
42995
42994
2026-06-24T04:37:53Z
King ChristLike
964
82 revisions imported from [[:en:Template:delete]]
42993
wikitext
text/x-wiki
{{#invoke:checkparams|error}}<!-- Validate template parameters
-->{{maintenance box|red
| image = [[File:Codex icon clock color-error.svg|48px|alt=Speedy deletion|link=]]
| title = This {{<noinclude>temp|</noinclude>pagetype}} has been marked for [[meta:Speedy deletion|speedy deletion]]{{#if:{{{1|}}}|, with the reason given: “{{{1}}}{{#ifeq:{{#invoke:string/templates|sub|{{{1}}}|-1}}|.||.}}”|.}}
| text = If you think it should be kept or discussed, then please replace this notice with {{temp|rfd}} or {{temp|rfv}} (as appropriate) and start a discussion at [[Wiktionary:Requests for deletion{{#if:{{NAMESPACE}}|/Others}}]] or [[Wiktionary:Requests for verification]] to contest the deletion.
}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->[[Category:Candidates for speedy deletion|{{#if:{{{sort|}}}|{{{sort|}}}|{{PAGENAME}}}}]]<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
0pw0453djjavdlsdsw57hjrfhqlp518
Wiktionary:Ogbako Otú
4
3683
42764
41875
2026-06-23T17:12:27Z
MediaWiki message delivery
283
/* RFC about AI-generated content in Wikimedia Commons */ nkeji ohúrù
42764
wikitext
text/x-wiki
* '''en:''' Requests for the [[m:bot|bot]] flag should be made on this page. This wiki uses the [[m:bot policy|standard bot policy]], and allows [[m:bot policy#Global_bots|global bots]] and [[m:bot policy#Automatic_approval|automatic approval of certain types of bots]]. Other bots should apply below, and then [[m:Steward requests/Bot status|request access]] from a steward if there is no objection.
==Bot policy==
Hello. To facilitate [[:m:Special:MyLanguage/Stewards|steward]] granting of bot access, I suggest implementing the [[m:Special:MyLanguage/Bot policy|standard bot policy]] on this wiki. In particular, this policy allows stewards to automatically flag known interlanguage linking bots (if this page says that is acceptable) or bots that fix double redirects. The policy also enables [[m:Bot policy#Global_bots|global bots]] on this wiki (if this page says that is acceptable), which are trusted bots that will be given bot access on every wiki that allows global bots.
This policy makes bot access requesting much easier for local users, operators, and stewards. To implement it we only need to create a redirect to this page from [[Project:Bot policy]], and add a line at the top noting that it is used here. If you use or prefer to use a dedicated project page for handling bot flag requests, that is also acceptable. Please read [[m:Special:MyLanguage/Bot policy|the text at Meta-Wiki]] before commenting. If you object, please say so; I hope to implement in two weeks if there is no objection, since it is particularly written to streamline bot requests on wikis with little or no community interested in bot access requests. Thank you for your consideration. --'''[[User:Rschen7754|Rs]][[User talk:Rschen7754|chen]][[Special:Contributions/Rschen7754|7754]]''' 04:57, 17 Ọktoba 2022 (WAT)
== Community Wishlist Survey 2023 opens in January ==
<div lang="en" dir="ltr" class="mw-content-ltr">
''{{int:Please-translate}}''
(There is [[m:Community Wishlist Survey 2023 opens in January|a translatable version of this message on MetaWiki]])
{{int:Hello}}
The [[m:Community Wishlist Survey 2023|'''Community Wishlist Survey (CWS) 2023''']], which lets contributors propose and vote for tools and improvements, starts next month on Monday, [https://zonestamp.toolforge.org/1674496831 23 January 2023, at 18:00 UTC] and will continue annually.
We are inviting you to share your ideas for technical improvements to our tools and platforms. Long experience in editing or technical skills is not required. If you have ever used our software and thought of an idea to improve it, this is the place to come share those ideas!
The dates for the phases of the Survey will be as follows:
* Phase 1: Submit, discuss, and revise proposals – Monday, Jan 23, 2023 to Sunday, Feb 6, 2023
* Phase 2: WMF/Community Tech reviews and organizes proposals – Monday, Jan 30, 2023 to Friday, Feb 10, 2023
* Phase 3: Vote on proposals – Friday, Feb 10, 2023 to Friday, Feb 24, 2023
* Phase 4: Results posted – Tuesday, Feb 28, 2023
If you want to start writing out your ideas ahead of the Survey, you can start thinking about your proposals and draft them in [[m:Community Wishlist Survey/Sandbox|the CWS sandbox]].
We are grateful to all who participated last year. See you in January 2023!
</div>
{{int:Feedback-thanks-title}} <bdi lang="en" dir="ltr">Community Tech, [[m:User:STei (WMF)|STei (WMF)]]</bdi> 17:44, 15 Disemba 2022 (WAT)
<!-- Message sent by User:Sannita (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Community_Wishlist_list_for_non-Wikipedias&oldid=24239678 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Your wiki will be in read only soon</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="server-switch"/><div class="plainlinks">
[[:m:Special:MyLanguage/Tech/Server switch|Read this message in another language]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-Tech%2FServer+switch&language=&action=page&filter= {{int:please-translate}}]
The [[foundation:|Wikimedia Foundation]] tests the switch between its first and secondary data centers. This will make sure that Wikipedia and the other Wikimedia wikis can stay online even after a disaster. To make sure everything is working, the Wikimedia Technology department needs to do a planned test. This test will show if they can reliably switch from one data centre to the other. It requires many teams to prepare for the test and to be available to fix any unexpected problems.
All traffic will switch on '''{{#time:j xg|2023-03-01|en}}'''. The test will start at '''[https://zonestamp.toolforge.org/{{#time:U|2023-03-01T14:00|en}} {{#time:H:i e|2023-03-01T14:00}}]'''.
Unfortunately, because of some limitations in [[mw:Manual:What is MediaWiki?|MediaWiki]], all editing must stop while the switch is made. We apologize for this disruption, and we are working to minimize it in the future.
'''You will be able to read, but not edit, all wikis for a short period of time.'''
*You will not be able to edit for up to an hour on {{#time:l j xg Y|2023-03-01|en}}.
*If you try to edit or save during these times, you will see an error message. We hope that no edits will be lost during these minutes, but we can't guarantee it. If you see the error message, then please wait until everything is back to normal. Then you should be able to save your edit. But, we recommend that you make a copy of your changes first, just in case.
''Other effects'':
*Background jobs will be slower and some may be dropped. Red links might not be updated as quickly as normal. If you create an article that is already linked somewhere else, the link will stay red longer than usual. Some long-running scripts will have to be stopped.
* We expect the code deployments to happen as any other week. However, some case-by-case code freezes could punctually happen if the operation require them afterwards.
* [[mw:Special:MyLanguage/GitLab|GitLab]] will be unavailable for about 90 minutes.
This project may be postponed if necessary. You can [[wikitech:Switch_Datacenter|read the schedule at wikitech.wikimedia.org]]. Any changes will be announced in the schedule. There will be more notifications about this. A banner will be displayed on all wikis 30 minutes before this operation happens. '''Please share this information with your community.'''</div><section end="server-switch"/>
</div>
<span dir=ltr>[[m:User:Trizek (WMF)|Trizek (WMF)]] ([[m:User talk:Trizek (WMF)|{{int:talk}}]])</span> 22:21, 27 Febụwarị 2023 (WAT)
<!-- Message sent by User:Trizek (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=24390465 -->
== Ndebata mmemme nnabata Wikimania 2023 ==
<section begin="wikimania-program-submissions"/>[[File:Wikimania Singapore Logo.svg|right|frameless]]Ị chọrọ ịkwado nnọkọ mmadụ ma ọ bụ mebere na Wikimania 2023? Ma eleghị anya, ọgbakọ nke ozugbo, mkparịta ụka na-ekpo ọkụ, ihe na-atọ ụtọ, akwụkwọ mmado na-adọrọ adọrọ, ma ọ bụ okwu ọkụ na-agaghị echefu echefu? [[wmania:Special:MyLanguage/2023:Program/Submissions|'''Ntinye akwụkwọ na-emeghe ruo ụbọchị iri abụọ na asatọ nke ọnwa Maachị''']]. Ihe omume a ga-enwe ngwakọ ngwakọ raara onwe ya nye, yabụ a na-anabatakwa ntinye akwụkwọ na ọdịnaya edekọrịrị. Ọ bụrụ na i nwere ajụjụ ọ bụla, biko sonyere anyị na mkparịta ụka na-abịanụ na Machị 12 ma ọ bụ 19, ma ọ bụ nweta ozi-email na wikimania@wikimedia.org ma ọ bụ na Telegram. Ozi ndị ọzọ na-wiki.<section end="wikimania-program-submissions"/>
<!-- Message sent by User:CKoerner (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=24390465 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Seeking volunteers for the next step in the Universal Code of Conduct process</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''<div class="plainlinks">[[m:Special:MyLanguage/Universal Code of Conduct/U4C Building Committee/Nominations/Announcement|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/U4C Building Committee/Nominations/Announcement}}&language=&action=page&filter= {{int:please-translate}}]</div>''
Hello,
As follow-up to [https://lists.wikimedia.org/hyperkitty/list/wikimedia-l@lists.wikimedia.org/message/IOMVS7W75ZYMABQGOQ2QH2JAURC3CHGH/ the message about the Universal Code of Conduct Enforcement Guidelines] by Wikimedia Foundation Board of Trustees Vice Chair, Shani Evenstein Sigalov, I am reaching out about the next steps. I want to bring your attention to the next stage of the Universal Code of Conduct process, which is forming a building committee for the Universal Code of Conduct Coordinating Committee (U4C). I invite community members with experience and deep interest in community health and governance to nominate themselves to be part of the U4C building committee, which needs people who are:
* Community members in good standing
* Knowledgeable about movement community processes, such as, but not limited to, policy drafting, participatory decision making, and application of existing rules and policies on Wikimedia projects
* Aware and appreciative of the diversity of the movement, such as, but not limited to, languages spoken, identity, geography, and project type
* Committed to participate for the entire U4C Building Committee period from mid-May - December 2023
* Comfortable with engaging in difficult, but productive conversations
* Confidently able to communicate in English
The Building Committee shall consist of volunteer community members, affiliate board or staff, and Wikimedia Foundation staff.
The Universal Code of Conduct has been a process strengthened by the skills and knowledge of the community and I look forward to what the U4C Building Committee creates. If you are interested in joining the Building Committee, please either [[m:Special:MyLanguage/Universal_Code_of_Conduct/U4C_Building_Committee/Nominations|sign up on the Meta-Wiki page]], or contact ucocproject[[File:At sign.svg|16x16px|link=|(_AT_)]]wikimedia.org by May 12, 2023. '''[[m:Special:MyLanguage/Universal_Code_of_Conduct/U4C_Building_Committee|Read more on Meta-Wiki]]'''.
Best regards,<br /><section end="announcement-content" />
</div>
[[User:Xeno (WMF)|Xeno (WMF)]] 20:01, 26 Eprel 2023 (WAT)
<!-- Message sent by User:Xeno (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=24941045 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Selection of the U4C Building Committee</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
The next stage in the Universal Code of Conduct process is establishing a Building Committee to create the charter for the Universal Code of Conduct Coordinating Committee (U4C). The Building Committee has been selected. [[m:Special:MyLanguage/Universal_Code_of_Conduct/U4C_Building_Committee|Read about the members and the work ahead on Meta-wiki]].<section end="announcement-content" />
</div>
-- [[m:Special:MyLanguage/Universal_Code_of_Conduct/Project|UCoC Project Team]], 05:21, 27 Mee 2023 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=25018085 -->
== <span lang="en" dir="ltr" class="mw-content-ltr"> Announcing the new Elections Committee members</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Wikimedia Foundation elections committee/Nominatons/2023/Announcement - new members|You can find this message translated into additional languages on Meta-wiki.]]''
:''<div class="plainlinks">[[m:Special:MyLanguage/Wikimedia Foundation elections committee/Nominatons/2023/Announcement - new members|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Wikimedia Foundation elections committee/Nominatons/2023/Announcement - new members}}&language=&action=page&filter= {{int:please-translate}}]</div>''
Hello there,
We are glad to announce [[listarchive:list/wikimedia-l@lists.wikimedia.org/message/4TALOUFPAP2VDBR27GKRVOP7IGQYU3DB/|the new members and advisors of the Elections Committee]]. The [[m:Special:MyLanguage/Wikimedia_Foundation_elections_committee|Elections Committee]] assists with the design and implementation of the process to select Community- and Affiliate-Selected trustees for the Wikimedia Foundation Board of Trustees. After an open nomination process, the strongest candidates spoke with the Board and four candidates were asked to join the Elections Committee. Four other candidates were asked to participate as advisors.
Thank you to all the community members who submitted their names for consideration. We look forward to working with the Elections Committee in the near future.
On behalf of the Wikimedia Foundation Board of Trustees,<br /><section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 19:00, 28 Jụn 2023 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=25018085 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Review the Charter for the Universal Code of Conduct Coordinating Committee</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''<div class="plainlinks">[[m:Special:MyLanguage/Universal Code of Conduct/U4C Building Committee/Announcement - Review|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/U4C Building Committee/Announcement - Review}}&language=&action=page&filter= {{int:please-translate}}]</div>''
Hello all,
I am pleased to share the next step in the [[foundation:Special:MyLanguage/Policy:Universal Code of Conduct|Universal Code of Conduct]] work. The [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|Universal Code of Conduct Coordinating Committee (U4C) draft charter]] is now ready for your review.
The [[foundation:Special:MyLanguage/Policy:Universal Code of Conduct/Enforcement guidelines|Enforcement Guidelines]] require a [[foundation:Special:MyLanguage/Policy:Universal_Code_of_Conduct/Enforcement_guidelines#4.5_U4C_Building_Committee|Building Committee]] form to draft a charter that outlines procedures and details for a global committee to be called the [[foundation:Special:MyLanguage/Policy:Universal_Code_of_Conduct/Enforcement_guidelines#4._UCoC_Coordinating_Committee_(U4C)|Universal Code of Conduct Coordinating Committee (U4C)]]. Over the past few months, the U4C Building Committee worked together as a group to discuss and draft the U4C charter. The U4C Building Committee welcomes feedback about the draft charter now through 22 September 2023. After that date, the U4C Building Committee will revise the charter as needed and a community vote will open shortly afterward.
Join the conversation during the [[m:Special:MyLanguage/Universal Code of Conduct/U4C Building Committee#Conversation hours|conversation hours]] or on [[m:Talk:Universal Code of Conduct/Coordinating Committee/Charter|Meta-wiki]].
Best,<br /><section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]], on behalf of the U4C Building Committee, 16:36, 28 Ọgọọst 2023 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=25392152 -->
== Ohere dị maka Kọmitii Affiliation,Ombuds kọmitii,na kọmitii nke Case Review ==
<section begin="announcement-content" />
<div style="margin:.2em 0 .5em;margin-{{#switch:{{PAGELANGUAGE}}|ar|arc|ary|arz|azb|bcc|bgn|ckb|bqi|dv|fa|fa-af|glk|ha-arab|he|kk-arab|kk-cn|ks|ku-arab|ms-arab|mzn|pnb|prd|ps|sd|ug|ur|ydd|yi=right|left}}:3ex;">
[[m:Special:MyLanguage/Wikimedia Foundation Legal department/Committee appointments/Announcement/Short|''Inwere ike ịhụ ozi a ka atugharịrị na asụsụ ndị ọzọ na Meta-Wiki.'']]
''<span class="plainlinks">[[m:Special:MyLanguage/Wikimedia Foundation Legal department/Committee appointments/Announcement/Short|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Wikimedia Foundation Legal department/Committee appointments/Announcement/Short}}&language=&action=page&filter= {{int:please-translate}}]</span>''</div>
Ndewo onye ọ bụla! Ndị [[m:Special:MyLanguage/Affiliations Committee| Kọmiti Mmekọrịta]] (AffCom), [[m:Special:MyLanguage/Ombuds_commission|Ombuds Commission]] (OC), na [[m:Special:MyLanguage/Trust_and_Safety/Case_Review_Committee| Kọmitii Nlebaanya Okwu]] (CRC) na-achọ ndị otu ọhụrụ. Ndị otu afọ ofufo a na-enye nkwado nhazi na nlekọta dị mkpa maka otu na njem. A na-agba ndị mmadụ ume ịhọpụta onwe ha ma ọ bụ gwaa ndị ọzọ ha chere na ha ga-atụnye aka na otu ndị a itinye akwụkwọ. Enwere ozi ndị ọzọ gbasara ọrụ nke otu, nka ndị achọrọ, yana ohere itinye n'ọrụ na [[m:Special:MyLanguage/Wikimedia Foundation Legal department/Committee appointments|'''peeji Meta-wiki''']].
N'aha ndị òtù Kọmitii Nnyereaka<br /><section end="announcement-content" />
<div lang="en" dir="ltr" class="mw-content-ltr">
~ [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 17:42, 9 Ọktoba 2023 (WAT) </div>
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=25570445 -->
== Nnyochaa na nkọwa nke nchịkọba iwu nhọpụta Board of Trustees Wikimedia Foundation nke 2024 ==
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/wiki/Wikimedia Foundation elections/2024/Announcement/Rules package review - short| Inwere ike ịhụ ibe ozi a ka atugharịrị na asụsụ ndị ọzọ na Meta-wiki'''.]]''
:''<div class="plainlinks">[[m:Special:MyLanguage/wiki/Wikimedia Foundation elections/2024/Announcement/Rules package review - short|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:wiki/Wikimedia Foundation elections/2024/Announcement/Rules package review - short}}&language=&action=page&filter= {{int:please-translate}}]</div>''
mmadụ niile,
Biko nyochaa ma nye ntunye okwu gbasara nchịkọba iwu nhọrọ Board of Trustees nke Wikimedia Foundation site ugbu a ruo 29 Ọktoba 2023. Usoro iwu nhọrọ dabeere na nsụgharị ochie nke Kọmitii Ntuli aka ma a ga-eji ya na nhọrọ Board of Trustees nke 2024 . Inye ntunye okwu gị ugbu a ga-enyere ha aka ịnye usoro nhọrọ bọọdụ dị mfe, ma ka mma. [[m:Special:MyLanguage/Wikimedia Foundation elections/2024|gukwuo Ndị ọzọ na ibe Meta-wiki]].
Nke kacha mma
Katie Chan <br>
Onye isi oche nke Kọmitii ntuliaka<br /><section end="announcement-content" />
02:13, 17 Ọktoba 2023 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=25570445 -->
== The Vector 2022 skin as the default in three weeks? ==
<div lang="en" dir="ltr" class="mw-content-ltr">
''[[mw:Special:MyLanguage/Reading/Web/Desktop Improvements/Updates/2023-10 for sister projects|Read this in your language]] • <span class=plainlinks>[https://mediawiki.org/w/index.php?title=Special:Translate&group=page-Reading%2FWeb%2FDesktop+Improvements%2FUpdates%2F2023-10+for+sister+projects&language=&action=page&filter= {{Int:please-translate}}]</span> • Please tell other users about these changes''
Hello. I'm writing on behalf of the [[mw:Reading/Web|Wikimedia Foundation Web team]]. '''In two weeks, we would like to make the Vector 2022 skin the default on this wiki.'''
[[File:Desktop Improvements - how to enable globally.png|thumb|[[Special:GlobalPreferences|{{int:globalpreferences}}]]]]
'''If you prefer keeping the current skin''' select "Vector legacy (2010)" on [[Special:GlobalPreferences#mw-prefsection-rendering|the appearance tab of the global preferences]] and save the change. We encourage you to give the new skin a try, though.
Since I last came to you with this question, many things have changed. The skin is now the default on most Wikipedias, and all logos are done! We have also made some tweaks in the skin itself. Below is the text I've sent to you once, but I'm sending it again, just slightly edited, for those who haven't seen it.
If you know what this is about, jump straight to the section "Our plan":
<div style="margin-left:.5em; border-left:3px dotted #a2a9b1; padding-left:.5em;">
It would become the default for all logged-out users, and also all logged-in users who currently use Vector legacy as a [[Special:Preferences#mw-prefsection-rendering|local]] (but not global) preference. Logged-in users can at any time switch to any other skin. No changes are expected for these skins.
<div style="width:100%; margin:auto;"><gallery widths="250" heights="180" mode="packed" caption="Top of an article">
Screenshot Historia da moeda do Tíbet - 2022-09-22 - Vector 2010 top.png|Vector legacy (current default)
Screenshot Historia da moeda do Tíbet - 2022-09-22 - Vector 2022 top.png|Vector 2022
</gallery><gallery widths="250" heights="180" mode="packed" caption="A section of an article">
Screenshot Historia da moeda do Tíbet - 2022-09-22 - Vector 2010 scrolled.png|Vector legacy (current default)
Screenshot Historia da moeda do Tíbet - 2022-09-22 - Vector 2022 scrolled.png|Vector 2022
</gallery></div>
=== About the skin ===
[[File:Wikimania 2022 Vector (2022) Presentation.pdf|thumb|Slides to our Wikimania 2022 presentation. [https://www.youtube.com/watch?v=yC-ItaXDe2A You may also listen to the recording on YouTube (in English)].]]
'''[Why is a change necessary]''' When the current default skin was created, it reflected the needs of the readers and editors as these were 14 years ago. Since then, new users have begun using the Internet and Wikimedia projects in different ways. [[wmfblog:2022/08/18/prioritizing-equity-within-wikipedias-new-desktop/|The old Vector does not meet their needs]].
'''[Objective]''' The objective for the Vector 2022 skin is to make the interface more welcoming and comfortable for readers and useful for advanced users. It introduces a series of changes that aim to improve problems new and existing readers and editors were having with the old skin. It draws inspiration from previous user requests, the [[metawiki:Special:MyLanguage/Community_Wishlist_Survey|Community Wishlist Surveys]], and gadgets and scripts. The work helped our code follow the standards and improve all other skins. [[phab:phame/post/view/290/how_and_why_we_moved_our_skins_to_mustache/|The PHP code in the other available skins has been reduced by 75%]]. The project has also focused on making it easier to support gadgets and use APIs.
[[File:Screenshot of the Vector-2022 skin's fullscreen toggle.png|thumb]]
'''[Changes in a nutshell]''' The skin introduces changes that improve readability and usability. The new skin does not remove any functionality currently available on the Vector skin.
* The limited width and pin-able menus allow to adjust the interface to the screen size, and focus on editing or reading. Logged-in and logged-out users may use a toggle button to keep the full width, though.
* The sticky header makes it easier to find tools that editors use often. It decreases scrolling to the top of the page by 16%.
* The new table of contents makes it easier to navigate to different sections. Readers and editors jump to different sections of the page 50% more than with the old table of contents. It also looks a bit different on talk pages.
* The new search bar is easier to find and makes it easier to find the correct search result from the list. This increased the amount of searches started by 30% on the tested wikis.
* The skin does not negatively affect pageviews, edit rates, or account creation. There is evidence of increases in pageviews and account creation across partner communities.
'''[Customize this skin]''' It's possible to configure and personalize our changes. We support volunteers who create new gadgets and user scripts. Check out [[mw:Special:MyLanguage/Reading/Web/Desktop Improvements/Repository|the repository]] for a list of currently available customizations and changes, or add your own.
</div>
=== Our plan ===
'''If no large concerns are raised, we plan on deploying on 14 November'''. If you'd like to ask our team anything, if you have questions, concerns, or additional thoughts, please comment in any language. If this is the first comment to my message, make sure to ping me. We will gladly answer! Also, check out [[mw:Reading/Web/Desktop Improvements/Frequently asked questions|our FAQ]]. Thank you! [[User:SGrabarczuk (WMF)|SGrabarczuk (WMF)]] ([[User talk:SGrabarczuk (WMF)|<span class="signature-talk">ṅkátá</span>]]) 02:09, 26 Ọktoba 2023 (WAT)
</div>
<!-- Message sent by User:SGrabarczuk (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:SGrabarczuk_(WMF)/sandbox/MM/Varia&oldid=25791651 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Vote on the Charter for the Universal Code of Conduct Coordinating Committee</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/wiki/Universal Code of Conduct/Coordinating Committee/Charter/Announcement - voting opens|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:wiki/Universal Code of Conduct/Coordinating Committee/Charter/Announcement - voting opens}}&language=&action=page&filter= {{int:please-translate}}]''
Hello all,
I am reaching out to you today to announce that the voting period for the [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Universal Code of Conduct Coordinating Committee]] (U4C) Charter is now open. Community members may [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter/Voter_information|cast their vote and provide comments about the charter via SecurePoll]] now through '''2 February 2024'''. Those of you who voiced your opinions during the development of the [[foundation:Special:MyLanguage/Policy:Universal_Code_of_Conduct/Enforcement_guidelines|UCoC Enforcement Guidelines]] will find this process familiar.
The [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|current version of the U4C Charter]] is on Meta-wiki with translations available.
Read the charter, go vote and share this note with others in your community. I can confidently say the U4C Building Committee looks forward to your participation.
On behalf of the UCoC Project team,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 19:09, 19 Jenụwarị 2024 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=25853527 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Last days to vote on the Charter for the Universal Code of Conduct Coordinating Committee</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/wiki/Universal Code of Conduct/Coordinating Committee/Charter/Announcement - voting reminder|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:wiki/Universal Code of Conduct/Coordinating Committee/Charter/Announcement - voting reminder}}&language=&action=page&filter= {{int:please-translate}}]''
Hello all,
I am reaching out to you today to remind you that the voting period for the [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Universal Code of Conduct Coordinating Committee]] (U4C) charter will close on '''2 February 2024'''. Community members may [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter/Voter_information|cast their vote and provide comments about the charter via SecurePoll]]. Those of you who voiced your opinions during the development of the [[foundation:Special:MyLanguage/Policy:Universal_Code_of_Conduct/Enforcement_guidelines|UCoC Enforcement Guidelines]] will find this process familiar.
The [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|current version of the U4C charter]] is on Meta-wiki with translations available.
Read the charter, go vote and share this note with others in your community. I can confidently say the U4C Building Committee looks forward to your participation.
On behalf of the UCoC Project team,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 18:01, 31 Jenụwarị 2024 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=25853527 -->
== Nkwupụta nsonaazụ nke UCoC Coordinating Committee Charter ratification vote ==
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/wiki/Universal Code of Conduct/Coordinating Committee/Charter/Announcement - results|Ị nwere ike ịchọta ozi a ka a tụgharịrị n'asụsụ ndị ọzọ na Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:wiki/Universal Code of Conduct/Coordinating Committee/Charter/Announcement - results}}&language=&action=page&filter= {{int:please-translate}}]''
Ezigbo mmadụ niile,
Daalụ onye ọ bụla maka ịgbaso ọganihu nke Usoro ụkpụrụ omume zuru ụwa ọnụ. Ana m edegara gị akwụkwọ ozi taa ka m kwupụta nsonaazụ [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter/Voter_information|votu nkwado]] na [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|Universal Code of Conduct Coordinating Committee Charter]]. Ndị ntinye aka 1746 tụrụ vootu na ntuli aka nkwado a yana ndị 1249 na-akwado Charter na ndị 420 akwadoghị. Usoro nkwado nkwado nyere ndị ntuli aka inye nkọwa gbasara Charter.
A ga-ebipụta akụkọ gbasara ọnụ ọgụgụ ịtụ vootu na nchịkọta nkọwa ndị ntuli aka na Meta-wiki n'izu ndị na-abịa.
Biko na-atụ anya ịnụ maka usoro ndị ọzọ n'oge adịghị anya.
N'aha ndị otu UCoC Project,<section end="announcement-content" />
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 19:24, 12 Febụwarị 2024 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26160150 -->
== <span lang="en" dir="ltr" class="mw-content-ltr"> Report of the U4C Charter ratification and U4C Call for Candidates now available</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024/Announcement – call for candidates| You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/Coordinating Committee/Election/2024/Announcement – call for candidates}}&language=&action=page&filter= {{int:please-translate}}]''
Hello all,
I am writing to you today with two important pieces of information. First, the [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter/Vote results|report of the comments from the Universal Code of Conduct Coordinating Committee (U4C) Charter ratification]] is now available. Secondly, the call for candidates for the U4C is open now through April 1, 2024.
The [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Universal Code of Conduct Coordinating Committee]] (U4C) is a global group dedicated to providing an equitable and consistent implementation of the UCoC. Community members are invited to submit their applications for the U4C. For more information and the responsibilities of the U4C, please [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|review the U4C Charter]].
Per the charter, there are 16 seats on the U4C: eight community-at-large seats and eight regional seats to ensure the U4C represents the diversity of the movement.
Read more and submit your application on [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024|Meta-wiki]].
On behalf of the UCoC project team,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 17:25, 5 Maachị 2024 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26276337 -->
== Nhọrọ Board of Trustees nke 2024 Wikimedia Foundation ==
<section begin="announcement-content" />
: ''[[m:Special:MyLanguage/Wikimedia Foundation elections/2024/Announcement/Selection announcement| Ị nwere ike ịhụ ozi a ka a tụgharịrị n'asụsụ ndị ọzọ na Meta-wiki.]]''
: ''<div class="plainlinks">[[m:Special:MyLanguage/Wikimedia Foundation elections/2024/Announcement/Selection announcement|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Wikimedia Foundation elections/2024/Announcement/Selection announcement}}&language=&action=page&filter= {{int:please-translate}}]</div>''
Mmadụ niile,
N'afọ a, ọkwa nke 4 (anọ) nke ngalaba otu - na Mgbakwunye-nhọpụta ndị nlekọta na Board of Trustees Wikimedia Foundation ga-abịa na njedebe [1]. Ndị Bọọdụ na-akpọ òtù niile òkù ka ha sonye na usoro nhọpụta nke afọ a na votu iji mejupụta oche ndị ahụ.
[[m:Special:MyLanguage/Wikimedia Foundation elections committee|Kọmitii Ntuliaka]] ga-ahụ maka usoro a site na nkwado ndị ọrụ Foundation [2]. Kọmitii na-ahụ maka nchịkwa ahụ mepụtara otu ndị na-arụ ọrụ ọrụ Board site na ndị nlekọta ndị na-enweghị ike ịbụ ndị na-adọ ndọrọ ndọrọ ntuliaka na otu ngalaba -na mpaghara nke ndị mmekọ ahọpụtara onye nlekọta nke Dariusz Jemielniak, Nataliia Tymkiv, Esra'a Al Shafei, Kathy Collins na Shani Evenstein Sigalov. [3]. Enyere otu a ọrụ inye nlekọta Bọọdụ maka usoro nhọpụta ndị nnọchi anya 2024, yana ime ka ndị Board mara ihe n'eme. Nkọwa ndị ọzọ gbasara ọrụ nke Kọmitii ntuliaka, Bọọdụ, na ndị ọrụ nọ ebe a [4].
Nke a bụ isi ụbọchị akwadoro:
* Mee 2024: ịkpọ oku ndị chọrọ ịdọ ndọrọ ndọrọ na ịnabata ajụjụ
* June 2024: Ndị mmekọ atụọ vootu iji nweta ndị ga-azọ ọkwa iri na abụọ (enweghị ndepụta aha ma ọ bụrụ na ndị ndọrọ ndọrọ mmadụiri na ise ma ọ bụ erughi bụ ndị tinyere akwụkwọ) [5]
* Juun-Ọgọọst 2024: Oge mkpọsa
* Ngwụcha Ọgọọst / mmalite nke Septemba 2024: Oge ịtụ vootu ngalaba otu izu abụọ
* Ọktoba–Nọvemba 2024: Nyocha mmetụtara nke ndị ahọpụtara
* Nzukọ otu Board na Disemba 2024: Ndị nlekọta ọhụrụ nọ nụ
Matakwuo maka usoro nhọpụta nke 2024 - gụnyere usoro iheomume zuru ezu, usoro nhọpụta, iwu mkpọsa, na ntuziaka ntozu ndị ntuliaka - na [[m:Special:MyLanguage/Wikimedia Foundation elections/2024|ibe Meta-wiki a]], wee mee atụmatụ gị.
'''Ntuliaka ndị ọrụ afọ ofufo '''
Ụzọ ọzọ ị ga-esi tinye aka na usoro nhọpụta 2024 bụ ịbụ onye ọrụ afọ ofufo. Ndị ọrụ afọ ofufo bụ ihe nnọchianya n'etiti kọmitii ntuliaka na ngalaba otu ha. Ha na-enyere aka hụ na ndị obodo ha nọchitere anya ma kpọkọta ha ka ha mee ntuliaka. Mụtakwuo maka mmemme yana otu ị ga-esi sonyere na [[m:Special:MyLanguage/Wikimedia Foundation elections/2024/Election Volunteers|ibe Meta-wiki]].
Ezi echiche,
[[m:Special:MyLanguage/User:Pundit|Dariusz Jemielniak]] (Onye isi oche kọmitii ọchịchị, otu ndị na-arụ ọrụ nhọrọ bọọdụ)
[1] https://meta.wikimedia.org/wiki/Special:MyLanguage/Wikimedia_Foundation_elections/2021/Results#Elected
[2] https://foundation.wikimedia.org/wiki/Committee:Elections_Committee_Charter
[3] https://foundation.wikimedia.org/wiki/Minutes:2023-08-15#Governance_Committee
[4] https://meta.wikimedia.org/wiki/Wikimedia_Foundation_elections_committee/Roles
[5] Ọ bụ ezie na ọnụ ọgụgụ ndị ndọrọ ndọrọ dị mma bụ iri na abụọ maka ohere oche, usoro ntinye aha ga-akpalite ma ọ bụrụ na e nwere ihe karịrị ntinye iri na ise ndị na-apụta maka ntuliaka n'ihi na ndị otu ruo atọ na-ewepụ nwere ike iche na ọ bụ ndị a na-achụpụ achụpụ nakwa ọ ga-abụ nnukwu ọrụ maka nye Ndị mmekọ na-eme usoro ntinye aha iji kpochapụ naanị otu ruo mmadụ atọ na listi ndị a ga-ahọrọ.<section end="announcement-content" />
[[User:MPossoupe_(WMF)|MPossoupe_(WMF)]]20:57, 12 Maachị 2024 (WAT)
<!-- Message sent by User:MPossoupe (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26349432 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Vote now to select members of the first U4C</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024/Announcement – vote opens|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/Coordinating Committee/Election/2024/Announcement – vote opens}}&language=&action=page&filter= {{int:please-translate}}]''
Dear all,
I am writing to you to let you know the voting period for the Universal Code of Conduct Coordinating Committee (U4C) is open now through May 9, 2024. Read the information on the [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024|voting page on Meta-wiki]] to learn more about voting and voter eligibility.
The Universal Code of Conduct Coordinating Committee (U4C) is a global group dedicated to providing an equitable and consistent implementation of the UCoC. Community members were invited to submit their applications for the U4C. For more information and the responsibilities of the U4C, please [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|review the U4C Charter]].
Please share this message with members of your community so they can participate as well.
On behalf of the UCoC project team,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 21:21, 25 Eprel 2024 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26390244 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Sign up for the language community meeting on May 31st, 16:00 UTC</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="message"/>Hello all,
The next language community meeting is scheduled in a few weeks - May 31st at 16:00 UTC. If you're interested, you can [https://www.mediawiki.org/w/index.php?title=Wikimedia_Language_engineering/Community_meetings#31_May_2024 sign up on this wiki page].
This is a participant-driven meeting, where we share language-specific updates related to various projects, collectively discuss technical issues related to language wikis, and work together to find possible solutions. For example, in the last meeting, the topics included the machine translation service (MinT) and the languages and models it currently supports, localization efforts from the Kiwix team, and technical challenges with numerical sorting in files used on Bengali Wikisource.
Do you have any ideas for topics to share technical updates related to your project? Any problems that you would like to bring for discussion during the meeting? Do you need interpretation support from English to another language? Please reach out to me at ssethi(__AT__)wikimedia.org and [[etherpad:p/language-community-meeting-may-2024|add agenda items to the document here]].
We look forward to your participation!
<section end="message"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 22:23, 14 Mee 2024 (WAT)
<!-- Message sent by User:SSethi (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26390244 -->
== <span lang="en" dir="ltr" class="mw-content-ltr"> Feedback invited on Procedure for Sibling Project Lifecycle</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Wikimedia Foundation Community Affairs Committee/Procedure for Sibling Project Lifecycle/Invitation for feedback (MM)|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Wikimedia Foundation Community Affairs Committee/Procedure for Sibling Project Lifecycle/Invitation for feedback (MM)}}&language=&action=page&filter= {{int:please-translate}}]''
[[File:Sibling Project Lifecycle Conversation 3.png|150px|right|link=:m:Special:MyLanguage/Wikimedia Foundation Community Affairs Committee/Procedure for Sibling Project Lifecycle]]
Dear community members,
The [[:m:Special:MyLanguage/Wikimedia Foundation Community Affairs Committee|Community Affairs Committee]] (CAC) of the [[:m:Special:MyLanguage/Wikimedia Foundation Board of Trustees|Wikimedia Foundation Board of Trustees]] invites you to give feedback on a '''[[:m:Special:MyLanguage/Wikimedia Foundation Community Affairs Committee/Procedure for Sibling Project Lifecycle|draft Procedure for Sibling Project Lifecycle]]'''. This draft Procedure outlines proposed steps and requirements for opening and closing Wikimedia Sibling Projects, and aims to ensure any newly approved projects are set up for success. This is separate from the procedures for opening or closing language versions of projects, which is handled by the [[:m:Special:MyLanguage/Language committee|Language Committee]] or [[m:Special:MyLanguage/Closing_projects_policy|closing projects policy]].
You can find the details on [[:m:Special:MyLanguage/Talk:Wikimedia Foundation Community Affairs Committee/Procedure for Sibling Project Lifecycle#Review|this page]], as well as the ways to give your feedback from today until the end of the day on '''June 23, 2024''', anywhere on Earth.
You can also share information about this with the interested project communities you work with or support, and you can also help us translate the procedure into more languages, so people can join the discussions in their own language.
On behalf of the CAC,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 03:26, 22 Mee 2024 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26390244 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Announcing the first Universal Code of Conduct Coordinating Committee</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024/Announcement – results|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/Coordinating Committee/Election/2024/Announcement – results}}&language=&action=page&filter= {{int:please-translate}}]''
Hello,
The scrutineers have finished reviewing the vote results. We are following up with the results of the first [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024|Universal Code of Conduct Coordinating Committee (U4C) election]].
We are pleased to announce the following individuals as regional members of the U4C, who will fulfill a two-year term:
* North America (USA and Canada)
** –
* Northern and Western Europe
** [[m:Special:MyLanguage/User:Ghilt|Ghilt]]
* Latin America and Caribbean
** –
* Central and East Europe (CEE)
** —
* Sub-Saharan Africa
** –
* Middle East and North Africa
** [[m:Special:MyLanguage/User:Ibrahim.ID|Ibrahim.ID]]
* East, South East Asia and Pacific (ESEAP)
** [[m:Special:MyLanguage/User:0xDeadbeef|0xDeadbeef]]
* South Asia
** –
The following individuals are elected to be community-at-large members of the U4C, fulfilling a one-year term:
* [[m:Special:MyLanguage/User:Barkeep49|Barkeep49]]
* [[m:Special:MyLanguage/User:Superpes15|Superpes15]]
* [[m:Special:MyLanguage/User:Civvì|Civvì]]
* [[m:Special:MyLanguage/User:Luke081515|Luke081515]]
* –
* –
* –
* –
Thank you again to everyone who participated in this process and much appreciation to the candidates for your leadership and dedication to the Wikimedia movement and community.
Over the next few weeks, the U4C will begin meeting and planning the 2024-25 year in supporting the implementation and review of the UCoC and Enforcement Guidelines. Follow their work on [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Meta-wiki]].
On behalf of the UCoC project team,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 09:15, 3 Jụn 2024 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26390244 -->
== Ndepụta ikpeazụ nke Wikimedia Movement Charter dị ugbu a na Meta ==
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Movement Charter/Drafting Committee/Announcement - Final draft available|Ị nwere ike ịchọta ozi a ka atụgharịrị n'asụsụ ndị ọzọ na Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Movement Charter/Drafting Committee/Announcement - Final draft available}}&language=&action=page&filter= {{int:please-translate}}]''
Ndewo onye ọ bụla,
Ndepụta ikpeazụ nke [[m:Special:MyLanguage/Movement Charter|Wikimedia Movement Charter]] dị ugbu a na Meta n'ihe karịrị asụsụ iri abụọ maka ọgụgụ gị.
'''Gịnị bụ Movement Charter Wikimedia?'''
Movement Charter Wikimedia bụ akwụkwọ atụpụtara iji kọwapụta ọrụ na ọrụ dịịrị ndị otu na ngalaba niile nke Wikimedia, tinyere imepụta otu ọhụrụ – Global Council – maka ọchịchị Otu a.
'''Sonye na "Mmemme Mwepụta mbụ" nke Wikimedia Movement Charter'''
Soro [[m:Special:MyLanguage/Event:Movement Charter Launch Party|“Mmemme Mwepụta mbụ”]] na ''June 20, 2024'' na ''14.00-15.00 UTC'' ([https://zonestamp.toolforge.org/1718892000 oge mpaghara gị]). N'oge oku a, anyị ga-eme ememe mwepụta nke Charter ikpeazụ ma gosịpụta ọdịnaya nke Charter. Soro ma mụta maka Charter a tupu ịtụọ vootu gị.
'''Votu nkwado Movement Charter '''
Ịtụ vootu ga amalite na Securepoll na '''Juun 25, 2024''' na '''00:01 UTC''' ma ọ ga akwụsị '''Jụlaị 9, 2024''' na '''23:59 UTC.'''
Ị nwere ike ịgụkwu gbasara [[m:Special:MyLanguage/Movement Charter/Ratification/Voting|usoro ịtụ vootu, ikike ntozu, na nkọwa ndị ọzọ]] na Meta.
Inwe ajụjụ ọbụla, Debanye ozi gị na [[m:Special:MyLanguage/Talk:Movement Charter|Meta talk page]] ma ọ bụ zigara ndị MCDC emailụ na [mailto:mcdc@wikimedia.org mcdc@wikimedia.org].
N'aha MCDC,<section end="announcement-content" />
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 09:45, 11 Jụn 2024 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26390244 -->
== Ịtụ vootu iji nabata Movement Charter Wikimedia amalitela ugbu a - tụọ vootu gị ==
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Movement Charter/Drafting Committee/Announcement - Ratification vote opens|Ị nwere ike ịchọta ozi a ka atụgharịrị n'asụsụ ndị ọzọ na Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Movement Charter/Drafting Committee/Announcement - Ratification vote opens}}&language=&action=page&filter= {{int:please-translate}}]''
Ndewo onye ọ bụla,
Ịtụ vootu iji nabata [[m:Special:MyLanguage/Movement Charter|'''Wikimedia Movement Charter''']] amalitela ugbu a. Movement Charter Wikimedia bụ akwụkwọ iji kọwapụta ọrụ na ọrụ dịịrị ndị otu na ngalaba niile nke otu Wikimedia, gụnyere imepụta otu ọhụrụ – Council Global – maka ọchịchị Otu a.
Ndepụta ikpeazụ nke Wikimedia Movement Charter [[m:Special:MyLanguage/Movement Charter|adịla na Meta n'asụsụ dị iche iche]].
Ịtụ vootu ga amalite na Securepoll na '''Juun 25, 2024''' na '''00:01 UTC''' ma ọ ga akwụsị '''Jụlaị 9, 2024''' na '''23:59 UTC.'''
Biko gụkwuo gbasara [[m:Special:MyLanguage/Movement Charter/Ratification/Voting|usoro ịtụ vootu na nkọwagasị ikike ntozu ]] na Meta.
Ịgụchaa Charter a, biko [[Special:SecurePoll/vote/398|'''ie vootu ebe a''']] ma bawanye ikesa ederede a.
Ọ bụrụ na ị nwere ajụjụ ọ bụla gbasara votu nnabata, biko kpọtụrụ Charter Electoral Commission na [mailto:cec@wikimedia.org '''cec@wikimedia.org'''].
N'aha CEC,<section end="announcement-content" />
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 11:52, 25 Jụn 2024 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26989444 -->
== Ịtụ vootu iji kwado usoro Nnabata nke Wikimedia Movement Charter na-akwụsị n'oge na-adịghị anya ==
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Movement Charter/Drafting Committee/Announcement - Final reminder|Ị nwere ike ịchọta ozi a ka atụgharịrị n'asụsụ ndị ọzọ na Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Movement Charter/Drafting Committee/Announcement - Final reminder}}&language=&action=page&filter= {{int:please-translate}}]''
Ndewo onye ọ bụla,
Nke a bụ n'udi ichetara gị na oge ịtụ vootu iji kwado nnabata [[m:Special:MyLanguage/Movement Charter|Wikimedia Movement Charter]] ga-emechi na '''Julaị 9, 2024''', na '''23:59 UTC'''.
Ọ bụrụ na ị tụghị vootu, biko tụọ [[m:Special:SecurePoll/vote/398|na SecurePoll]].
N'aha [[m:Special:MyLanguage/Movement_Charter/Ratification/Voting#Electoral_Commission|Charter Electoral Commission]],<section end="announcement-content" />
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 04:46, 8 Julaị 2024 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26989444 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">U4C Special Election - Call for Candidates</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election/Announcement – call for candidates|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election/Announcement – call for candidates}}&language=&action=page&filter= {{int:please-translate}}]''
Hello all,
A special election has been called to fill additional vacancies on the U4C. The call for candidates phase is open from now through July 19, 2024.
The [[:m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Universal Code of Conduct Coordinating Committee]] (U4C) is a global group dedicated to providing an equitable and consistent implementation of the [[:foundation:Wikimedia Foundation Universal Code of Conduct|UCoC]]. Community members are invited to submit their applications in the special election for the U4C. For more information and the responsibilities of the U4C, please review the [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|U4C Charter]].
In this special election, according to [[Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter#2. Elections and Terms|chapter 2 of the U4C charter]], there are 9 seats available on the U4C: '''four''' community-at-large seats and '''five''' regional seats to ensure the U4C represents the diversity of the movement. [[Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter#5. Glossary|No more than two members of the U4C can be elected from the same home wiki]]. Therefore, candidates must not have English Wikipedia, German Wikipedia, or Italian Wikipedia as their home wiki.
Read more and submit your application on [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election|Meta-wiki]].
In cooperation with the U4C,<section end="announcement-content" />
</div>
-- [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 01:03, 10 Julaị 2024 (WAT)
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26989444 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Wikimedia Movement Charter ratification voting results</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Movement Charter/Drafting Committee/Announcement - Results of the ratification vote|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Movement Charter/Drafting Committee/Announcement - Results of the ratification vote}}&language=&action=page&filter= {{int:please-translate}}]''
Hello everyone,
After carefully tallying both individual and affiliate votes, the [[m:Special:MyLanguage/Movement Charter/Ratification/Voting#Electoral Commission|Charter Electoral Commission]] is pleased to announce the final results of the Wikimedia Movement Charter voting.
As [[m:Special:MyLanguage/Talk:Movement Charter#Thank you for your participation in the Movement Charter ratification vote!|communicated]] by the Charter Electoral Commission, we reached the quorum for both Affiliate and individual votes by the time the vote closed on '''July 9, 23:59 UTC'''. We thank all 2,451 individuals and 129 Affiliate representatives who voted in the ratification process. Your votes and comments are invaluable for the future steps in Movement Strategy.
The final results of the [[m:Special:MyLanguage/Movement Charter|Wikimedia Movement Charter]] ratification voting held between 25 June and 9 July 2024 are as follows:
'''Individual vote:'''
Out of 2,451 individuals who voted as of July 9 23:59 (UTC), 2,446 have been accepted as valid votes. Among these, '''1,710''' voted “yes”; '''623''' voted “no”; and '''113''' selected “–” (neutral). Because the neutral votes don’t count towards the total number of votes cast, 73.30% voted to approve the Charter (1710/2333), while 26.70% voted to reject the Charter (623/2333).
'''Affiliates vote:'''
Out of 129 Affiliates designated voters who voted as of July 9 23:59 (UTC), 129 votes are confirmed as valid votes. Among these, '''93''' voted “yes”; '''18''' voted “no”; and '''18''' selected “–” (neutral). Because the neutral votes don’t count towards the total number of votes cast, 83.78% voted to approve the Charter (93/111), while 16.22% voted to reject the Charter (18/111).
'''Board of Trustees of the Wikimedia Foundation:'''
The Wikimedia Foundation Board of Trustees voted '''not to ratify''' the proposed Charter during their special Board meeting on July 8, 2024. The Chair of the Wikimedia Foundation Board of Trustees, Nataliia Tymkiv, [[m:Special:MyLanguage/Wikimedia_Foundation_Board_noticeboard/Board_resolution_and_vote_on_the_proposed_Movement_Charter|shared the result of the vote, the resolution, meeting minutes and proposed next steps]].
With this, the Wikimedia Movement Charter in its current revision is '''not ratified'''.
We thank you for your participation in this important moment in our movement’s governance.
The Charter Electoral Commission,
[[m:User:Abhinav619|Abhinav619]], [[m:User:Borschts|Borschts]], [[m:User:Iwuala Lucy|Iwuala Lucy]], [[m:User:Tochiprecious|Tochiprecious]], [[m:User:Der-Wir-Ing|Der-Wir-Ing]]<section end="announcement-content" />
</div>
[[Ọbanife:MediaWiki message delivery|MediaWiki message delivery]] ([[Okwu ọbanife:MediaWiki message delivery|ṅkátá]]) 18:53, 18 Julaị 2024 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26989444 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Vote now to fill vacancies of the first U4C</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election/Announcement – voting opens|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election/Announcement – voting opens}}&language=&action=page&filter= {{int:please-translate}}]''
Dear all,
I am writing to you to let you know the voting period for the Universal Code of Conduct Coordinating Committee (U4C) is open now through '''August 10, 2024'''. Read the information on the [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election|voting page on Meta-wiki]] to learn more about voting and voter eligibility.
The Universal Code of Conduct Coordinating Committee (U4C) is a global group dedicated to providing an equitable and consistent implementation of the UCoC. Community members were invited to submit their applications for the U4C. For more information and the responsibilities of the U4C, please [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|review the U4C Charter]].
Please share this message with members of your community so they can participate as well.
In cooperation with the U4C,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 03:47, 27 Julaị 2024 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=26989444 -->
== <span lang="en" dir="ltr" class="mw-content-ltr">Reminder! Vote closing soon to fill vacancies of the first U4C</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election/Announcement – reminder to vote|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election/Announcement – reminder to vote}}&language=&action=page&filter= {{int:please-translate}}]''
Dear all,
The voting period for the Universal Code of Conduct Coordinating Committee (U4C) is closing soon. It is open through 10 August 2024. Read the information on [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Election/2024_Special_Election#Voting|the voting page on Meta-wiki to learn more about voting and voter eligibility]]. If you are eligible to vote and have not voted in this special election, it is important that you vote now.
'''Why should you vote?''' The U4C is a global group dedicated to providing an equitable and consistent implementation of the UCoC. Community input into the committee membership is critical to the success of the UCoC.
Please share this message with members of your community so they can participate as well.
In cooperation with the U4C,<section end="announcement-content" />
</div>
-- [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 16:30, 6 Ọgọọst 2024 (WAT)
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=27183190 -->
== <span lang="en" dir="ltr">Coming soon: A new sub-referencing feature – try it!</span> ==
<div lang="en" dir="ltr">
<section begin="Sub-referencing"/>
[[File:Sub-referencing reuse visual.png|{{#ifeq:{{#dir}}|ltr|right|left}}|400px]]
Hello. For many years, community members have requested an easy way to re-use references with different details. Now, a MediaWiki solution is coming: The new sub-referencing feature will work for wikitext and Visual Editor and will enhance the existing reference system. You can continue to use different ways of referencing, but you will probably encounter sub-references in articles written by other users. More information on [[m:Special:MyLanguage/WMDE Technical Wishes/Sub-referencing|the project page]].
'''We want your feedback''' to make sure this feature works well for you:
* [[m:Special:MyLanguage/WMDE Technical Wishes/Sub-referencing#Test|Please try]] the current state of development on beta wiki and [[m:Talk:WMDE Technical Wishes/Sub-referencing|let us know what you think]].
* [[m:WMDE Technical Wishes/Sub-referencing/Sign-up|Sign up here]] to get updates and/or invites to participate in user research activities.
[[m:Special:MyLanguage/Wikimedia Deutschland|Wikimedia Deutschland]]’s [[m:Special:MyLanguage/WMDE Technical Wishes|Technical Wishes]] team is planning to bring this feature to Wikimedia wikis later this year. We will reach out to creators/maintainers of tools and templates related to references beforehand.
Please help us spread the message. --[[m:User:Johannes Richter (WMDE)|Johannes Richter (WMDE)]] ([[m:User talk:Johannes Richter (WMDE)|talk]]) 10:36, 19 August 2024 (UTC)
<section end="Sub-referencing"/>
</div>
<!-- Message sent by User:Johannes Richter (WMDE)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Johannes_Richter_(WMDE)/Sub-referencing/massmessage_list&oldid=27309345 -->
== Sign up for the language community meeting on August 30th, 15:00 UTC ==
Hi all,
The next language community meeting is scheduled in a few weeks—on August 30th at 15:00 UTC. If you're interested in joining, you can [https://www.mediawiki.org/wiki/Wikimedia_Language_and_Product_Localization/Community_meetings#30_August_2024 sign up on this wiki page].
This participant-driven meeting will focus on sharing language-specific updates related to various projects, discussing technical issues related to language wikis, and working together to find possible solutions. For example, in the last meeting, topics included the Language Converter, the state of language research, updates on the Incubator conversations, and technical challenges around external links not working with special characters on Bengali sites.
Do you have any ideas for topics to share technical updates or discuss challenges? Please add agenda items to the document [https://etherpad.wikimedia.org/p/language-community-meeting-aug-2024 here] and reach out to ssethi(__AT__)wikimedia.org. We look forward to your participation!
[[Ọbanife:MediaWiki message delivery|MediaWiki message delivery]] ([[Okwu ọbanife:MediaWiki message delivery|ṅkátá]]) 00:20, 23 Ọgọọst 2024 (WAT)
<!-- Message sent by User:SSethi (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=27183190 -->
== <span lang="en" dir="ltr">Announcing the Universal Code of Conduct Coordinating Committee</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
:''[https://lists.wikimedia.org/hyperkitty/list/board-elections@lists.wikimedia.org/thread/OKCCN2CANIH2K7DXJOL2GPVDFWL27R7C/ Original message at wikimedia-l]. [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election/Announcement - results|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election/Announcement - results}}&language=&action=page&filter= {{int:please-translate}}]''
Hello all,
The scrutineers have finished reviewing the vote and the [[m:Special:MyLanguage/Elections Committee|Elections Committee]] have certified the [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election/Results|results]] for the [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024 Special Election|Universal Code of Conduct Coordinating Committee (U4C) special election]].
I am pleased to announce the following individual as regional members of the U4C, who will fulfill a term until 15 June 2026:
* North America (USA and Canada)
** Ajraddatz
The following seats were not filled during this special election:
* Latin America and Caribbean
* Central and East Europe (CEE)
* Sub-Saharan Africa
* South Asia
* The four remaining Community-At-Large seats
Thank you again to everyone who participated in this process and much appreciation to the candidates for your leadership and dedication to the Wikimedia movement and community.
Over the next few weeks, the U4C will begin meeting and planning the 2024-25 year in supporting the implementation and review of the UCoC and Enforcement Guidelines. You can follow their work on [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Meta-Wiki]].
On behalf of the U4C and the Elections Committee,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] 15:07, 2 Septemba 2024 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=27183190 -->
== Nwee nkwuwa okwu gị: tụọ votu maka bọọdụ ndị nlekọta 2024! ==
<section begin="announcement-content" />
Ndewo nụ,
Oge ịtụ vootu maka [[m:Special:MyLanguage/Wikimedia Foundation elections/2024|2024 Board of Trustees]] emegheela ugbu a. Enwere mmadụ iri na abụọ (12) na-azọ ọkwa maka nnọchiteanya oche anọ (4) na Board.
Mụtakwuo maka ndị na-azọ ọkwa nnọchiteanya site na [[m:Special:MyLanguage/Wikimedia Foundation elections/2024/Candidates|ịgụ nkwupụta ha]] na [[m:Special:MyLanguage/Wikimedia_Foundation_elections/2024/Questions_for_candidates | azịza nke ajụjụ ngalaba otu]].
Mgbe ị dị njikere, wee gaa na ibe ntụli aka [[m:Special:SecurePoll/vote/400|SecurePoll]] iji mee ntuliaka. '''Votu a na-emeghe site na Septemba 3 na 00:00 UTC ruo Septemba 17 na 23:59 UTC'''.
Iji lelee ntozu ime ntuliaka gị, biko gaa na [[m:Special:MyLanguage/Wikimedia_Foundation_elections/2024/Voter_eligibility_guidelines|ibe ntozu ndị n'eme ntuliaka]].
Yagazie
Kọmitii n'ahụ maka Ntuliaka Na Board Selection Working Group<section end="announcement-content" />
[[Ọbanife:MediaWiki message delivery|MediaWiki message delivery]] ([[Okwu ọbanife:MediaWiki message delivery|ṅkátá]]) 13:15, 3 Septemba 2024 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=27183190 -->
== 'Wikidata item' link is moving. Find out where... ==
<div lang="en" dir="ltr" class="mw-content-ltr"><i>Apologies for cross-posting in English. Please consider translating this message.</i>{{tracked|T66315}}
Hello everyone, a small change will soon be coming to the user-interface of your Wikimedia project.
The [[d:Q16222597|Wikidata item]] [[w:|sitelink]] currently found under the <span style="color: #54595d;"><u>''General''</u></span> section of the '''Tools''' sidebar menu will move into the <span style="color: #54595d;"><u>''In Other Projects''</u></span> section.
We would like the Wiki communities feedback so please let us know or ask questions on the [[m:Talk:Wikidata_For_Wikimedia_Projects/Projects/Move_Wikidata_item_link|Discussion page]] before we enable the change which can take place October 4 2024, circa 15:00 UTC+2.
More information can be found on [[m:Wikidata_For_Wikimedia_Projects/Projects/Move_Wikidata_item_link|the project page]].<br><br>We welcome your feedback and questions.<br> [[Ọbanife:MediaWiki message delivery|MediaWiki message delivery]] ([[Okwu ọbanife:MediaWiki message delivery|ṅkátá]]) 19:58, 27 Septemba 2024 (WAT)
</div>
<!-- Message sent by User:Danny Benjafield (WMDE)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Danny_Benjafield_(WMDE)/MassMessage_Test_List&oldid=27524260 -->
== Mpụtaara mbụ nke ntuliaka Board of Trustees Wikimedia Foundation 2024 ==
<section begin="announcement-content" />
Ndewo nụ,
Ekene dịrị onye ọ bụla sonyere na Ntuliaka nke 2024 Wikimedia Foundation Board of Trustees. Ihe ruru ndị ngalaba otu nke 6000 sitere na ihe karịrị ọrụ wiki 180 tụrụ vootu.
Ndị nsonye anọ a na-azọ ọkwa bụ ndị a kacha tụọrọ vootu:
# [[User:Kritzolina|Christel Steigenberger]]
# [[User:Nadzik|Maciej Artur Nadzikiewicz]]
# [[User:Victoria|Victoria Doronina]]
# [[User:Laurentius|Lorenzo Losa]]
Ọ bụ ezie na a họpụtara ndị a site na ntuliaka, a ka chọrọ ka a họpụta ha na Board of Trustees. Ha kwesịrị ịgafe nnyocha nke ọma ma mezuo iru ogo ndị edepụtara na Iwu. A ga-ahọpụta ndị nnọchiteanya ọhụrụ na nzukọ Board ọzọ na Disemba 2024.
[[m:Special:MyLanguage/Wikimedia_Foundation_elections/2024/Results|Gụkwuo gbasara mpụtaara a na Meta-Wiki]]
Yagazie
Kọmitii n'ahụ maka Ntuliaka Na Board Selection Working Group
<section end="announcement-content" />
[[User:MPossoupe_(WMF)|MPossoupe_(WMF)]] 09:26, 14 Ọktoba 2024 (WAT)
<!-- Message sent by User:MPossoupe (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=27183190 -->
== <span lang="en" dir="ltr">Seeking volunteers to join several of the movement’s committees</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
Each year, typically from October through December, several of the movement’s committees seek new volunteers.
Read more about the committees on their Meta-wiki pages:
* [[m:Special:MyLanguage/Affiliations_Committee|Affiliations Committee (AffCom)]]
* [[m:Special:MyLanguage/Ombuds_commission|Ombuds commission (OC)]]
* [[m:Special:MyLanguage/Wikimedia Foundation/Legal/Community Resilience and Sustainability/Trust and Safety/Case Review Committee|Case Review Committee (CRC)]]
Applications for the committees open on 16 October 2024. Applications for the Affiliations Committee close on 18 November 2024, and applications for the Ombuds commission and the Case Review Committee close on 2 December 2024. Learn how to apply by [[m:Special:MyLanguage/Wikimedia_Foundation/Legal/Committee_appointments|visiting the appointment page on Meta-wiki]]. Post to the talk page or email [mailto:cst@wikimedia.org cst@wikimedia.org] with any questions you may have.
For the Committee Support team,
<section end="announcement-content" />
</div>
-- [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 00:09, 17 Ọktoba 2024 (WAT)
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=27601062 -->
== 'Wikidata item' link is moving, finally. ==
Hello everyone, I previously wrote on the 27th September to advise that the ''Wikidata item'' sitelink will change places in the sidebar menu, moving from the '''General''' section into the '''In Other Projects''' section. The scheduled rollout date of 04.10.2024 was delayed due to a necessary request for Mobile/MinervaNeue skin. I am happy to inform that the global rollout can now proceed and will occur later today, 22.10.2024 at 15:00 UTC-2. [[m:Talk:Wikidata_For_Wikimedia_Projects/Projects/Move_Wikidata_item_link|Please let us know]] if you notice any problems or bugs after this change. There should be no need for null-edits or purging cache for the changes to occur. Kind regards, -[[m:User:Danny Benjafield (WMDE)|Danny Benjafield (WMDE)]] 12:30, 22 Ọktoba 2024 (WAT)
<!-- Message sent by User:Danny Benjafield (WMDE)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Danny_Benjafield_(WMDE)/MassMessage_Test_List&oldid=27535421 -->
== Sign up for the language community meeting on November 29th, 16:00 UTC ==
Hello everyone,
The next language community meeting is coming up next week, on November 29th, at 16:00 UTC (Zonestamp! For your timezone <https://zonestamp.toolforge.org/1732896000>). If you're interested in joining, you can sign up on this wiki page: <https://www.mediawiki.org/wiki/Wikimedia_Language_and_Product_Localization/Community_meetings#29_November_2024>.
This participant-driven meeting will be organized by the Wikimedia Foundation’s Language Product Localization team and the Language Diversity Hub. There will be presentations on topics like developing language keyboards, the creation of the Moore Wikipedia, and the language support track at Wiki Indaba. We will also have members from the Wayuunaiki community joining us to share their experiences with the Incubator and as a new community within our movement. This meeting will have a Spanish interpretation.
Looking forward to seeing you at the language community meeting! Cheers, [[User:SSethi (WMF)|Srishti]] 20:55, 21 Novemba 2024 (WAT)
<!-- Message sent by User:SSethi (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=27746256 -->
== Universal Code of Conduct annual review: provide your comments on the UCoC and Enforcement Guidelines ==
<div lang="en" dir="ltr" class="mw-content-ltr">
My apologies for writing in English.
{{Int:Please-translate}}.
I am writing to you to let you know the annual review period for the Universal Code of Conduct and Enforcement Guidelines is open now. You can make suggestions for changes through 3 February 2025. This is the first step of several to be taken for the annual review.
[[m:Special:MyLanguage/Universal_Code_of_Conduct/Annual_review|Read more information and find a conversation to join on the UCoC page on Meta]].
The [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee]] (U4C) is a global group dedicated to providing an equitable and consistent implementation of the UCoC. This annual review was planned and implemented by the U4C. For more information and the responsibilities of the U4C, [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter|you may review the U4C Charter]].
Please share this information with other members in your community wherever else might be appropriate.
-- In cooperation with the U4C, [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 02:12, 24 Jenụwarị 2025 (WAT)
</div>
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=27746256 -->
== Reminder: first part of the annual UCoC review closes soon ==
<div lang="en" dir="ltr" class="mw-content-ltr">
My apologies for writing in English.
{{Int:Please-translate}}.
This is a reminder that the first phase of the annual review period for the Universal Code of Conduct and Enforcement Guidelines will be closing soon. You can make suggestions for changes through [[d:Q614092|the end of day]], 3 February 2025. This is the first step of several to be taken for the annual review.
[[m:Special:MyLanguage/Universal_Code_of_Conduct/Annual_review|Read more information and find a conversation to join on the UCoC page on Meta]]. After review of the feedback, proposals for updated text will be published on Meta in March for another round of community review.
Please share this information with other members in your community wherever else might be appropriate.
-- In cooperation with the U4C, [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 01:49, 3 Febụwarị 2025 (WAT)
</div>
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28198931 -->
== <span lang="en" dir="ltr"> Upcoming Language Community Meeting (Feb 28th, 14:00 UTC) and Newsletter</span> ==
<div lang="en" dir="ltr">
<section begin="message"/>
Hello everyone!
[[File:WP20Symbols WIKI INCUBATOR.svg|right|frameless|150x150px|alt=An image symbolising multiple languages]]
We’re excited to announce that the next '''Language Community Meeting''' is happening soon, '''February 28th at 14:00 UTC'''! If you’d like to join, simply sign up on the '''[[mw:Wikimedia_Language_and_Product_Localization/Community_meetings#28_February_2025|wiki page]]'''.
This is a participant-driven meeting where we share updates on language-related projects, discuss technical challenges in language wikis, and collaborate on solutions. In our last meeting, we covered topics like developing language keyboards, creating the Moore Wikipedia, and updates from the language support track at Wiki Indaba.
'''Got a topic to share?''' Whether it’s a technical update from your project, a challenge you need help with, or a request for interpretation support, we’d love to hear from you! Feel free to '''reply to this message''' or add agenda items to the document '''[[etherpad:p/language-community-meeting-feb-2025|here]]'''.
Also, we wanted to highlight that the sixth edition of the Language & Internationalization newsletter (January 2025) is available here: [[:mw:Special:MyLanguage/Wikimedia Language and Product Localization/Newsletter/2025/January|Wikimedia Language and Product Localization/Newsletter/2025/January]]. This newsletter provides updates from the October–December 2024 quarter on new feature development, improvements in various language-related technical projects and support efforts, details about community meetings, and ideas for contributing to projects. To stay updated, you can subscribe to the newsletter on its wiki page: [[:mw:Wikimedia Language and Product Localization/Newsletter|Wikimedia Language and Product Localization/Newsletter]].
We look forward to your ideas and participation at the language community meeting, see you there!
<section end="message"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 09:30, 22 Febụwarị 2025 (WAT)
<!-- Message sent by User:SSethi (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28217779 -->
== <span lang="en" dir="ltr">Migration to Parsoid</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
Hello everyone! I am glad to inform you that as the next step in the [[mw:Special:MyLanguage/Parsoid/Parser Unification|Parser Unification]] project, Parsoid will soon be turned on as the default article renderer on your Wiktionary. We are gradually increasing the number of wikis using Parsoid, with the intention of making it the default wikitext parser for MediaWiki's next long-term support release. This will make our wikis more reliable and consistent for editors, readers, and tools to use, as well as making the development of future wikitext features easier.
If this transition disrupts your workflow, don’t worry! You can still opt out through a user preference or turn Parsoid off on the current page using the Tools submenu, as described in the [[mw:Special:MyLanguage/Help:Extension:ParserMigration|Extension:ParserMigration]] documentation.
There is [[mw:Special:MyLanguage/Parsoid/Parser_Unification/Confidence_Framework|more information about our roll-out strategy]] available, including the testing done before we turn on Parsoid for a new wiki.
To report bugs and issues, please look at our [[mw:Special:MyLanguage/Parsoid/Parser Unification/Known Issues|known issues]] documentation and if you found a new bug please create a phab ticket and tag the [[phab:project/view/5846|Content Transform Team in Phabricator]].
<section end="announcement-content" />
</div>
<em>[[m:Special:MyLanguage/Wikimedia Foundation/Product and Technology/Parsoid Read Views/Wiktionary Announcement|{{MediaWiki:Please-translate}}]]</em>
<bdi lang="en" dir="ltr">[[mw:User:ABreault (WMF)|Content Transform Team]]</bdi> 18:24, 26 Febụwarị 2025 (WAT)
<!-- Message sent by User:ABreault (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Wikimedia_Foundation/Product_and_Technology/Parsoid_Read_Views/2025-02-27_Wiktionaries&oldid=28314348 -->
== Universal Code of Conduct annual review: proposed changes are available for comment ==
<div lang="en" dir="ltr" class="mw-content-ltr">
My apologies for writing in English.
{{Int:Please-translate}}.
I am writing to you to let you know that [[m:Special:MyLanguage/Universal_Code_of_Conduct/Annual_review/Proposed_Changes|proposed changes]] to the [[foundation:Special:MyLanguage/Policy:Universal_Code_of_Conduct/Enforcement_guidelines|Universal Code of Conduct (UCoC) Enforcement Guidelines]] and [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter|Universal Code of Conduct Coordinating Committee (U4C) Charter]] are open for review. '''[[m:Special:MyLanguage/Universal_Code_of_Conduct/Annual_review/Proposed_Changes|You can provide feedback on suggested changes]]''' through the [[d:Q614092|end of day]] on Tuesday, 18 March 2025. This is the second step in the annual review process, the final step will be community voting on the proposed changes.
[[m:Special:MyLanguage/Universal_Code_of_Conduct/Annual_review|Read more information and find relevant links about the process on the UCoC annual review page on Meta]].
The [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee]] (U4C) is a global group dedicated to providing an equitable and consistent implementation of the UCoC. This annual review was planned and implemented by the U4C. For more information and the responsibilities of the U4C, [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter|you may review the U4C Charter]].
Please share this information with other members in your community wherever else might be appropriate.
-- In cooperation with the U4C, [[m:User:Keegan (WMF)|Keegan (WMF)]] 19:52, 7 Maachị 2025 (WAT)
</div>
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28307738 -->
== Final proposed modifications to the Universal Code of Conduct Enforcement Guidelines and U4C Charter now posted ==
<div lang="en" dir="ltr" class="mw-content-ltr">
The proposed modifications to the [[foundation:Special:MyLanguage/Policy:Universal_Code_of_Conduct/Enforcement_guidelines|Universal Code of Conduct Enforcement Guidelines]] and the U4C Charter [[m:Universal_Code_of_Conduct/Annual_review/2025/Proposed_Changes|are now on Meta-wiki for community notice]] in advance of the voting period. This final draft was developed from the previous two rounds of community review. Community members will be able to vote on these modifications starting on 17 April 2025. The vote will close on 1 May 2025, and results will be announced no later than 12 May 2025. The U4C election period, starting with a call for candidates, will open immediately following the announcement of the review results. More information will be posted on [[m:Special:MyLanguage//Universal_Code_of_Conduct/Coordinating_Committee/Election|the wiki page for the election]] soon.
Please be advised that this process will require more messages to be sent here over the next two months.
The [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee (U4C)]] is a global group dedicated to providing an equitable and consistent implementation of the UCoC. This annual review was planned and implemented by the U4C. For more information and the responsibilities of the U4C, you may [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter|review the U4C Charter]].
Please share this message with members of your community so they can participate as well.
-- In cooperation with the U4C, [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User_talk:Keegan (WMF)|talk]]) 03:05, 4 Eprel 2025 (WAT)
</div>
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28469465 -->
== Vote now on the revised UCoC Enforcement Guidelines and U4C Charter ==
<div lang="en" dir="ltr" class="mw-content-ltr">
The voting period for the revisions to the Universal Code of Conduct Enforcement Guidelines ("UCoC EG") and the UCoC's Coordinating Committee Charter is open now through the end of 1 May (UTC) ([https://zonestamp.toolforge.org/1746162000 find in your time zone]). [[m:Special:MyLanguage/Universal_Code_of_Conduct/Annual_review/2025/Voter_information|Read the information on how to participate and read over the proposal before voting]] on the UCoC page on Meta-wiki.
The [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee (U4C)]] is a global group dedicated to providing an equitable and consistent implementation of the UCoC. This annual review of the EG and Charter was planned and implemented by the U4C. Further information will be provided in the coming months about the review of the UCoC itself. For more information and the responsibilities of the U4C, you may [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter|review the U4C Charter]].
Please share this message with members of your community so they can participate as well.
In cooperation with the U4C -- [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User_talk:Keegan (WMF)|talk]]) 01:35, 17 Eprel 2025 (WAT)
</div>
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28469465 -->
== Vote on proposed modifications to the UCoC Enforcement Guidelines and U4C Charter ==
<section begin="announcement-content" />
<div lang="en" dir="ltr" class="mw-content-ltr">
The voting period for the revisions to the Universal Code of Conduct Enforcement Guidelines and U4C Charter closes on 1 May 2025 at 23:59 UTC ([https://zonestamp.toolforge.org/1746162000 find in your time zone]). [[m:Special:MyLanguage/Universal Code of Conduct/Annual review/2025/Voter information|Read the information on how to participate and read over the proposal before voting]] on the UCoC page on Meta-wiki.
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
The [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Universal Code of Conduct Coordinating Committee (U4C)]] is a global group dedicated to providing an equitable and consistent implementation of the UCoC. This annual review was planned and implemented by the U4C. For more information and the responsibilities of the U4C, you may [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|review the U4C Charter]].
</div>
Biko kesaa ozi a na nye ndị ngalaba otu asụsụ gị n'asụsụ gị, dịka o kwesịrị, ka ha wee nwee ike isonye.
Na njikọ aka nke ndị Otu U4C <section end="announcement-content" />
<div lang="en" dir="ltr" class="mw-content-ltr">
[[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 04:42, 29 Eprel 2025 (WAT)</div>
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28618011 -->
== Wikifunctions will be deployed on your wiki on May 27 ==
Hi all, we want to let you know that [[wikifunctions:Wikifunctions:Main_Page|Wikifunctions]] is coming to your project on May 27! When enabled, you will be able to call functions from your project, and integrate them in your articles.
A function is something that takes one or more inputs and transforms them into a desired output. Think of adding up two numbers, or converting miles into metres, or calculating how much time has passed since an event, or declining a word into a case. This is usually done with templates that are complicated to create or to import. With Wikifunctions, you will be able to do this with just a couple of clicks!
Please check out [[wikifunctions:Wikifunctions:Introduction|these tutorials]] for more details. You’re also invited to [[wikifunctions:Special:CreateObject|create]] functions that you find useful, or [[wikifunctions:Wikifunctions:Suggest_a_function|ask for help from the Wikifunctions community]].
We would like to invite you to contribute to Wikifunctions, by translating the existing functions labels into your language, so that more users in your community can more easily reuse them on the project.
Of course, we are happy to help in case there are questions or difficulties, and we are ready to listen to your feedback. Please ping me directly in case of necessity or reach out to me on my talk page. Thank you in advance! --[[Ojiarụ:Sannita (WMF)|Sannita (WMF)]] ([[Ṅkàtá ojiarụ:Sannita (WMF)|ṅkátá]]) 15:06, 15 Mee 2025 (WAT)
== <span lang="en" dir="ltr">Call for Candidates for the Universal Code of Conduct Coordinating Committee (U4C)</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
The results of voting on the Universal Code of Conduct Enforcement Guidelines and Universal Code of Conduct Coordinating Committee (U4C) Charter is [[m:Special:MyLanguage/Universal Code of Conduct/Annual review/2025#Results|available on Meta-wiki]].
You may now [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2025/Candidates|submit your candidacy to serve on the U4C]] through 29 May 2025 at 12:00 UTC. Information about [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2025|eligibility, process, and the timeline are on Meta-wiki]]. Voting on candidates will open on 1 June 2025 and run for two weeks, closing on 15 June 2025 at 12:00 UTC.
If you have any questions, you can ask on [[m:Talk:Universal Code of Conduct/Coordinating Committee/Election/2025|the discussion page for the election]]. -- in cooperation with the U4C, </div><section end="announcement-content" />
</div>
<bdi lang="en" dir="ltr">[[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User_talk:Keegan (WMF)|ṅkátá]])</bdi> 23:08, 15 Mee 2025 (WAT)
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28618011 -->
== RfC ongoing regarding Abstract Wikipedia (and your project) ==
<div lang="en" dir="ltr" class="mw-content-ltr">
''(Apologies for posting in English, if this is not your first language)''
Hello all! We opened a discussion on Meta about a very delicate issue for the development of [[:m:Special:MyLanguage/Abstract Wikipedia|Abstract Wikipedia]]: where to store the abstract content that will be developed through functions from Wikifunctions and data from Wikidata. Since some of the hypothesis involve your project, we wanted to hear your thoughts too.
We want to make the decision process clear: we do not yet know which option we want to use, which is why we are consulting here. We will take the arguments from the Wikimedia communities into account, and we want to consult with the different communities and hear arguments that will help us with the decision. The decision will be made and communicated after the consultation period by the Foundation.
You can read the various hypothesis and have your say at [[:m:Abstract Wikipedia/Location of Abstract Content|Abstract Wikipedia/Location of Abstract Content]]. Thank you in advance! -- [[User:Sannita (WMF)|Sannita (WMF)]] ([[User talk:Sannita (WMF)|<span class="signature-talk">{{int:Talkpagelinktext}}</span>]]) 16:27, 22 Mee 2025 (WAT)
</div>
<!-- Message sent by User:Sannita (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Sannita_(WMF)/Mass_sending_test&oldid=28768453 -->
== Ntuliaka Nhọpụta ndị Otu nlekọta atụkwasara obi nke Wikimedia Foundation 2025 & Òkù nnabata ajụjụ ==
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Wikimedia Foundation elections/2025/Announcement/Selection announcement|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Wikimedia Foundation elections/2025/Announcement/Selection announcement}}&language=&action=page&filter= {{int:please-translate}}]''
Ndewo Mmadụ niile,
N'afọ a, ọnụnọ ugboro (abụọ) 2 nke ndị otu nlekọta atụkwasara obi ndị ngalaba otu- na ndị mmekọ-họpụtara na Otu Bọọdụ ndị nlekọta atụkwasịrị obi na Wikimedia Foundation ga-abịa na njedebe [1]. Ndị Bọọdụ na-akpọ òtù niile òkù isonye na usoro nhọpụta nke afọ a ma tụọ votu iji mejupụta oche ndị ahụ.
Kọmitii Ntuliaka ga-ahụ maka usoro a site na nkwado ndị ọrụ Foundation [2]. Kọmitii na-ahụ maka ọchịchị, nke ndị na-akwado ndị na-abụghị ndị na-azọ ọkwa n’usoro nhọpụta nke nhọpụta ndị nlekọta atụkwasịrị obi nke ngalaba otu-na ndị mmekọ na ntuliaka 2025 mejupụtara (Raju Narisetti, Shani Evenstein Sigalov, Lorenzo Losa, Kathy Collins, Victoria Doronina na Esra'a Al Shafei) [3], bụ ndị enyere ọrụ nlebara anya nye ndị Bọọdụ maka usoro nhọpụta nke ndị nlekọta atụkwasịrị obi 2025. Nkọwa ndị ọzọ gbasara ọrụ nke ndị Kọmitii ntuliaka, ndị Bọọdụ, na ndị ọrụ nọ ebe a [4].
Nke a bụ ụbọchị ndị akwadoro imepụta ihe ndị a:
* Mee 22 – June 5: Nkwupụta (nkwukọrịta a) na ịkpọ oku maka oge ajụjụ [6]
* June 17 - Julaị 1, 2025: ịkpọ oku maka ndị na-aga ịzọ ọkwa
* Julaị 2025: Ọ bụrụ na ọ dị mkpa, ndị mmekọ ga-eme ntuliaka iji wepụta aha ndị ga-azọ ọkwa ma ọ bụrụ na mmadụ iri ma ọ bụ karịa tinyere akwụkwọ [5]
* Ọgọst 2025: Oge nzisa
* Ọgọst – Septemba 2025: Oge ịtụ vootu ndị ngalaba otu izu abụọ
* Ọktoba – Nọvemba 2025: Nnyocha ndabere nke ndị ahọpụtara
* Nzukọ Bọọdụ na Disemba 2025: Ndị nlekọta ọhụrụ ewerela ọnọdụ
Matakwuo maka usoro nhọpụta nke 2025 - tinyere usoro ihe omume zuru ezu, usoro ịdebanye aha, iwu nzisa, na iwu ntozu ndị ga-eme ntuliaka - na ibe Meta-wiki a. [[m:Special:MyLanguage/Wikimedia_Foundation_elections/2025|[link]]].
'''Ịkpọ oku maka ajụjụ'''
N'ime usoro nhọpụta ọ bụla, ndị ngalaba otu nwere ohere iweta ajụjụ nye ndị na-azọ ọkwa Board of Trustees ịza. Kọmiti na-eme ntuliaka na-ahọpụta ajụjụ n'ime ndepụta ndị ngalaba otu wepụtara nye ndị na-azọ ọkwa ịza. Ndị na-azọ ọkwa ga-aza ajụjụ niile achọrọ ka ha wee ike tozuo ịzọ ọkwa; ma ọ bụghị ya, a ga-ewepu akwụkwọ anam achọ iso ha tinyere. N'afọ a, kọmitii ntuliaka ga-ahọpụta ajụjụ ise ndị na-azọ ọkwa ga-aza. Ajụjụ ndị ahọpụtara nwere ike ịbụ nchịkọta nke ihe ndị ngalaba otu zitere, ma ọ bụrụ na ha yitere ma ọ bụ na ha metụtara. [[m:Special:MyLanguage/Wikimedia_Foundation_elections/2025/Questions_for_candidates|[link]]]
'''Ndị ọrụ afọ ofufo Ntuliaka'''
Ụzọ ọzọ ị ga-esi sonye na usoro nhọpụta 2025 bụ ịbụ onye ọrụ afọ ofufo. Ndị ọrụ afọ ofufo bụ ndị nọ n'etiti kọmitii ntuliaka na ngalaba otu ha si na ya. Ha na-enyere aka hụ na ndị ngalaba otu ha sonyere ma kpọkọta ha ka ha mee ntuliaka. Mụtakwuo maka mmemme a na otu esi esonye na ibe Meta-wiki a
[[m:Wikimedia_Foundation_elections/2025/Election_volunteers|[link]]].
Daalụ!
[1] https://meta.wikimedia.org/wiki/Wikimedia_Foundation_elections/2022/Results
[2] https://foundation.wikimedia.org/wiki/Committee:Elections_Committee_Charter
[3] https://foundation.wikimedia.org/wiki/Resolution:Committee_Membership,_December_2024
[4] https://meta.wikimedia.org/wiki/Wikimedia_Foundation_elections_committee/Roles
[5] https://meta.wikimedia.org/wiki/Wikimedia_Foundation_elections/2025/FAQ
[6] https://meta.wikimedia.org/wiki/Wikimedia_Foundation_elections/2025/Questions_for_candidates
Ka e mesịa,
Victoria Doronina
Board Liaison to the Elections Committee
Governance Committee<section end="announcement-content" />
[[Ojiarụ:MediaWiki message delivery|MediaWiki message delivery]] ([[Ṅkàtá ojiarụ:MediaWiki message delivery|ṅkátá]]) 04:08, 28 Mee 2025 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28618011 -->
== Vote now in the 2025 U4C Election ==
<div lang="en" dir="ltr" class="mw-content-ltr">
Apologies for writing in English.
{{Int:Please-translate}}
Eligible voters are asked to participate in the 2025 [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee]] election. More information–including an eligibility check, voting process information, candidate information, and a link to the vote–are available on Meta at the [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Election/2025|2025 Election information page]]. The vote closes on 17 June 2025 at [https://zonestamp.toolforge.org/1750161600 12:00 UTC].
Please vote if your account is eligible. Results will be available by 1 July 2025. -- In cooperation with the U4C, [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 00:01, 14 Jụn 2025 (WAT) </div>
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28848819 -->
== Otu Bọọdụ ndị nlekọta atụkwasịrị obi nke Wikimedia Foundation 2025 - Ọkpụkpọ oku maka ndị ga-eso zọọ ọkwa ==
<section begin="announcement-content" />
:''<div class="plainlinks">[[m:Special:MyLanguage/Wikimedia Foundation elections/2025/Announcement/Call for candidates|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Wikimedia Foundation elections/2025/Announcement/Call for candidates}}&language=&action=page&filter= {{int:please-translate}}]</div>
Ndewo mmadụ niile,
[[m:Special:MyLanguage/Wikimedia Foundation elections/2025|Ọkpụkpọ oku maka ndị ga-eso zọọ ọkwa maka nhopụta ọkwa Board of Trustees nke Wikimedia Foundation 2025 amalitela ugbua]] site na June 17, 2025 - Julaị 2, 2025 na 11:59 UTC [1]. Ndị Board of Trustees na-ahụ maka ọrụ Wikimedia Foundation, nakwa onye nlekọta atụkwasịrị obi ọ bụla ga-eje ozi afọ atọ [2]. Nke a bụ ọnọdụ ọrụ afọ ofufo.
N'afọ a, ndị ngalaba otu Wikimedia ga-eme ntuliaka na ngwụcha Ọgọstụ ruo Septemba 2025 iji mejupụta oche abụọ (2) na Bọọdụ Foundation. Ị nwere ike - ma ọ bụ onye ị maara - bụ onye tozuru isonyere ndị isi nlekọta nke Wikimedia Foundation? [3]
Matakwuo maka ihe ọ ga-ewe iji guzoro n'ọkwa onye isi ndị a yana otu ị ga-esi nyefee nhọpụta gị na [[m:Special:MyLanguage/Wikimedia Foundation elections/2025/Candidate application| ibe Meta-wiki a]] ma ọ bụ gbaa onye ọzọ ume ịzọ ọkwa na ntuliaka nke afọ a.
Yagazie,
Abhishek Suryawanshi<br />
Onye isi oche nke Kọmitii Ntuliaka
N'aha Kọmitii Ntuliaka na Kọmitii Ọchịchị
[1] https://meta.wikimedia.org/wiki/Special:MyLanguage/Wikimedia_Foundation_elections/2025/Call_for_candidates
[2] https://foundation.wikimedia.org/wiki/Legal:Bylaws#(B)_Term.
[3] https://meta.wikimedia.org/wiki/Special:MyLanguage/Wikimedia_Foundation_elections/2025/Resources_for_candidates<section end="announcement-content" />
[[Ojiarụ:MediaWiki message delivery|MediaWiki message delivery]] ([[Ṅkàtá ojiarụ:MediaWiki message delivery|ṅkátá]]) 18:44, 17 Jụn 2025 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28866958 -->
== <span lang="en" dir="ltr">Sister Projects Task Force reviews Wikispore and Wikinews</span> ==
<div lang="en" dir="ltr">
<section begin="message"/>
Dear Wikimedia Community,
The [[m:Wikimedia Foundation Community Affairs Committee|Community Affairs Committee (CAC)]] of the Wikimedia Foundation Board of Trustees assigned [[m:Wikimedia Foundation Community Affairs Committee/Sister Projects Task Force|the Sister Projects Task Force (SPTF)]] to update and implement a procedure for assessing the lifecycle of Sister Projects – wiki [[m:Wikimedia projects|projects supported by Wikimedia Foundation (WMF)]].
A vision of relevant, accessible, and impactful free knowledge has always guided the Wikimedia Movement. As the ecosystem of Wikimedia projects continues to evolve, it is crucial that we periodically review existing projects to ensure they still align with our goals and community capacity.
Despite their noble intent, some projects may no longer effectively serve their original purpose. '''Reviewing such projects is not about giving up – it's about responsible stewardship of shared resources'''. Volunteer time, staff support, infrastructure, and community attention are finite, and the non-technical costs tend to grow significantly as our ecosystem has entered a different age of the internet than the one we were founded in. Supporting inactive projects or projects that didn't meet our ambitions can unintentionally divert these resources from areas with more potential impact.
Moreover, maintaining projects that no longer reflect the quality and reliability of the Wikimedia name stands for, involves a reputational risk. An abandoned or less reliable project affects trust in the Wikimedia movement.
Lastly, '''failing to sunset or reimagine projects that are no longer working can make it much harder to start new ones'''. When the community feels bound to every past decision – no matter how outdated – we risk stagnation. A healthy ecosystem must allow for evolution, adaptation, and, when necessary, letting go. If we create the expectation that every project must exist indefinitely, we limit our ability to experiment and innovate.
Because of this, SPTF reviewed two requests concerning the lifecycle of the Sister Projects to work through and demonstrate the review process. We chose Wikispore as a case study for a possible new Sister Project opening and Wikinews as a case study for a review of an existing project. Preliminary findings were discussed with the CAC, and a community consultation on both proposals was recommended.
=== Wikispore ===
The [[m:Wikispore|application to consider Wikispore]] was submitted in 2019. SPTF decided to review this request in more depth because rather than being concentrated on a specific topic, as most of the proposals for the new Sister Projects are, Wikispore has the potential to nurture multiple start-up Sister Projects.
After careful consideration, the SPTF has decided '''not to recommend''' Wikispore as a Wikimedia Sister Project. Considering the current activity level, the current arrangement allows '''better flexibility''' and experimentation while WMF provides core infrastructural support.
We acknowledge the initiative's potential and seek community input on what would constitute a sufficient level of activity and engagement to reconsider its status in the future.
As part of the process, we shared the decision with the Wikispore community and invited one of its leaders, Pharos, to an SPTF meeting.
Currently, we especially invite feedback on measurable criteria indicating the project's readiness, such as contributor numbers, content volume, and sustained community support. This would clarify the criteria sufficient for opening a new Sister Project, including possible future Wikispore re-application. However, the numbers will always be a guide because any number can be gamed.
=== Wikinews ===
We chose to review Wikinews among existing Sister Projects because it is the one for which we have observed the highest level of concern in multiple ways.
Since the SPTF was convened in 2023, its members have asked for the community's opinions during conferences and community calls about Sister Projects that did not fulfil their promise in the Wikimedia movement.[https://commons.wikimedia.org/wiki/File:WCNA_2024._Sister_Projects_-_opening%3F_closing%3F_merging%3F_splitting%3F.pdf <nowiki>[1]</nowiki>][https://meta.wikimedia.org/wiki/Wikimedia_Foundation_Community_Affairs_Committee/Sister_Projects_Task_Force#Wikimania_2023_session_%22Sister_Projects:_past,_present_and_the_glorious_future%22 <nowiki>[2]</nowiki>][https://meta.wikimedia.org/wiki/WikiConvention_francophone/2024/Programme/Quelle_proc%C3%A9dure_pour_ouvrir_ou_fermer_un_projet_%3F <nowiki>[3]</nowiki>] Wikinews was the leading candidate for an evaluation because people from multiple language communities proposed it. Additionally, by most measures, it is the least active Sister Project, with the greatest drop in activity over the years.
While the Language Committee routinely opens and closes language versions of the Sister Projects in small languages, there has never been a valid proposal to close Wikipedia in major languages or any project in English. This is not true for Wikinews, where there was a proposal to close English Wikinews, which gained some traction but did not result in any action[https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_English_Wikinews <nowiki>[4]</nowiki>][https://meta.wikimedia.org/wiki/WikiConvention_francophone/2024/Programme/Quelle_proc%C3%A9dure_pour_ouvrir_ou_fermer_un_projet_%3F <nowiki>[5]</nowiki>, see section 5] as well as a draft proposal to close all languages of Wikinews[https://meta.wikimedia.org/wiki/Talk:Proposals_for_closing_projects/Archive_2#Close_Wikinews_completely,_all_languages? <nowiki>[6]</nowiki>].
[[:c:File:Sister Projects Taskforce Wikinews review 2024.pdf|Initial metrics]] compiled by WMF staff also support the community's concerns about Wikinews.
Based on this report, SPTF recommends a community reevaluation of Wikinews. We conclude that its current structure and activity levels are the lowest among the existing sister projects. SPTF also recommends pausing the opening of new language editions while the consultation runs.
SPTF brings this analysis to a discussion and welcomes discussions of alternative outcomes, including potential restructuring efforts or integration with other Wikimedia initiatives.
'''Options''' mentioned so far (which might be applied to just low-activity languages or all languages) include but are not limited to:
*Restructure how Wikinews works and is linked to other current events efforts on the projects,
*Merge the content of Wikinews into the relevant language Wikipedias, possibly in a new namespace,
*Merge content into compatibly licensed external projects,
*Archive Wikinews projects.
Your insights and perspectives are invaluable in shaping the future of these projects. We encourage all interested community members to share their thoughts on the relevant discussion pages or through other designated feedback channels.
=== Feedback and next steps ===
We'd be grateful if you want to take part in a conversation on the future of these projects and the review process. We are setting up two different project pages: [[m:Public consultation about Wikispore|Public consultation about Wikispore]] and [[m:Public consultation about Wikinews|Public consultation about Wikinews]]. Please participate between 27 June 2025 and 27 July 2025, after which we will summarize the discussion to move forward. You can write in your own language.
I will also host a community conversation 16th July Wednesday 11.00 UTC and 17th July Thursday 17.00 UTC (call links to follow shortly) and will be around at Wikimania for more discussions.
<section end="message"/>
</div>
-- [[User:Victoria|Victoria]] on behalf of the Sister Project Task Force, 21:57, 27 Jụn 2025 (WAT)
<!-- Message sent by User:Johan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Johan_(WMF)/Sister_project_MassMassage_on_behalf_of_Victoria/Target_list&oldid=28911188 -->
== <span lang="en" dir="ltr">Temporary accounts will be rolled out soon</span> ==
<div lang="en" dir="ltr">
<section begin="body"/>
Hello, we are the Wikimedia Foundation [[mw:Special:MyLanguage/Product Safety and Integrity|Product Safety and Integrity]] team. We would like to announce that '''we plan to enable [[mw:Special:MyLanguage/Trust and Safety Product/Temporary Accounts|temporary accounts]] for this wiki in the week of September 1'''.
Temporary accounts are successfully live on 30 wikis, including many large ones like German, Japanese, and French. The change they bring is especially relevant to logged-out editors, who this feature is designed to protect. But it is also relevant to community members like mentors, patrollers, and admins – anyone who reverts edits, blocks users, or otherwise interacts with logged-out editors as part of keeping the wikis safe and accurate.
'''Why we are building temporary accounts'''
Our wikis should be safer to edit by default for logged-out editors. Temporary accounts allow people to continue editing the wikis without creating an account, while avoiding publicly tying their edits to their IP address. We believe this is in the best interest of our logged-out editors, who make valuable contributions to the wikis and who may later create accounts and grow our community of editors, admins, and other roles. Even though the wikis do warn logged-out editors that their IP address will be associated with their edit, many people may not understand what an IP address is, or that it could be used to connect them to other information about them in ways they might not expect.
Additionally, our moderation software and tools rely too heavily on network origin (IP addresses) to identify users and patterns of activity, especially as IP addresses themselves are becoming less stable as identifiers. Temporary accounts allow for more precise interactions with logged-out editors, including more precise blocks, and can help limit how often we unintentionally end up blocking good-faith users who use the same IP addresses as bad-faith users.
'''How temporary accounts work'''
[[File:Temporary account banner and empty talk page.png|thumb]]
Any time a logged-out user publishes an edit on this wiki, a cookie will be set in this user's browser, and a temporary account tied with this cookie will be automatically created. This account's name will follow the pattern: <code dir=ltr>~2025-12345-67</code> (a tilde, current year, a number). On pages like Recent Changes or page history, this name will be displayed. The cookie will expire 90 days after its creation. As long as it exists, all edits made from this device will be attributed to this temporary account. It will be the same account even if the IP address changes, unless the user clears their cookies or uses a different device or web browser. A record of the IP address used at the time of each edit will be stored for 90 days after the edit. However, only some logged-in users will be able to see it.
'''What does this mean for different groups of users?'''
'''For logged-out editors'''
* This increases privacy: currently, if you do not use a registered account to edit, then everybody can see the IP address for the edits you made, even after 90 days. That will no longer be possible on this wiki.
* If you use a temporary account to edit from different locations in the last 90 days (for example at home and at a coffee shop), the edit history and the IP addresses for all those locations will now be recorded together, for the same temporary account. Users who [[foundation:Special:MyLanguage/Policy:Access_to_temporary_account_IP_addresses|meet the relevant requirements]] will be able to view this data. If this creates any personal security concerns for you, please contact talktohumanrights at wikimedia.org for advice.
'''For community members interacting with logged-out editors'''
* A temporary account is uniquely linked to a device. In comparison, an IP address can be shared with different devices and people (for example, different people at school or at work might have the same IP address).
* Compared to the current situation, it will be safer to assume that a temporary user's talk page belongs to only one person, and messages left there will be read by them. As you can see in the screenshot, temporary account users will receive notifications. It will also be possible to thank them for their edits, ping them in discussions, and invite them to get more involved in the community.
'''For users who use IP address data to moderate and maintain the wiki'''
* '''For patrollers''' who track persistent abusers, investigate violations of policies, etc.: Users who [[foundation:Special:MyLanguage/Policy:Access_to_temporary_account_IP_addresses|meet the requirements]] will be able to reveal temporary users' IP addresses and all contributions made by temporary accounts from a specific IP address or range ([[Special:IPContributions]]). They will also have access to useful information about the IP addresses thanks to the [[mw:Special:MyLanguage/Trust and Safety Product/IP Info|IP Info]] feature. Many other pieces of software have been built or adjusted to work with temporary accounts, including AbuseFilter, global blocks, Global User Contributions, and more. (For information for volunteer developers on how to update the code of your tools – see the last part of the message.)
* '''For admins blocking logged-out editors''':
** It will be possible to block many abusers by just blocking their temporary accounts. A blocked person won't be able to create new temporary accounts quickly if the admin selects the [[mw:Special:MyLanguage/Autoblock|autoblock]] option.
** It will still be possible to block an IP address or IP range.
* Temporary accounts will not be retroactively applied to contributions made before the deployment. On Special:Contributions, you will be able to see existing IP user contributions, but not new contributions made by temporary accounts on that IP address. Instead, you should use Special:IPContributions for this.
'''Our requests for you, and next steps'''
* If you know of any tools, bots, gadgets etc. using data about IP addresses or being available for logged-out users, you may want to test if they work on [[testwiki:Main_Page|testwiki]] or [[test2wiki:Main_Page|test2wiki]]. If you are a volunteer developer, [[mw:Special:MyLanguage/Trust and Safety Product/Temporary Accounts/For developers|read our documentation for developers]], and in particular, the section on [[mw:Special:MyLanguage/Trust and Safety Product/Temporary Accounts/For developers#How should I update my code?|how your code might need to be updated]].
* If you want to test the temporary account experience, for example just to check what it feels like, go to testwiki or test2wiki and edit without logging in.
* Tell us if you know of any difficulties that need to be addressed. We will try to help, and if we are not able, we will consider the available options.
* Look at our [[m:Meta:Babel#Temporary_Accounts:_access_to_IP_addresses_and_next_steps|previous message]] about requirements for users without extended rights who may need access to IP addresses.
To learn more about the project, check out [[mw:Special:MyLanguage/Trust and Safety Product/Temporary Accounts/FAQ|our FAQ]] – you will find many useful answers there. You may also [[mw:Special:MyLanguage/Trust and Safety Product/Temporary Accounts/Updates|look at the updates]] (we have just posted one) and [[mw:Newsletter:Product Safety and Integrity|subscribe to our new newsletter]]. If you'd like to talk to me (Szymon) off-wiki, you will find me on Discord and Telegram. Thank you!<section end="body" />
</div>
<bdi lang="en" dir="ltr">[[m:user:NKohli (WMF)|NKohli (WMF)]], [[m:user:SGrabarczuk (WMF)|SGrabarczuk (WMF)]]</bdi> 22:37, 26 Ọgọọst 2025 (WAT)
<!-- Message sent by User:Quiddity (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Quiddity_(WMF)/sandbox6&oldid=29181713 -->
== Kwuo uche gi: tụọ vootu na ntuliaka Board of Trustees nke afọ 2025. ==
<section begin="announcement-content" />
Ndewo nu,
Oge emem ntuliaka nke [[m:Special:MyLanguage/Wikimedia Foundation elections/2025|2025 Board of Trustees election]] amalitela. Ndị na-adọ ndọrọ ndọrọ ọchịchị na-adọ ndọrọ ndọrọ nnọchi óche abụọ nkè Bọọdụ.
I ji nyochaa ntozu gị ime ntuliaka, biko gaa na [[m:Special:MyLanguage/Wikimedia Foundation elections/2025/Voter eligibility guidelines|voter eligibility page]]
Matakwuo maka há site na [[m:Special:MyLanguage/Wikimedia Foundation elections/2025/Candidates|ịgụ gbasara nkwuputa métụtara ntinye akwụkwọ anam achọ nsonye hà ma lelee vidio gbasara nsonye na ndọrọ ndọrọ ha]].
Mgbe ị dị njikere, gaa na [[m:Special:SecurePoll/vote/405| peeji SecurePoll iji tụọ vootu]].
'''A ga-amalite ịtụ Votu site na October 8 na 00:00 UTC ruo October 22 na 23:59 UTC'''
Ya gazie,
Abhishek Suryawanshi<br />Onye isi oche, Kọmitii Ntuliaka<section end="announcement-content" />
[[Ojiarụ:MediaWiki message delivery|MediaWiki message delivery]] ([[Ṅkàtá ojiarụ:MediaWiki message delivery|ṅkátá]]) 05:49, 9 Ọktoba 2025 (WAT)
<!-- Message sent by User:RamzyM (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29360896 -->
== <span lang="en" dir="ltr">Help us decide the name of the new Abstract Wikipedia project</span> ==
<div lang="en" dir="ltr">
<section begin="function1"/>
{{int:Hello}}. Please help pick a name for the new Abstract Wikipedia wiki project. This project will be a wiki that will enable users to combine functions from [[:f:|Wikifunctions]] and data from Wikidata in order to generate natural language sentences in any supported languages. These sentences can then be used by any Wikipedia (or elsewhere).
There will be two rounds of voting, each followed by legal review of candidates, with votes beginning on 20 October and 17 November 2025. Our goal is to have a final project name selected on mid-December 2025. If you would like to participate, then '''[[m:Special:MyLanguage/Abstract Wikipedia/Abstract Wikipedia naming contest|please learn more and vote now]]''' at meta-wiki.
{{Int:Feedback-thanks-title}}
<section end="function1"/>
</div>
-- [[User:Sannita (WMF)|User:Sannita (WMF)]] ([[User talk:Sannita (WMF)|talk]]) 12:44, 20 Ọktoba 2025 (WAT)
<!-- Message sent by User:Sannita (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29432175 -->
== <span lang="en" dir="ltr">Wikifunctions will be deployed on your wiki on 2025-11-05</span> ==
<div lang="en" dir="ltr">
<section begin="Message"/>
:''[[m:Special:MyLanguage/Abstract Wikipedia/Wikifunctions deployment|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Abstract Wikipedia/Wikifunctions deployment}}&language=&action=page&filter= {{int:please-translate}}]''
Hi all, we want to let you know that [[:f:|Wikifunctions]] is coming to your project soon! When enabled, you will be able to call functions from your project, and integrate them in your articles.
A function is something that takes one or more inputs and transforms them into a desired output. Think of adding up two numbers, or converting miles into metres, or calculating how much time has passed since an event, or declining a word into a case. This is usually done with templates that are complicated to create or to import. With Wikifunctions, you will be able to do this with just a couple of clicks!
Please check out [[:f:Special:MyLanguage/Wikifunctions:Introduction|these tutorials]] for more details. You’re also invited to [[:f:Special:CreateObject|create functions]] that you find useful, or [[:f:Wikifunctions:Suggest a function|ask for help from the Wikifunctions community]].
We would like to invite you to contribute to Wikifunctions, by translating the existing functions labels into your language, so that more users in your community can more easily reuse them on the project. You can also translate the messages for the Wikifunctions interface on TranslateWiki ([https://translatewiki.net/w/i.php?title=Special%3ATranslate&group=ext-wikilambda-ve&filter=%21translated&action=translate here for VisualEditor messages], and [https://translatewiki.net/w/i.php?title=Special%3ATranslate&group=ext-wikilambda-user&filter=%21translated&action=translate here for the Wikifunctions interface proper]).
Of course, we are happy to help in case there are questions or difficulties, and we are ready to listen to your feedback. Please ping me directly in case of necessity or reach out to me [[User talk:Sannita (WMF)|on my talk page]].
<section end="Message"/>
</div>
--[[User:Sannita (WMF)|Sannita (WMF)]] ([[User talk:Sannita (WMF)|talk]]) 13:22, 29 Ọktoba 2025 (WAT)
<!-- Message sent by User:Sannita (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:Sannita_(WMF)/Mass_sending_test&oldid=29517140 -->
:Hi all, unfortunately due to a technical problem we couldn't deploy Wikifunctions on your project. We will keep you updated about the next date of deployment. Thanks for your comprehension! [[Ojiarụ:Sannita (WMF)|Sannita (WMF)]] ([[Ṅkàtá ojiarụ:Sannita (WMF)|ṅkátá]]) 14:59, 6 Novemba 2025 (WAT)
== A na-chọ ndị ọrụ afọ ofufo ka ha sonye n'ọtụtụ kọmitii nke òtù a ==
<section begin="announcement-content" />
Kwa afọ, ọ kachasị site na Ọktọba ruo Disemba, ọtụtụ n'ime kọmitii nke òtù a na-achọ ndị ọrụ afọ ofufo ọhụrụ.
Gụkwuo maka kọmitii ndị a na ibe Meta-wiki ha:
* [[m:Special:MyLanguage/Affiliations Committee|Affiliations Committee (AffCom)]]
* [[m:Special:MyLanguage/Ombuds commission|Ombuds commission (OC)]]
* [[m:Special:MyLanguage/Wikimedia Foundation/Legal/Community Resilience and Sustainability/Trust and Safety/Case Review Committee|Case Review Committee (CRC)]]
Akwụkwọ anamachọ nsonye kọmitii na-emepe na 30 Ọktoba 2025. Akwụkwọ anamachọ nsonye na kọmitii Mmekọrịta ga-emechi na 11 Disemba 2025, yana Akwụkwọ anamachọ nsonye nke Ombuds kọmishọn na kọmitii Case Review ga-emechi na 11 Disemba 2025. Mata otu esi etinye akwụkwọ site na [[m:Special:MyLanguage/Wikimedia Foundation/Legal/Committee appointments|ịga na ibe dị na Meta-wiki]]. Biputa ozi gị na ibe okwu ma ọ bụ zigara cst[[File:At sign.svg|16x16px|link=|(_AT_)]]wikimedia.org ozi emailu gbasara ajụjụ ọ bụla ị nwere ike inwe.
N'aha ndị òtù Kọmitii Nkwado,
<section end="announcement-content" />
-[[m:User:MKaur (WMF)| MKaur (WMF)]] 15:13, 30 Ọktoba 2025 (WAT)
<!-- Message sent by User:MKaur (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29517125 -->
== <span lang="en" dir="ltr">Reminder: Help us decide the name of the new Abstract Wikipedia project</span> ==
<div lang="en" dir="ltr">
<section begin="function2"/>
{{int:Hello}}. Reminder: Please help to choose name for the new Abstract Wikipedia wiki project. The finalist vote starts today. The finalists for the name are: <span lang="en" dir="ltr" class="mw-content-ltr">Abstract Wikipedia, Multilingual Wikipedia, Wikiabstracts, Wikigenerator, Proto-Wiki</span>. If you would like to participate, then '''[[m:Special:MyLanguage/Abstract Wikipedia/Abstract Wikipedia naming contest|please learn more and vote now]]''' at meta-wiki.
{{Int:Feedback-thanks-title}}
<section end="function2"/>
</div>
-- [[User:Sannita (WMF)|User:Sannita (WMF)]] ([[User talk:Sannita (WMF)|talk]]) 15:23, 20 Novemba 2025 (WAT)
<!-- Message sent by User:Sannita (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29583860 -->
== <span lang="en" dir="ltr">Annual review of the Universal Code of Conduct and Enforcement Guidelines</span> ==
<div lang="en" dir="ltr">
<section begin="announcement-content" />
I am writing to you to let you know the annual review period for the Universal Code of Conduct and Enforcement Guidelines is open now. You can make suggestions for changes through 9 February 2026. This is the first step of several to be taken for the annual review. [[m:Special:MyLanguage/Universal Code of Conduct/Annual review/2026|Read more information and find a conversation to join on the UCoC page on Meta]].
The [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Universal Code of Conduct Coordinating Committee]] (U4C) is a global group dedicated to providing an equitable and consistent implementation of the UCoC. This annual review was planned and implemented by the U4C. For more information and the responsibilities of the U4C, [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|you may review the U4C Charter]].
Please share this information with other members in your community wherever else might be appropriate.
-- In cooperation with the U4C, [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]])<section end="announcement-content" />
</div>
22:02, 19 Jenụwarị 2026 (WAT)
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29905753 -->
== Request for comment (global AI policy) ==
<bdi lang="en" dir="ltr" class="mw-content-ltr">
Apologies for writing in English. {{int:Please-translate}}
A [[:m:Requests for comment/Artificial intelligence policy|request for comment]] is currently being held to decide on a global AI policy. {{int:Feedback-thanks-title}}
[[Ojiarụ:MediaWiki message delivery|MediaWiki message delivery]] ([[Ńkàtá ojiarụ:MediaWiki message delivery|ṅkátá]]) 01:58, 26 Eprel 2026 (WAT)
</bdi>
<!-- Message sent by User:Codename Noreste@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=30424282 -->
== Binye aka ugbu a na nhọpụta 2026 ==
<section begin="announcement-content" />
A na-agwa ndị tozuru ibinye aka ka ha sonye na nhọpụta [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Ótù Nhazi Usoro Nchịkwata Akparamagwa Nke Zuru Ụwa Ọnụ]] 2026. Ozi ndị ọzọ-tinyere nlele ntozu, ozi usoro mbinye aka, na njikọ- ga-adị na Meta n'[[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Election/2026|ihuakwụkwọ ozi mbinye aka 2026]]. Mbinye aka ahụ na-akwụsị na 2 Juunu 2026 na [https://zonestamp.toolforge.org/1780358400 00:00 UTC].
Biko binye aka ma ọ bụrụ na akaụntụ gị tozuru etozu. Mpụtara (nhọpụta ahụ) ga-adị na 14 Juunu 2026. Site na mmekọrịta U4C,<section end="announcement-content" />
[[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 18:15, 27 Mee 2026 (WAT)
<!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=30513860 -->
== RFC about AI-generated content in Wikimedia Commons ==
<bdi lang="en" dir="ltr">Apologies for writing in English, please help translate this message to your language. You are invited to participate in a [[c:Commons:Requests for comment/Policy update for AI content|request for comment on Wikimedia Commons about a policy update for AI content]]. This may affect files that are uploaded to Wikimedia Commons for use on this project. Thank you. [[m:User:Codename Noreste|Codename Noreste]] ([[m:User talk:Codename Noreste|ṅkátá]])</bdi> 18:12, 23 Jụn 2026 (WAT)
<!-- Message sent by User:Codename Noreste@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=30513860 -->
4ibp0vvbm9rrxkg56ggdatu44b1khye
Templeeti:-
10
3860
42782
2005-09-15T22:58:16Z
Wonderfool
1433
42782
wikitext
text/x-wiki
<br style="clear:both" />
q5y5l61q0u8m4tuwcyjaqy6r6xrwe3q
42783
42782
2005-12-22T20:54:23Z
Eclecticology
1907
temp - tracing function of template
42783
wikitext
text/x-wiki
<br style="clear:both" />
[[tracing]]
m5pbirba7jlphlsd8x6n90f84i8tp31
42784
42783
2005-12-22T21:06:24Z
Eclecticology
1907
Reverted edit of Eclecticology, changed back to last version by Wonderfool
42784
wikitext
text/x-wiki
<br style="clear:both" />
q5y5l61q0u8m4tuwcyjaqy6r6xrwe3q
42785
42784
2006-04-28T09:43:41Z
Connel MacKenzie
1302
glom from 'pedia
42785
wikitext
text/x-wiki
<br clear="all" /><noinclude>
This template "clears" both margins; it is often used before a header to make sure that the header will be the full width of the page. For technical XHTML details see [[Template talk:{{PAGENAME}}]].
</noinclude>
hfw9os9riwncx9tt9y3mbn58jb4rl85
42786
42785
2006-09-23T05:41:59Z
16@r
1479
+fr
42786
wikitext
text/x-wiki
<br clear="all" />
<noinclude>
This template "clears" both margins; it is often used before a header to make sure that the header will be the full width of the page. For technical XHTML details see [[Template talk:{{PAGENAME}}]].
[[fr:Modèle:-]]
</noinclude>
atu34b9c6at1kgp3ey04384h5fpju1q
42787
42786
2006-10-22T21:10:00Z
Connel MacKenzie
1302
rm EVIL vandalism of adding linebreak to a sensitive template
42787
wikitext
text/x-wiki
<br clear="all" /><noinclude>
This template "clears" both margins; it is often used before a header to make sure that the header will be the full width of the page. For technical XHTML details see [[Template talk:{{PAGENAME}}]].
[[fr:Modèle:-]]
</noinclude>
hvsimmlh3vzyjqiz1f89s59az7mzyqd
42788
42787
2006-10-22T21:10:08Z
Connel MacKenzie
1302
Protected "[[Template:-]]" [edit=sysop:move=sysop]
42787
wikitext
text/x-wiki
<br clear="all" /><noinclude>
This template "clears" both margins; it is often used before a header to make sure that the header will be the full width of the page. For technical XHTML details see [[Template talk:{{PAGENAME}}]].
[[fr:Modèle:-]]
</noinclude>
hvsimmlh3vzyjqiz1f89s59az7mzyqd
42789
42788
2006-10-22T22:16:42Z
Robert Ullmann
1308
the :fr: - template isn't the same, it is like template:mid !
42789
wikitext
text/x-wiki
<br clear="all" /><noinclude>
This template "clears" both margins; it is often used before a header to make sure that the header will be the full width of the page. For technical XHTML details see [[Template talk:{{PAGENAME}}]].
</noinclude>
d3rxzthhdgmewmxlxu3gefctlb1he0p
42790
42789
2010-06-23T06:07:20Z
Bequw
1408
+{{documentation}}
42790
wikitext
text/x-wiki
<br clear="all" /><noinclude>{{documentation}}</noinclude>
rp71zdpgn00verxpkam0vp9huunz645
42791
42790
2016-10-25T15:19:58Z
TheDaveRoss
1305
Changed protection level for "[[Template:-]]": Adjusting the protection level from 'sysop' to 'template editor'. ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite))
42790
wikitext
text/x-wiki
<br clear="all" /><noinclude>{{documentation}}</noinclude>
rp71zdpgn00verxpkam0vp9huunz645
42792
42791
2022-09-09T21:30:10Z
Surjection
380
modern solution but keep the old deprecated one for compatibility
42792
wikitext
text/x-wiki
<br style="clear: both;" clear="all" /><noinclude>{{documentation}}</noinclude>
1lll4cqx751qhxyph6igulkmfzj6cuv
42793
42792
2022-09-09T23:13:57Z
Erutuon
1339
sounds like the deprecated attribute is equivalent to the CSS property, so it can just be removed
42793
wikitext
text/x-wiki
<br style="clear: both;" /><noinclude>{{documentation}}</noinclude>
t8j5w1hhrtdsupkh1yerubdw4phsz02
42794
16448
2026-06-24T04:29:53Z
King ChristLike
964
12 revisions imported from [[:en:Template:-]]
16448
wikitext
text/x-wiki
<br style="clear: both;" /><noinclude>{{documentation}}</noinclude>
t8j5w1hhrtdsupkh1yerubdw4phsz02
Ukachi
0
5415
42763
28042
2026-06-23T15:59:54Z
Geraldine Kene
966
42763
wikitext
text/x-wiki
==Nkọwa==
Nkea bụ aha mmadụ nke pụtara okwuchukwu
===Nkejịasụsụ===
Aha
===Ọmụmaatụ===
Ụkachi bụ nwanne m nwoke
===Mkpọpụta===
===Olumba===
Ụkachukwu
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
God's word
05wukxyxe2ewugzrx7le97tdlworr21
Chidiọgọ
0
5521
42510
42263
2026-06-23T13:35:52Z
Ebube Clara
1134
42510
wikitext
text/x-wiki
==Nkọwa==
Nkea bụ aha mmadụ, ọkachasị ụmụnwaanyị nke pụtara na Chi maọbụ Chukwu bụ Chi eji ime ọgọ wee mara.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Chidiọgọ bụ onye Nsukka
===Mkpọpụta===
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
God is good
[[Category:Aha]]
[[Category:Mmadu]]
[[Category: Wiki Loves Names]]
gn03hgkpbkwsqng1qdsd5r925dtvn2r
Ụkazụegbulam
0
5533
42754
42073
2026-06-23T15:52:05Z
Geraldine Kene
966
42754
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ aha mmadụ nke pụtara na okwu azụ agaghị egbu m.
===Ọmụmaatụ===
Ụkazụegbulam bụ nwanne nna m.
===Nkejiasụsụ===
Aha
===Mkpọpụta===
===Olumba ===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Back talk will not kill me.
i85tyvpa19pszjhm368zvdpe7rh2qm8
42755
42754
2026-06-23T15:53:56Z
Geraldine Kene
966
Geraldine Kene moved page [[Ukazuegbulam]] to [[Ụkazụegbulam]]: Misspelled title
42754
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ aha mmadụ nke pụtara na okwu azụ agaghị egbu m.
===Ọmụmaatụ===
Ụkazụegbulam bụ nwanne nna m.
===Nkejiasụsụ===
Aha
===Mkpọpụta===
===Olumba ===
===Ntụgharị n'asụsụ ọzọ===
===Bekee===
Back talk will not kill me.
i85tyvpa19pszjhm368zvdpe7rh2qm8
Nwata rie ihe o kwo mụrụ anya ụra atụwa ya
0
5550
42353
42288
2026-06-23T12:32:01Z
Goodymeraj
496
E mere m ndezi
42353
wikitext
text/x-wiki
===Nkọwa===
*Nke a bụ ilu Igbo na akọwa na onye nwere mkpa anaghị enwe aňụrị ruokwa mgbe e gboro mkpa ahụ.
===Mkpọpụta===
===Myiri n'asụsụ ọzọ===
===Bekee===
When a child eats what he stays awake waiting for, he sleeps
[[Category:Ilu]]
huiwfjxit94z469878eat99mopngvhp
Ọ bụ ihe onye nwere na-epu n'ubi ya
0
5551
42322
25792
2026-06-23T12:09:59Z
Goodymeraj
496
E mere m ndezi
42322
wikitext
text/x-wiki
==Nkọwa==
Nkea bụ ilu Igbo amamihe jupụtara n'ime ya nke na akọwa na mmadụ na emedebe ihe ebe áká rụrụ ya.
==Myiri n'asụsụ ọzọ==
===Bekee===
Cut your coat according to your cloth
[[Category:Ilu]]
4656dvek3klqds51ccpaylbvg8bme54
A naghị eji abalị arọ anya
0
5553
42411
28858
2026-06-23T12:59:07Z
Nma jeni
626
42411
wikitext
text/x-wiki
==Nkọwa==
Nkea bụ ilu igbo amamihe jupụtara n'ime ya na akọwa a ga na-eme ihe mgbe ọ jị kwesị ekwesị
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Geraldine Kene (Chiraldine)-A naghị eji abalị arọ anya.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
May hay while the sun shines
[[Category:Ilu]]
m5rc1m8s14r6a7551qkk7tfodkex002
Anaghị ekpuchi afọ ịme aka
0
5558
42404
25799
2026-06-23T12:57:16Z
Nma jeni
626
42404
wikitext
text/x-wiki
==Nkọwa==
Nkea bụ ilu Igbo amamihe jupụtara n'ime ya na kọwaa ọ dịghị ihe nzuzo a pụrụ izobe ruo mgbe ebighị ebi.
==Mkpọpụta==
==Myiri n'asụsụ ọzọ==
===Bekee===
What happens in the dark must surely come to light
[[Category:Ilu]]
jab5u9sl22pwh67whaikvw1xfqboo2u
Echi dị ime
0
5589
42402
28784
2026-06-23T12:57:02Z
Ennydavids
470
/* Mkpoputa */
42402
wikitext
text/x-wiki
==Nkọwa==
Ịlụ Igbo pụtara na o nweghị onye ma ihe ga eme n'oge na-abịa abịa.
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Dagentle-Echi dị ime.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
No one knows tomorrow
[[Category:ilu]]
o0vivcnopqxtjtvq07j6gxgkghhto9o
42494
42402
2026-06-23T13:29:26Z
Nma jeni
626
42494
wikitext
text/x-wiki
==Nkọwa==
Nka bụ Ilụ Igbo pụtara na o nweghị onye ma ihe ga eme n'oge na-abịa abịa.
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Dagentle-Echi dị ime.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
*No one knows tomorrow
[[Category:Ilu]]
goik3lpwkbjnnz9bj63aufwxbiirrl0
42654
42494
2026-06-23T14:10:45Z
Nma jeni
626
42654
wikitext
text/x-wiki
==Nkọwa==
Nkea bụ Ilụ Igbo pụtara na o nweghị onye ma ihe ga eme n'oge na-abịa abịa.
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Dagentle-Echi dị ime.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
*No one knows tomorrow
[[Category:Ilu]]
me4yh3c140ptl7g61nuo0uztyj5ou8c
Nri
0
5604
42733
29411
2026-06-23T14:31:57Z
Celetex
55
/* Mkpọpụta */
42733
wikitext
text/x-wiki
'''Nri'''
[[File:Fast Food in Lusaka 02.jpg|thumb|Fast_Food_in_Lusaka_02]]
==Nkọwa==
Nri bụ ihe mmadụ na-eri iji nwee ndụ ma zuo ike.
Ọ bụkwa ihe a na-esi ma rie, nke na-enye ahụ ike ma na-eme ka mmadụ dịrị ndụ. Ọ nwere ike ịbụ nri ụtụtụ, nri ehihie, ma ọ bụ nri abalị.
==Nkejiasụsu==
Aha
==Ọmụmaatụ==
# '''''Ụmụaka chọrọ iri nri tupu ha gaa ụlọ akwụkwọ.'''''
# '''''Chinedu riri nri ya tupu ọ pụọ n'ụlọ. '''''
==Mkpọpụta==
Na/ri
[[File:Nri Nri.wav|thumb|Food Food]]
==Olu mba==
# '''''Ịri'''''
==Ntughari n'asusu ozo==
===Bekee===
[https://en.wiktionary.org/wiki/food Food]
[[Category:Aha]
[[Òtù:aha]]
[[Òtù:Ihe oriri]]
[[Òtù:Igbo Noun Project]]
qsb585singavjhiilfbu20ban7hn90r
42734
42733
2026-06-23T14:32:37Z
Celetex
55
/* Olu mba */
42734
wikitext
text/x-wiki
'''Nri'''
[[File:Fast Food in Lusaka 02.jpg|thumb|Fast_Food_in_Lusaka_02]]
==Nkọwa==
Nri bụ ihe mmadụ na-eri iji nwee ndụ ma zuo ike.
Ọ bụkwa ihe a na-esi ma rie, nke na-enye ahụ ike ma na-eme ka mmadụ dịrị ndụ. Ọ nwere ike ịbụ nri ụtụtụ, nri ehihie, ma ọ bụ nri abalị.
==Nkejiasụsu==
Aha
==Ọmụmaatụ==
# '''''Ụmụaka chọrọ iri nri tupu ha gaa ụlọ akwụkwọ.'''''
# '''''Chinedu riri nri ya tupu ọ pụọ n'ụlọ. '''''
==Mkpọpụta==
Na/ri
[[File:Nri Nri.wav|thumb|Food Food]]
==Olu mba==
Nnu (Ukpor, Anambra)
# '''''Ịri'''''
==Ntughari n'asusu ozo==
===Bekee===
[https://en.wiktionary.org/wiki/food Food]
[[Category:Aha]
[[Òtù:aha]]
[[Òtù:Ihe oriri]]
[[Òtù:Igbo Noun Project]]
n382dmt2hc7wvdwlg32e9ge8b6s71f5
Ọcha
0
5611
42426
27312
2026-06-23T13:04:21Z
Celetex
55
/* Olumba */
42426
wikitext
text/x-wiki
==Nkọwa==
Okwu a bụ okwu Igbo na ekwu maka ihe na acha ọcha maọbụ ka ihe siri dị maọbu etu gburugburu mmadu siri dị,oruru unyi ka ọ dị ọcha.Ejikwa ya akọwa ka mmadụ dị maọbu onye ọ bụ.
[[File:Color icon white.svg|thumb|Color icon white]]
===Nkejiasụsụ===
Nkọwaaha
===Ọmụmatụ===
# Nwoke a bụ onye ọcha
# Akwa ahụ ojiri bịa dị ọcha
===Mkpọpụta===
[[File:Ig-òchá.ogg]]
===Olumba===
Ụcha( Abịa)
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/white White]
[[Category:Nkọwaaha]]
nlbv9s038q2rj8dixshb7iepnizpgwb
42434
42426
2026-06-23T13:07:41Z
Celetex
55
/* Nkọwa */
42434
wikitext
text/x-wiki
==Nkọwa==
Okwu a bụ okwu Igbo na ekwu maka etu ihe si acha, ka ihe siri dị maọbu etu gburugburu mmadu siri dị. Oruru unyi ka ọ dị ọcha.Ejikwa ya akọwa ka mmadụ dị maọbu onye ọ bụ.
[[File:Color icon white.svg|thumb|Color icon white]]
===Nkejiasụsụ===
Nkọwaaha
===Ọmụmatụ===
# Nwoke a bụ onye ọcha
# Akwa ahụ ojiri bịa dị ọcha
===Mkpọpụta===
[[File:Ig-òchá.ogg]]
===Olumba===
Ụcha( Abịa)
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/white White]
[[Category:Nkọwaaha]]
ppg03hbqwayoryb7hkotzsozjxskroc
42572
42434
2026-06-23T13:51:27Z
Celetex
55
/* Mkpọpụta */
42572
wikitext
text/x-wiki
==Nkọwa==
Okwu a bụ okwu Igbo na ekwu maka etu ihe si acha, ka ihe siri dị maọbu etu gburugburu mmadu siri dị. Oruru unyi ka ọ dị ọcha.Ejikwa ya akọwa ka mmadụ dị maọbu onye ọ bụ.
[[File:Color icon white.svg|thumb|Color icon white]]
===Nkejiasụsụ===
Nkọwaaha
===Ọmụmatụ===
# Nwoke a bụ onye ọcha
# Akwa ahụ ojiri bịa dị ọcha
===Mkpọpụta===
Ọ|cha
[[File:Ig-òchá.ogg]]
===Olumba===
Ụcha( Abịa)
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/white White]
[[Category:Nkọwaaha]]
6pwfghbzspwix7rugwkqpynqogtd2c3
42574
42572
2026-06-23T13:51:55Z
Celetex
55
/* Mkpọpụta */
42574
wikitext
text/x-wiki
==Nkọwa==
Okwu a bụ okwu Igbo na ekwu maka etu ihe si acha, ka ihe siri dị maọbu etu gburugburu mmadu siri dị. Oruru unyi ka ọ dị ọcha.Ejikwa ya akọwa ka mmadụ dị maọbu onye ọ bụ.
[[File:Color icon white.svg|thumb|Color icon white]]
===Nkejiasụsụ===
Nkọwaaha
===Ọmụmatụ===
# Nwoke a bụ onye ọcha
# Akwa ahụ ojiri bịa dị ọcha
===Mkpọpụta===
Ọ|cha
[[File:Ig-òchá.ogg]]
===Olumba===
Ụcha( Abịa)
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/white White]
[[Category:Nkọwaaha]]
om9bd7gaw0bpcq7oxz2fgipga2p03ys
42579
42574
2026-06-23T13:53:01Z
Celetex
55
/* Mkpọpụta */
42579
wikitext
text/x-wiki
==Nkọwa==
Okwu a bụ okwu Igbo na ekwu maka etu ihe si acha, ka ihe siri dị maọbu etu gburugburu mmadu siri dị. Oruru unyi ka ọ dị ọcha.Ejikwa ya akọwa ka mmadụ dị maọbu onye ọ bụ.
[[File:Color icon white.svg|thumb|Color icon white]]
===Nkejiasụsụ===
Nkọwaaha
===Ọmụmatụ===
# Nwoke a bụ onye ọcha
# Akwa ahụ ojiri bịa dị ọcha
===Mkpọpụta===
Ọ/cha
[[File:Ig-òchá.ogg]]
===Olumba===
Ụcha( Abịa)
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[https://en.wiktionary.org/wiki/white White]
[[Category:Nkọwaaha]]
6phsao0llarnldy1yuip6jyoxyn3f12
Agadi nwaanyị anaagi aka nkà n'egwu ọ mara agba.
0
5622
42569
28812
2026-06-23T13:50:50Z
Nma jeni
626
42569
wikitext
text/x-wiki
==Nkọwa==
Nka bụ Ilu Igbo pụtara na mmadụ apụghị ichefu ihe ọ ma eme nke oma.
===Mkpọpụta===
[[File:Ig-Agadi nwaanyị anaagi aka nkà n'egwu ọ mara agba..ogg|Ig-Agadi nwaanyị anaagi aka nkà n'egwu ọ mara agba.]]
==Myiri n'asụsụ ọzọ==
===Bekee===
*Experience is the best teacher
*Old habits die hard
[[Category: Ilu]]
h748s74ksukmaazinao20g736ba7ci8
42630
42569
2026-06-23T14:07:08Z
Nma jeni
626
42630
wikitext
text/x-wiki
==Nkọwa==
Nkea bụ Ilu Igbo pụtara na mmadụ apụghị ichefu ihe ọ ma eme nke oma.
===Mkpọpụta===
[[File:Ig-Agadi nwaanyị anaagi aka nkà n'egwu ọ mara agba..ogg|Ig-Agadi nwaanyị anaagi aka nkà n'egwu ọ mara agba.]]
==Myiri n'asụsụ ọzọ==
===Bekee===
*Experience is the best teacher
*Old habits die hard
[[Category: Ilu]]
qtrlsimj9iagkmf9h460k6vfysvitka
Onye atụọrọ ilu ma kọwara ya, ego ejiri luọ nne ya lara niyi.
0
5648
42431
26170
2026-06-23T13:06:42Z
Goodymeraj
496
E mere m ndezi
42431
wikitext
text/x-wiki
==Nkọwa==
#Nke a bu ilu Igbo na-akọwa na onye bu nwa afọ ekwesịghị ka akọwaara ya ilu, n'ihi na ọ kwesịrị ka ọ were uche ghọta ilu a tụụrụ ya, makwa were ya baara onwe ya uru.
#Ilu na-akọwa na onye a tụrụ anya na ọ ga-ama ihe,
===Myiri n'asụsụ ọzọ===
===Bekee===
If a man doesn’t understand a proverb, then he is not fit to be a part of the indigenous.
[[Category:Ilu]]
0hfacl9txhr4ydnfs0rm6ok23rx4xex
Ụzụ na-amaghị akpụ ogene lee egbe anya n'ọdụ.
0
5649
42309
26171
2026-06-23T12:03:11Z
Goodymeraj
496
E mere m ndezi
42309
wikitext
text/x-wiki
==Nkọwa==
#Nke a bụ ilu Igbo na-akọwa na onye na-amaghị ka-esi eme ihe jee mụta n'aka ndị bụ ọkachamara na ngalaba ahụ
#Ilu a na-akọwa kwa na o nweghị onye kwesịrị inwe mkpesa n'ihi na Ọ maara ka esi eme ihe.
#Ilu a na-arụ aka ka onye ọbụla gaa mụta ìhè ọbụla o tinyere uche ime ma o nweta ezi nkụzi ya.
===Myiri n'asụsụ Ọzọ===
===Bekee===
#No excuse for not knowing how to do something
#You can always learn how to do anything with the right training.
[[Category:Ilu]]
rn52bghnded8ae1ghj28sigprq3xorc
Adịghị ebute ozu ọdụm n'ụlọ
0
5654
42563
42220
2026-06-23T13:49:50Z
Nma jeni
626
42563
wikitext
text/x-wiki
==Nkọwa==
Nka bụ Ilu igbo pụtara na ihe ọma anaghị abịa ngwa ngwa, ya bụ mmadụ ga-agbasi mbọ ike iru ebe dị elu ma nweta ihe ọma
===Mkpọpụta===
[[File:Ig-Adịghị ebute ozu ọdụm n'ụlọ.ogg|Ig-Adịghị ebute ozu ọdụm n'ụlọ]]
==Myiri n'asụsụ ọzọ==
===Bekee===
Great things never come from comfort zone
[[Category: Ilu]]
p9igxa5gkoxml9539nnekb3m86vjl5o
42634
42563
2026-06-23T14:07:45Z
Nma jeni
626
42634
wikitext
text/x-wiki
==Nkọwa==
Nkea bụ Ilu igbo pụtara na ihe ọma anaghị abịa ngwa ngwa, ya bụ mmadụ ga-agbasi mbọ ike iru ebe dị elu ma nweta ihe ọma.
===Mkpọpụta===
[[File:Ig-Adịghị ebute ozu ọdụm n'ụlọ.ogg|Ig-Adịghị ebute ozu ọdụm n'ụlọ]]
==Myiri n'asụsụ ọzọ==
===Bekee===
Great things never come from comfort zone
[[Category: Ilu]]
kbczjr211h12rg7ethf04v412y3b5fr
Isi kote ebu, ọ gbaa ya
0
5680
42483
26332
2026-06-23T13:26:49Z
Akwugo
14
Akwugo moved page [[Isi kote ebunu agba ya]] to [[Isi kote ebu, ọ gbaa ya]]
26332
wikitext
text/x-wiki
==Nkọwa==
nke a bụ ilu Igbo nke pụtara na ihe onye kotere ka eji isi ya bụrụ maọbụ nsogbu onye kotere ka ọ ga ebu
==Myiri n'asụsụ ọzọ==
===Bekee===
[[Category :ilu]]
64l1nwyotkd0yy6hrwpq018bd92rhve
42492
42483
2026-06-23T13:28:14Z
Akwugo
14
/* Bekee */
42492
wikitext
text/x-wiki
==Nkọwa==
nke a bụ ilu Igbo nke pụtara na ihe onye kotere ka eji isi ya bụrụ maọbụ nsogbu onye kotere ka ọ ga ebu
==Myiri n'asụsụ ọzọ==
===Bekee===
[[Category :Ilu]]
ic9wjleqaftox77g4bb6wyzxqoetqch
Abalị
0
5684
42627
27161
2026-06-23T14:06:46Z
Celetex
55
/* Olu mba */
42627
wikitext
text/x-wiki
'''Abalị'''
==Nkọwa==
Abalị bụ oge nke na-esochi ehihie, mgbe anyanwụ na-apụ n’anya ma ụwa na-ejupụta na ọchịchịrị. Ọ bụkwa oge izu ike, izu oyi, na ụfọdụ omume ndị mmadụ na-eme tupu ụra.
==Nkejiasụsu==
Aha
==Ọmụmaatụ==
# '''''Ezinne gara ụlọ ekpere abalị iji kpee ekpere.'''''
# '''''Abalị bụ oge zuru ike mgbe mmadụ nile zuru ike.'''''
==Mkpọpụta==
[[File:Abalị.wav|thumb|Night]]
==Olu mba==
Abanị(Ukporo, Anambra)
==Ntughari n'asusu ozo==
===Bekee===
[https://en.wiktionary.org/w/index.php?search=night Night]
[[Category:Aha]]
8xayt9vlynv663o95syk7yz25o96kki
42632
42627
2026-06-23T14:07:18Z
Celetex
55
/* Olu mba */
42632
wikitext
text/x-wiki
'''Abalị'''
==Nkọwa==
Abalị bụ oge nke na-esochi ehihie, mgbe anyanwụ na-apụ n’anya ma ụwa na-ejupụta na ọchịchịrị. Ọ bụkwa oge izu ike, izu oyi, na ụfọdụ omume ndị mmadụ na-eme tupu ụra.
==Nkejiasụsu==
Aha
==Ọmụmaatụ==
# '''''Ezinne gara ụlọ ekpere abalị iji kpee ekpere.'''''
# '''''Abalị bụ oge zuru ike mgbe mmadụ nile zuru ike.'''''
==Mkpọpụta==
[[File:Abalị.wav|thumb|Night]]
==Olu mba==
Abanị(Ukpor, Anambra)
==Ntughari n'asusu ozo==
===Bekee===
[https://en.wiktionary.org/w/index.php?search=night Night]
[[Category:Aha]]
808o6pjmm4rgl9h32gdv8k8ctuvgdjp
42636
42632
2026-06-23T14:07:59Z
Celetex
55
/* Mkpọpụta */
42636
wikitext
text/x-wiki
'''Abalị'''
==Nkọwa==
Abalị bụ oge nke na-esochi ehihie, mgbe anyanwụ na-apụ n’anya ma ụwa na-ejupụta na ọchịchịrị. Ọ bụkwa oge izu ike, izu oyi, na ụfọdụ omume ndị mmadụ na-eme tupu ụra.
==Nkejiasụsu==
Aha
==Ọmụmaatụ==
# '''''Ezinne gara ụlọ ekpere abalị iji kpee ekpere.'''''
# '''''Abalị bụ oge zuru ike mgbe mmadụ nile zuru ike.'''''
==Mkpọpụta==
A/na/nị
[[File:Abalị.wav|thumb|Night]]
==Olu mba==
Abanị(Ukpor, Anambra)
==Ntughari n'asusu ozo==
===Bekee===
[https://en.wiktionary.org/w/index.php?search=night Night]
[[Category:Aha]]
202ewemyfmjrv02folkxxtlhea1vhhb
42678
42636
2026-06-23T14:20:16Z
Celetex
55
/* Mkpọpụta */
42678
wikitext
text/x-wiki
'''Abalị'''
==Nkọwa==
Abalị bụ oge nke na-esochi ehihie, mgbe anyanwụ na-apụ n’anya ma ụwa na-ejupụta na ọchịchịrị. Ọ bụkwa oge izu ike, izu oyi, na ụfọdụ omume ndị mmadụ na-eme tupu ụra.
==Nkejiasụsu==
Aha
==Ọmụmaatụ==
# '''''Ezinne gara ụlọ ekpere abalị iji kpee ekpere.'''''
# '''''Abalị bụ oge zuru ike mgbe mmadụ nile zuru ike.'''''
==Mkpọpụta==
A/ba/nị
[[File:Abalị.wav|thumb|Night]]
==Olu mba==
Abanị(Ukpor, Anambra)
==Ntughari n'asusu ozo==
===Bekee===
[https://en.wiktionary.org/w/index.php?search=night Night]
[[Category:Aha]]
h9gkzhq2tpe5jm62xvm34x67g2t628k
Ehihie
0
5686
42687
27155
2026-06-23T14:21:38Z
Celetex
55
/* Mkpọpụta */
42687
wikitext
text/x-wiki
'''Ehihie'''
==Nkọwa==
Ehihie bụ oge n'etiti ụtụtụ na mgbede. Ọ na-abụkarị site n'elekere iri na abụọ ruo elekere anọ nke mgbede.
==Nkejiasụsu==
Aha
==Ọmụmaatụ==
# '''''Chinedu gara ahịa n'ehihie.'''''
# '''''Ehihie taa dị ọkụ.'''''
==Mkpọpụta==
E/dị/fie
[[File:Ehihie.wav|thumb|Afternoon]]
==Olu mba==
# '''''Ọkara ehihie'''''
==Ntughari n'asusu ozo==
===Bekee===
[https://en.wiktionary.org/w/index.php?search=afternoon Afternoon]
[[Category:Aha]]
2ulfozul7fknnfk8mkmdg4vm1bvr43m
42690
42687
2026-06-23T14:22:19Z
Celetex
55
/* Mkpọpụta */
42690
wikitext
text/x-wiki
'''Ehihie'''
==Nkọwa==
Ehihie bụ oge n'etiti ụtụtụ na mgbede. Ọ na-abụkarị site n'elekere iri na abụọ ruo elekere anọ nke mgbede.
==Nkejiasụsu==
Aha
==Ọmụmaatụ==
# '''''Chinedu gara ahịa n'ehihie.'''''
# '''''Ehihie taa dị ọkụ.'''''
==Mkpọpụta==
E/hi/hie
[[File:Ehihie.wav|thumb|Afternoon]]
==Olu mba==
# '''''Ọkara ehihie'''''
==Ntughari n'asusu ozo==
===Bekee===
[https://en.wiktionary.org/w/index.php?search=afternoon Afternoon]
[[Category:Aha]]
rjv2llo0gqrdebxk26phby8p7juxpbo
42696
42690
2026-06-23T14:24:16Z
Celetex
55
/* Olu mba */
42696
wikitext
text/x-wiki
'''Ehihie'''
==Nkọwa==
Ehihie bụ oge n'etiti ụtụtụ na mgbede. Ọ na-abụkarị site n'elekere iri na abụọ ruo elekere anọ nke mgbede.
==Nkejiasụsu==
Aha
==Ọmụmaatụ==
# '''''Chinedu gara ahịa n'ehihie.'''''
# '''''Ehihie taa dị ọkụ.'''''
==Mkpọpụta==
E/hi/hie
[[File:Ehihie.wav|thumb|Afternoon]]
==Olu mba==
Effie (Nnewi, Anambra)
==Ntughari n'asusu ozo==
===Bekee===
[https://en.wiktionary.org/w/index.php?search=afternoon Afternoon]
[[Category:Aha]]
abgx7ax5vbxk0xa1medypye5jqjrdxv
Gidi gidi bụ ugwu eze
0
5693
42370
28646
2026-06-23T12:43:29Z
Ebube Clara
1134
42370
wikitext
text/x-wiki
==Nkọwa==
Ilu nke a putara na mgbe ndị mmadụ gbakọtara ọnụ n'ịdị n'otu, ha nwere ike nweta ọtụtụ ihe na ntugharị anya.
===Mkpọpụta===
[[File:Ig-Gidi gidi bụ ugwu eze.ogg|Ig-Gidi gidi bụ ugwu eze]]
==Myiri n'asụsụ ọzọ==
===Bekee===
A stick in a bundle is unbreakable
[[Category: Ilu]]
6o3by474ucd8eoq73tg0kzaxd7v65cu
Onye mere onwe ya, a sina ọ bụ mmadụ mere ya
0
5734
42394
26471
2026-06-23T12:54:56Z
Goodymeraj
496
E mere m ndezi
42394
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ ilu Igbo na akọwa na mmadụ iji aka ya emejọ onwe ya maọbụ tinye onwr ya n'ọnọdụ ọjọọ achọkwala onye ọ ga-ata ụta na ọ bụ ya mere ya
==Myiri n'asụsụ ọzọ==
===Bekee===
He who puts him or herself in a difficult situation should not blame anyone.
[[Category:Ilu]]
7wfkog845geed6yufkq1tb10drb7kqb
Aka na aga na akụkụ ọkụ na agakwa na akụkụ ọnụ
0
5773
42364
28859
2026-06-23T12:40:28Z
Nma jeni
626
42364
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ ịlụ na akọwa na ọnye ọbụla na esi nri ga emeturiri nri ahụ ọnụ, ọzọkwa bụna ọ na akọwa na onye rụọ o rie.
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Geraldine Kene (Chiraldine)-Aka na aga na akụkụ ọkụ na agakwa na akụkụ ọnụ.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
No food for a lazy man
[[Category :ilu]]
jhnoe1sn43lvbj56kv3znz5l9kk97a8
42419
42364
2026-06-23T13:01:37Z
Nma jeni
626
42419
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ ịlụ na akọwa na ọnye ọbụla na esi nri ga emeturiri nri ahụ ọnụ, ọzọkwa bụna ọ na akọwa na onye rụọ o rie.
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Geraldine Kene (Chiraldine)-Aka na aga na akụkụ ọkụ na agakwa na akụkụ ọnụ.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
No food for a lazy man
[[Category :Ilu]]
19po5v3f5pcspwvmdaaap126h5nr1q6
42714
42419
2026-06-23T14:27:15Z
Nma jeni
626
42714
wikitext
text/x-wiki
==Nkọwa==
Nkea bụ ịlụ na akọwa na ọnye ọbụla na esi nri ga emeturiri nri ahụ ọnụ, ọzọkwa bụna ọ na akọwa na onye rụọ o rie.
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Geraldine Kene (Chiraldine)-Aka na aga na akụkụ ọkụ na agakwa na akụkụ ọnụ.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
No food for a lazy man
[[Category :Ilu]]
e7c44i954kwyyzm0f5wnqz62olwsy1e
Ihe okenye n'ala were hụ,nwata rigo elu osisi ọ gaghị ahụ ya
0
5784
42418
26611
2026-06-23T13:01:27Z
Ennydavids
470
42418
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ ilụ Igbo na akọwa maka amamihe ndị okenye n'ala Igbo n'ihi na ha agabigago ihe ndịa ahụ mbụ.
===Mkpọpụta===
==Myiri n'asụsụ ọzọ==
===Bekee===
Experience grows with maturity
[[Category :ilu]]
68l2g73mu2d3xd3f926827wbyb2v6v8
42526
42418
2026-06-23T13:38:45Z
Nma jeni
626
42526
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ ilụ Igbo na akọwa maka amamihe ndị okenye n'ala Igbo n'ihi na ha agabigago ihe ndịa ahụ mbụ.
===Mkpọpụta===
==Myiri n'asụsụ ọzọ==
===Bekee===
Experience grows with maturity
[[Category :Ilu]]
nkhn1cv2zf713m42gvhmq8yf8fh8445
42642
42526
2026-06-23T14:08:56Z
Nma jeni
626
42642
wikitext
text/x-wiki
==Nkọwa==
Nkea bụ ilụ Igbo na akọwa maka amamihe ndị okenye n'ala Igbo n'ihi na ha agabigago ihe ndịa ahụ mbụ.
===Mkpọpụta===
==Myiri n'asụsụ ọzọ==
===Bekee===
Experience grows with maturity
[[Category :Ilu]]
3nh2qcetyiz8yq3ojhxtaqzq9ji4l9s
Nwa ọkụkọ na-erekpe,ọ sị na ya na-agbapụta mmanụ
0
5788
42307
26615
2026-06-23T12:03:03Z
Ennydavids
470
42307
wikitext
text/x-wiki
===Nkọwa===
*Nke a bụ ilu Igbo jupụtara n'amamihe nke pụtara na onye na eme ihe ọjọọ,ọ sị na ọ na eme ihe ọma.
===Mkpọpụta===
==Myiri n'asụsụ ọzọ==
===Bekee===
[[Category :ilu]]
9g9z6ratfbc7eehupz7atuvhicoshfy
42365
42307
2026-06-23T12:41:33Z
Goodymeraj
496
E mere m ndezi
42365
wikitext
text/x-wiki
===Nkọwa===
*Nke a bụ ilu Igbo jupụtara n'amamihe nke pụtara na onye na emesi onwe ya ike site n'akparamagwa ọjọọ o nwere,ọ sị na ọ na-atụrụ ndụ.
===Mkpọpụta===
==Myiri n'asụsụ ọzọ==
===Bekee===
[[Category :ilu]]
1lm4z9qam91u8qtcwulnlt7tjgihey9
Isi kote ebu,ọgba ya
0
5791
42637
26619
2026-06-23T14:08:20Z
Goodymeraj
496
E mere m ndezi
42637
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ okwu Igbo pụtara na ihe onye chọrọ ka ọ ga-ahụ, ihe onye metere ka ọ ga eji isi ya buru.
==Myiri n'asụsụ Ọzọ==
===Bekee===
What goes around,comes around
[[Category : Ilu]]
ia33z615kl60act0tqp2b7mnl0m58ow
42649
42637
2026-06-23T14:10:13Z
Goodymeraj
496
E mere m ndezi
42649
wikitext
text/x-wiki
#REDIRECT [[Isi kote ebu, ọ gbaa ya]]
==Nkọwa==
Nke a bụ okwu Igbo pụtara na ihe onye chọrọ ka ọ ga-ahụ, ihe onye metere ka ọ ga eji isi ya buru.
==Myiri n'asụsụ Ọzọ==
===Bekee===
What goes around,comes around
[[Category : Ilu]]
6hbz6y0faqbe0sdl1h08ovhraupm6fz
Ụbọchị niile bụ nke onye ọhị mana otu Ụbọchị bụ nke onye nwe ụlọ
0
5803
42314
26786
2026-06-23T12:05:02Z
Goodymeraj
496
E mere m ndezi
42314
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ ilu Igbo pụtara na ọ bụ naanị otu ụbọchị ka aka na akpara onye ọjọọ maọbụ iko onye ahụ ejuo
==Myiri n'asụsụ ọzọ==
===Bekee===
Everyday is for the thief, one day is for the owner of the house.
[[Category :Ilu]]
085bda39j2mdfn6bu6ifulsr083mk1t
N'agbanyeghị etú ọchịchịrị si dị, aka mgbe niile maara ụzọ ọnụ.
0
5821
42301
42300
2026-06-23T11:59:30Z
Ennydavids
470
42301
wikitext
text/x-wiki
==Nkọwa==
*Nke a bụ ilu Igbo na-akọwa n'agbanyeghị ọtú ihe ọjọọ sịrị noo eziokwu ga apụta ihe
*ihe ọjọọ chọrọ ya tee aka, nke bụ ihe ọma ga emeri na ngwụcha
===Mkpọpụta===
==Myiri n'asụsụ==
==Bekee==
No matter the circumstances, good must triumph
[[Category:ilu]]
aua7bdfkabq6p06zox8c9kk9i405jxm
42373
42301
2026-06-23T12:44:50Z
Goodymeraj
496
E mere m ndezi
42373
wikitext
text/x-wiki
==Nkọwa==
*Nke a bụ ilu Igbo na-akọwa n'agbanyeghị ọtú ihe ọjọọ sịrị nọrọ eziokwu ga apụta ihe
*ihe ọjọọ chọrọ ya tee aka, nke bụ ihe ọma ga emeri na ngwụcha
===Mkpọpụta===
==Myiri n'asụsụ Ọzọ==
==Bekee==
No matter the circumstances, good must triumph
[[Category:Ilu]]
e6b0317d4w08s8jly0wcmys7nx63ikm
Ebe ana-adụ nwa nwere nne ọdụ ka nwa n'enweghi nne na amụta ihe
0
5824
42467
28001
2026-06-23T13:20:11Z
Nma jeni
626
42467
wikitext
text/x-wiki
==Nkọwa==
Nke a bu ịlụ igbo na-akọwa na Ịdọ aka ná ntị, ma ọ bụ ntụziaka e nyere onye nwere nkwado na-aghọ ihe mmụta nye ndị na-enweghị ya.
===Mkpọpụta===
[[File:Ig-Ebe ana-adụ nwa nwere nne ọdụ ka nwa n'enweghi nne na amụta ihe.ogg|Ig-Ebe ana-adụ nwa nwere nne ọdụ ka nwa n'enweghi nne na amụta ihe]]
==Myiri n'asụsụ ọzọ==
==Ntụgharị n'asụsụ==
===Bekee===
#Learn from the guidance others receive.
#You don’t need to experience everything firsthand to gain wisdom.
[[Category:Ilu]]
k71zbacpy4i6u3ljziqmsltqhlztzj1
Akwụkwọ juru n'ọhia, ma a baa a chọba ọkazi
0
5826
42367
28778
2026-06-23T12:42:24Z
Nma jeni
626
42367
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ ilu Igbo na-akọwa na, ọbụladị mgbe ndụ nwere ọtụtụ ohere, mmadụ ga-emecha chọọ ihe dị mkpa n'ezie ma ọ bụ ihe kacha mkpa na-emezu ebumnuche ya.
===Mkpọpụta===
[[File:LL-Q33578 (ibo)-Dagentle-Akwụkwọ juru n'ọhia, ma a baa a chọba ọkazi.wav]]
==Myiri n'asụsụ==
==Bekee==
*Not everything available is useful.
*Life will force you to prioritize.
[[Category:ilu]]
b694xfinrhlw9alzr4cet4ykgz5kml2
42421
42367
2026-06-23T13:02:41Z
Nma jeni
626
42421
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ ilu Igbo na-akọwa na, ọbụladị mgbe ndụ nwere ọtụtụ ohere, mmadụ ga-emecha chọọ ihe dị mkpa n'ezie ma ọ bụ ihe kacha mkpa na-emezu ebumnuche ya.
===Mkpọpụta===
[[File:LL-Q33578 (ibo)-Dagentle-Akwụkwọ juru n'ọhia, ma a baa a chọba ọkazi.wav]]
==Myiri n'asụsụ==
==Bekee==
*Not everything available is useful.
*Life will force you to prioritize.
[[Category:Ilu]]
6tvyo4vfaef2b8khq1em7skggln83de
42453
42421
2026-06-23T13:16:43Z
Nma jeni
626
42453
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ ilu Igbo na-akọwa na, ọbụladị mgbe ndụ nwere ọtụtụ ohere, mmadụ ga-emecha chọọ ihe dị mkpa n'ezie ma ọ bụ ihe kacha mkpa na-emezu ebumnuche ya.
===Mkpọpụta===
[[File:LL-Q33578 (ibo)-Dagentle-Akwụkwọ juru n'ọhia, ma a baa a chọba ọkazi.wav]]
==Myiri n'asụsụ ọzọ==
==Bekee==
*Not everything available is useful.
*Life will force you to prioritize.
[[Category:Ilu]]
bolu1cu5nz2x5iwvhdwryt4003p02yc
42698
42453
2026-06-23T14:25:14Z
Nma jeni
626
42698
wikitext
text/x-wiki
==Nkọwa==
Nkea bụ ilu Igbo na-akọwa na, ọbụladị mgbe ndụ nwere ọtụtụ ohere, mmadụ ga-emecha chọọ ihe dị mkpa n'ezie ma ọ bụ ihe kacha mkpa na-emezu ebumnuche ya.
===Mkpọpụta===
[[File:LL-Q33578 (ibo)-Dagentle-Akwụkwọ juru n'ọhia, ma a baa a chọba ọkazi.wav]]
==Myiri n'asụsụ ọzọ==
==Bekee==
*Not everything available is useful.
*Life will force you to prioritize.
[[Category:Ilu]]
knz7zbbfdhl0yvke5wkcwvwlmdre1jv
Ama ka nwoke siri sie ike ọgaghị atuso chi ya ọgụ
0
5827
42377
26990
2026-06-23T12:46:22Z
Nma jeni
626
42377
wikitext
text/x-wiki
==Nkọwa==
Nke a bu ịlụ igbo na-akọwa, ekwela ka ihe ndị ị rụzuru mee ka i chefuo ọnye kere gị ma ọ bụ kwe na ị karịrị ọnye kere gị.
==Mkpọpụta==
==Myiri n'asụsụ ==
==Bekee==
*Human power is temporary; divine power is eternal.
*Pride leads to downfall.
[[Category:ilu]]
dmk0arknxt6o68f8zi0vau1vvecg7t8
42422
42377
2026-06-23T13:03:09Z
Nma jeni
626
42422
wikitext
text/x-wiki
==Nkọwa==
Nke a bu ịlụ igbo na-akọwa, ekwela ka ihe ndị ị rụzuru mee ka i chefuo ọnye kere gị ma ọ bụ kwe na ị karịrị ọnye kere gị.
==Mkpọpụta==
==Myiri n'asụsụ ==
==Bekee==
*Human power is temporary; divine power is eternal.
*Pride leads to downfall.
[[Category:Ilu]]
6xo9etm1nog4n6qs4fhe5bao88utnda
42456
42422
2026-06-23T13:17:11Z
Nma jeni
626
42456
wikitext
text/x-wiki
==Nkọwa==
Nke a bu ịlụ igbo na-akọwa, ekwela ka ihe ndị ị rụzuru mee ka i chefuo ọnye kere gị ma ọ bụ kwe na ị karịrị ọnye kere gị.
==Mkpọpụta==
==Myiri n'asụsụ ọzọ==
==Bekee==
*Human power is temporary; divine power is eternal.
*Pride leads to downfall.
[[Category:Ilu]]
3moav5ognvqaqbq937ib0dn9w4lv290
42699
42456
2026-06-23T14:25:33Z
Nma jeni
626
42699
wikitext
text/x-wiki
==Nkọwa==
Nkea bu ịlụ igbo na-akọwa, ekwela ka ihe ndị ị rụzuru mee ka i chefuo ọnye kere gị ma ọ bụ kwe na ị karịrị ọnye kere gị.
==Mkpọpụta==
==Myiri n'asụsụ ọzọ==
==Bekee==
*Human power is temporary; divine power is eternal.
*Pride leads to downfall.
[[Category:Ilu]]
cfayd5univf0jstmppo0bzhvm72yw4x
Ihe okenye nọ ala hụ, nwata rịa ugwu kasi ibe ya elu, ọgaghị ahụ ya.
0
5829
42534
26989
2026-06-23T13:41:09Z
Nma jeni
626
42534
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ ilu Igbo na-akọwa na onye na-eto eto, n'agbanyeghị otú ike ya siri dị ma ọ bụ otú o si nwee obi ike, enweghị ahụmịhe ndụ iji hụ ihe egwu ụfọdụ di n'ihu.
==Mkpọpụta==
==Myiri n'asụsụ==
==Bekee==
#Respect the wisdom of elders.
#Experience teaches lessons that youthful cleverness cannot replace.
[[Category:Ilu]]
maovbde583rryyhptoln6eba72w45w0
42535
42534
2026-06-23T13:41:36Z
Nma jeni
626
42535
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ ilu Igbo na-akọwa na onye na-eto eto, n'agbanyeghị otú ike ya siri dị ma ọ bụ otú o si nwee obi ike, enweghị ahụmịhe ndụ iji hụ ihe egwu ụfọdụ di n'ihu.
==Mkpọpụta==
==Myiri n'asụsụ ọzọ==
==Bekee==
#Respect the wisdom of elders.
#Experience teaches lessons that youthful cleverness cannot replace.
[[Category:Ilu]]
fbtltb4cfp782nfwdwrcmptus9akm8t
42537
42535
2026-06-23T13:41:58Z
Nma jeni
626
42537
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ ilu Igbo na-akọwa na onye na-eto eto, n'agbanyeghị otú ike ya siri dị ma ọ bụ otú o si nwee obi ike, enweghị ahụmịhe ndụ iji hụ ihe egwu ụfọdụ di n'ihu.
==Mkpọpụta==
==Myiri n'asụsụ ọzọ==
==Bekee==
*Respect the wisdom of elders.
*Experience teaches lessons that youthful cleverness cannot replace.
[[Category:Ilu]]
nlmc94pqq9rngga5kef7eoz49t825zb
42559
42537
2026-06-23T13:48:18Z
Akwugo
14
Akwugo moved page [[Ihe okenye tukwu ana hụ, nwata ria ugwu kasi ibe ya elu, ọgaghi ahụ ya.]] to [[Ihe okenye nọ ala hụ, nwata rịa ugwu kasi ibe ya elu, ọgaghị ahụ ya.]]: Misspelled title
42537
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ ilu Igbo na-akọwa na onye na-eto eto, n'agbanyeghị otú ike ya siri dị ma ọ bụ otú o si nwee obi ike, enweghị ahụmịhe ndụ iji hụ ihe egwu ụfọdụ di n'ihu.
==Mkpọpụta==
==Myiri n'asụsụ ọzọ==
==Bekee==
*Respect the wisdom of elders.
*Experience teaches lessons that youthful cleverness cannot replace.
[[Category:Ilu]]
nlmc94pqq9rngga5kef7eoz49t825zb
42639
42559
2026-06-23T14:08:28Z
Nma jeni
626
42639
wikitext
text/x-wiki
==Nkọwa==
Nkea bụ ilu Igbo na-akọwa na onye na-eto eto, n'agbanyeghị otú ike ya siri dị ma ọ bụ otú o si nwee obi ike, enweghị ahụmịhe ndụ iji hụ ihe egwu ụfọdụ di n'ihu.
==Mkpọpụta==
==Myiri n'asụsụ ọzọ==
==Bekee==
*Respect the wisdom of elders.
*Experience teaches lessons that youthful cleverness cannot replace.
[[Category:Ilu]]
fjwrutli6qitqu49hcxrxtdbzmhof7i
Onye buru chi ya ụzọ, ọ gbagbue onwe ya n'ọsọ.
0
5830
42410
26988
2026-06-23T12:59:00Z
Goodymeraj
496
E mere m ndezi
42410
wikitext
text/x-wiki
==Nkọwa==
#Nke a bu ilu Igbo na-akọwa na onye ọ bụla, jụrụ nduzi na-etinye onwe ya n'ihe isi ike.
#Ilu a dọrọ aka ná ntị na onye ọbụla ọ na-adị ọkụ ọkụ mgbe niile, na-enweghị nduzi Chineke ma ọ bụ onye jụrụ amamihe na-etinye onwe ya na ntaramahụhụ n'ihi na ya họọrọ ụzọ kachasị sie ike.
==Myiri n'asụsụ Ọzọ==
===Bekee===
#Follow guidance; don’t outrun it.
#Life becomes a difficult race when you refuse counsel or spiritual direction.
[[Category:Ilu]]
2buysp1m7xifbmakjrthxgalbzychnx
Nwanyi na ele-anya nwa n'aka Chineke anaghi eyi uwe-ukwu anaba ura.
0
5831
42358
26987
2026-06-23T12:36:15Z
Goodymeraj
496
E mere m ndezi
42358
wikitext
text/x-wiki
==Nkọwa==
#Nke a bụ ilu Igbo na-akọwa na ọ bụrụ na ị na-achọsị ihe ike, ị ga-ewepụ ihe mgbochi niile ma mee ka onwe gị dị njikere ime ihe niile kwesịrị ekwesị ka I nwee ike chọta ihe ahụ.
#Ọ bụrụ na ị na-atụ anya n'ezie na Chineke ga-emere gị ihe, kwadebe onwe gị nke ọma, ekwela ka ihe ọ bụla gbochie gị.
==Myiri n'asụsụ Ọzọ==
==Bekee==
#Expectation involves preparation.
#You cannot say you are waiting for God while holding on to things that block your blessing
[[Category:Ilu]]
nynd453jx54pg9fzfdlhj65e4ym8vc8
Mberede nyịrị dike, mana mberede ka-eji ama dike.
0
5845
42598
42279
2026-06-23T14:00:14Z
Goodymeraj
496
E mere m ndezi
42598
wikitext
text/x-wiki
===Nkọwa===
*Nke a bụ ilu Igbo na-akọwa na oge siri ike nakwa oge ihe ndakwasị a na-atụghị anya ya ka eji anwale ike n'ezie.
*A na-ekpughe obi ike, ma ọ bụ ntachi obi mmadụ n'oge ihe ịma aka na ihe atụghị anya ya bịara.
==Myiri n'asụsụ Ọzọ==
===Bekee===
*A person’s bravery, wisdom, or resilience is revealed during unexpected challenges.
*Sudden situations or emergencies,can overwhelm a strong man,but it is in sudden situations that a strong man is truly known.
[[Category:Ilu]]
m3bvd3yticwjponkurq8c7l1voakqtn
Nwata etozughi etozu mara ogodo, ikuku eburu ya.
0
5846
42355
26995
2026-06-23T12:33:06Z
Goodymeraj
496
E mere m ndezi
42355
wikitext
text/x-wiki
==Nkọwa==
Nke a bu ilu Igbo na-akọwa na mgbe mmadụ malitere ibu ọrụ nke o na-etobeghị etozu ibu ma ọ bụ na-adịghị njikere maka ya, ihe ịma aka ga-eju ya anya.
==Myiri n'asụsụ Ọzọ==
==Bekee==
#Immaturity cannot withstand pressure.
#Trying to behave like an adult without the necessary experience leads to embarrassment or failure.
[[Category:Ilu]]
f27r2n1809uxgd4uizh8jnn648yfo7n
Agadị wekọtacha ọkazị ma gbajie mgbọrọgwụ ya, agụ biara n'afo nke mbụ ga-abịakwa ọzọ.
0
5924
42577
28011
2026-06-23T13:52:38Z
Nma jeni
626
42577
wikitext
text/x-wiki
==Nkọwa==
Erichala ihe niile inwere taa, cheta na echi dị.
===Mkpọpụta===
[[File:Ig-Agadị wekọtacha ọkazị ma gbajie mgbọrọgwụ ya, agụ biara n'afo nke mbụ ga-abịakwa ọzọ..ogg|Ig-Agadị wekọtacha ọkazị ma gbajie mgbọrọgwụ ya, agụ biara n'afo nke mbụ ga-abịakwa ọzọ.]]
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
If an old woman harvests ọkazị and break its roots, the hunger that came initially will come again.
[[Category: Ilu]]
stx9fyf28kgvfycuper854bj9myb47r
Ebe nwatakịrị na-ebute onu mmanu-mmanu ka o na-apu orịrị.
0
5945
42368
27707
2026-06-23T12:43:16Z
Ennydavids
470
42368
wikitext
text/x-wiki
==Nkọwa ==
Nke a bụ ilu Igbo na-akọwa na onye ọbụla na-alaghachi ebe ọ bụla ha baara uru, ebe ha nwere afọ ojuju, ma ọ bụ ebe e mesoro ha ihe nke ọma.
Ọ bụrụ na ị na-emeso ndị mmadụ nke ọma, ha ga-anọnyere good.
===Mkpọpụta===
===Myiri n'asụsụ===
===Bekee===
*People follow where their needs are met.
*We keep the company that rewards us.
[[Category:ilu]]
6hpffypct71ptm1nuds3ux1vyxtkofy
42477
42368
2026-06-23T13:22:12Z
Nma jeni
626
42477
wikitext
text/x-wiki
==Nkọwa ==
Nke a bụ ilu Igbo na-akọwa na onye ọbụla na-alaghachi ebe ọ bụla ha bara uru, ebe ha nwere afọ ojuju, ma ọ bụ ebe e mesoro ha ihe nke ọma.
Ọ bụrụ na ị na-emeso ndị mmadụ nke ọma, ha ga-anọnyere good.
===Mkpọpụta===
===Myiri n'asụsụ===
===Bekee===
*People follow where their needs are met.
*We keep the company that rewards us.
[[Category:Ilu]]
4y27cw93niil0zx8ujenu96jxnshrjp
42695
42477
2026-06-23T14:24:05Z
Nma jeni
626
42695
wikitext
text/x-wiki
==Nkọwa ==
Nkea bụ ilu Igbo na-akọwa na onye ọbụla na-alaghachi ebe ọ bụla ha bara uru, ebe ha nwere afọ ojuju, ma ọ bụ ebe e mesoro ha ihe nke ọma.
Ọ bụrụ na ị na-emeso ndị mmadụ nke ọma, ha ga-anọnyere good.
===Mkpọpụta===
===Myiri n'asụsụ ọzọ===
===Bekee===
*People follow where their needs are met.
*We keep the company that rewards us.
[[Category:Ilu]]
09v8ito49804ngk5tadusmgk97wsn1h
Eburu ụzọ zọta ala, azọba ute.
0
5946
42399
27706
2026-06-23T12:55:41Z
Ennydavids
470
42399
wikitext
text/x-wiki
==Nkọwa==
Nke a bu ilu Igbo na-akọwa na mmadụ kwesịrị ebuzo nwete godi ihe kachasị mkpa tupu ọ na-echegbu onwe ya banyere mgbakwunye.
===Mkpọpụta===
==Myiri n'asụsụ ==
===Bekee===
*Prioritize wisely.
*Do not focus on minor benefits before establishing the major victory.
[[Category:ilu]]
ehgd531r0kjrw2qqunnkz0br7l20kl7
42489
42399
2026-06-23T13:27:27Z
Nma jeni
626
42489
wikitext
text/x-wiki
==Nkọwa==
Nke a bu ilu Igbo na-akọwa na mmadụ kwesịrị ebuzo nwete godi ihe kachasị mkpa tupu ọ na-echegbu onwe ya banyere mgbakwunye.
===Mkpọpụta===
==Myiri n'asụsụ Ọzọ==
===Bekee===
*Prioritize wisely.
*Do not focus on minor benefits before establishing the major victory.
[[Category:Ilu]]
tv7sgpoxdmf3ih6ryu4kyjj9i6m4mcd
42691
42489
2026-06-23T14:22:35Z
Nma jeni
626
42691
wikitext
text/x-wiki
==Nkọwa==
Nkea bu ilu Igbo na-akọwa na mmadụ kwesịrị ebuzo nwete godi ihe kachasị mkpa tupu ọ na-echegbu onwe ya banyere mgbakwunye.
===Mkpọpụta===
==Myiri n'asụsụ Ọzọ==
===Bekee===
*Prioritize wisely.
*Do not focus on minor benefits before establishing the major victory.
[[Category:Ilu]]
g60kfzkfkht4kt33nrqwgloy3uef867
Ọkwa sịrị ụmụ ya na ha tụrụ ji, ha tụrụkwa mgbọrọgwụ maka na onye nwe ji gwuru ji ya, ha ewere mgbọrọgwụ biri.
0
5949
42317
27992
2026-06-23T12:06:42Z
Goodymeraj
496
E mere m ndezi
42317
wikitext
text/x-wiki
==Nkọwa ==
# Nke a bu ilu Igbo na-akọwa mkpa o dị mmadụ izụ onwe ya iji nagide ihe maọbụ ọnọdụ ọbụla, mgbe ihe kacha mma ma obu mgbe ihe adịghịzi.
#Atụkwasịla obi naanị n'otu ebe ị ga-esi dị ndụ.
==Myiri n'asụsụ Ọzọ==
===Bekee ===
#Always have a backup plan.
#Train yourself to cope even when the best is no longer available.
[[Category:Ilu]]
6qfhwgq1nezofbioi74c0d3qysf1bpw
Atuọrọ ọmara, ọmara, mana atuọrọ ofeke otinye isi n'ọhia.
0
5991
42429
42292
2026-06-23T13:05:42Z
Nma jeni
626
42429
wikitext
text/x-wiki
===Nkọwa===
*Nke a bu ilu Igbo na-akọwa na onye maara ihe na-ege ntị na ndụmọdụ ma jiri ya mee ihe nke ọma.
*Onye nzuzu na-ajụ ndụmọdụ wee mebie onwe ya.
===Mkpọpụta===
==Myiri n'asụsụ==
===Bekee===
*Advice is only useful to those who value it.
*A wise person learns from advice; a foolish person destroys themselves with it.
[[Category:Ilu]]
rbfo44mvz67ivftkdrtpwvbfog3yx5n
42464
42429
2026-06-23T13:19:32Z
Nma jeni
626
42464
wikitext
text/x-wiki
===Nkọwa===
*Nke a bu ilu Igbo na-akọwa na onye maara ihe na-ege ntị na ndụmọdụ ma jiri ya mee ihe nke ọma.
*Onye nzuzu na-ajụ ndụmọdụ wee mebie onwe ya.
===Mkpọpụta===
==Myiri n'asụsụ ọzọ==
===Bekee===
*Advice is only useful to those who value it.
*A wise person learns from advice; a foolish person destroys themselves with it.
[[Category:Ilu]]
ndbmzw0qaan4larm903zv1lsbb45zb3
42708
42464
2026-06-23T14:26:23Z
Nma jeni
626
42708
wikitext
text/x-wiki
===Nkọwa===
*Nkea bu ilu Igbo na-akọwa na onye maara ihe na-ege ntị na ndụmọdụ ma jiri ya mee ihe nke ọma.
*Onye nzuzu na-ajụ ndụmọdụ wee mebie onwe ya.
===Mkpọpụta===
==Myiri n'asụsụ ọzọ==
===Bekee===
*Advice is only useful to those who value it.
*A wise person learns from advice; a foolish person destroys themselves with it.
[[Category:Ilu]]
faydfqjjrv5nz7q7l98sl8bbidjc2u6
Anaghị agwa ochi ntị n’agha esu.
0
5992
42383
27994
2026-06-23T12:49:29Z
Nma jeni
626
42383
wikitext
text/x-wiki
==Nkọwa ==
*Nke a bu okwu igbo na-akọwa na ụfọdụ ndị anaghị enwe nchekasị ma ọ bụ na ha nwere isi ike nke na-eme na ha ejighị ihe ndị dị mkpa kpọrọ ihe.
*Ọnye jụrụ ige ntị agaghị enweta enyemaka site na ịdọ aka ná ntị.
==Mkpọpụta==
==Myiri n'asụsụ ==
===Bekee ===
*You cannot advise someone who refuses to see danger.
[[Category:ilu]]
gbtjmvc91zcu907gijurhqf6vzf2y3b
42423
42383
2026-06-23T13:03:47Z
Nma jeni
626
42423
wikitext
text/x-wiki
==Nkọwa ==
*Nke a bu okwu igbo na-akọwa na ụfọdụ ndị anaghị enwe nchekasị ma ọ bụ na ha nwere isi ike nke na-eme na ha ejighị ihe ndị dị mkpa kpọrọ ihe.
*Ọnye jụrụ ige ntị agaghị enweta enyemaka site na ịdọ aka ná ntị.
==Mkpọpụta==
==Myiri n'asụsụ ==
===Bekee ===
*You cannot advise someone who refuses to see danger.
[[Category:Ilu]]
m9z2p7zr4ovj7otelyrlglcebwbxo8u
42457
42423
2026-06-23T13:17:39Z
Nma jeni
626
42457
wikitext
text/x-wiki
==Nkọwa ==
*Nke a bu okwu igbo na-akọwa na ụfọdụ ndị anaghị enwe nchekasị ma ọ bụ na ha nwere isi ike nke na-eme na ha ejighị ihe ndị dị mkpa kpọrọ ihe.
*Ọnye jụrụ ige ntị agaghị enweta enyemaka site na ịdọ aka ná ntị.
==Mkpọpụta==
==Myiri n'asụsụ ọzọ ==
===Bekee ===
*You cannot advise someone who refuses to see danger.
[[Category:Ilu]]
f5bcqeuqw9lqb0ur8k2cseeouefbfrq
42702
42457
2026-06-23T14:25:52Z
Nma jeni
626
42702
wikitext
text/x-wiki
==Nkọwa ==
*Nkea bu okwu igbo na-akọwa na ụfọdụ ndị anaghị enwe nchekasị ma ọ bụ na ha nwere isi ike nke na-eme na ha ejighị ihe ndị dị mkpa kpọrọ ihe.
*Ọnye jụrụ ige ntị agaghị enweta enyemaka site na ịdọ aka ná ntị.
==Mkpọpụta==
==Myiri n'asụsụ ọzọ ==
===Bekee ===
*You cannot advise someone who refuses to see danger.
[[Category:Ilu]]
98zxyqtypxtvl7cj3olymrat4fir6t7
Agadi nwanyị anaghị aka-nka n’egwu ọ ma agba
0
5993
42339
42047
2026-06-23T12:27:40Z
Nma jeni
626
42339
wikitext
text/x-wiki
==Nkọwa ==
Nke a bụ ilu Igbo na-akọwa na oge afọ anaghị ehichapụ ezi agụụ, nkà, ma ọ bụ àgwà mmadụ.
===Mkpọpụta===
==Myiri n'asụsụ ==
===Bekee ===
#Old habits, passions, and character traits do not easily disappear with age.
#People keep doing what they love, no matter their age.
[[Category:ilu]]
4oc18d8hmfh5uroybof038qidnq9k8r
42342
42339
2026-06-23T12:28:12Z
Nma jeni
626
/* Bekee */
42342
wikitext
text/x-wiki
==Nkọwa ==
Nke a bụ ilu Igbo na-akọwa na oge afọ anaghị ehichapụ ezi agụụ, nkà, ma ọ bụ àgwà mmadụ.
===Mkpọpụta===
==Myiri n'asụsụ ==
===Bekee ===
*Old habits, passions, and character traits do not easily disappear with age.
*People keep doing what they love, no matter their age.
[[Category:ilu]]
dp7dl16kam96ilhp3u2x93ta872l4hg
42412
42342
2026-06-23T12:59:30Z
Nma jeni
626
42412
wikitext
text/x-wiki
==Nkọwa ==
Nke a bụ ilu Igbo na-akọwa na oge afọ anaghị ehichapụ ezi agụụ, nkà, ma ọ bụ àgwà mmadụ.
===Mkpọpụta===
==Myiri n'asụsụ ==
===Bekee ===
*Old habits, passions, and character traits do not easily disappear with age.
*People keep doing what they love, no matter their age.
[[Category:Ilu]]
g64fezli4mmvpc7azwbcwg9d7kbi2sp
42459
42412
2026-06-23T13:18:08Z
Nma jeni
626
42459
wikitext
text/x-wiki
==Nkọwa ==
Nke a bụ ilu Igbo na-akọwa na oge afọ anaghị ehichapụ ezi agụụ, nkà, ma ọ bụ àgwà mmadụ.
===Mkpọpụta===
==Myiri n'asụsụ ọzọ ==
===Bekee ===
*Old habits, passions, and character traits do not easily disappear with age.
*People keep doing what they love, no matter their age.
[[Category:Ilu]]
sel1l1qcc22eqflfmcfglmd6pbh1rt5
42663
42459
2026-06-23T14:15:18Z
Akwugo
14
Akwugo moved page [[Agadi nwanyị anaghị aka-nka n’egwu o ma agba]] to [[Agadi nwanyị anaghị aka-nka n’egwu ọ ma agba]]: Misspelled title
42459
wikitext
text/x-wiki
==Nkọwa ==
Nke a bụ ilu Igbo na-akọwa na oge afọ anaghị ehichapụ ezi agụụ, nkà, ma ọ bụ àgwà mmadụ.
===Mkpọpụta===
==Myiri n'asụsụ ọzọ ==
===Bekee ===
*Old habits, passions, and character traits do not easily disappear with age.
*People keep doing what they love, no matter their age.
[[Category:Ilu]]
sel1l1qcc22eqflfmcfglmd6pbh1rt5
42718
42663
2026-06-23T14:28:03Z
Nma jeni
626
42718
wikitext
text/x-wiki
==Nkọwa ==
Nkea bụ ilu Igbo na-akọwa na oge afọ anaghị ehichapụ ezi agụụ, nkà, ma ọ bụ àgwà mmadụ.
===Mkpọpụta===
==Myiri n'asụsụ ọzọ ==
===Bekee ===
*Old habits, passions, and character traits do not easily disappear with age.
*People keep doing what they love, no matter their age.
[[Category:Ilu]]
6hn2q6a5ycem2896wmakmc1upzp0r4w
A tuọrọ ọmara, ọ mara, a tuọrọ ofeke, o fenye isi n'ọhịa
0
5994
42551
28008
2026-06-23T13:46:16Z
Nma jeni
626
42551
wikitext
text/x-wiki
==Nkọwa==
Naanị onye nwere amamihe na-anara ndumọdụ mana onye nzuzu n'atacha ndụmọdụ, o zuzuru gawa
===Mkpọpụta===
[[File:Ig-A tuọrọ ọmara, ọ mara, a tuọrọ ofeke, o fenye isi n'ọhịa.ogg|Ig-A tuọrọ ọmara, ọ mara, a tuọrọ ofeke, o fenye isi n'ọhịa]]
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[[Category: Ilu]]
859f2aedmjfxac78n1rvns0yrhqy18p
Ọ bụ oke nọ n'ụlọ gwara oke nọ na ezi na azụ dị na ngịga
0
5995
42320
27997
2026-06-23T12:08:42Z
Goodymeraj
496
E deziri m peeji a
42320
wikitext
text/x-wiki
==Nkọwa ==
#Nke a bu ilu Igbo na-akọwa na ihe ize ndụ dị n'ezie na-esikarị n'ime ụlọ ya, ọ bụghị n'èzí.
#Onye iro kachasị ukwuu na-abụkarị onye nọ n'ime ụlọ maọbụ onye ma mmadụ.
==Myiri n'asụsụ Ọzọ==
===Bekee ===
#The real danger usually comes from inside, not outside.
#The greatest enemy is often an insider.
[[Category:Ilu]]
3g1hccm9wtffejmn06352w22fwpva4h
Obụrụ na akwa tie akị, ihere emebe mkpume
0
5998
42348
28000
2026-06-23T12:30:24Z
Goodymeraj
496
E mere m ndezi
42348
wikitext
text/x-wiki
==Nkọwa ==
Nke a bu ilu igbo na-akọwa na mgbe ndị na-adịghị ike mere ihe a tụrụ anya ndị siri ike kwesịrị ime, ihere na-eme ndị siri ike.
==Myiri n'asụsụ Ọzọ==
===Bekee ===
#Those who boast of strength but fail lose honor.
#The strong who fail are shamed by the weak who succeed.
[[Category:Ilu]]
0ru2vgbnpznt14uek7fttky7ervr0lb
Ka enyochata ka mgbọ ji tụọ nwa enwe n'iru.
0
6001
42619
28004
2026-06-23T14:05:18Z
Goodymeraj
496
E mere m ndezi
42619
wikitext
text/x-wiki
==Nkọwa ==
Nke a bu ilu Igbo na-akọwa na ịchọ ịmatacha ihe niile ma nke dị mkpa ma nke adịghị nwere ike ibute nnukwu nsogbu.
Zere itinye aka na nsogbu ndị dị ize ndụ na-enweghị isi.
==Myiri n'asụsụ Ọzọ==
===Bekee ===
#Mind your business, especially where danger is involved.
#Curiosity must be guided by wisdom.
[[Category:Ilu]]
jw7xsoxocxy1cnuht6b37nvbnhpo6fz
Chọọ ewu ojii ka chi dị
0
6144
42435
28783
2026-06-23T13:07:49Z
Nma jeni
626
42435
wikitext
text/x-wiki
==Nkọwa==
Nka bụ ilụ Igbo pụtara na-eji ohere eme ihe mgbe ha na-adịgide adịgide ma na-eme ihe ngwa ngwa tupu ohere ahụ apụ.
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-King ChristLike-Chọọ ewu ojii ka chi dị.wav|LL-Q33578_(ibo)-King_ChristLike-Chọọ_ewu_ojii_ka_chi_dị]]
==Myiri n'asụsụ ọzọ==
===Bekee===
Make Hay while the Sun Shines
[[Category:Ilu]]
a3mlaiskx5fkrf7zlh7gc4n9ht6x5a3
42709
42435
2026-06-23T14:26:45Z
Nma jeni
626
42709
wikitext
text/x-wiki
==Nkọwa==
Nkea bụ ilụ Igbo pụtara na-eji ohere eme ihe mgbe ha na-adịgide adịgide ma na-eme ihe ngwa ngwa tupu ohere ahụ apụ.
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-King ChristLike-Chọọ ewu ojii ka chi dị.wav|LL-Q33578_(ibo)-King_ChristLike-Chọọ_ewu_ojii_ka_chi_dị]]
==Myiri n'asụsụ ọzọ==
===Bekee===
Make Hay while the Sun Shines
[[Category:Ilu]]
18uswhb818ugyqgqfudneg1mmiu7qi2
Si ekele onye nti chiri; enu anughi, ala anu
0
6145
42328
28785
2026-06-23T12:17:43Z
Goodymeraj
496
E mere m ndezi
42328
wikitext
text/x-wiki
==Nkọwa==
Ịlụ Igbo pụtara na ka anyị mee ihe ziri ezi ma mgbe a na-ahụ anyị ma mgbe a naghị ahụ, mepụrụ Chukwu.
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Dagentle-Si ekele onye nti chiri; enu anughi, ala anu.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
Let us do the right thing, for the sake of God
[[Category:Ilu]]
ehd15lurm36voe9i6tno3p13qalcg6h
Mgbe nnukwu anụ ji apụta n’ọhịa bụ mgbe dinta sọrọ ngọngọ ọrụ
0
6149
42440
42293
2026-06-23T13:11:25Z
Goodymeraj
496
E mere m ndezi
42440
wikitext
text/x-wiki
==Nkọwa==
Ịlụ Igbo e ji agba mmadụ ume na onye adala mba, anọla jụụ ruo mgbe i meriri.
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Nachi kim-Mgbe nnukwu anụ ji apụta n’ọhịa bụ mgbe dinta sọrọ ngọngọ ọrụ.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
Never give up, don’t rest until you have succeeded
[[Category:Ilu]]
1ietg6lhbqede72ckaltb08phc4sj7u
42462
42440
2026-06-23T13:18:48Z
Goodymeraj
496
/* Mkpọpụta */
42462
wikitext
text/x-wiki
==Nkọwa==
Ịlụ Igbo e ji agba mmadụ ume na onye adala mba, anọla jụụ ruo mgbe i meriri.
==Mkpọpụta==
[[File:Ig-Mgbe nnukwu anụ ji apụta n’ọhịa bụ mgbe dinta sọrọ ngọngọ ọrụ.ogg|thumb|Ig-Mgbe nnukwu anụ ji apụta n’ọhịa bụ mgbe dinta sọrọ ngọngọ ọrụ]]
==Myiri n'asụsụ ọzọ==
===Bekee===
Never give up, don’t rest until you have succeeded
[[Category:Ilu]]
7vpp51njnyy1htk8frm6vxcbevwc05d
42465
42462
2026-06-23T13:19:41Z
Goodymeraj
496
/* Mkpọpụta */
42465
wikitext
text/x-wiki
==Nkọwa==
Ịlụ Igbo e ji agba mmadụ ume na onye adala mba, anọla jụụ ruo mgbe i meriri.
==Mkpọpụta==
[[File:Ig-Mgbe nnukwu anụ ji apụta n’ọhịa bụ mgbe dinta sọrọ ngọngọ ọrụ.ogg|thumb]]
==Myiri n'asụsụ ọzọ==
===Bekee===
Never give up, don’t rest until you have succeeded
[[Category:Ilu]]
gnuxlhjavapankpljvcjfug4n0mdut4
42470
42465
2026-06-23T13:20:55Z
Goodymeraj
496
42470
wikitext
text/x-wiki
==Nkọwa==
Ịlụ Igbo e ji agba mmadụ ume na onye adala mba, anọla jụụ ruo mgbe i meriri.
==Mkpọpụta==
[[File:Ig-Mgbe nnukwu anụ ji apụta n’ọhịa bụ mgbe dinta sọrọ ngọngọ ọrụ.ogg]]
==Myiri n'asụsụ ọzọ==
===Bekee===
Never give up, don’t rest until you have succeeded
[[Category:Ilu]]
h2gwesdhllpmfm38u7h2xtp0lbmu61t
42474
42470
2026-06-23T13:22:03Z
Goodymeraj
496
E mere m ndezi
42474
wikitext
text/x-wiki
==Nkọwa==
Ịlụ Igbo e ji agba mmadụ ume na onye adala mba, anọla jụụ ruo mgbe i meriri.
==Mkpọpụta==
[[File:Ig-Mgbe nnukwu anụ ji apụta n’ọhịa bụ mgbe dinta sọrọ ngọngọ ọrụ.ogg]]
==Myiri n'asụsụ ọzọ==
===Bekee===
Never give up, don’t rest until you have succeeded
[[Category:Ilu]]
4ekmek8mm0ecpuld276t1e4f6916z1u
A na-agwa ntị ma ntị anụghị, e gburu isi ntị esoro ya
0
6158
42337
28824
2026-06-23T12:25:26Z
Nma jeni
626
/* Mkpoputa */
42337
wikitext
text/x-wiki
==Nkọwa==
Ịlụ Igbo pụtara na Ọ bụrụ na anyị adịghị aṅa ntị na ndụmọdụ dị mma , anyị nwere ike ịdaba na nsogbu.
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Nachi kim-A na-agwa ntị ma ntị anụghị, e gburu isi ntị esoro ya..wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
If we don’t take notice of good advice we shall likely fall into trouble
[[Category:ilu]]
cz2aln8cijwgye4hthywl9u1sc1p9u1
42406
42337
2026-06-23T12:57:56Z
Nma jeni
626
42406
wikitext
text/x-wiki
==Nkọwa==
Ịlụ Igbo pụtara na Ọ bụrụ na anyị adịghị aṅa ntị na ndụmọdụ dị mma , anyị nwere ike ịdaba na nsogbu.
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Nachi kim-A na-agwa ntị ma ntị anụghị, e gburu isi ntị esoro ya..wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
If we don’t take notice of good advice we shall likely fall into trouble
[[Category:Ilu]]
kukgibzxdzzoclwels29h1x9hrhkqol
42504
42406
2026-06-23T13:34:20Z
Nma jeni
626
42504
wikitext
text/x-wiki
==Nkọwa==
Ịlụ Igbo pụtara na Ọ bụrụ na anyị adịghị aṅa ntị na ndụmọdụ dị mma , anyị nwere ike ịdaba na nsogbu.
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Nachi kim-A na-agwa ntị ma ntị anụghị, e gburu isi ntị esoro ya..wav]]
==Myiri n'asụsụ Ọzọ==
===Bekee===
If we don’t take notice of good advice we shall likely fall into trouble
[[Category:Ilu]]
pax84t9jvddu60h2tcmwi471ejl4ex3
Agwọ emeghi ihe o ji bụrụ agwọ, ụmụaka ewere ya kee nkụ
0
6162
42351
28831
2026-06-23T12:31:49Z
Nma jeni
626
42351
wikitext
text/x-wiki
==Nkọwa==
Ịlụ Igbo pụtara na chebe ikike gị ka ị ghara ịbụ ihe egwuregwu
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Nachi kim-Agwọ emeghi ihe o ji bụrụ agwọ, ụmụaka ewere ya kee nkụ.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
defend your capability to avoid being taken for granted.
[[Category:ilu]]
79e8b38t8k3i8h491vm4tvd03dn6apk
42417
42351
2026-06-23T13:00:48Z
Nma jeni
626
42417
wikitext
text/x-wiki
==Nkọwa==
Ịlụ Igbo pụtara na chebe ikike gị ka ị ghara ịbụ ihe egwuregwu
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Nachi kim-Agwọ emeghi ihe o ji bụrụ agwọ, ụmụaka ewere ya kee nkụ.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
defend your capability to avoid being taken for granted.
[[Category:Ilu]]
0v4j382m7cv3ydhiahvwqfl3zzqav8g
Ha na-asi na oku gbara Father I na-aju ma o gbakwara ma afuonu ya
0
6164
42513
28836
2026-06-23T13:36:47Z
Nma jeni
626
42513
wikitext
text/x-wiki
==Nkọwa==
Nka bụ Ilụ na-ekwu maka ihe dị mkpa ị nọ ebe ahụ na-ekwu ihe nzuzu ma ọ bụ nke na-adịchaghị mkpa.
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Chiraldine-Ha na-asi na oku gbara Father I na-aju ma o gbakwara ma afuonu ya.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
Talking about the important and you are there talking something stupid or of less importance
[[Category:Ilu]]
nmgdacmjv84djpqyzea8kzp0z6unka9
42644
42513
2026-06-23T14:09:20Z
Nma jeni
626
42644
wikitext
text/x-wiki
==Nkọwa==
Nkea bụ Ilụ na-ekwu maka ihe dị mkpa ị nọ ebe ahụ na-ekwu ihe nzuzu ma ọ bụ nke na-adịchaghị mkpa.
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Chiraldine-Ha na-asi na oku gbara Father I na-aju ma o gbakwara ma afuonu ya.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
Talking about the important and you are there talking something stupid or of less importance
[[Category:Ilu]]
pv1nnhrhl5h2ciszhrn9imnzec9jiz1
Ka a na-achu àjà, ka íkpé na-ama ndi mmụọ
0
6165
42626
28842
2026-06-23T14:06:41Z
Goodymeraj
496
E mere m ndezi
42626
wikitext
text/x-wiki
==Nkọwa ==
Nke a bu ilu Igbo na-akọwa ka mmadụ mee ihe o kwesịrị ime, ka a ghara ịta ya ụta
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Chizoba Amanambu-Ka a na-achu àjà, ka íkpé n'ama ndi mmụọ.wav]]
==Myiri n'asụsụ Ọzọ==
===Bekee ===
#Do your part to avoid the blame
[[Category:Ilu]]
ieh5oqpugv7u94mps86o0kkhv8yo8s3
42628
42626
2026-06-23T14:07:08Z
Goodymeraj
496
Goodymeraj moved page [[Ka a na-achu àjà, ka íkpé n'ama ndi mmụọ]] to [[Ka a na-achu àjà, ka íkpé na-ama ndi mmụọ]]
42626
wikitext
text/x-wiki
==Nkọwa ==
Nke a bu ilu Igbo na-akọwa ka mmadụ mee ihe o kwesịrị ime, ka a ghara ịta ya ụta
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Chizoba Amanambu-Ka a na-achu àjà, ka íkpé n'ama ndi mmụọ.wav]]
==Myiri n'asụsụ Ọzọ==
===Bekee ===
#Do your part to avoid the blame
[[Category:Ilu]]
ieh5oqpugv7u94mps86o0kkhv8yo8s3
Ejighị ụtụtụ ama njọ ahịa
0
6166
42501
42271
2026-06-23T13:33:49Z
Nma jeni
626
42501
wikitext
text/x-wiki
==Nkọwa ==
Nke a bu ilu Igbo na-akọwa A pụghị ikpebi ọdịnihu mmadụ site ná mmalite ọjọọ
Zere itinye aka na nsogbu ndị eji ize ndụ na-enweghị isi.
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Chizoba Amanambu-Ejighị ụtụtụ ama njọ ahịa.wav]]
==Myiri n'asụsụ Ọzọ ==
===Bekee===
Ones future can't be determined by a bad start
[[Category:Ilu]]
9bvirgeb4e9c8apj5zm5b3gez86hlmw
42648
42501
2026-06-23T14:10:01Z
Nma jeni
626
42648
wikitext
text/x-wiki
==Nkọwa ==
Nkea bu ilu Igbo na-akọwa A pụghị ikpebi ọdịnihu mmadụ site ná mmalite ọjọọ
Zere itinye aka na nsogbu ndị eji ize ndụ na-enweghị isi.
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Chizoba Amanambu-Ejighị ụtụtụ ama njọ ahịa.wav]]
==Myiri n'asụsụ Ọzọ ==
===Bekee===
Ones future can't be determined by a bad start
[[Category:Ilu]]
6t6o5gket64m3dhc6n2ane81jwke3f6
Agbacha ọsọ agụọ maịlụ
0
6167
42360
42061
2026-06-23T12:37:17Z
Nma jeni
626
/* Bekee */
42360
wikitext
text/x-wiki
==Nkọwa ==
Nke a bụ ilu Igbo na-akọwa na-atụgharị uche mgbe ị rụchara ọrụ siri ike
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Chizoba Amanambu-Agbacha ọsọ a gụọ milụ.wav]]
==Myiri n'asụsụ ==
===Bekee ===
*Be reflective after a difficult task
[[Category:ilu]]
gywt8xy011phpraeqqxbg54plv1uhfv
42415
42360
2026-06-23T12:59:57Z
Nma jeni
626
42415
wikitext
text/x-wiki
==Nkọwa ==
Nke a bụ ilu Igbo na-akọwa na-atụgharị uche mgbe ị rụchara ọrụ siri ike
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Chizoba Amanambu-Agbacha ọsọ a gụọ milụ.wav]]
==Myiri n'asụsụ ==
===Bekee ===
*Be reflective after a difficult task
[[Category:Ilu]]
9e9xnqxruz7ldo0vgu5zeuloxzagw2e
42461
42415
2026-06-23T13:18:46Z
Nma jeni
626
42461
wikitext
text/x-wiki
==Nkọwa ==
Nke a bụ ilu Igbo na-akọwa na-atụgharị uche mgbe ị rụchara ọrụ siri ike
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Chizoba Amanambu-Agbacha ọsọ a gụọ milụ.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee ===
*Be reflective after a difficult task
[[Category:Ilu]]
c44x96j40989dx7zmejteqroa932bel
42681
42461
2026-06-23T14:21:01Z
Akwugo
14
Akwugo moved page [[Agbacha ọsọ a gụọ milụ]] to [[Agbacha ọsọ agụọ maịlụ]]
42461
wikitext
text/x-wiki
==Nkọwa ==
Nke a bụ ilu Igbo na-akọwa na-atụgharị uche mgbe ị rụchara ọrụ siri ike
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Chizoba Amanambu-Agbacha ọsọ a gụọ milụ.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee ===
*Be reflective after a difficult task
[[Category:Ilu]]
c44x96j40989dx7zmejteqroa932bel
42715
42681
2026-06-23T14:27:38Z
Nma jeni
626
42715
wikitext
text/x-wiki
==Nkọwa ==
Nkea bụ ilu Igbo na-akọwa na-atụgharị uche mgbe ị rụchara ọrụ siri ike
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Chizoba Amanambu-Agbacha ọsọ a gụọ milụ.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee ===
*Be reflective after a difficult task
[[Category:Ilu]]
nay7vg4d17aqt0fwal8dcrz0d0shuzv
Ogologo abughi na nwa m e tola
0
6168
42517
28867
2026-06-23T13:37:08Z
Goodymeraj
496
E mere m ndezi
42517
wikitext
text/x-wiki
#REDIRECT [[Ogologo abụghị na nwa m etoola]]
==Nkọwa==
A naghị ekpebi ntozu okè na ndụ site na ọdịdị anụ ahụ nke mmadụ
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Geraldine Kene (Chiraldine)-Ogologo abughi na nwa m e tola.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
Maturity in Life is not determined by the physical appearance (athletic build) of an individual
[[Category: Ilu]]
2iax2we2sbq7hwu5v9szogfpt0tbm0f
Ukwu na ga wara; anya na ga wara na hu ya
0
6169
42324
28857
2026-06-23T12:11:19Z
Goodymeraj
496
E deziri m peeji a
42324
wikitext
text/x-wiki
==Nkọwa==
Ị nweghị ike ịghọgbu mmadụ nile
Ihe Onye na-eme ka e ji ama ya
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Geraldine Kene (Chiraldine)-Ukwu na ga wara; anya na ga wara na hu ya.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
You can't outsmart everyone
[[Category:Ilu]]
k787i5glme92y9zqpqt3pvy12s5sky3
Mmiri mara ugo sara ugo ahụ
0
6172
42380
42295
2026-06-23T12:47:26Z
Goodymeraj
496
E mere m ndezi
42380
wikitext
text/x-wiki
==Nkọwa==
Ịlụ Igbo pụtara na mgbe ụfọdụ , ihe ọjọọ maọbụ ihe ike mere mmadụ nwere ike ịghọ ngọzi.
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-NiferO-Mmiri mara ugo sara ugo ahụ.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
#sometimes unfortunate events can turn out to be blessings in disguise
#Every disappointment is a blessing in disguise
[[Category:Ilu]]
nxzqgt3mo4ndxy3fwhs6fjgwh4knxlv
Ego dị na ogwu
0
6173
42496
28865
2026-06-23T13:31:53Z
Nma jeni
626
42496
wikitext
text/x-wiki
==Nkọwa==
Nka bụ ilụ Igbo pụtara na I nweta ezigbo ihe ị nwere ike ime ihe siri ike.
==Mkpoputa==
[[File:LL-Q33578 (ibo)-NiferO-Ego dị na ogwu.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
To get something great you may have to do something difficult.
[[Category:Ilu]]
rxle93b5kdjn5xp8dbtc9puffq426fa
42652
42496
2026-06-23T14:10:25Z
Nma jeni
626
42652
wikitext
text/x-wiki
==Nkọwa==
Nkea bụ ilụ Igbo pụtara na I nweta ezigbo ihe ị nwere ike ime ihe siri ike.
==Mkpoputa==
[[File:LL-Q33578 (ibo)-NiferO-Ego dị na ogwu.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
To get something great you may have to do something difficult.
[[Category:Ilu]]
p748ez2sf77mzzn2xs1pqee2fsknznb
Onye nwere mmadụ ka onye nwere ego
0
6177
42388
28882
2026-06-23T12:51:47Z
Goodymeraj
496
E mere m ndezi
42388
wikitext
text/x-wiki
==Nkọwa==
Ịlụ Igbo pụtara na echefula mkpa ọ dị inwe ezi mmekọrịta.
==Mkpoputa==
[[File:LL-Q33578 (ibo)-Chinemeremprince-Onye nwere mmadụ ka onye nwere ego.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
A person with a robust network of people is stronger than an individual with only money
[[Category:Ilu]]
fw9swslssxfbzqfdhf09rx07i6sz99t
A tufue aziza uno, ututu a chọba ya
0
6289
42332
42037
2026-06-23T12:21:49Z
Ebube Clara
1134
42332
wikitext
text/x-wiki
==Nkọwa==
Ihe ọbụla dị n’ụlọ nwere uru na ọrụ ọ na-aru.Ilu a na-akụzi na mmadụ ekwesịghị ileda ihe ọ bụla anya n’ihi na ụbọchị ọ ga-adị mkpa nwere ike ịbịa.
==Mkpọpụta==
==Myiri N'asụsụ Ọzọ==
===Bekee===
Anything in the house has its own work to do.
[[Category:Ilu]]
1odvcq8k4ymist2gwjw3nyo3b77ugfu
42347
42332
2026-06-23T12:29:38Z
Ebube Clara
1134
42347
wikitext
text/x-wiki
==Nkọwa==
Ihe ọbụla dị n’ụlọ nwere uru na ọrụ ọ na-aru.Ilu a na-akụzi na mmadụ ekwesịghị ileda ihe ọ bụla anya n’ihi na ụbọchị ọ ga-adị mkpa nwere ike ịbịa.
==Mkpọpụta==
[[File:Ig-A tufue aziza uno, ututu a chọba ya.ogg]]
==Myiri N'asụsụ Ọzọ==
===Bekee===
Anything in the house has its own work to do.
[[Category:Ilu]]
atk1urxsivev66epsf7baicbup0caz4
A chọ agụ ahughi, e kpue ngwuru ya
0
6293
42617
30246
2026-06-23T14:05:07Z
Nma jeni
626
42617
wikitext
text/x-wiki
==Nkọwa==
Nkea bụ ilu igbo pụtara na dike nwụọ, onye obula akpaba ka osịrị sọ ya.
===Mkpọpụta===
==Myiri n'asụsụ ọzọ==
===Bekee===
When cat is away the mice play
[[Category: Ilu]]
nxdh9xetti6vlsg29y9g3g2tidlj2ap
Agha azụ adịghị egbu nnụnụ
0
6336
42599
30293
2026-06-23T14:00:50Z
Nma jeni
626
42599
wikitext
text/x-wiki
==Nkọwa==
Ịgba onye aka ya dị ọcha mgba okpuru, enweghị isi.
==Mkpọpųta==
==Myiri N'asụsụ ọzọ==
===Bekee===
A person who finds trouble with a just person will not succeed.
[[Category:Ilu]]
d2d0650vs6z5jmdd0gdz5spii4splj8
42610
42599
2026-06-23T14:04:19Z
Nma jeni
626
42610
wikitext
text/x-wiki
==Nkọwa==
Nkea bụ Ilu Igbo na ekwu na Ịgba onye aka ya dị ọcha mgba okpuru, enweghị isi.
==Mkpọpųta==
==Myiri N'asụsụ ọzọ==
===Bekee===
A person who finds trouble with a just person will not succeed.
[[Category:Ilu]]
q5sr4spq4mk0gs7cmmt55jhdm1wndsa
Egbe Bere Ugo Bere, nke si Ibe ya ebela, nku Kwa ya.
0
6345
42363
30303
2026-06-23T12:38:23Z
Ebube Clara
1134
42363
wikitext
text/x-wiki
==Nkọwa==
Ilu a na-akowa ka onye biri ya kwe ka ibe ya biri
==Mkpọpųta==
==Myiri N'asụsụ Ọzọ==
===Bekee===
This is a word to some people who like to prosper, and leave others to perish.
[[Category:Ilu]]
kkuz1g1hikosyn8f1b02ymr7g6sbt21
42485
42363
2026-06-23T13:26:51Z
Ebube Clara
1134
Ebube Clara moved page [[Egbe Bere Ugo Bere, nke si Ibe ya ebela, nku Kwa us.]] to [[Egbe Bere Ugo Bere, nke si Ibe ya ebela, nku Kwa ya.]]
42363
wikitext
text/x-wiki
==Nkọwa==
Ilu a na-akowa ka onye biri ya kwe ka ibe ya biri
==Mkpọpųta==
==Myiri N'asụsụ Ọzọ==
===Bekee===
This is a word to some people who like to prosper, and leave others to perish.
[[Category:Ilu]]
kkuz1g1hikosyn8f1b02ymr7g6sbt21
Templeeti:temp
10
6463
42996
41872
2006-10-07T08:03:13Z
Wurmz
1403
30907
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
42997
41873
2006-10-25T11:01:43Z
Herman Guthrie
1406
30913
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
42998
41874
2026-06-24T04:37:55Z
King ChristLike
964
2 revisions imported from [[:en:Template:temp]]
30954
wikitext
text/x-wiki
<includeonly><onlyinclude>{{safesubst:<noinclude/>#invoke:template parser/templates|template_link_t}}</onlyinclude></includeonly><!--
-->{{temp|temp}}{{documentation}}
j7pe9fadahr6jqm0fnpuxcxasravo3o
43208
42996
2006-10-07T08:03:13Z
Wurmz
1403
30907
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
43209
42997
2006-10-25T11:01:43Z
Herman Guthrie
1406
30913
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
43210
42998
2026-06-24T04:39:32Z
King ChristLike
964
2 revisions imported from [[:en:Template:temp]]
30954
wikitext
text/x-wiki
<includeonly><onlyinclude>{{safesubst:<noinclude/>#invoke:template parser/templates|template_link_t}}</onlyinclude></includeonly><!--
-->{{temp|temp}}{{documentation}}
j7pe9fadahr6jqm0fnpuxcxasravo3o
43573
43208
2006-10-07T08:03:13Z
Wurmz
1403
30907
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
43574
43209
2006-10-25T11:01:43Z
Herman Guthrie
1406
30913
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
43575
43210
2026-06-24T04:44:02Z
King ChristLike
964
2 revisions imported from [[:en:Template:temp]]
30954
wikitext
text/x-wiki
<includeonly><onlyinclude>{{safesubst:<noinclude/>#invoke:template parser/templates|template_link_t}}</onlyinclude></includeonly><!--
-->{{temp|temp}}{{documentation}}
j7pe9fadahr6jqm0fnpuxcxasravo3o
Module:temp
828
6520
43399
41637
2006-10-07T08:03:13Z
Wurmz
1403
34427
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
43400
41638
2006-10-25T11:01:43Z
Herman Guthrie
1406
34433
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
43401
41639
2026-06-24T04:41:59Z
King ChristLike
964
2 revisions imported from [[:en:Template:temp]]
34474
wikitext
text/x-wiki
<includeonly><onlyinclude>{{safesubst:<noinclude/>#invoke:template parser/templates|template_link_t}}</onlyinclude></includeonly><!--
-->{{temp|temp}}{{documentation}}
j7pe9fadahr6jqm0fnpuxcxasravo3o
Module:yesno
828
6523
43402
34563
2026-06-07T09:07:11Z
Theknightwho
1347
43402
Scribunto
text/plain
-- Function allowing for consistent treatment of boolean-like wikitext input.
-- It works similarly to the template {{yesno}}.
local lower = string.lower
local tonumber = tonumber
local type = type
local yesno
return function (val, default)
if val == nil then
return nil
elseif not yesno then
yesno = {
[true] = true, [false] = false,
["true"] = true, ["false"] = false,
["t"] = true, ["f"] = false,
[1] = true, [0] = false,
["1"] = true, ["0"] = false,
["yes"] = true, ["no"] = false,
["y"] = true, ["n"] = false,
["on"] = true, ["off"] = false,
}
end
local ret = yesno[val]
if ret ~= nil then
return ret
elseif type(val) ~= "string" then
return default
end
-- Catch inputs like "00".
ret = yesno[tonumber(val)]
if ret ~= nil then
return ret
end
-- Case-insensitive.
ret = yesno[lower(val)]
if ret ~= nil then
return ret
end
return default
end
50fw3j6qj6cod4hrcb5leyd15zs34hg
43403
43402
2026-06-24T04:42:00Z
King ChristLike
964
1 revision imported from [[:en:Module:yesno]]
43402
Scribunto
text/plain
-- Function allowing for consistent treatment of boolean-like wikitext input.
-- It works similarly to the template {{yesno}}.
local lower = string.lower
local tonumber = tonumber
local type = type
local yesno
return function (val, default)
if val == nil then
return nil
elseif not yesno then
yesno = {
[true] = true, [false] = false,
["true"] = true, ["false"] = false,
["t"] = true, ["f"] = false,
[1] = true, [0] = false,
["1"] = true, ["0"] = false,
["yes"] = true, ["no"] = false,
["y"] = true, ["n"] = false,
["on"] = true, ["off"] = false,
}
end
local ret = yesno[val]
if ret ~= nil then
return ret
elseif type(val) ~= "string" then
return default
end
-- Catch inputs like "00".
ret = yesno[tonumber(val)]
if ret ~= nil then
return ret
end
-- Case-insensitive.
ret = yesno[lower(val)]
if ret ~= nil then
return ret
end
return default
end
50fw3j6qj6cod4hrcb5leyd15zs34hg
Templeeti:para
10
8068
43211
41609
2019-04-20T23:37:43Z
en>Unknown user
0
41609
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
43212
41615
2026-06-24T04:39:32Z
King ChristLike
964
1 revision imported from [[:en:Template:para]]
41614
wikitext
text/x-wiki
<code>|{{#if:{{{}}}|{{#if:{{{1<includeonly>|</includeonly>}}}|{{{1}}}{{#if:{{{list|}}}|<var>N</var>}}=}}{{{2<includeonly>|</includeonly>}}}|={{{1|}}}}}</code><!--
-->{{#if:{{{3|}}}<!--
-->| ({{#if:{{{req|}}}|'''''required''''', }}{{#if:{{{opt|}}}|''optional'', }}{{{3}}})<!--
-->|{{#if:{{{req|}}}| ('''''required''''')}}{{#if:{{{opt|}}}| (''optional'')}}<!--
-->}}<!--
--><noinclude>{{documentation}}</noinclude>
ila07avdxjfpqibvzqu562e2zqxw53f
43576
43211
2019-04-20T23:37:43Z
en>Unknown user
0
41609
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
43577
43212
2026-06-24T04:44:03Z
King ChristLike
964
1 revision imported from [[:en:Template:para]]
41614
wikitext
text/x-wiki
<code>|{{#if:{{{}}}|{{#if:{{{1<includeonly>|</includeonly>}}}|{{{1}}}{{#if:{{{list|}}}|<var>N</var>}}=}}{{{2<includeonly>|</includeonly>}}}|={{{1|}}}}}</code><!--
-->{{#if:{{{3|}}}<!--
-->| ({{#if:{{{req|}}}|'''''required''''', }}{{#if:{{{opt|}}}|''optional'', }}{{{3}}})<!--
-->|{{#if:{{{req|}}}| ('''''required''''')}}{{#if:{{{opt|}}}| (''optional'')}}<!--
-->}}<!--
--><noinclude>{{documentation}}</noinclude>
ila07avdxjfpqibvzqu562e2zqxw53f
Adaobi
0
8174
42303
42021
2026-06-23T12:00:55Z
Ebube Clara
1134
42303
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ aha kọwara ada eze
===Nkejiasụsụ===
Aha
===Ọmụmatụ===
Adaobi gwụru ọkwu na mmemmé ịri ji
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
==Bekee==
The dauther of a king
[[category:Aha]]
[[Category: Mmadụ]]
nra6ioydbp3xup0kw8u3pt4pbpnxy44
42315
42303
2026-06-23T12:05:13Z
Ebube Clara
1134
42315
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ aha kọwara ada eze
===Nkejiasụsụ===
Aha
===Ọmụmatụ===
Adaobi gwụru ọkwu na mmemmé ịri ji
===Mkpoputa===
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
==Bekee==
The dauther of a king
[[category:Aha]]
[[Category: Mmadụ]]
t01pkfy5wt8wbgmyizs4uv23kx47kur
42316
42315
2026-06-23T12:06:27Z
Ebube Clara
1134
42316
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ aha kọwara ada eze
===Nkejiasụsụ===
Aha
===Ọmụmatụ===
Adaobi gwụru ọkwu na mmemmé ịri ji
===Mkpọpụta===
===Olumba===
==Ntụgharị n'asụsụ ọzọ==
==Bekee==
The dauther of a king
[[category:Aha]]
[[Category: Mmadụ]]
0i82srb73vhi8ta5asmw3l84gjgq76s
Amalachukwu
0
8187
42765
42258
2026-06-24T04:07:26Z
King ChristLike
964
fixed redirect
42765
wikitext
text/x-wiki
#REDIRECT [[Amarachukwu]]
759k36ypys2afzoei4viu9spyg3ep99
Alozie
0
8188
42476
2026-06-23T13:22:06Z
Akwugo
14
Akwugo moved page [[Alozie]] to [[Alọzie]]
42476
wikitext
text/x-wiki
#KÚFÙ [[Alọzie]]
5ot4cidgsjslp460uheaz8zlk1sc4o8
Isi kote ebunu agba ya
0
8189
42484
2026-06-23T13:26:49Z
Akwugo
14
Akwugo moved page [[Isi kote ebunu agba ya]] to [[Isi kote ebu, ọ gbaa ya]]
42484
wikitext
text/x-wiki
#KÚFÙ [[Isi kote ebu, ọ gbaa ya]]
acb3zszdxbzil1e83xsc5p94yl8cgu5
Egbe Bere Ugo Bere, nke si Ibe ya ebela, nku Kwa us.
0
8190
42486
2026-06-23T13:26:51Z
Ebube Clara
1134
Ebube Clara moved page [[Egbe Bere Ugo Bere, nke si Ibe ya ebela, nku Kwa us.]] to [[Egbe Bere Ugo Bere, nke si Ibe ya ebela, nku Kwa ya.]]
42486
wikitext
text/x-wiki
#KÚFÙ [[Egbe Bere Ugo Bere, nke si Ibe ya ebela, nku Kwa ya.]]
2hrekwbxl03n2zolbx77dvj2id2fj7j
Jinwannụnụ
0
8191
42488
2026-06-23T13:27:08Z
IfyClassique
950
Jiri '"""Jinwannụnụ""" ===Nkọwa=== Nke a bụ otu n'ime nri enwere n'ala Igbo. ===Nkejiasụsụ=== Aha ===Ọmụmaatụ=== Jinwannụnụ mara mma na ahu. ===Mkpọpụta=== ===Olumba=== Nduku ==Ntụgharị n'asụsụ ọzọ== ===Bekee=== Potato [[Category:Wiki Loves Names]] [[Category:Aha]] [[Category: Mmadụ]]' kere ihü
42488
wikitext
text/x-wiki
"""Jinwannụnụ"""
===Nkọwa===
Nke a bụ otu n'ime nri enwere n'ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Jinwannụnụ mara mma na ahu.
===Mkpọpụta===
===Olumba===
Nduku
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Potato
[[Category:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
dqetrf5bk88gqr39zzv08rwh7a9kcr2
42573
42488
2026-06-23T13:51:34Z
IfyClassique
950
/* Mkpọpụta */
42573
wikitext
text/x-wiki
"""Jinwannụnụ"""
===Nkọwa===
Nke a bụ otu n'ime nri enwere n'ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Jinwannụnụ mara mma na ahu.
===Mkpọpụta===
File:Ig-Jinwannụnụ.ogg
===Olumba===
Nduku
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Potato
[[Category:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
2gx50wtdnd1blt3fwc1ji4smnbkjgiv
42578
42573
2026-06-23T13:52:46Z
IfyClassique
950
/* Mkpọpụta */
42578
wikitext
text/x-wiki
"""Jinwannụnụ"""
===Nkọwa===
Nke a bụ otu n'ime nri enwere n'ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Jinwannụnụ mara mma na ahu.
===Mkpọpụta===
https://commons.wikimedia.org/wiki/File:Ig-Jinwann%E1%BB%A5n%E1%BB%A5.ogg
===Olumba===
Nduku
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Potato
[[Category:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
c0qg9z96lgrwb5kskoefhge7t1cxh93
42581
42578
2026-06-23T13:53:38Z
IfyClassique
950
/* Mkpọpụta */
42581
wikitext
text/x-wiki
"""Jinwannụnụ"""
===Nkọwa===
Nke a bụ otu n'ime nri enwere n'ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Jinwannụnụ mara mma na ahu.
===Mkpọpụta===
[[https://commons.wikimedia.org/wiki/File:Ig-Jinwann%E1%BB%A5n%E1%BB%A5.ogg Jinwannụnụ]]
===Olumba===
Nduku
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Potato
[[Category:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
d86o95nt05wo7j98j5u09vtoni62pom
42697
42581
2026-06-23T14:24:54Z
Senator Choko
98
/* Mkpọpụta */
42697
wikitext
text/x-wiki
"""Jinwannụnụ"""
===Nkọwa===
Nke a bụ otu n'ime nri enwere n'ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Jinwannụnụ mara mma na ahu.
===Mkpọpụta===
[[File:Ig-Jinwannụnụ.ogg]]
===Olumba===
Nduku
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Potato
[[Category:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
04iinrvdmds3gy1zfyg48dmb63zfzf2
42700
42697
2026-06-23T14:25:39Z
Senator Choko
98
42700
wikitext
text/x-wiki
===Nkọwa==
Nke a bụ otu n'ime nri enwere n'ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Jinwannụnụ mara mma na ahu.
===Mkpọpụta===
[[File:Ig-Jinwannụnụ.ogg]]
===Olumba===
Nduku
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Potato
[[Category:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
o6bqb3au4x2ryjrjw0e02ccgwoeuevc
42706
42700
2026-06-23T14:26:00Z
Senator Choko
98
/* =Nkọwa */
42706
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ otu n'ime nri enwere n'ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Jinwannụnụ mara mma na ahu.
===Mkpọpụta===
[[File:Ig-Jinwannụnụ.ogg]]
===Olumba===
Nduku
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
Potato
[[Category:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
emkw5ene4invjkypqeyqp8apgr6wkke
42712
42706
2026-06-23T14:27:11Z
Senator Choko
98
42712
wikitext
text/x-wiki
==Nkọwa==
Nke a bụ otu n'ime nri enwere n'ala Igbo.
===Nkejiasụsụ===
Aha
===Ọmụmaatụ===
Jinwannụnụ mara mma na ahu.
===Mkpọpụta===
[[File:Ig-Jinwannụnụ.ogg]]
===Olumba===
Nduku
==Ntụgharị n'asụsụ ọzọ==
===Bekee===
[[:en:potato|Potato]]
[[Category:Wiki Loves Names]]
[[Category:Aha]]
[[Category: Mmadụ]]
b49pfj7osb5hixzuvi4lian4jyj3bfj
Egwurugwu
0
8192
42499
2026-06-23T13:32:09Z
Senator Choko
98
Senator Choko moved page [[Egwurugwu]] to [[Eke na Egwurugwu]]: Misspelled title
42499
wikitext
text/x-wiki
#KÚFÙ [[Eke na Egwurugwu]]
9qf18xrucvp1zihojdn59t0cvehnwgr
Ogologo abụghị na nwa m etoola
0
8193
42508
2026-06-23T13:35:13Z
Goodymeraj
496
E mere m ndezi
42508
wikitext
text/x-wiki
==Nkọwa==
A naghị ekpebi ntozu okè na ndụ mmadụ site na ọdịdị anụ ahụ onye ahụ
==Mkpọpụta==
[[File:LL-Q33578 (ibo)-Geraldine Kene (Chiraldine)-Ogologo abughi na nwa m e tola.wav]]
==Myiri n'asụsụ ọzọ==
===Bekee===
Maturity in Life is not determined by the physical appearance (athletic build) of an individual
[[Category: Ilu]]
s4ypb9bis59kgbatqcb0wacrjfck78n
Fio fio
0
8194
42531
2026-06-23T13:39:58Z
Senator Choko
98
Senator Choko moved page [[Fio fio]] to [[Fiọ fiọ]]: Misspelled title
42531
wikitext
text/x-wiki
#KÚFÙ [[Fiọ fiọ]]
prcaf9lnfus65p7u6a9r6qnoj11kyss
Ihe okenye tukwu ana hụ, nwata ria ugwu kasi ibe ya elu, ọgaghi ahụ ya.
0
8195
42560
2026-06-23T13:48:18Z
Akwugo
14
Akwugo moved page [[Ihe okenye tukwu ana hụ, nwata ria ugwu kasi ibe ya elu, ọgaghi ahụ ya.]] to [[Ihe okenye nọ ala hụ, nwata rịa ugwu kasi ibe ya elu, ọgaghị ahụ ya.]]: Misspelled title
42560
wikitext
text/x-wiki
#KÚFÙ [[Ihe okenye nọ ala hụ, nwata rịa ugwu kasi ibe ya elu, ọgaghị ahụ ya.]]
8o8y7m756r3q1fn26gre29mpqniavmi
Ka a na-achu àjà, ka íkpé n'ama ndi mmụọ
0
8196
42629
2026-06-23T14:07:08Z
Goodymeraj
496
Goodymeraj moved page [[Ka a na-achu àjà, ka íkpé n'ama ndi mmụọ]] to [[Ka a na-achu àjà, ka íkpé na-ama ndi mmụọ]]
42629
wikitext
text/x-wiki
#KÚFÙ [[Ka a na-achu àjà, ka íkpé na-ama ndi mmụọ]]
3ne7nwd7hpr1mwdl1rbm0l6b46q1pa8
Agadi nwanyị anaghị aka-nka n’egwu o ma agba
0
8197
42664
2026-06-23T14:15:18Z
Akwugo
14
Akwugo moved page [[Agadi nwanyị anaghị aka-nka n’egwu o ma agba]] to [[Agadi nwanyị anaghị aka-nka n’egwu ọ ma agba]]: Misspelled title
42664
wikitext
text/x-wiki
#KÚFÙ [[Agadi nwanyị anaghị aka-nka n’egwu ọ ma agba]]
ogs0t139a7b02iwwxirybtw4rg2vopn
Agu owulu
0
8198
42674
2026-06-23T14:17:51Z
Akwugo
14
Akwugo moved page [[Agu owulu]] to [[Agụ owulu]]
42674
wikitext
text/x-wiki
#KÚFÙ [[Agụ owulu]]
me9ta00gme9gyimo6f99yhi2g0or38h
Agbacha ọsọ a gụọ milụ
0
8199
42682
2026-06-23T14:21:01Z
Akwugo
14
Akwugo moved page [[Agbacha ọsọ a gụọ milụ]] to [[Agbacha ọsọ agụọ maịlụ]]
42682
wikitext
text/x-wiki
#KÚFÙ [[Agbacha ọsọ agụọ maịlụ]]
pp73d5phq7zcad90uinn3afbnmm58lc
Ūtarï
0
8200
42705
2026-06-23T14:25:54Z
IfyClassique
950
IfyClassique moved page [[Ūtarï]] to [[Utari]]
42705
wikitext
text/x-wiki
#KÚFÙ [[Utari]]
cz5i4k7ks7nqoaa6l3y4q5qjon7ngad
Ukazuegbulam
0
8201
42756
2026-06-23T15:53:56Z
Geraldine Kene
966
Geraldine Kene moved page [[Ukazuegbulam]] to [[Ụkazụegbulam]]: Misspelled title
42756
wikitext
text/x-wiki
#KÚFÙ [[Ụkazụegbulam]]
ojw7ws18kz219ab64zvv71sfjo04nfg
Ukandu
0
8202
42759
2026-06-23T15:56:28Z
Geraldine Kene
966
Geraldine Kene moved page [[Ukandu]] to [[Ụkandụ]]
42759
wikitext
text/x-wiki
#KÚFÙ [[Ụkandụ]]
ow7xfj7ty89tnqjeqay7n87r11g4b6g
Ukamaka
0
8203
42762
2026-06-23T15:58:15Z
Geraldine Kene
966
Geraldine Kene moved page [[Ukamaka]] to [[Ụkamaka]]
42762
wikitext
text/x-wiki
#KÚFÙ [[Ụkamaka]]
q68kg5w3mj4btjdv6vnr2qwfitpk96e
Templeeti:wikidata lexeme
10
8204
42767
2022-11-16T17:35:12Z
Sławobóg
1477
New template
42767
wikitext
text/x-wiki
<div class="sister-wikidata"><div class="sister-project"><div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; text-align: left; float: right;">
<div style="float: left;">[[File:Wikidata lexemes logo symbol square.svg|link=|40px|none|alt=Wikidata Logo]]</div>
<div style="margin-left: 45px;">[[w:Wikidata|Wikidata]] has a [[d:Wikidata:Lexicographical data|Lexeme]] related to:
<div style="margin-left: 10px; line-height:2em;">'''''[[d:Lexeme:{{{1|}}}|{{PAGENAME}} ({{{1}}})]]'''''</div>
</div>
</div>
</div></div><noinclude>{{documentation}}</noinclude>
olyv9fnyp8kaqwks5ya06g2c5gb0fl9
42768
42767
2022-11-16T17:47:04Z
Sławobóg
1477
42768
wikitext
text/x-wiki
<div class="sister-wikidata"><div class="sister-project"><div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; text-align: left; float: right;">
<div style="float: left;">[[File:Wikidata lexemes logo symbol square.svg|link=|40px|none|alt=Wikidata Logo]]</div>
<div style="margin-left: 45px;">[[w:Wikidata|Wikidata]] has a [[d:Wikidata:Lexicographical data|Lexeme]] related to:
<div style="margin-left: 10px; line-height:2em;">'''''[[d:Lexeme:{{{1|}}}|{{{2|{{PAGENAME}}}}} ({{{1}}})]]'''''</div>
</div>
</div>
</div></div><noinclude>{{documentation}}</noinclude>
hyjiztgcrvmi8knuog9ami05wivqy2g
42769
42768
2024-09-10T19:27:41Z
Surjection
380
42769
wikitext
text/x-wiki
<templatestyles src="Module:interproject/style.css" /><div class="sister-wikidata"><div class="sister-project"><div class="noprint floatright interproject-box">
<div style="float: left;">[[File:Wikidata lexemes logo symbol square.svg|link=|40px|none|alt=Wikidata Logo]]</div>
<div style="margin-left: 45px;">[[w:Wikidata|Wikidata]] has a [[d:Wikidata:Lexicographical data|Lexeme]] related to:
<div style="margin-left: 10px; line-height:2em;">'''''[[d:Lexeme:{{{1|}}}|{{{2|{{PAGENAME}}}}} ({{{1}}})]]'''''</div>
</div>
</div>
</div></div><noinclude>{{documentation}}</noinclude>
5u5edi8sw9f89hmdl2h2n1c8fv9ctmo
42770
42769
2025-09-04T19:13:59Z
Surjection
380
42770
wikitext
text/x-wiki
<templatestyles src="Module:interproject/style.css" /><div class="sister-wikidata"><div class="sister-project"><div class="noprint floatright interproject-box">
<div style="float: left;" class="interproject-box-logo">[[File:Wikidata lexemes logo symbol square.svg|link=|x40px|none|alt=Wikidata Logo]]</div>
<div style="margin-left: 45px;">[[w:Wikidata|Wikidata]] has a [[d:Wikidata:Lexicographical data|Lexeme]] related to:
<div style="margin-left: 10px; line-height:2em;">'''''[[d:Lexeme:{{{1|}}}|{{{2|{{PAGENAME}}}}} ({{{1}}})]]'''''</div>
</div>
</div>
</div></div><noinclude>{{documentation}}</noinclude>
szb6yt0pvv7oeguh8ig2vy3sqbn0pam
42771
42770
2025-09-04T19:42:15Z
Surjection
380
42771
wikitext
text/x-wiki
{{interproject-box|sisterclass=wikidata|logo=Wikidata lexemes logo symbol square.svg|logoalt=Wikidata lexemes logo|intro=[[w:Wikidata|Wikidata]] has a [[d:Wikidata:Lexicographical data|Lexeme]] related to|link=''[[d:Lexeme:{{{1|}}}|{{{2|{{PAGENAME}}}}} ({{{1}}})]]''}}<noinclude>{{documentation}}</noinclude>
mghfc0utn3kn5468m8go46d3z5qp3pi
42772
42771
2025-09-04T19:56:40Z
Surjection
380
42772
wikitext
text/x-wiki
{{interproject-box|sisterclass=wikidata|logo=Wikidata lexemes logo symbol square.svg|logoalt=Wikidata lexemes logo|intro=[[w:Wikidata|Wikidata]] has a [[d:Wikidata:Lexicographical data|Lexeme]] related to|link=[[d:Lexeme:{{{1|}}}|{{{2|{{PAGENAME}}}}} ({{{1}}})]]}}<noinclude>{{documentation}}</noinclude>
5cz3mfvpxcpdz45yfwenfuqxzihf670
42773
42772
2025-12-17T23:51:15Z
Immanuelle
1905
adding anchor
42773
wikitext
text/x-wiki
{{interproject-box|sisterclass=wikidata|logo=Wikidata lexemes logo symbol square.svg|logoalt=Wikidata lexemes logo|intro=[[w:Wikidata|Wikidata]] has a [[d:Wikidata:Lexicographical data|Lexeme]] related to|link=[[d:Lexeme:{{{1|}}}|{{{2|{{PAGENAME}}}}} ({{{1}}})]]}}{{Anchor|1}}<noinclude>{{documentation}}</noinclude>
2qvw3l80nvej5t6hmviip6e5lcnu710
42774
42773
2025-12-17T23:53:23Z
Immanuelle
1905
42774
wikitext
text/x-wiki
{{anchor|1}}{{interproject-box|sisterclass=wikidata|logo=Wikidata lexemes logo symbol square.svg|logoalt=Wikidata lexemes logo|intro=[[w:Wikidata|Wikidata]] has a [[d:Wikidata:Lexicographical data|Lexeme]] related to|link=[[d:Lexeme:{{{1|}}}|{{{2|{{PAGENAME}}}}} ({{{1}}})]]}}<noinclude>{{documentation}}</noinclude>
r973fvbdda4ii62mcdn86hljkac1emk
42775
42774
2025-12-17T23:58:04Z
Immanuelle
1905
42775
wikitext
text/x-wiki
{{anchor|1}}
{{interproject-box|sisterclass=wikidata|logo=Wikidata lexemes logo symbol square.svg|logoalt=Wikidata lexemes logo|intro=[[w:Wikidata|Wikidata]] has a [[d:Wikidata:Lexicographical data|Lexeme]] related to|link=[[d:Lexeme:{{{1|}}}|{{{2|{{PAGENAME}}}}} ({{{1}}})]]}}<noinclude>{{documentation}}</noinclude>
eccrfex9flkaj9lyh316fw763dgmry7
42776
42775
2025-12-18T00:01:52Z
Immanuelle
1905
42776
wikitext
text/x-wiki
<div id="{{{1}}}">
{{interproject-box|
{{interproject-box|sisterclass=wikidata|logo=Wikidata lexemes logo symbol square.svg|logoalt=Wikidata lexemes logo|intro=[[w:Wikidata|Wikidata]] has a [[d:Wikidata:Lexicographical data|Lexeme]] related to|link=[[d:Lexeme:{{{1|}}}|{{{2|{{PAGENAME}}}}} ({{{1}}})]]}}</div><noinclude>{{documentation}}</noinclude>
q6qn8o5e8cdcf2ybfpk4c0frrcxr1rk
42777
42776
2025-12-18T00:02:20Z
Immanuelle
1905
42777
wikitext
text/x-wiki
<div id="{{{1}}}">
{{interproject-box|sisterclass=wikidata|logo=Wikidata lexemes logo symbol square.svg|logoalt=Wikidata lexemes logo|intro=[[w:Wikidata|Wikidata]] has a [[d:Wikidata:Lexicographical data|Lexeme]] related to|link=[[d:Lexeme:{{{1|}}}|{{{2|{{PAGENAME}}}}} ({{{1}}})]]}}</div><noinclude>{{documentation}}</noinclude>
hjylme7auircv2hyvuhmihzfozs8wi8
42778
42777
2026-05-19T01:48:13Z
Jlwoodwa
1906
{{[[mw:SUBPAGENAME|SUBPAGENAME]]}} does the right thing in appendices and is otherwise identical
42778
wikitext
text/x-wiki
<div id="{{{1}}}">
{{interproject-box|sisterclass=wikidata|logo=Wikidata lexemes logo symbol square.svg|logoalt=Wikidata lexemes logo|intro=[[w:Wikidata|Wikidata]] has a [[d:Wikidata:Lexicographical data|Lexeme]] related to|link=[[d:Lexeme:{{{1|}}}|{{{2|{{SUBPAGENAME}}}}} ({{{1}}})]]}}</div><noinclude>{{documentation}}</noinclude>
ncpt7w95115vqdpq36os2lxfq6x0tuf
42779
42778
2026-06-06T09:30:49Z
Surjection
380
Protected "[[Template:wikidata lexeme]]": Highly visible template/module ([Edit=Allow only autopatrollers] (indefinite) [Move=Allow only autopatrollers] (indefinite))
42778
wikitext
text/x-wiki
<div id="{{{1}}}">
{{interproject-box|sisterclass=wikidata|logo=Wikidata lexemes logo symbol square.svg|logoalt=Wikidata lexemes logo|intro=[[w:Wikidata|Wikidata]] has a [[d:Wikidata:Lexicographical data|Lexeme]] related to|link=[[d:Lexeme:{{{1|}}}|{{{2|{{SUBPAGENAME}}}}} ({{{1}}})]]}}</div><noinclude>{{documentation}}</noinclude>
ncpt7w95115vqdpq36os2lxfq6x0tuf
42780
42779
2026-06-06T09:32:36Z
Surjection
380
normal anchor breaks if the same lexeme is listed multiple times on a page (we cover multiple languages, not just English, and this template does not appear to be exclusive to English)
42780
wikitext
text/x-wiki
{{interproject-box|sisterclass=wikidata|logo=Wikidata lexemes logo symbol square.svg|logoalt=Wikidata lexemes logo|intro=[[w:Wikidata|Wikidata]] has a [[d:Wikidata:Lexicographical data|Lexeme]] related to|link=[[d:Lexeme:{{{1|}}}|{{{2|{{SUBPAGENAME}}}}} ({{{1}}})]]}}<noinclude>{{documentation}}</noinclude>
977v881f11psk03icfsyn62y24zir0j
42781
42780
2026-06-24T04:29:52Z
King ChristLike
964
14 revisions imported from [[:en:Template:wikidata_lexeme]]
42780
wikitext
text/x-wiki
{{interproject-box|sisterclass=wikidata|logo=Wikidata lexemes logo symbol square.svg|logoalt=Wikidata lexemes logo|intro=[[w:Wikidata|Wikidata]] has a [[d:Wikidata:Lexicographical data|Lexeme]] related to|link=[[d:Lexeme:{{{1|}}}|{{{2|{{SUBPAGENAME}}}}} ({{{1}}})]]}}<noinclude>{{documentation}}</noinclude>
977v881f11psk03icfsyn62y24zir0j
Templeeti:clear
10
8205
42795
2008-02-21T19:04:26Z
NuclearVacuum
1908
Redirecting to [[Template:Clear]]
42795
wikitext
text/x-wiki
#REDIRECT [[Template:Clear]]
321aaofzzzl6ha5uj7sf2v4753r6ydi
42796
42795
2008-02-21T23:10:43Z
Conrad.Irwin
1315
#REDIRECT [[Template:-]] (maybe should {{delete}})
42796
wikitext
text/x-wiki
#REDIRECT [[Template:-]]
8mnf3kxto02k625tj78hpti7lzo60x3
42797
42796
2010-10-10T06:49:17Z
Spl908455
1909
[[cs:Šablona:clear]] [[pl:Szablon:clear]]
42797
wikitext
text/x-wiki
#REDIRECT [[Template:-]]
[[cs:Šablona:clear]]
[[pl:Szablon:clear]]
d7d29e4hhw3rscq53uu6bimqqeng3jl
42798
42797
2026-06-24T04:29:55Z
King ChristLike
964
3 revisions imported from [[:en:Template:clear]]
42797
wikitext
text/x-wiki
#REDIRECT [[Template:-]]
[[cs:Šablona:clear]]
[[pl:Szablon:clear]]
d7d29e4hhw3rscq53uu6bimqqeng3jl
Templeeti:wikidata lexeme/documentation
10
8206
42799
2022-11-16T17:46:04Z
Sławobóg
1477
New doc
42799
wikitext
text/x-wiki
{{documentation subpage}}
Creates a box with a link to structured data on our sister site Wikidata.
== Usage ==
{{wikidata lexeme|L18775|Bicester}}
In most cases, you only need to provide the [[d:Wikidata:Identifiers|Wikidata identifier]] of the lexeme, which consists of the letter <code>L</code> and numbers, eg: <code>L18775</code>. The template call is as follows:
<pre>
{{wikidata lexeme|L18775}}
</pre>
{{clear}}
{{wikidata lexeme|L18775|custom text}}
The text in the box is identical to the page name. If you want to use custom text you can do it as follows:
<pre>
{{wikidata lexeme|L18775|custom text}}
</pre>
<includeonly>
[[Category:Interwiki templates|wikidata]]
</includeonly>
3drzdcg1umhrc9hrmq902uvn9wik166
42800
42799
2022-11-16T17:49:02Z
Sławobóg
1477
/* Usage */
42800
wikitext
text/x-wiki
{{documentation subpage}}
Creates a box with a link to structured data on our sister site Wikidata.
== Usage ==
{{wikidata lexeme|L512|house}}
In most cases, you only need to provide the [[d:Wikidata:Identifiers|Wikidata identifier]] of the lexeme, which consists of the letter <code>L</code> and numbers, eg: <code>L18775</code>. The template call is as follows:
<pre>
{{wikidata lexeme|L512}}
</pre>
{{clear}}
{{wikidata lexeme|L512|custom text}}
The text in the box is identical to the page name. If you want to use custom text you can do it as follows:
<pre>
{{wikidata lexeme|L512|custom text}}
</pre>
<includeonly>
[[Category:Interwiki templates|wikidata]]
</includeonly>
9nbvlutkb5utd3e8i395y4i6sqyxtck
42801
42800
2022-11-16T18:04:13Z
Sławobóg
1477
/* Usage */
42801
wikitext
text/x-wiki
{{documentation subpage}}
Creates a box with a link to structured data on our sister site Wikidata.
== Usage ==
{{wikidata lexeme|L512|house}}
In most cases, you only need to provide the [[d:Wikidata:Identifiers|Wikidata identifier]] of the lexeme, which consists of the letter <code>L</code> and numbers, eg: <code>L512</code>. The template call is as follows:
<pre>
{{wikidata lexeme|L512}}
</pre>
{{clear}}
{{wikidata lexeme|L512|custom text}}
The text in the box is identical to the page name. If you want to use custom text you can do it as follows:
<pre>
{{wikidata lexeme|L512|custom text}}
</pre>
<includeonly>
[[Category:Interwiki templates|wikidata]]
</includeonly>
svxnredekmlckjf4lel5wapunvwfgkz
42802
42801
2023-04-19T10:54:01Z
Jberkel
1376
42802
wikitext
text/x-wiki
{{documentation subpage}}
Creates a box with a link to structured data on our sister site Wikidata.
== Usage ==
{{wikidata lexeme|L512|house}}
In most cases, you only need to provide the [[d:Wikidata:Identifiers|Wikidata identifier]] of the lexeme, which consists of the letter <code>L</code> and numbers, eg: <code>L512</code>. The template call is as follows:
<pre>
{{wikidata lexeme|L512}}
</pre>
{{clear}}
{{wikidata lexeme|L512|custom text}}
The text in the box is identical to the page name. If you want to use custom text you can do it as follows:
<pre>
{{wikidata lexeme|L512|custom text}}
</pre>
<includeonly>
[[Category:Interwiki templates|wikidata]]
[[Category:Wikidata templates]]
</includeonly>
7nfyj1xtqyqxj92s9mbzh11yv6oc7pm
42803
42802
2025-10-17T18:52:39Z
Juwan
804
42803
wikitext
text/x-wiki
{{documentation subpage}}
{{uses lua|interproject}}
{{uses templatestyles|Module:interproject/style.css}}
Creates a box with a link to structured data on our sister site Wikidata.
== Usage ==
{{wikidata lexeme|L512|house}}
In most cases, you only need to provide the [[d:Wikidata:Identifiers|Wikidata identifier]] of the lexeme, which consists of the letter <code>L</code> and numbers, eg: <code>L512</code>. The template call is as follows:
<pre>
{{wikidata lexeme|L512}}
</pre>
{{clear}}
{{wikidata lexeme|L512|custom text}}
The text in the box is identical to the page name. If you want to use custom text you can do it as follows:
<pre>
{{wikidata lexeme|L512|custom text}}
</pre>
<includeonly>
[[Category:Sidebar interwiki link templates]]
[[Category:Wikidata link templates]]
</includeonly>
dnnrra3e980fkyxgbfrc6k1l08rc0df
42804
42803
2026-06-24T04:29:55Z
King ChristLike
964
5 revisions imported from [[:en:Template:wikidata_lexeme/documentation]]
42803
wikitext
text/x-wiki
{{documentation subpage}}
{{uses lua|interproject}}
{{uses templatestyles|Module:interproject/style.css}}
Creates a box with a link to structured data on our sister site Wikidata.
== Usage ==
{{wikidata lexeme|L512|house}}
In most cases, you only need to provide the [[d:Wikidata:Identifiers|Wikidata identifier]] of the lexeme, which consists of the letter <code>L</code> and numbers, eg: <code>L512</code>. The template call is as follows:
<pre>
{{wikidata lexeme|L512}}
</pre>
{{clear}}
{{wikidata lexeme|L512|custom text}}
The text in the box is identical to the page name. If you want to use custom text you can do it as follows:
<pre>
{{wikidata lexeme|L512|custom text}}
</pre>
<includeonly>
[[Category:Sidebar interwiki link templates]]
[[Category:Wikidata link templates]]
</includeonly>
dnnrra3e980fkyxgbfrc6k1l08rc0df
Templeeti:interproject/style.css
10
8207
42805
2024-08-25T20:04:08Z
Surjection
380
Created page with ".interproject-box { font-size: 90%; width: 250px; padding: 4px; text-align: left; background: #f9f9f9; border: solid #aaa 1px; }"
42805
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: #f9f9f9;
border: solid #aaa 1px;
}
7dfrv7k67s8b8r60iym06lbb53sssly
42806
42805
2024-08-25T20:04:14Z
Surjection
380
Protected "[[Module:interproject/style.css]]" ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite))
42805
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: #f9f9f9;
border: solid #aaa 1px;
}
7dfrv7k67s8b8r60iym06lbb53sssly
42807
42806
2024-08-25T20:08:05Z
Surjection
380
make box full-wide and slightly more compact on mobile
42807
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: #f9f9f9;
border: solid #aaa 1px;
}
@media screen and (min-width: 800px) {
.interproject-box {
box-sizing: border-box;
width: 100%;
line-height: 1.5;
}
}
ch55378qkbkomciaoqqbyv00w57jmtl
42808
42807
2024-08-25T20:08:13Z
Surjection
380
42808
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: #f9f9f9;
border: solid #aaa 1px;
}
@media screen and (max-width: 800px) {
.interproject-box {
box-sizing: border-box;
width: 100%;
line-height: 1.5;
}
}
l396552reomuzjsbs09g5aqyljyf41n
42809
42808
2024-08-25T20:09:33Z
Surjection
380
42809
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: #f9f9f9;
border: solid #aaa 1px;
}
@media screen and (max-width: 800px) {
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
h89v4d1p9k36se0ry35jh67vzmxeg6d
42810
42809
2024-08-25T20:18:07Z
Surjection
380
42810
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: #f9f9f9;
border: solid #aaa 1px;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
rdv2x702gofhy2saosqc93gfgzjkyt3
42811
42810
2024-08-25T20:30:08Z
Surjection
380
42811
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: #f9f9f9;
border: solid #aaa 1px;
}
@media screen and (max-width: 639px) { /* >=640px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
qhe8uqifv91enmz7k29xf1qz1w0ngcq
42812
42811
2024-08-25T20:30:45Z
Surjection
380
Undo revision [[Special:Diff/81386802|81386802]] by [[Special:Contributions/Surjection|Surjection]] ([[User talk:Surjection|talk]])
42812
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: #f9f9f9;
border: solid #aaa 1px;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
rdv2x702gofhy2saosqc93gfgzjkyt3
42813
42812
2024-09-09T01:56:03Z
Ioaxxere
1384
--wikt-palette-paleblue
42813
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue);
border: solid #aaa 1px;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
t31ycpj5gncfimf1jlc8occjp7ttxrm
42814
42813
2024-09-10T07:12:17Z
Surjection
380
42814
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue);
border-style: solid;
border-width: 1px;
border-color: #aaa;
}
@media screen { html.skin-theme-clientpref-night .interproject-box { border-color: #555; } }
@media (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .interproject-box { border-color: #555; } }
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
hcdp22ofhse9tf6twhk5xwuraxgqmhx
42815
42814
2024-09-10T07:20:34Z
Surjection
380
42815
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue);
border-style: solid;
border-width: 1px;
/*
works perfectly well on en.wp: https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ReferenceTooltips.css&oldid=1234748639#L-131
but on en.wikt, it just says that "Invalid or unsupported value for property border-color at ..."
border-color: var(--wikt-palette-grey);
*/
border-color: #aaa;
}
/* remove when border-color var works */
@media screen { html.skin-theme-clientpref-night .interproject-box { border-color: #555; } }
@media (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .interproject-box { border-color: #555; } }
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
ft4h0tk84zu3f0s97wr5ow1f8ot6ryi
42816
42815
2024-09-10T07:20:54Z
Surjection
380
42816
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue);
border-style: solid;
border-width: 1px;
/*
works perfectly well on en.wp: https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ReferenceTooltips.css&oldid=1234748639#L-131
but on en.wikt, it just says that "Invalid or unsupported value for property border-color at ..."
but please remember: MediaWiki devs definitely, absolutely do care about more than just Wikipedia
border-color: var(--wikt-palette-grey);
*/
border-color: #aaa;
}
/* remove when border-color var works */
@media screen { html.skin-theme-clientpref-night .interproject-box { border-color: #555; } }
@media (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .interproject-box { border-color: #555; } }
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
ri8yeycm35jbmuq37bz1bjhvykyfshh
42817
42816
2024-09-10T17:44:09Z
Surjection
380
42817
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue);
border-style: solid;
border-width: 1px;
/*
works perfectly well on en.wp: https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ReferenceTooltips.css&oldid=1234748639#L-131
but on en.wikt, it just says that "Invalid or unsupported value for property border-color at ..."
but please remember: MediaWiki devs definitely, absolutely do care about more than just Wikipedia
border-color: var(--wikt-palette-grey, #aaa);
*/
border-color: #aaa;
}
/* remove when border-color var works */
@media screen { html.skin-theme-clientpref-night .interproject-box { border-color: #555; } }
@media (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .interproject-box { border-color: #555; } }
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
louznk5cmixvxf5ctg725qxxhs1zg77
42818
42817
2024-09-10T18:01:17Z
Surjection
380
42818
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue);
border-style: solid;
border-width: 1px;
/*
works perfectly well on en.wp: https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ReferenceTooltips.css&oldid=1234748639#L-131
but on en.wikt, it just says that "Invalid or unsupported value for property border-color at ..."
but please remember: MediaWiki devs definitely, absolutely do care about more than just Wikipedia
border-color: var(--wikt-palette-grey, #aaa);
*/
border-color: #aaa;
}
/* remove when border-color var works */
@media screen { html.skin-theme-clientpref-night .interproject-box { border-color: #555; } }
@media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .interproject-box { border-color: #555; } }
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
e1upwzr8i5iv72broy2htszy95mh73j
42819
42818
2024-09-10T19:18:20Z
Surjection
380
42819
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border-style: solid;
border-width: 1px;
/*
works perfectly well on en.wp: https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ReferenceTooltips.css&oldid=1234748639#L-131
but on en.wikt, it just says that "Invalid or unsupported value for property border-color at ..."
but please remember: MediaWiki devs definitely, absolutely do care about more than just Wikipedia
border-color: var(--wikt-palette-grey, #aaa);
*/
border-color: #aaa;
}
/* remove when border-color var works */
@media screen { html.skin-theme-clientpref-night .interproject-box { border-color: #555; } }
@media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .interproject-box { border-color: #555; } }
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
3sf7xnjh9u6gztjr4xtvm2pcz6xtaxn
42820
42819
2024-09-10T19:22:42Z
Surjection
380
42820
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border-style: solid;
border-width: 1px;
/*
works perfectly well on en.wp: https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ReferenceTooltips.css&oldid=1234748639#L-131
but on en.wikt, it just says that "Invalid or unsupported value for property border-color at ..."
but please remember: MediaWiki devs definitely, absolutely do care about more than just Wikipedia
border-color: var(--wikt-palette-grey, #aaa);
*/
border-color: #aaa;
}
/* remove when border-color var works */
@media screen { html.skin-theme-clientpref-night .interproject-box { border-color: #555; } }
@media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .interproject-box { border-color: #555; } }
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
f7oml9hxwraqtwitqe5at1o5oglpgrk
42821
42820
2024-09-11T10:54:57Z
Surjection
380
42821
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
n803p9gjjebrdwzsq51p3ncs1jerwi8
42822
42821
2025-02-19T03:55:23Z
This, that and the other
894
use flex to vertically center the project logo
42822
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
display: flex;
flex-direction: row;
align-items: center;
}
/* override inline styles */
.interproject-box > div:first-child {
float: none !important;
}
.interproject-box > div:nth-child(2) {
margin-left: 8px !important;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
1wr3g9c8ez2i50k43uh2xf42jxx7lxm
42823
42822
2025-02-19T04:15:16Z
This, that and the other
894
42823
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
display: flex;
flex-direction: row;
align-items: center;
}
/* override inline styles */
.interproject-box > div:first-child {
float: none !important;
flex: none;
}
.interproject-box > div:nth-child(2) {
margin-left: 8px !important;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
c9b0ga3j0mt2rymh1v2nua0qcqpi40j
42824
42823
2025-02-19T04:16:15Z
This, that and the other
894
42824
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
display: flex;
flex-direction: row;
align-items: center;
}
/* override inline styles */
.interproject-box > div:first-child {
float: none !important;
flex: none;
}
.interproject-box > div:nth-child(2) {
margin-left: 0.55em !important;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
gt51g6n5mpneod5i27rzbrj24fy43ot
42825
42824
2025-02-19T04:26:16Z
This, that and the other
894
42825
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
display: flex;
flex-direction: row;
align-items: center;
}
/* override inline styles */
.interproject-box > div:first-child {
float: none !important;
flex: none;
}
.interproject-box > div:nth-child(2) {
margin-left: 0.55em !important;
}
/* allow {{commonscat}} to be smaller in Vector skin */
body.skin-vector .interproject-box .vector-hide {
display: none;
}
body.skin-vector .interproject-box .vector-inline-block {
display: inline-block;
margin-left: 0 !important;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
j4u2oxnm1szkoigs851b6f8z1hal34i
42826
42825
2025-02-19T04:27:05Z
This, that and the other
894
42826
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
display: flex;
flex-direction: row;
align-items: center;
}
/* override inline styles */
.interproject-box > div:first-child {
float: none !important;
flex: none;
}
.interproject-box > div:nth-child(2) {
margin-left: 0.55em !important;
}
/* allow {{commonscat}} to be smaller in Vector skin */
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-hide {
display: none;
}
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-inline-block {
display: inline-block;
margin-left: 0 !important;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
8ayiidzx705dbdng9cswm9yrxpw3n9j
42827
42826
2025-09-04T19:09:59Z
Surjection
380
slightly more padding
42827
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 6px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
display: flex;
flex-direction: row;
align-items: center;
}
/* override inline styles */
.interproject-box > div:first-child {
float: none !important;
flex: none;
}
.interproject-box > div:nth-child(2) {
margin-left: 0.55em !important;
}
/* allow {{commonscat}} to be smaller in Vector skin */
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-hide {
display: none;
}
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-inline-block {
display: inline-block;
margin-left: 0 !important;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
lrrynlmhh2j5uhjcx07vi325lo7xn4b
42828
42827
2025-09-04T19:10:33Z
Surjection
380
42828
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 5px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
display: flex;
flex-direction: row;
align-items: center;
}
/* override inline styles */
.interproject-box > div:first-child {
float: none !important;
flex: none;
}
.interproject-box > div:nth-child(2) {
margin-left: 0.55em !important;
}
/* allow {{commonscat}} to be smaller in Vector skin */
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-hide {
display: none;
}
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-inline-block {
display: inline-block;
margin-left: 0 !important;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
padding: 6px;
}
}
e5fnukyhdi4yqylimgf9eyc96xjbsdx
42829
42828
2025-09-04T19:17:37Z
Surjection
380
42829
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 5px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
display: flex;
flex-direction: row;
align-items: center;
}
.interproject-box-logo {
min-width: 44px;
display: flex;
align-items: center;
justify-content: center;
}
/* override inline styles */
.interproject-box > div:first-child {
float: none !important;
flex: none;
}
.interproject-box > div:nth-child(2) {
margin-left: 0.55em !important;
}
/* allow {{commonscat}} to be smaller in Vector skin */
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-hide {
display: none;
}
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-inline-block {
display: inline-block;
margin-left: 0 !important;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
padding: 6px;
}
}
m9k5xbng6wuwr54i1j6n3x45wmrntyz
42830
42829
2026-06-24T04:29:55Z
King ChristLike
964
25 revisions imported from [[:en:Module:interproject/style.css]]
42829
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 5px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
display: flex;
flex-direction: row;
align-items: center;
}
.interproject-box-logo {
min-width: 44px;
display: flex;
align-items: center;
justify-content: center;
}
/* override inline styles */
.interproject-box > div:first-child {
float: none !important;
flex: none;
}
.interproject-box > div:nth-child(2) {
margin-left: 0.55em !important;
}
/* allow {{commonscat}} to be smaller in Vector skin */
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-hide {
display: none;
}
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-inline-block {
display: inline-block;
margin-left: 0 !important;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
padding: 6px;
}
}
m9k5xbng6wuwr54i1j6n3x45wmrntyz
Templeeti:uses templatestyles
10
8208
42831
2025-08-26T11:18:00Z
Juwan
804
Created page with "<includeonly><onlyinclude>{{safesubst:<noinclude/>#invoke:uses templatestyles|show}}</onlyinclude></includeonly><!-- -->{{documentation}}"
42831
wikitext
text/x-wiki
<includeonly><onlyinclude>{{safesubst:<noinclude/>#invoke:uses templatestyles|show}}</onlyinclude></includeonly><!--
-->{{documentation}}
cevhqmn70jrh97wpwp5mq1htahg5o7j
42832
42831
2026-06-24T04:29:56Z
King ChristLike
964
1 revision imported from [[:en:Template:uses_templatestyles]]
42831
wikitext
text/x-wiki
<includeonly><onlyinclude>{{safesubst:<noinclude/>#invoke:uses templatestyles|show}}</onlyinclude></includeonly><!--
-->{{documentation}}
cevhqmn70jrh97wpwp5mq1htahg5o7j
Templeeti:interproject-box
10
8209
42833
2025-09-04T19:31:25Z
Surjection
380
Created page with "<div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link=|alt=]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span class="Latn" lang="en">|<b class="Latn" lang="en">}}{{{link|}}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interproject-link|}}}..."
42833
wikitext
text/x-wiki
<div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link=|alt=]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span class="Latn" lang="en">|<b class="Latn" lang="en">}}{{{link|}}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interproject-link|}}}|<span class="interProject">{{{interproject-link}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /><noinclude>{{documentation}}</noinclude>
5j9yap8es6bkrvhdbrehvkkgfqkod1g
42834
42833
2025-09-04T19:32:13Z
Surjection
380
42834
wikitext
text/x-wiki
<div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link={{{logolink|}}}|alt=]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span class="Latn" lang="en">|<b class="Latn" lang="en">}}{{{link|}}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interproject-link|}}}|<span class="interProject">{{{interproject-link}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /><noinclude>{{documentation}}</noinclude>
46wl3nvxyx2ga1brvqukguvuojrfaek
42835
42834
2025-09-04T19:33:19Z
Surjection
380
Protected "[[Template:interproject-box]]" ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite))
42834
wikitext
text/x-wiki
<div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link={{{logolink|}}}|alt=]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span class="Latn" lang="en">|<b class="Latn" lang="en">}}{{{link|}}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interproject-link|}}}|<span class="interProject">{{{interproject-link}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /><noinclude>{{documentation}}</noinclude>
46wl3nvxyx2ga1brvqukguvuojrfaek
42836
42835
2025-09-04T19:34:34Z
Surjection
380
42836
wikitext
text/x-wiki
<div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link={{{logolink|}}}|alt={{{logoalt|}}}]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span class="Latn" lang="en">|<b class="Latn" lang="en">}}{{{link|}}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interproject-link|}}}|<span class="interProject">{{{interproject-link}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /><noinclude>{{documentation}}</noinclude>
925yetqy2pdgz47xtehfyf9s65tggcd
42837
42836
2025-09-04T19:39:42Z
Surjection
380
42837
wikitext
text/x-wiki
<div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link={{{logolink|}}}|alt={{{logoalt|}}}]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span class="Latn" lang="en">|<b class="Latn" lang="en">}}{{{link|}}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interprojectlink|}}}|<span class="interProject">{{{interprojectlink}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /><noinclude>{{documentation}}</noinclude>
7cqasuffug2491zugceb12sn1iuj28m
42838
42837
2025-09-04T19:55:05Z
Surjection
380
42838
wikitext
text/x-wiki
<div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link={{{logolink|}}}|alt={{{logoalt|}}}]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span class="Latn" lang="en">|<b class="Latn" lang="en">}}{{#if:{{{noitalic|}}}||<i>}}{{{link|}}}{{#if:{{{noitalic|}}}||</i>}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interprojectlink|}}}|<span class="interProject">{{{interprojectlink}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /><noinclude>{{documentation}}</noinclude>
9f1j5y3rr4dd1d3151swq0yl69e4rrw
42839
42838
2025-09-04T20:06:19Z
Surjection
380
42839
wikitext
text/x-wiki
<div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link={{{logolink|}}}|alt={{{logoalt|}}}]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span {{#if:{{{nolang|}}}|| class="Latn" lang="en"}}>|<b {{#if:{{{nolang|}}}|| class="Latn" lang="en"}}>}}{{#if:{{{noitalic|}}}||<i>}}{{{link|}}}{{#if:{{{noitalic|}}}||</i>}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interprojectlink|}}}|<span class="interProject">{{{interprojectlink}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /><noinclude>{{documentation}}</noinclude>
90ixu8dc1il7uvgipgf39gvspiel96b
42840
42839
2025-09-04T20:24:01Z
Surjection
380
42840
wikitext
text/x-wiki
<includeonly><div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link={{{logolink|}}}|alt={{{logoalt|}}}]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span {{#if:{{{nolang|}}}|| class="Latn" lang="en"}}>|<b {{#if:{{{nolang|}}}|| class="Latn" lang="en"}}>}}{{#if:{{{noitalic|}}}||<i>}}{{{link|}}}{{#if:{{{noitalic|}}}||</i>}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interprojectlink|}}}|<span class="interProject">{{{interprojectlink}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /></includeonly><noinclude>{{interproject-box|logo=Commons-emblem-success.svg|intro=This Wiktionary template has more information on {{FULLPAGENAME}}|link=[[#documentation|{{FULLPAGENAME}}]]}}{{documentation}}</noinclude>
ft76pbbv6gwf49yjgei3klynlmsio3e
42841
42840
2025-09-04T20:25:12Z
Surjection
380
42841
wikitext
text/x-wiki
<includeonly><div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link={{{logolink|}}}|alt={{{logoalt|}}}]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span {{#if:{{{nolang|}}}|| class="Latn" lang="en"}}>|<b {{#if:{{{nolang|}}}|| class="Latn" lang="en"}}>}}{{#if:{{{noitalic|}}}||<i>}}{{{link|}}}{{#if:{{{noitalic|}}}||</i>}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interprojectlink|}}}|<span class="interProject">{{{interprojectlink}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /></includeonly><noinclude>{{interproject-box|logo=Commons-emblem-success.svg|logoalt=Hello, World!|intro=This Wiktionary template has more information on {{FULLPAGENAME}}|link=[[#documentation|{{FULLPAGENAME}}]]}}{{documentation}}</noinclude>
3eoiinhktx1dffstt568c2vkft2svjd
42842
42841
2026-06-24T04:29:56Z
King ChristLike
964
9 revisions imported from [[:en:Template:interproject-box]]
42841
wikitext
text/x-wiki
<includeonly><div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link={{{logolink|}}}|alt={{{logoalt|}}}]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span {{#if:{{{nolang|}}}|| class="Latn" lang="en"}}>|<b {{#if:{{{nolang|}}}|| class="Latn" lang="en"}}>}}{{#if:{{{noitalic|}}}||<i>}}{{{link|}}}{{#if:{{{noitalic|}}}||</i>}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interprojectlink|}}}|<span class="interProject">{{{interprojectlink}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /></includeonly><noinclude>{{interproject-box|logo=Commons-emblem-success.svg|logoalt=Hello, World!|intro=This Wiktionary template has more information on {{FULLPAGENAME}}|link=[[#documentation|{{FULLPAGENAME}}]]}}{{documentation}}</noinclude>
3eoiinhktx1dffstt568c2vkft2svjd
Module:interproject/style.css
828
8210
42844
2024-08-25T20:04:08Z
Surjection
380
Created page with ".interproject-box { font-size: 90%; width: 250px; padding: 4px; text-align: left; background: #f9f9f9; border: solid #aaa 1px; }"
42844
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: #f9f9f9;
border: solid #aaa 1px;
}
7dfrv7k67s8b8r60iym06lbb53sssly
42845
42844
2024-08-25T20:04:14Z
Surjection
380
Protected "[[Module:interproject/style.css]]" ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite))
42844
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: #f9f9f9;
border: solid #aaa 1px;
}
7dfrv7k67s8b8r60iym06lbb53sssly
42846
42845
2024-08-25T20:08:05Z
Surjection
380
make box full-wide and slightly more compact on mobile
42846
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: #f9f9f9;
border: solid #aaa 1px;
}
@media screen and (min-width: 800px) {
.interproject-box {
box-sizing: border-box;
width: 100%;
line-height: 1.5;
}
}
ch55378qkbkomciaoqqbyv00w57jmtl
42847
42846
2024-08-25T20:08:13Z
Surjection
380
42847
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: #f9f9f9;
border: solid #aaa 1px;
}
@media screen and (max-width: 800px) {
.interproject-box {
box-sizing: border-box;
width: 100%;
line-height: 1.5;
}
}
l396552reomuzjsbs09g5aqyljyf41n
42848
42847
2024-08-25T20:09:33Z
Surjection
380
42848
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: #f9f9f9;
border: solid #aaa 1px;
}
@media screen and (max-width: 800px) {
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
h89v4d1p9k36se0ry35jh67vzmxeg6d
42849
42848
2024-08-25T20:18:07Z
Surjection
380
42849
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: #f9f9f9;
border: solid #aaa 1px;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
rdv2x702gofhy2saosqc93gfgzjkyt3
42850
42849
2024-08-25T20:30:08Z
Surjection
380
42850
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: #f9f9f9;
border: solid #aaa 1px;
}
@media screen and (max-width: 639px) { /* >=640px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
qhe8uqifv91enmz7k29xf1qz1w0ngcq
42851
42850
2024-08-25T20:30:45Z
Surjection
380
Undo revision [[Special:Diff/81386802|81386802]] by [[Special:Contributions/Surjection|Surjection]] ([[User talk:Surjection|talk]])
42851
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: #f9f9f9;
border: solid #aaa 1px;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
rdv2x702gofhy2saosqc93gfgzjkyt3
42852
42851
2024-09-09T01:56:03Z
Ioaxxere
1384
--wikt-palette-paleblue
42852
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue);
border: solid #aaa 1px;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
t31ycpj5gncfimf1jlc8occjp7ttxrm
42853
42852
2024-09-10T07:12:17Z
Surjection
380
42853
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue);
border-style: solid;
border-width: 1px;
border-color: #aaa;
}
@media screen { html.skin-theme-clientpref-night .interproject-box { border-color: #555; } }
@media (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .interproject-box { border-color: #555; } }
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
hcdp22ofhse9tf6twhk5xwuraxgqmhx
42854
42853
2024-09-10T07:20:34Z
Surjection
380
42854
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue);
border-style: solid;
border-width: 1px;
/*
works perfectly well on en.wp: https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ReferenceTooltips.css&oldid=1234748639#L-131
but on en.wikt, it just says that "Invalid or unsupported value for property border-color at ..."
border-color: var(--wikt-palette-grey);
*/
border-color: #aaa;
}
/* remove when border-color var works */
@media screen { html.skin-theme-clientpref-night .interproject-box { border-color: #555; } }
@media (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .interproject-box { border-color: #555; } }
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
ft4h0tk84zu3f0s97wr5ow1f8ot6ryi
42855
42854
2024-09-10T07:20:54Z
Surjection
380
42855
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue);
border-style: solid;
border-width: 1px;
/*
works perfectly well on en.wp: https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ReferenceTooltips.css&oldid=1234748639#L-131
but on en.wikt, it just says that "Invalid or unsupported value for property border-color at ..."
but please remember: MediaWiki devs definitely, absolutely do care about more than just Wikipedia
border-color: var(--wikt-palette-grey);
*/
border-color: #aaa;
}
/* remove when border-color var works */
@media screen { html.skin-theme-clientpref-night .interproject-box { border-color: #555; } }
@media (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .interproject-box { border-color: #555; } }
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
ri8yeycm35jbmuq37bz1bjhvykyfshh
42856
42855
2024-09-10T17:44:09Z
Surjection
380
42856
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue);
border-style: solid;
border-width: 1px;
/*
works perfectly well on en.wp: https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ReferenceTooltips.css&oldid=1234748639#L-131
but on en.wikt, it just says that "Invalid or unsupported value for property border-color at ..."
but please remember: MediaWiki devs definitely, absolutely do care about more than just Wikipedia
border-color: var(--wikt-palette-grey, #aaa);
*/
border-color: #aaa;
}
/* remove when border-color var works */
@media screen { html.skin-theme-clientpref-night .interproject-box { border-color: #555; } }
@media (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .interproject-box { border-color: #555; } }
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
louznk5cmixvxf5ctg725qxxhs1zg77
42857
42856
2024-09-10T18:01:17Z
Surjection
380
42857
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue);
border-style: solid;
border-width: 1px;
/*
works perfectly well on en.wp: https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ReferenceTooltips.css&oldid=1234748639#L-131
but on en.wikt, it just says that "Invalid or unsupported value for property border-color at ..."
but please remember: MediaWiki devs definitely, absolutely do care about more than just Wikipedia
border-color: var(--wikt-palette-grey, #aaa);
*/
border-color: #aaa;
}
/* remove when border-color var works */
@media screen { html.skin-theme-clientpref-night .interproject-box { border-color: #555; } }
@media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .interproject-box { border-color: #555; } }
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
e1upwzr8i5iv72broy2htszy95mh73j
42858
42857
2024-09-10T19:18:20Z
Surjection
380
42858
sanitized-css
text/css
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border-style: solid;
border-width: 1px;
/*
works perfectly well on en.wp: https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ReferenceTooltips.css&oldid=1234748639#L-131
but on en.wikt, it just says that "Invalid or unsupported value for property border-color at ..."
but please remember: MediaWiki devs definitely, absolutely do care about more than just Wikipedia
border-color: var(--wikt-palette-grey, #aaa);
*/
border-color: #aaa;
}
/* remove when border-color var works */
@media screen { html.skin-theme-clientpref-night .interproject-box { border-color: #555; } }
@media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .interproject-box { border-color: #555; } }
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
3sf7xnjh9u6gztjr4xtvm2pcz6xtaxn
42859
42858
2024-09-10T19:22:42Z
Surjection
380
42859
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border-style: solid;
border-width: 1px;
/*
works perfectly well on en.wp: https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-ReferenceTooltips.css&oldid=1234748639#L-131
but on en.wikt, it just says that "Invalid or unsupported value for property border-color at ..."
but please remember: MediaWiki devs definitely, absolutely do care about more than just Wikipedia
border-color: var(--wikt-palette-grey, #aaa);
*/
border-color: #aaa;
}
/* remove when border-color var works */
@media screen { html.skin-theme-clientpref-night .interproject-box { border-color: #555; } }
@media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .interproject-box { border-color: #555; } }
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
f7oml9hxwraqtwitqe5at1o5oglpgrk
42860
42859
2024-09-11T10:54:57Z
Surjection
380
42860
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
n803p9gjjebrdwzsq51p3ncs1jerwi8
42861
42860
2025-02-19T03:55:23Z
This, that and the other
894
use flex to vertically center the project logo
42861
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
display: flex;
flex-direction: row;
align-items: center;
}
/* override inline styles */
.interproject-box > div:first-child {
float: none !important;
}
.interproject-box > div:nth-child(2) {
margin-left: 8px !important;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
1wr3g9c8ez2i50k43uh2xf42jxx7lxm
42862
42861
2025-02-19T04:15:16Z
This, that and the other
894
42862
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
display: flex;
flex-direction: row;
align-items: center;
}
/* override inline styles */
.interproject-box > div:first-child {
float: none !important;
flex: none;
}
.interproject-box > div:nth-child(2) {
margin-left: 8px !important;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
c9b0ga3j0mt2rymh1v2nua0qcqpi40j
42863
42862
2025-02-19T04:16:15Z
This, that and the other
894
42863
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
display: flex;
flex-direction: row;
align-items: center;
}
/* override inline styles */
.interproject-box > div:first-child {
float: none !important;
flex: none;
}
.interproject-box > div:nth-child(2) {
margin-left: 0.55em !important;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
gt51g6n5mpneod5i27rzbrj24fy43ot
42864
42863
2025-02-19T04:26:16Z
This, that and the other
894
42864
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
display: flex;
flex-direction: row;
align-items: center;
}
/* override inline styles */
.interproject-box > div:first-child {
float: none !important;
flex: none;
}
.interproject-box > div:nth-child(2) {
margin-left: 0.55em !important;
}
/* allow {{commonscat}} to be smaller in Vector skin */
body.skin-vector .interproject-box .vector-hide {
display: none;
}
body.skin-vector .interproject-box .vector-inline-block {
display: inline-block;
margin-left: 0 !important;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
j4u2oxnm1szkoigs851b6f8z1hal34i
42865
42864
2025-02-19T04:27:05Z
This, that and the other
894
42865
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 4px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
display: flex;
flex-direction: row;
align-items: center;
}
/* override inline styles */
.interproject-box > div:first-child {
float: none !important;
flex: none;
}
.interproject-box > div:nth-child(2) {
margin-left: 0.55em !important;
}
/* allow {{commonscat}} to be smaller in Vector skin */
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-hide {
display: none;
}
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-inline-block {
display: inline-block;
margin-left: 0 !important;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
8ayiidzx705dbdng9cswm9yrxpw3n9j
42866
42865
2025-09-04T19:09:59Z
Surjection
380
slightly more padding
42866
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 6px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
display: flex;
flex-direction: row;
align-items: center;
}
/* override inline styles */
.interproject-box > div:first-child {
float: none !important;
flex: none;
}
.interproject-box > div:nth-child(2) {
margin-left: 0.55em !important;
}
/* allow {{commonscat}} to be smaller in Vector skin */
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-hide {
display: none;
}
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-inline-block {
display: inline-block;
margin-left: 0 !important;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
}
}
lrrynlmhh2j5uhjcx07vi325lo7xn4b
42867
42866
2025-09-04T19:10:33Z
Surjection
380
42867
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 5px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
display: flex;
flex-direction: row;
align-items: center;
}
/* override inline styles */
.interproject-box > div:first-child {
float: none !important;
flex: none;
}
.interproject-box > div:nth-child(2) {
margin-left: 0.55em !important;
}
/* allow {{commonscat}} to be smaller in Vector skin */
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-hide {
display: none;
}
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-inline-block {
display: inline-block;
margin-left: 0 !important;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
padding: 6px;
}
}
e5fnukyhdi4yqylimgf9eyc96xjbsdx
42868
42867
2025-09-04T19:17:37Z
Surjection
380
42868
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 5px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
display: flex;
flex-direction: row;
align-items: center;
}
.interproject-box-logo {
min-width: 44px;
display: flex;
align-items: center;
justify-content: center;
}
/* override inline styles */
.interproject-box > div:first-child {
float: none !important;
flex: none;
}
.interproject-box > div:nth-child(2) {
margin-left: 0.55em !important;
}
/* allow {{commonscat}} to be smaller in Vector skin */
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-hide {
display: none;
}
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-inline-block {
display: inline-block;
margin-left: 0 !important;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
padding: 6px;
}
}
m9k5xbng6wuwr54i1j6n3x45wmrntyz
42869
42868
2026-06-24T04:31:03Z
King ChristLike
964
25 revisions imported from [[:en:Module:interproject/style.css]]
42868
sanitized-css
text/css
/* note: these styles are also used by some legacy templates that do not use the module. thus a full redesign should probably use a new class. */
.interproject-box {
font-size: 90%;
width: 250px;
padding: 5px;
text-align: left;
background: var(--wikt-palette-paleblue, #f9f9f9);
border: var(--border-color-base, #aaa) 1px solid;
display: flex;
flex-direction: row;
align-items: center;
}
.interproject-box-logo {
min-width: 44px;
display: flex;
align-items: center;
justify-content: center;
}
/* override inline styles */
.interproject-box > div:first-child {
float: none !important;
flex: none;
}
.interproject-box > div:nth-child(2) {
margin-left: 0.55em !important;
}
/* allow {{commonscat}} to be smaller in Vector skin */
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-hide {
display: none;
}
body.skin-vector:not(.skin-vector-2022) .interproject-box .vector-inline-block {
display: inline-block;
margin-left: 0 !important;
}
@media screen and (max-width: 719px) { /* >=720px is the crossover point for floats to work */
.interproject-box {
box-sizing: border-box;
line-height: 1.5;
width: 100%;
max-width: 100%;
padding: 6px;
}
}
m9k5xbng6wuwr54i1j6n3x45wmrntyz
Module:commonscat
828
8211
42870
2025-10-17T17:55:07Z
Juwan
804
Juwan moved page [[Template:commonscat]] to [[Template:commons category]]: Standardize title: [[Wiktionary:Grease pit/2025/September#Cleanup of interwiki templates]]
42870
wikitext
text/x-wiki
#REDIRECT [[Template:commons category]]
hcfn5d8y16ng72uhtyvlte4cux6nofs
42871
42870
2026-06-24T04:31:03Z
King ChristLike
964
1 revision imported from [[:en:Template:commonscat]]
42870
wikitext
text/x-wiki
#REDIRECT [[Template:commons category]]
hcfn5d8y16ng72uhtyvlte4cux6nofs
Module:interproject-box
828
8212
42872
2025-09-04T19:31:25Z
Surjection
380
Created page with "<div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link=|alt=]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span class="Latn" lang="en">|<b class="Latn" lang="en">}}{{{link|}}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interproject-link|}}}..."
42872
wikitext
text/x-wiki
<div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link=|alt=]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span class="Latn" lang="en">|<b class="Latn" lang="en">}}{{{link|}}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interproject-link|}}}|<span class="interProject">{{{interproject-link}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /><noinclude>{{documentation}}</noinclude>
5j9yap8es6bkrvhdbrehvkkgfqkod1g
42873
42872
2025-09-04T19:32:13Z
Surjection
380
42873
wikitext
text/x-wiki
<div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link={{{logolink|}}}|alt=]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span class="Latn" lang="en">|<b class="Latn" lang="en">}}{{{link|}}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interproject-link|}}}|<span class="interProject">{{{interproject-link}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /><noinclude>{{documentation}}</noinclude>
46wl3nvxyx2ga1brvqukguvuojrfaek
42874
42873
2025-09-04T19:33:19Z
Surjection
380
Protected "[[Template:interproject-box]]" ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite))
42873
wikitext
text/x-wiki
<div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link={{{logolink|}}}|alt=]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span class="Latn" lang="en">|<b class="Latn" lang="en">}}{{{link|}}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interproject-link|}}}|<span class="interProject">{{{interproject-link}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /><noinclude>{{documentation}}</noinclude>
46wl3nvxyx2ga1brvqukguvuojrfaek
42875
42874
2025-09-04T19:34:34Z
Surjection
380
42875
wikitext
text/x-wiki
<div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link={{{logolink|}}}|alt={{{logoalt|}}}]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span class="Latn" lang="en">|<b class="Latn" lang="en">}}{{{link|}}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interproject-link|}}}|<span class="interProject">{{{interproject-link}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /><noinclude>{{documentation}}</noinclude>
925yetqy2pdgz47xtehfyf9s65tggcd
42876
42875
2025-09-04T19:39:42Z
Surjection
380
42876
wikitext
text/x-wiki
<div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link={{{logolink|}}}|alt={{{logoalt|}}}]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span class="Latn" lang="en">|<b class="Latn" lang="en">}}{{{link|}}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interprojectlink|}}}|<span class="interProject">{{{interprojectlink}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /><noinclude>{{documentation}}</noinclude>
7cqasuffug2491zugceb12sn1iuj28m
42877
42876
2025-09-04T19:55:05Z
Surjection
380
42877
wikitext
text/x-wiki
<div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link={{{logolink|}}}|alt={{{logoalt|}}}]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span class="Latn" lang="en">|<b class="Latn" lang="en">}}{{#if:{{{noitalic|}}}||<i>}}{{{link|}}}{{#if:{{{noitalic|}}}||</i>}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interprojectlink|}}}|<span class="interProject">{{{interprojectlink}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /><noinclude>{{documentation}}</noinclude>
9f1j5y3rr4dd1d3151swq0yl69e4rrw
42878
42877
2025-09-04T20:06:19Z
Surjection
380
42878
wikitext
text/x-wiki
<div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link={{{logolink|}}}|alt={{{logoalt|}}}]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span {{#if:{{{nolang|}}}|| class="Latn" lang="en"}}>|<b {{#if:{{{nolang|}}}|| class="Latn" lang="en"}}>}}{{#if:{{{noitalic|}}}||<i>}}{{{link|}}}{{#if:{{{noitalic|}}}||</i>}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interprojectlink|}}}|<span class="interProject">{{{interprojectlink}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /><noinclude>{{documentation}}</noinclude>
90ixu8dc1il7uvgipgf39gvspiel96b
42879
42878
2025-09-04T20:24:01Z
Surjection
380
42879
wikitext
text/x-wiki
<includeonly><div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link={{{logolink|}}}|alt={{{logoalt|}}}]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span {{#if:{{{nolang|}}}|| class="Latn" lang="en"}}>|<b {{#if:{{{nolang|}}}|| class="Latn" lang="en"}}>}}{{#if:{{{noitalic|}}}||<i>}}{{{link|}}}{{#if:{{{noitalic|}}}||</i>}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interprojectlink|}}}|<span class="interProject">{{{interprojectlink}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /></includeonly><noinclude>{{interproject-box|logo=Commons-emblem-success.svg|intro=This Wiktionary template has more information on {{FULLPAGENAME}}|link=[[#documentation|{{FULLPAGENAME}}]]}}{{documentation}}</noinclude>
ft76pbbv6gwf49yjgei3klynlmsio3e
42880
42879
2025-09-04T20:25:12Z
Surjection
380
42880
wikitext
text/x-wiki
<includeonly><div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link={{{logolink|}}}|alt={{{logoalt|}}}]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span {{#if:{{{nolang|}}}|| class="Latn" lang="en"}}>|<b {{#if:{{{nolang|}}}|| class="Latn" lang="en"}}>}}{{#if:{{{noitalic|}}}||<i>}}{{{link|}}}{{#if:{{{noitalic|}}}||</i>}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interprojectlink|}}}|<span class="interProject">{{{interprojectlink}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /></includeonly><noinclude>{{interproject-box|logo=Commons-emblem-success.svg|logoalt=Hello, World!|intro=This Wiktionary template has more information on {{FULLPAGENAME}}|link=[[#documentation|{{FULLPAGENAME}}]]}}{{documentation}}</noinclude>
3eoiinhktx1dffstt568c2vkft2svjd
42881
42880
2026-06-24T04:31:04Z
King ChristLike
964
9 revisions imported from [[:en:Template:interproject-box]]
42880
wikitext
text/x-wiki
<includeonly><div class="interproject-box {{#if:{{{sisterclass|}}}|sister-{{{sisterclass}}}}} sister-project noprint floatright"><div style="float: left;" class="interproject-box-logo">[[File:{{{logo}}}|{{{logosize|x40px}}}|none|link={{{logolink|}}}|alt={{{logoalt|}}}]]</div><div style="margin-left: 60px;">{{{intro}}}:<div style="margin-left: 10px;">{{#if:{{{nobold|}}}|<span {{#if:{{{nolang|}}}|| class="Latn" lang="en"}}>|<b {{#if:{{{nolang|}}}|| class="Latn" lang="en"}}>}}{{#if:{{{noitalic|}}}||<i>}}{{{link|}}}{{#if:{{{noitalic|}}}||</i>}}{{#if:{{{nobold|}}}|</span>|</b>}}</div></div>{{#if:{{{interprojectlink|}}}|<span class="interProject">{{{interprojectlink}}}</span>}}</div><templatestyles src="Module:interproject/style.css" /></includeonly><noinclude>{{interproject-box|logo=Commons-emblem-success.svg|logoalt=Hello, World!|intro=This Wiktionary template has more information on {{FULLPAGENAME}}|link=[[#documentation|{{FULLPAGENAME}}]]}}{{documentation}}</noinclude>
3eoiinhktx1dffstt568c2vkft2svjd
Module:commons category
828
8213
42882
2005-07-03T15:07:03Z
84.121.3.154
42882
wikitext
text/x-wiki
<div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; spacing: 0px; text-align: left; float: right;">
<div style="float: left;">[[Image:Commons-logo.png|50px|none|Commons:Category]]</div>
<div style="margin-left: 60px;">[[Wikimedia Commons]] has more media related to:
<div style="margin-left: 10px;">'''''[[Commons:Category:{{{1}}}|{{{1}}}]]'''''</div>
</div>
</div>
ooansqxjg7zrayjoue34dhic82bk4xl
42883
42882
2005-07-03T15:10:38Z
24
1679
[[Template:Commonscat]] moved to [[Template:commonscat]]
42882
wikitext
text/x-wiki
<div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; spacing: 0px; text-align: left; float: right;">
<div style="float: left;">[[Image:Commons-logo.png|50px|none|Commons:Category]]</div>
<div style="margin-left: 60px;">[[Wikimedia Commons]] has more media related to:
<div style="margin-left: 10px;">'''''[[Commons:Category:{{{1}}}|{{{1}}}]]'''''</div>
</div>
</div>
ooansqxjg7zrayjoue34dhic82bk4xl
42884
42883
2005-10-08T22:21:34Z
84.131.75.183
42884
wikitext
text/x-wiki
<div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; spacing: 0px; text-align: left; float: right;">
<div style="float: left;">[[Image:Commons-logo.svg|50px|none|Commons:Category]]</div>
<div style="margin-left: 60px;">[[Wikimedia Commons]] has more media related to:
<div style="margin-left: 10px;">'''''[[Commons:Category:{{{1}}}|{{{1}}}]]'''''</div>
</div>
</div>
55bxhd914su5ehhn85njys9ab6lqvio
42885
42884
2006-05-03T16:51:42Z
Vildricianus
1301
42885
wikitext
text/x-wiki
<div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; spacing: 0px; text-align: left; float: right;">
<div style="float: left;">[[Image:Commons-logo.svg|50px|none|Commons:Category]]</div>
<div style="margin-left: 60px;">[[commons:Main_Page|Wikimedia Commons]] has more media related to:
<div style="margin-left: 10px;">'''''[[Commons:Category:{{{1}}}|{{{1}}}]]'''''</div>
</div>
</div>
emlifl5yz13mzvxqpwdinkozemrtq6k
42886
42885
2006-08-19T04:02:13Z
Fabartus
1848
Fx default per normal interwiki operations. Needs no argument this way.
42886
wikitext
text/x-wiki
<div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; spacing: 0px; text-align: left; float: right;">
<div style="float: left;">[[Image:Commons-logo.svg|50px|none|Commons:Category]]</div>
<div style="margin-left: 60px;">[[commons:Main_Page|Wikimedia Commons]] has more media related to:
<div style="margin-left: 10px;">'''''[[Commons:Category:{{{1}}}|{{{PAGENAME}}}]]'''''</div>
</div>
</div>
dvti5wa5fr4sv9lt404z1af90ly7iwu
42887
42886
2006-08-19T04:06:33Z
Fabartus
1848
Fx default per normal interwiki operations. Needs no argument this way.
42887
wikitext
text/x-wiki
<div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; spacing: 0px; text-align: left; float: right;">
<div style="float: left;">[[Image:Commons-logo.svg|50px|none|Commons:Category]]</div>
<div style="margin-left: 60px;">[[commons:Main_Page|Wikimedia Commons]] has more media related to:
<div style="margin-left: 10px;">'''''[[Commons:Category:{{{1}}}|{{{PAGENAME}}}]]'''''</div>
</div>
</div><noinclude>{{-}}
{|<!--- this trick allows the template to float left --->
!{{Wikiptmp}}
|}
==Usage==
Links to arg1 or defaults to link to page name on {{w2|the commons}}.
[[category:interwiki link templates]]
</noinclude>
bnxf66g3zss6p10pjcu7k0zd16zcifc
42888
42887
2006-08-19T04:10:29Z
Fabartus
1848
try again
42888
wikitext
text/x-wiki
<div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; spacing: 0px; text-align: left; float: right;">
<div style="float: left;">[[Image:Commons-logo.svg|50px|none|Commons:Category]]</div>
<div style="margin-left: 60px;">[[commons:Main_Page|Wikimedia Commons]] has more media related to:
<div style="margin-left: 10px;">'''''[[Commons:Category:{{{1}}}|{{PAGENAME}}]]'''''</div>
</div>
</div><noinclude>{{-}}
{|<!--- this trick allows the template to float left --->
!{{Wikiptmp}}
|}
==Usage==
Links to arg1 or defaults to link to page name on {{w2|the commons}}.
[[category:interwiki link templates]]
</noinclude>
b3bii86m814dboqslbepr46htylpwd7
42889
42888
2006-11-05T14:13:50Z
Connel MacKenzie
1302
Reverted edits by [[Special:Contributions/Fabartus|Fabartus]] ([[User_talk:Fabartus|Talk]]); changed back to last version by [[User:Vildricianus|Vildricianus]]
42889
wikitext
text/x-wiki
<div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; spacing: 0px; text-align: left; float: right;">
<div style="float: left;">[[Image:Commons-logo.svg|50px|none|Commons:Category]]</div>
<div style="margin-left: 60px;">[[commons:Main_Page|Wikimedia Commons]] has more media related to:
<div style="margin-left: 10px;">'''''[[Commons:Category:{{{1}}}|{{{1}}}]]'''''</div>
</div>
</div>
emlifl5yz13mzvxqpwdinkozemrtq6k
42890
42889
2008-11-14T18:03:16Z
Jackofclubs
1493
42890
wikitext
text/x-wiki
<div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; spacing: 0px; text-align: left; float: right;">
<div style="float: left;">[[Image:Commons-logo.svg|50px|none|Commons:Category]]</div>
<div style="margin-left: 60px;">[[commons:Main_Page|Wikimedia Commons]] has more media related to:
<div style="margin-left: 10px;">'''''[[Commons:Category:{{{1}}}|{{{1}}}]]'''''</div>
</div>
</div>
<noinclude>
[[Category:Interwiki templates|{{PAGENAME}}]]
</noinclude>
b9opbnq1vn7q08kyb63mechgt5qx6ok
42891
42890
2008-11-14T18:24:16Z
Jackofclubs
1493
rm etra line
42891
wikitext
text/x-wiki
<div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; spacing: 0px; text-align: left; float: right;">
<div style="float: left;">[[Image:Commons-logo.svg|50px|none|Commons:Category]]</div>
<div style="margin-left: 60px;">[[commons:Main_Page|Wikimedia Commons]] has more media related to:
<div style="margin-left: 10px;">'''''[[Commons:Category:{{{1}}}|{{{1}}}]]'''''</div>
</div>
</div><noinclude>
[[Category:Interwiki templates|{{PAGENAME}}]]
</noinclude>
tu6o7b1q7qe4v2q5ujlo9160jxa1xb5
42892
42891
2010-01-25T14:54:03Z
BRUTE
1910
+ka
42892
wikitext
text/x-wiki
<div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; spacing: 0px; text-align: left; float: right;">
<div style="float: left;">[[Image:Commons-logo.svg|50px|none|Commons:Category]]</div>
<div style="margin-left: 60px;">[[commons:Main_Page|Wikimedia Commons]] has more media related to:
<div style="margin-left: 10px;">'''''[[Commons:Category:{{{1}}}|{{{1}}}]]'''''</div>
</div>
</div><noinclude>
[[Category:Interwiki templates|{{PAGENAME}}]]
[[ka:თარგი:Commons cat]]
</noinclude>
agdvlc1cbdih196brj8ye159hqfoqg5
42893
42892
2010-04-06T15:15:42Z
EncycloPetey
1321
Reverted edits by [[Special:Contributions/BRUTE|BRUTE]] ([[User_talk:BRUTE|Talk]]); changed back to last version by [[User:Jackofclubs|Jackofclubs]]
42893
wikitext
text/x-wiki
<div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; spacing: 0px; text-align: left; float: right;">
<div style="float: left;">[[Image:Commons-logo.svg|50px|none|Commons:Category]]</div>
<div style="margin-left: 60px;">[[commons:Main_Page|Wikimedia Commons]] has more media related to:
<div style="margin-left: 10px;">'''''[[Commons:Category:{{{1}}}|{{{1}}}]]'''''</div>
</div>
</div><noinclude>
[[Category:Interwiki templates|{{PAGENAME}}]]
</noinclude>
tu6o7b1q7qe4v2q5ujlo9160jxa1xb5
42894
42893
2010-04-06T15:16:02Z
EncycloPetey
1321
Protected "[[Template:commonscat]]": Highly visible template ([edit=sysop] (indefinite) [move=sysop] (indefinite))
42893
wikitext
text/x-wiki
<div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; spacing: 0px; text-align: left; float: right;">
<div style="float: left;">[[Image:Commons-logo.svg|50px|none|Commons:Category]]</div>
<div style="margin-left: 60px;">[[commons:Main_Page|Wikimedia Commons]] has more media related to:
<div style="margin-left: 10px;">'''''[[Commons:Category:{{{1}}}|{{{1}}}]]'''''</div>
</div>
</div><noinclude>
[[Category:Interwiki templates|{{PAGENAME}}]]
</noinclude>
tu6o7b1q7qe4v2q5ujlo9160jxa1xb5
42895
42894
2011-05-18T16:52:24Z
Mglovesfun
1369
default to {{ucfirst:{{PAGENAME}}}} (the current page name with an initial capital letter)
42895
wikitext
text/x-wiki
<div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; spacing: 0px; text-align: left; float: right;">
<div style="float: left;">[[Image:Commons-logo.svg|50px|none|Commons:Category]]</div>
<div style="margin-left: 60px;">[[commons:Main_Page|Wikimedia Commons]] has more media related to:
<div style="margin-left: 10px;">'''''[[Commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|{{{1|{{ucfirst:{{PAGENAME}}}}}}}]]'''''</div>
</div>
</div><noinclude>
[[Category:Interwiki templates|{{PAGENAME}}]]
</noinclude>
eefq3zqfih08pc4yiyjdfisqptf73l5
42896
42895
2011-05-18T17:11:12Z
Mglovesfun
1369
documentation
42896
wikitext
text/x-wiki
<div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; spacing: 0px; text-align: left; float: right;">
<div style="float: left;">[[Image:Commons-logo.svg|50px|none|Commons:Category]]</div>
<div style="margin-left: 60px;">[[commons:Main_Page|Wikimedia Commons]] has more media related to:
<div style="margin-left: 10px;">'''''[[Commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|{{{1|{{ucfirst:{{PAGENAME}}}}}}}]]'''''</div>
</div>
</div><noinclude>{{documentation}}[[Category:Interwiki templates|commonscat]]</noinclude>
haswozmz31e6erpbpzp8etajc4g43kg
42897
42896
2016-10-25T17:37:14Z
TheDaveRoss
1305
Changed protection level for "[[Template:commonscat]]": Adjusting the protection level from 'sysop' to 'template editor'. ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefin...
42896
wikitext
text/x-wiki
<div class="noprint" style="clear: right; border: solid #aaa 1px; margin: 0 0 1em 1em; font-size: 90%; background: #f9f9f9; width: 250px; padding: 4px; spacing: 0px; text-align: left; float: right;">
<div style="float: left;">[[Image:Commons-logo.svg|50px|none|Commons:Category]]</div>
<div style="margin-left: 60px;">[[commons:Main_Page|Wikimedia Commons]] has more media related to:
<div style="margin-left: 10px;">'''''[[Commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|{{{1|{{ucfirst:{{PAGENAME}}}}}}}]]'''''</div>
</div>
</div><noinclude>{{documentation}}[[Category:Interwiki templates|commonscat]]</noinclude>
haswozmz31e6erpbpzp8etajc4g43kg
42898
42897
2024-09-10T19:25:52Z
Surjection
380
42898
wikitext
text/x-wiki
<templatestyles src="Module:interproject/style.css" /><div class="noprint floatright interproject-box">
<div style="float: left;">[[Image:Commons-logo.svg|50px|none|Commons:Category]]</div>
<div style="margin-left: 60px;">[[commons:Main_Page|Wikimedia Commons]] has more media related to:
<div style="margin-left: 10px;">'''''[[Commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|{{{1|{{ucfirst:{{PAGENAME}}}}}}}]]'''''</div>
</div>
</div><noinclude>{{documentation}}[[Category:Interwiki templates|commonscat]]</noinclude>
13v7sp06qvmigcxl5c3dju5lfc2v47q
42899
42898
2025-02-19T04:13:31Z
This, that and the other
894
bring in features from [[Template:Commonscat]]
42899
wikitext
text/x-wiki
<templatestyles src="Module:interproject/style.css" /><div class="noprint floatright interproject-box">
<div>[[Image:Commons-logo.svg|50px|none|link=commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}]]</div>
<div>[[commons:Main_Page|Wikimedia Commons]] has more media related to:
<div style="margin-left: 10px;">{{#ifeq:{{{3|}}}|ni||''}}'''[[commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|{{{2|{{{1|{{ucfirst:{{PAGENAME}}}}}}}}}}]]'''{{#ifeq:{{{3|}}}|ni||''}}</div>
</div>
</div><noinclude>{{documentation}}[[Category:Interwiki templates|commonscat]]</noinclude>
01ufm056y9kque3s46n87aiswtg5p13
42900
42899
2025-02-19T04:20:03Z
This, that and the other
894
line up logo with other sister project boxes
42900
wikitext
text/x-wiki
<templatestyles src="Module:interproject/style.css" /><div class="noprint floatright interproject-box">
<div style="width: 50px; text-align: center">[[Image:Commons-logo.svg|34px|none|link=commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}]]</div>
<div>[[commons:|Wikimedia Commons]] has images and media related to:
<div style="margin-left: 10px;">{{#ifeq:{{{3|}}}|ni||''}}'''[[commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|{{{2|{{{1|{{ucfirst:{{PAGENAME}}}}}}}}}}]]'''{{#ifeq:{{{3|}}}|ni||''}}</div>
</div>
</div><noinclude>{{documentation}}[[Category:Interwiki templates|commonscat]]</noinclude>
0d7drxv2fypd0yh785v2btprk1vm0fp
42901
42900
2025-02-19T04:25:14Z
This, that and the other
894
compromise for DCDuring
42901
wikitext
text/x-wiki
<templatestyles src="Module:interproject/style.css" /><div class="noprint floatright interproject-box">
<div style="width: 50px; text-align: center">[[Image:Commons-logo.svg|34px|none|link=commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}]]</div>
<div>[[commons:|Wikimedia Commons]] has <span class="vector-hide">images and</span> media related to:
<div style="margin-left: 10px;" class="vector-inline-block">{{#ifeq:{{{3|}}}|ni||''}}'''[[commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|{{{2|{{{1|{{ucfirst:{{PAGENAME}}}}}}}}}}]]'''{{#ifeq:{{{3|}}}|ni||''}}</div>
</div>
</div><noinclude>{{documentation}}[[Category:Interwiki templates|commonscat]]</noinclude>
qug11o8uudbezqgy4jsvthy36yab987
42902
42901
2025-02-19T04:38:09Z
This, that and the other
894
44px to match {{wikipedia}}
42902
wikitext
text/x-wiki
<templatestyles src="Module:interproject/style.css" /><div class="noprint floatright interproject-box">
<div style="width: 44px; text-align: center">[[Image:Commons-logo.svg|34px|none|link=commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}]]</div>
<div>[[commons:|Wikimedia Commons]] has <span class="vector-hide">images and</span> media related to:
<div style="margin-left: 10px;" class="vector-inline-block">{{#ifeq:{{{3|}}}|ni||''}}'''[[commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|{{{2|{{{1|{{ucfirst:{{PAGENAME}}}}}}}}}}]]'''{{#ifeq:{{{3|}}}|ni||''}}</div>
</div>
</div><noinclude>{{documentation}}[[Category:Interwiki templates|commonscat]]</noinclude>
nn22rxvs05hw9ych8lev7yhf2lmgbrq
42903
42902
2025-05-13T23:16:08Z
Koavf
8
Images _are_ media and this is evidently hidden from the most popular skin anyway.
42903
wikitext
text/x-wiki
<templatestyles src="Module:interproject/style.css" /><div class="noprint floatright interproject-box">
<div style="width: 44px; text-align: center">[[File:Commons-logo.svg|34px|none|link=commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}]]</div>
<div>[[c:|Wikimedia Commons]] has media related to:
<div style="margin-left: 10px;" class="vector-inline-block">{{#ifeq:{{{3|}}}|ni||''}}'''[[c:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|{{{2|{{{1|{{ucfirst:{{PAGENAME}}}}}}}}}}]]'''{{#ifeq:{{{3|}}}|ni||''}}</div>
</div>
</div><noinclude>{{documentation}}[[Category:Interwiki templates|commonscat]]</noinclude>
9oi0ql29f17i5lp86ti8shb4b4017n2
42904
42903
2025-09-04T19:14:30Z
Surjection
380
42904
wikitext
text/x-wiki
<templatestyles src="Module:interproject/style.css" /><div class="noprint floatright interproject-box">
<div style="float: left; text-align: center;" class="interproject-box-logo">[[File:Commons-logo.svg|x40px|none|link=commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}]]</div>
<div>[[c:|Wikimedia Commons]] has media related to:
<div style="margin-left: 10px;" class="vector-inline-block">{{#ifeq:{{{3|}}}|ni||''}}'''[[c:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|{{{2|{{{1|{{ucfirst:{{PAGENAME}}}}}}}}}}]]'''{{#ifeq:{{{3|}}}|ni||''}}</div>
</div>
</div><noinclude>{{documentation}}[[Category:Interwiki templates|commonscat]]</noinclude>
mudj9db0ymnwkoyg2if7sfifshsraaa
42905
42904
2025-09-04T19:33:32Z
Surjection
380
42905
wikitext
text/x-wiki
{{interproject-box|logo=Commons-logo.svg|logolink=commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}|intro=[[c:|Wikimedia Commons]] has media related to|link={{#ifeq:{{{3|}}}|ni||''}}'''[[c:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|{{{2|{{{1|{{ucfirst:{{PAGENAME}}}}}}}}}}]]'''{{#ifeq:{{{3|}}}|ni||''}}}}<noinclude>{{documentation}}[[Category:Interwiki templates|commonscat]]</noinclude>
3mnr0ok2j8ij5pbuktv0n4ko4hw5svh
42906
42905
2025-09-04T19:37:26Z
Surjection
380
42906
wikitext
text/x-wiki
{{interproject-box|logo=Commons-logo.svg|logolink=commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}|intro=[[c:|Wikimedia Commons]] has media related to|link={{#ifeq:{{{3|}}}|ni||''}}[[c:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|{{{2|{{{1|{{ucfirst:{{PAGENAME}}}}}}}}}}]]{{#ifeq:{{{3|}}}|ni||''}}}}<noinclude>{{documentation}}[[Category:Interwiki templates|commonscat]]</noinclude>
epwkfhaviiey0unvzj9y3wd94ejn8x2
42907
42906
2025-09-04T19:55:15Z
Surjection
380
42907
wikitext
text/x-wiki
{{interproject-box|logo=Commons-logo.svg|logolink=commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}|intro=[[c:|Wikimedia Commons]] has media related to|noitalic={{#ifeq:{{{3|}}}|ni|1|}}|link=[[c:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|{{{2|{{{1|{{ucfirst:{{PAGENAME}}}}}}}}}}]]}}<noinclude>{{documentation}}[[Category:Interwiki templates|commonscat]]</noinclude>
byp4tbfzrg8cg01yxpwkzqidtcecwy8
42908
42907
2025-09-06T07:59:58Z
Surjection
380
42908
wikitext
text/x-wiki
{{interproject-box|logo=Commons-logo.svg|logolink=commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|intro=[[c:|Wikimedia Commons]] has media related to|noitalic={{#ifeq:{{{3|}}}|ni|1|}}|link=[[c:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|{{{2|{{{1|{{ucfirst:{{PAGENAME}}}}}}}}}}]]}}<noinclude>{{documentation}}[[Category:Interwiki templates|commonscat]]</noinclude>
rtvledbooboyay4gbpl0xfbvcyxk5cv
42909
42908
2025-10-17T17:55:07Z
Juwan
804
Juwan moved page [[Template:commonscat]] to [[Template:commons category]]: Standardize title: [[Wiktionary:Grease pit/2025/September#Cleanup of interwiki templates]]
42908
wikitext
text/x-wiki
{{interproject-box|logo=Commons-logo.svg|logolink=commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|intro=[[c:|Wikimedia Commons]] has media related to|noitalic={{#ifeq:{{{3|}}}|ni|1|}}|link=[[c:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|{{{2|{{{1|{{ucfirst:{{PAGENAME}}}}}}}}}}]]}}<noinclude>{{documentation}}[[Category:Interwiki templates|commonscat]]</noinclude>
rtvledbooboyay4gbpl0xfbvcyxk5cv
42910
42909
2025-10-17T22:26:56Z
Juwan
804
42910
wikitext
text/x-wiki
{{interproject-box|logo=Commons-logo.svg|logolink=commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|intro=[[c:|Wikimedia Commons]] has media related to|noitalic={{#ifeq:{{{3|}}}|ni|1|}}|link=[[c:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|{{{2|{{{1|{{ucfirst:{{PAGENAME}}}}}}}}}}]]}}<noinclude>{{documentation}}</noinclude>
hj8avp7e8n4c7twb71i0apefxdaiss1
42911
42910
2025-11-27T12:31:13Z
Koavf
8
tighten up
42911
wikitext
text/x-wiki
{{interproject-box|logo=Commons-logo.svg|logolink=commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|intro=[[c:|Wikimedia Commons]] has media about|noitalic={{#ifeq:{{{3|}}}|ni|1|}}|link=[[c:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|{{{2|{{{1|{{ucfirst:{{PAGENAME}}}}}}}}}}]]}}<noinclude>{{documentation}}</noinclude>
71adsemdad3dpdyhl8wm4t0zbad2jzk
42912
42911
2026-06-24T04:31:05Z
King ChristLike
964
30 revisions imported from [[:en:Template:commons_category]]
42911
wikitext
text/x-wiki
{{interproject-box|logo=Commons-logo.svg|logolink=commons:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|intro=[[c:|Wikimedia Commons]] has media about|noitalic={{#ifeq:{{{3|}}}|ni|1|}}|link=[[c:Category:{{{1|{{ucfirst:{{PAGENAME}}}}}}}|{{{2|{{{1|{{ucfirst:{{PAGENAME}}}}}}}}}}]]}}<noinclude>{{documentation}}</noinclude>
71adsemdad3dpdyhl8wm4t0zbad2jzk
Templeeti:d
10
8214
42999
2006-01-22T10:37:49Z
Jon Harald Søby
4
#redirect [[Template:delete]]
42999
wikitext
text/x-wiki
#redirect [[Template:delete]]
6ledwyw95sxu9508ocnnkde701j7uzr
43000
42999
2010-06-23T06:58:40Z
Yair rand
1377
Protected "[[Template:d]]" ([edit=sysop] (indefinite) [move=sysop] (indefinite))
42999
wikitext
text/x-wiki
#redirect [[Template:delete]]
6ledwyw95sxu9508ocnnkde701j7uzr
43001
43000
2020-01-05T03:50:48Z
49.195.50.72
Removed redirect to [[Template:delete]]
43001
wikitext
text/x-wiki
#rte]]
8n70hwav696xgko4tix6jnabndfrs4d
43002
43001
2020-01-05T03:52:15Z
Inner Focus
1927
Undo revision 58298378 by [[Special:Contributions/49.195.50.72|49.195.50.72]] ([[User talk:49.195.50.72|talk]])
43002
wikitext
text/x-wiki
#redirect [[Template:delete]]
6ledwyw95sxu9508ocnnkde701j7uzr
43003
43002
2020-01-05T04:40:34Z
Metaknowledge
1331
Protected "[[Template:d]]" ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))
43002
wikitext
text/x-wiki
#redirect [[Template:delete]]
6ledwyw95sxu9508ocnnkde701j7uzr
43004
43003
2020-01-05T06:12:02Z
Chuck Entz
1231
Changed protection level for "[[Template:d]]": Highly visible template/module ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite))
43002
wikitext
text/x-wiki
#redirect [[Template:delete]]
6ledwyw95sxu9508ocnnkde701j7uzr
43005
43004
2026-06-24T04:37:57Z
King ChristLike
964
6 revisions imported from [[:en:Template:d]]
43002
wikitext
text/x-wiki
#redirect [[Template:delete]]
6ledwyw95sxu9508ocnnkde701j7uzr
Templeeti:delete/documentation
10
8215
43006
2010-04-24T21:10:44Z
Bequw
1408
Created page with '{{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> ==Usage== This template is intended to notify a [[WT:A|sysop]] that there is ...'
43006
wikitext
text/x-wiki
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
==Usage==
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
[[fr:Modèle:supp]]
</includeonly>
6r2zgv90ui6nqkbpb38os8vcidqtht6
43007
43006
2011-03-21T22:34:48Z
99.189.110.227
43007
wikitext
text/x-wiki
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
==Usage==
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
Hhhh
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
[[fr:Modèle:supp]]
</includeonly>
4sov205m7l2kb5vskmk538gkt6go8kl
43008
43007
2011-03-21T22:35:52Z
en>Gauss
0
Reverted edits by [[Special:Contributions/99.189.110.227|99.189.110.227]] ([[User_talk:99.189.110.227|Talk]]); changed back to last version by [[User:Bequw|Bequw]]
43008
wikitext
text/x-wiki
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
==Usage==
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Deletion templates|delete]]
[[es:Plantilla:destruir]]
[[fr:Modèle:supp]]
</includeonly>
6r2zgv90ui6nqkbpb38os8vcidqtht6
43009
43008
2011-11-10T20:29:58Z
Mglovesfun
1369
copy/paste interwikis from [[fr:Modèle:supp]]
43009
wikitext
text/x-wiki
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
==Usage==
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Deletion templates|delete]]
[[an:Plantilla:Destruyir]]
[[ar:قالب:شطب]]
[[bg:Шаблон:Бързо изтриване]]
[[cs:Šablona:Smazat]]
[[de:Vorlage:Löschen]]
[[en:Template:delete]]
[[es:Plantilla:destruir]]
[[fr:Modèle:supp]]
[[he:תבנית:למחוק]]
[[hsb:Template:Wušmórnyć]]
[[ia:Patrono:Eliminar]]
[[it:Template:Cancella subito]]
[[ja:Template:Deletebecause]]
[[jbo:Template:ko vimcu]]
[[nah:Plantilla:Destruir]]
[[pt:Predefinição:Eliminação rápida]]
[[pl:Szablon:Ekspresowe kasowanko]]
[[sk:Šablóna:Zmazať lebo]]
[[sv:Mall:Radera]]
[[uk:Шаблон:Db-reason]]
[[zh:Template:Db-reason]]
</includeonly>
5kl82b6gbvtolj19wug3zsjohfi5z7v
43010
43009
2011-11-11T11:32:16Z
Mglovesfun
1369
interwiki +ca, -en
43010
wikitext
text/x-wiki
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
==Usage==
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Deletion templates|delete]]
[[an:Plantilla:Destruyir]]
[[ar:قالب:شطب]]
[[bg:Шаблон:Бързо изтриване]]
[[ca:Plantilla:Destrucció]]
[[cs:Šablona:Smazat]]
[[de:Vorlage:Löschen]]
[[es:Plantilla:destruir]]
[[fr:Modèle:supp]]
[[he:תבנית:למחוק]]
[[hsb:Template:Wušmórnyć]]
[[ia:Patrono:Eliminar]]
[[it:Template:Cancella subito]]
[[ja:Template:Deletebecause]]
[[jbo:Template:ko vimcu]]
[[nah:Plantilla:Destruir]]
[[pt:Predefinição:Eliminação rápida]]
[[pl:Szablon:Ekspresowe kasowanko]]
[[sk:Šablóna:Zmazať lebo]]
[[sv:Mall:Radera]]
[[uk:Шаблон:Db-reason]]
[[zh:Template:Db-reason]]
</includeonly>
mig97btxwr0cnhsndfyzy0d6vp3rt58
43011
43010
2011-11-12T11:03:33Z
Mglovesfun
1369
43011
wikitext
text/x-wiki
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
==Usage==
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Deletion templates|delete]]
[[an:Plantilla:Destruyir]]
[[ar:قالب:شطب]]
[[bg:Шаблон:Бързо изтриване]]
[[ca:Plantilla:destrucció]]
[[cs:Šablona:Smazat]]
[[de:Vorlage:Löschen]]
[[es:Plantilla:destruir]]
[[fr:Modèle:supp]]
[[he:תבנית:למחוק]]
[[hsb:Template:Wušmórnyć]]
[[ia:Patrono:Eliminar]]
[[it:Template:Cancella subito]]
[[ja:Template:Deletebecause]]
[[jbo:Template:ko vimcu]]
[[nah:Plantilla:Destruir]]
[[pt:Predefinição:Eliminação rápida]]
[[pl:Szablon:Ekspresowe kasowanko]]
[[sk:Šablóna:Zmazať lebo]]
[[sv:Mall:Radera]]
[[uk:Шаблон:Db-reason]]
[[zh:Template:Db-reason]]
</includeonly>
ppp4ttpyoimw6oglsorqgk82tkqtl3i
43012
43011
2013-05-22T17:13:27Z
Rua
1351
CodeCat moved page [[Template:delete/doc]] to [[Template:delete/documentation]] without leaving a redirect: Moving documentation
43011
wikitext
text/x-wiki
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
==Usage==
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Deletion templates|delete]]
[[an:Plantilla:Destruyir]]
[[ar:قالب:شطب]]
[[bg:Шаблон:Бързо изтриване]]
[[ca:Plantilla:destrucció]]
[[cs:Šablona:Smazat]]
[[de:Vorlage:Löschen]]
[[es:Plantilla:destruir]]
[[fr:Modèle:supp]]
[[he:תבנית:למחוק]]
[[hsb:Template:Wušmórnyć]]
[[ia:Patrono:Eliminar]]
[[it:Template:Cancella subito]]
[[ja:Template:Deletebecause]]
[[jbo:Template:ko vimcu]]
[[nah:Plantilla:Destruir]]
[[pt:Predefinição:Eliminação rápida]]
[[pl:Szablon:Ekspresowe kasowanko]]
[[sk:Šablóna:Zmazať lebo]]
[[sv:Mall:Radera]]
[[uk:Шаблон:Db-reason]]
[[zh:Template:Db-reason]]
</includeonly>
ppp4ttpyoimw6oglsorqgk82tkqtl3i
43013
43012
2016-10-11T13:40:34Z
2605:E000:2154:DD00:94BA:C8E1:788:5240
43013
wikitext
text/x-wiki
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
==Usage==
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
ö
f54y0pbaocms95z6o7wrbeb09qwtn5c
43014
43013
2016-10-11T14:02:19Z
Rua
1351
Reverted edits by [[Special:Contributions/2605:E000:2154:DD00:94BA:C8E1:788:5240|2605:E000:2154:DD00:94BA:C8E1:788:5240]]. If you think this rollback is in error, please leave a message on my talk page.
43014
wikitext
text/x-wiki
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
==Usage==
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Deletion templates|delete]]
[[an:Plantilla:Destruyir]]
[[ar:قالب:شطب]]
[[bg:Шаблон:Бързо изтриване]]
[[ca:Plantilla:destrucció]]
[[cs:Šablona:Smazat]]
[[de:Vorlage:Löschen]]
[[es:Plantilla:destruir]]
[[fr:Modèle:supp]]
[[he:תבנית:למחוק]]
[[hsb:Template:Wušmórnyć]]
[[ia:Patrono:Eliminar]]
[[it:Template:Cancella subito]]
[[ja:Template:Deletebecause]]
[[jbo:Template:ko vimcu]]
[[nah:Plantilla:Destruir]]
[[pt:Predefinição:Eliminação rápida]]
[[pl:Szablon:Ekspresowe kasowanko]]
[[sk:Šablóna:Zmazať lebo]]
[[sv:Mall:Radera]]
[[uk:Шаблон:Db-reason]]
[[zh:Template:Db-reason]]
</includeonly>
ppp4ttpyoimw6oglsorqgk82tkqtl3i
43015
43014
2016-10-13T11:22:48Z
Aabdullayev851
1928
43015
wikitext
text/x-wiki
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
==Usage==
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Deletion templates|delete]]
[[an:Plantilla:Destruyir]]
[[ar:قالب:شطب]]
[[az:Şablon:Sil]]
[[bg:Шаблон:Бързо изтриване]]
[[ca:Plantilla:destrucció]]
[[cs:Šablona:Smazat]]
[[de:Vorlage:Löschen]]
[[es:Plantilla:destruir]]
[[fr:Modèle:supp]]
[[he:תבנית:למחוק]]
[[hsb:Template:Wušmórnyć]]
[[ia:Patrono:Eliminar]]
[[it:Template:Cancella subito]]
[[ja:Template:Deletebecause]]
[[jbo:Template:ko vimcu]]
[[nah:Plantilla:Destruir]]
[[pt:Predefinição:Eliminação rápida]]
[[pl:Szablon:Ekspresowe kasowanko]]
[[sk:Šablóna:Zmazať lebo]]
[[sv:Mall:Radera]]
[[uk:Шаблон:Db-reason]]
[[zh:Template:Db-reason]]
</includeonly>
6swid2bxtwpbej48tnltbehveps0g8y
43016
43015
2016-11-06T23:40:08Z
Erutuon
1339
show shortcut
43016
wikitext
text/x-wiki
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
==Usage==
{{shortcut|Template:d}}
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Deletion templates|delete]]
[[an:Plantilla:Destruyir]]
[[ar:قالب:شطب]]
[[az:Şablon:Sil]]
[[bg:Шаблон:Бързо изтриване]]
[[ca:Plantilla:destrucció]]
[[cs:Šablona:Smazat]]
[[de:Vorlage:Löschen]]
[[es:Plantilla:destruir]]
[[fr:Modèle:supp]]
[[he:תבנית:למחוק]]
[[hsb:Template:Wušmórnyć]]
[[ia:Patrono:Eliminar]]
[[it:Template:Cancella subito]]
[[ja:Template:Deletebecause]]
[[jbo:Template:ko vimcu]]
[[nah:Plantilla:Destruir]]
[[pt:Predefinição:Eliminação rápida]]
[[pl:Szablon:Ekspresowe kasowanko]]
[[sk:Šablóna:Zmazať lebo]]
[[sv:Mall:Radera]]
[[uk:Шаблон:Db-reason]]
[[zh:Template:Db-reason]]
</includeonly>
q77vp9vrxhecn82fw94k57m6v69spku
43017
43016
2017-02-18T11:06:59Z
Gamren
1696
43017
wikitext
text/x-wiki
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
==Usage==
{{shortcut|Template:d}}
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Deletion templates|delete]]
[[an:Plantilla:Destruyir]]
[[ar:قالب:شطب]]
[[az:Şablon:Sil]]
[[bg:Шаблон:Бързо изтриване]]
[[ca:Plantilla:destrucció]]
[[cs:Šablona:Smazat]]
[[da:Skabelon:Hurtigslet]]
[[de:Vorlage:Löschen]]
[[es:Plantilla:destruir]]
[[fr:Modèle:supp]]
[[he:תבנית:למחוק]]
[[hsb:Template:Wušmórnyć]]
[[ia:Patrono:Eliminar]]
[[it:Template:Cancella subito]]
[[ja:Template:Deletebecause]]
[[jbo:Template:ko vimcu]]
[[nah:Plantilla:Destruir]]
[[pt:Predefinição:Eliminação rápida]]
[[pl:Szablon:Ekspresowe kasowanko]]
[[sk:Šablóna:Zmazať lebo]]
[[sv:Mall:Radera]]
[[uk:Шаблон:Db-reason]]
[[zh:Template:Db-reason]]
</includeonly>
gb1e5q9qqo99uzbkyipxoila55s26ts
43018
43017
2017-11-22T23:37:00Z
Dokurrat
1929
Use Wikidata instead
43018
wikitext
text/x-wiki
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
==Usage==
{{shortcut|Template:d}}
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
<includeonly>
<!-- CATEGORIES HERE, THANKS -->
[[Category:Deletion templates|delete]]
</includeonly>
e6frxmthx91o6yq9ibayx95vf1mu2wy
43019
43018
2018-08-09T10:10:05Z
en>Unknown user
0
43019
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
43020
43019
2018-08-09T10:10:12Z
Surjection
380
43020
wikitext
text/x-wiki
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
==Usage==
{{shortcut|Template:d}}
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
<includeonly>
<!-- CATEGORIES HERE, THANKS -->
[[Category:Deletion templates|delete]]
</includeonly>
e6frxmthx91o6yq9ibayx95vf1mu2wy
43021
43020
2019-03-30T20:54:32Z
2604:6000:100E:85D0:5DD4:B785:BC96:6EF6
/* See also */ edited using [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]]
43021
wikitext
text/x-wiki
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
==Usage==
{{shortcut|Template:d}}
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
<includeonly>
<!-- CATEGORIES HERE, THANKS -->
[[Category:Deletion templates|delete]]
</includeonly>Warning: You are recreating a page that was previously deleted.
oed5jax2jvucslx4ry4ce9a2xhsts99
43022
43021
2019-03-30T20:55:00Z
Metaknowledge
1331
Reverted edits by [[Special:Contributions/2604:6000:100E:85D0:5DD4:B785:BC96:6EF6|2604:6000:100E:85D0:5DD4:B785:BC96:6EF6]]. If you think this rollback is in error, please leave a message on my [[User talk:Metaknowledge|talk page]].
43022
wikitext
text/x-wiki
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
==Usage==
{{shortcut|Template:d}}
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
<includeonly>
<!-- CATEGORIES HERE, THANKS -->
[[Category:Deletion templates|delete]]
</includeonly>
e6frxmthx91o6yq9ibayx95vf1mu2wy
43023
43022
2019-10-11T15:22:27Z
120.17.72.93
Replaced content with "{{documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->"
43023
wikitext
text/x-wiki
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
i67swcmtnwjk18skk17ejcvnpcdd6br
43024
43023
2019-10-11T17:26:57Z
Robbie SWE
1487
Reverted edits by [[Special:Contributions/120.17.72.93|120.17.72.93]]. If you think this rollback is in error, please leave a message on my talk page.
43024
wikitext
text/x-wiki
{{documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
==Usage==
{{shortcut|Template:d}}
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
<includeonly>
<!-- CATEGORIES HERE, THANKS -->
[[Category:Deletion templates|delete]]
</includeonly>
e6frxmthx91o6yq9ibayx95vf1mu2wy
43025
43024
2019-10-17T05:16:47Z
WingerBot
1359
Manual cleanups of request template documentation pages
43025
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
{{shortcut|Template:d}}
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using <nowiki>{{rfd}}</nowiki>.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
<includeonly>
[[Category:Deletion templates]]
[[Category:Request templates]]
</includeonly>
m4lw7bnpkm7npntgmncj84pdo8t7azu
43026
43025
2020-10-26T10:42:44Z
SodhakSH
1728
/* Usage */
43026
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
{{shortcut|Template:d}}
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using {{tl|rfd}}.
When in doubt, it is better to replace a garbage entry with the correct definition. If unsure what the definition should look like but you are sure it is a valid word, you can blank the entry and replace it with <nowiki>{{stub}}</nowiki>.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|tosh}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
<includeonly>
[[Category:Deletion templates]]
[[Category:Request templates]]
</includeonly>
l36uwdfvp0rvoik052z58grc2jt28cy
43027
43026
2021-10-26T16:37:49Z
Ultimateria
1490
adding some speedy deletion etiquette, linking to Deletereason-dropdown
43027
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
{{shortcut|Template:d}}
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using {{tl|rfd}}.
Do not blank the page before adding this template. When you add it to a page, click on the "What links here" tool to correct any incoming links.
It is generally better to improve a poorly formatted or defined entry than to delete it. If you are unsure what the definition should look like but you are sure it is a valid word, you can replace the incorrect definition with {{tl|rfdef}}.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|misspelling of [[x]]}}</nowiki>
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
*<nowiki>{{delete|typo on my part}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
* [[MediaWiki:Deletereason-dropdown|List of reasons for deletion]]
<includeonly>
[[Category:Deletion templates]]
[[Category:Request templates]]
</includeonly>
ckk7rpeq274zgyf9giknkekrvhms1cf
43028
43027
2022-05-24T17:09:00Z
Ultimateria
1490
/* Some examples */ typos should link to the right page
43028
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
{{shortcut|Template:d}}
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using {{tl|rfd}}.
Do not blank the page before adding this template. When you add it to a page, click on the "What links here" tool to correct any incoming links.
It is generally better to improve a poorly formatted or defined entry than to delete it. If you are unsure what the definition should look like but you are sure it is a valid word, you can replace the incorrect definition with {{tl|rfdef}}.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|misspelling of [[x]]}}</nowiki>
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
* [[MediaWiki:Deletereason-dropdown|List of reasons for deletion]]
<includeonly>
[[Category:Deletion templates]]
[[Category:Request templates]]
</includeonly>
2mt7un66znwki7cxqtakyl8oco08edd
43029
43028
2022-08-27T15:47:19Z
WingerBot
1359
remove extraneous spaces at end of line
43029
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
{{shortcut|Template:d}}
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using {{tl|rfd}}.
Do not blank the page before adding this template. When you add it to a page, click on the "What links here" tool to correct any incoming links.
It is generally better to improve a poorly formatted or defined entry than to delete it. If you are unsure what the definition should look like but you are sure it is a valid word, you can replace the incorrect definition with {{tl|rfdef}}.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
*<nowiki>{{delete|misspelling of [[x]]}}</nowiki>
*<nowiki>{{delete|nonsense}}</nowiki>
*<nowiki>{{delete|encyclopedic}}</nowiki>
*<nowiki>{{delete|personal attack}}</nowiki>
=== See also ===
* [[:Category:Candidates for speedy deletion]]
* [[MediaWiki:Deletereason-dropdown|List of reasons for deletion]]
<includeonly>
[[Category:Deletion templates]]
[[Category:Request templates]]
</includeonly>
38fsnf3z1pyv8d5eisdf328i7bik0cp
43030
43029
2024-07-26T22:27:45Z
Theknightwho
1347
/* Some examples */
43030
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
{{shortcut|Template:d}}
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using {{tl|rfd}}.
Do not blank the page before adding this template. When you add it to a page, click on the "What links here" tool to correct any incoming links.
It is generally better to improve a poorly formatted or defined entry than to delete it. If you are unsure what the definition should look like but you are sure it is a valid word, you can replace the incorrect definition with {{tl|rfdef}}.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
* {{tl|delete|misspelling of [[x]]}}
* {{tl|delete|nonsense}}
* {{tl|delete|copyvio}}
* {{tl|delete|personal attack}}
=== See also ===
* [[:Category:Candidates for speedy deletion]]
* [[MediaWiki:Deletereason-dropdown|List of reasons for deletion]]
<includeonly>
[[Category:Deletion templates]]
[[Category:Request templates]]
</includeonly>
mqrh5wk6vo0xllpirqy8ppimxng44k0
43031
43030
2024-08-18T20:32:23Z
Theknightwho
1347
43031
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
{{shortcut|Template:d|Template:db}}
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using {{tl|rfd}}.
Do not blank the page before adding this template. When you add it to a page, click on the "What links here" tool to correct any incoming links.
It is generally better to improve a poorly formatted or defined entry than to delete it. If you are unsure what the definition should look like but you are sure it is a valid word, you can replace the incorrect definition with {{tl|rfdef}}.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
Please always add parameter one after the vertical bar "|".
===Some examples===
* {{tl|delete|misspelling of [[x]]}}
* {{tl|delete|nonsense}}
* {{tl|delete|copyvio}}
* {{tl|delete|personal attack}}
=== See also ===
* [[:Category:Candidates for speedy deletion]]
* [[MediaWiki:Deletereason-dropdown|List of reasons for deletion]]
<includeonly>
[[Category:Deletion templates]]
[[Category:Request templates]]
</includeonly>
ftidoyqvj1x2ui98n60ymjy91imtuu3
43032
43031
2024-10-06T17:05:27Z
Ultimateria
1490
/* Usage */ -overexplanation
43032
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
{{shortcut|Template:d|Template:db}}
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using {{tl|rfd}}.
Do not blank the page before adding this template. When you add it to a page, click on the "What links here" tool to correct any incoming links.
It is generally better to improve a poorly formatted or defined entry than to delete it. If you are unsure what the definition should look like but you are sure it is a valid word, you can replace the incorrect definition with {{tl|rfdef}}.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
===Some examples===
* {{tl|delete|misspelling of [[x]]}}
* {{tl|delete|nonsense}}
* {{tl|delete|copyvio}}
* {{tl|delete|personal attack}}
=== See also ===
* [[:Category:Candidates for speedy deletion]]
* [[MediaWiki:Deletereason-dropdown|List of reasons for deletion]]
<includeonly>
[[Category:Deletion templates]]
[[Category:Request templates]]
</includeonly>
8l2z2mi2i2vtra6x2mhdmzv0jc4a6hu
43033
43032
2025-02-09T01:48:22Z
Chuck Entz
1231
43033
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
{{shortcut|Template:d|Template:db|Template:speedy}}
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using {{tl|rfd}}.
Do not blank the page before adding this template. When you add it to a page, click on the "What links here" tool to correct any incoming links.
It is generally better to improve a poorly formatted or defined entry than to delete it. If you are unsure what the definition should look like but you are sure it is a valid word, you can replace the incorrect definition with {{tl|rfdef}}.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
===Some examples===
* {{tl|delete|misspelling of [[x]]}}
* {{tl|delete|nonsense}}
* {{tl|delete|copyvio}}
* {{tl|delete|personal attack}}
=== See also ===
* [[:Category:Candidates for speedy deletion]]
* [[MediaWiki:Deletereason-dropdown|List of reasons for deletion]]
<includeonly>
[[Category:Deletion templates]]
[[Category:Request templates]]
</includeonly>
46eh5fjsex4ghzdk38xz8i1fnmtrux4
43034
43033
2026-06-24T04:38:00Z
King ChristLike
964
28 revisions imported from [[:en:Template:delete/documentation]]
43033
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
{{shortcut|Template:d|Template:db|Template:speedy}}
This template is intended to notify a [[WT:A|sysop]] that there is junk that very obviously should be removed; it does so by adding the entry to [[:Category:Candidates for speedy deletion]], which is periodically checked by various sysops. If there is any possibility that the entry should maybe be retained for any reason whatsoever, then use {{temp|rfd}} instead. If you think it is nonsense, but there ''might'' be someone who thinks it is a genuine contribution, you are much better off using {{tl|rfd}}.
Do not blank the page before adding this template. When you add it to a page, click on the "What links here" tool to correct any incoming links.
It is generally better to improve a poorly formatted or defined entry than to delete it. If you are unsure what the definition should look like but you are sure it is a valid word, you can replace the incorrect definition with {{tl|rfdef}}.
If you are certain that an entry does not meet our [[WT:CFI|criteria for inclusion]], you can use this <nowiki>{{delete|}}</nowiki> template to flag the entry.
===Some examples===
* {{tl|delete|misspelling of [[x]]}}
* {{tl|delete|nonsense}}
* {{tl|delete|copyvio}}
* {{tl|delete|personal attack}}
=== See also ===
* [[:Category:Candidates for speedy deletion]]
* [[MediaWiki:Deletereason-dropdown|List of reasons for deletion]]
<includeonly>
[[Category:Deletion templates]]
[[Category:Request templates]]
</includeonly>
46eh5fjsex4ghzdk38xz8i1fnmtrux4
Templeeti:db
10
8216
43035
2019-11-17T10:48:52Z
37.42.31.102
Redirected page to [[Template:delete]]
43035
wikitext
text/x-wiki
#REDIRECT [[Template:delete]]
don0o3ej2zyi5f59rhmlipfgdlfm40t
43036
43035
2023-05-21T20:30:57Z
Chuck Entz
1231
Protected "[[Template:db]]": Highly visible template/module ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite))
43035
wikitext
text/x-wiki
#REDIRECT [[Template:delete]]
don0o3ej2zyi5f59rhmlipfgdlfm40t
43037
43036
2026-06-24T04:38:00Z
King ChristLike
964
2 revisions imported from [[:en:Template:db]]
43035
wikitext
text/x-wiki
#REDIRECT [[Template:delete]]
don0o3ej2zyi5f59rhmlipfgdlfm40t
Templeeti:speedy
10
8217
43038
2005-07-03T16:10:53Z
Connel MacKenzie
1302
for visiting WikiPedians
43038
wikitext
text/x-wiki
{{rfd}}
h2a52aogoxp9mava9xo5tuvafxseeda
43039
43038
2005-07-03T16:13:15Z
24
1679
#redirect [[rfd]]
43039
wikitext
text/x-wiki
#redirect [[rfd]]
7s0a993xgj9l8it6qx5igul9y7oz6kr
43040
43039
2005-07-03T16:13:33Z
24
1679
43040
wikitext
text/x-wiki
#redirect [[template:rfd]]
00v72yo4yzhragbi6tbvbk406yza08p
43041
43040
2005-07-08T21:48:36Z
Quuxplusone
1930
redirect
43041
wikitext
text/x-wiki
#REDIRECT [[Template:Rfd]]
42w0rmwr7ao81vwq3l30c7j2k9ofbw3
43042
43041
2006-04-29T17:47:09Z
Rory096
1680
getting rid of double redirect; redirecting to the actual speedy template
43042
wikitext
text/x-wiki
#REDIRECT [[Template:delete]]
don0o3ej2zyi5f59rhmlipfgdlfm40t
43043
43042
2011-05-27T22:02:40Z
Romanophile
1873
43043
wikitext
text/x-wiki
{{delete}}
#REDIRECT [[Template:delete]]
jbsprh3n0rfju6ogtnvsyuc374oaq46
43044
43043
2011-05-27T22:29:42Z
Mglovesfun
1369
Reverted edits by [[Special:Contributions/Pilcrow|Pilcrow]] ([[User_talk:Pilcrow|Talk]]); changed back to last version by [[User:Rory096|Rory096]]
43044
wikitext
text/x-wiki
#REDIRECT [[Template:delete]]
don0o3ej2zyi5f59rhmlipfgdlfm40t
43045
43044
2023-05-21T20:29:46Z
Chuck Entz
1231
Protected "[[Template:speedy]]": Highly visible template/module ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
43044
wikitext
text/x-wiki
#REDIRECT [[Template:delete]]
don0o3ej2zyi5f59rhmlipfgdlfm40t
43046
43045
2026-06-24T04:38:00Z
King ChristLike
964
8 revisions imported from [[:en:Template:speedy]]
43044
wikitext
text/x-wiki
#REDIRECT [[Template:delete]]
don0o3ej2zyi5f59rhmlipfgdlfm40t
Templeeti:rfd
10
8218
43047
2004-05-05T02:52:13Z
Emperorbma
1932
43047
wikitext
text/x-wiki
:''This page has been listed on [[Wiktionary:Votes for deletion]]. Please see that page for justifications and discussion[[MediaWiki:Vfd|.]]''<br>
2jmti165e0ro54orvjysv4lig0stmt8
43048
43047
2004-05-05T05:04:22Z
Emperorbma
1932
43048
wikitext
text/x-wiki
:''This page has been listed on [[Wiktionary:Requests for deletion]]. Please see that page for justifications and discussion[[MediaWiki:Vfd|.]]''<br>
lkspsf11wf5sjh0hgm91c0leifqgl9k
43049
43048
2004-05-16T04:05:48Z
Eric119
1933
43049
wikitext
text/x-wiki
:''This page has been listed on [[Wiktionary:Requests for deletion]]. Please see that page for justifications and discussion[[MediaWiki:Rfd|.]]''<br>
eyd8p1rilwkktpxlx6mqxy7tcrfkvmf
43050
43049
2004-08-25T00:49:25Z
Blade Hirato
1934
imported wikipedia Vfd;
43050
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
</div>
</center>
kshdswwoy17s7o399sstc835b576qqx
43051
43050
2004-11-28T08:46:40Z
Richardb
1418
43051
wikitext
text/x-wiki
[[category:Ready for Deletion]]
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]] or is listed in [[:category:Requests for Deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
</div>
</center>
esmtuz7et7z1v5shwp8rnz8ckih3sxx
43052
43051
2004-11-28T08:48:35Z
Richardb
1418
43052
wikitext
text/x-wiki
[[category:Requests for Deletion]]
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
</div>
</center>
hf1p9hjfulxru0tvgrwjjj0a2fc9ci2
43053
43052
2004-12-24T07:56:42Z
Mario Dinis
1935
43053
wikitext
text/x-wiki
[[category:Requests for Deletion]]
[[Category:Animal Fucking]]
[[Category:Scat Fetish]]
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
</div>
</center>
lk2zl3rwawvknxk0c0ewtcbj9inzykv
43054
43053
2004-12-24T10:43:38Z
Eclecticology
1907
revert vandalism
43054
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
</div>
</center>
8igmndqc049vppkl6r2s2m2x6eg71t6
43055
43054
2004-12-31T20:35:22Z
Eclecticology
1907
add category
43055
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
</div>
</center>
[[Category:Requests for deletion]]
9vo5662bt2q9xdj432f96qdf2watrbc
43056
43055
2004-12-31T21:57:45Z
Eclecticology
1907
43056
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
[[Category:Requests for deletion]]
</div>
</center>
2nv92v343k8ocdk9tsjxqn8307uwn4w
43057
43056
2004-12-31T22:05:58Z
152.2.241.23
43057
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or bugger this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
[[Category:Requests for deletion]]
</div>
</center>
l2gsux1p6yw4admeywow9c17hn1axou
43058
43057
2005-01-01T01:45:45Z
Eclecticology
1907
Reverted edit of 152.2.241.23, changed back to last version by Eclecticology
43058
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
[[Category:Requests for deletion]]
</div>
</center>
2nv92v343k8ocdk9tsjxqn8307uwn4w
43059
43058
2005-01-01T02:53:03Z
Gollyplot
1936
rv vandalism
43059
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or bugger this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
[[Category:Requests for deletion]]
</div>
</center>
l2gsux1p6yw4admeywow9c17hn1axou
43060
43059
2005-01-02T01:27:37Z
Eclecticology
1907
Reverted edit of Gollyplot, changed back to last version by Eclecticology
43060
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
[[Category:Requests for deletion]]
</div>
</center>
2nv92v343k8ocdk9tsjxqn8307uwn4w
43061
43060
2005-01-02T04:10:27Z
Gollyplot
1936
43061
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or bugger this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
[[Category:Requests for deletion]]
</div>
</center>
l2gsux1p6yw4admeywow9c17hn1axou
43062
43061
2005-01-02T05:59:42Z
Eclecticology
1907
Reverted edit of Gollyplot, changed back to last version by Eclecticology
43062
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
[[Category:Requests for deletion]]
</div>
</center>
2nv92v343k8ocdk9tsjxqn8307uwn4w
43063
43062
2005-01-02T06:12:31Z
Bung
1937
43063
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or bugger this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
[[Category:Requests for deletion]]
</div>
</center>
l2gsux1p6yw4admeywow9c17hn1axou
43064
43063
2005-01-02T09:52:22Z
66.67.235.193
rv vandalism
43064
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
[[Category:Requests for deletion]]
</div>
</center>
2nv92v343k8ocdk9tsjxqn8307uwn4w
43065
43064
2005-01-02T10:07:46Z
Diptwiddle
1938
rv vandalism
43065
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or bugger this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
[[Category:Requests for deletion]]
</div>
</center>
l2gsux1p6yw4admeywow9c17hn1axou
43066
43065
2005-01-02T19:12:35Z
Eclecticology
1907
Reverted edit of Diptwiddle, changed back to last version by 66.67.235.193
43066
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
[[Category:Requests for deletion]]
</div>
</center>
2nv92v343k8ocdk9tsjxqn8307uwn4w
43067
43066
2005-01-03T03:20:08Z
Diptwiddle
1938
43067
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or bugger this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
[[Category:Requests for deletion]]
</div>
</center>
l2gsux1p6yw4admeywow9c17hn1axou
43068
43067
2005-01-19T01:04:00Z
Eclecticology
1907
Reverted edit of Diptwiddle, changed back to last version by Eclecticology
43068
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
[[Category:Requests for deletion]]
</div>
</center>
2nv92v343k8ocdk9tsjxqn8307uwn4w
43069
43068
2005-01-22T23:31:20Z
207.36.86.132
43069
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or bugger this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
[[Category:Requests for deletion]]
</div>
</center>
l2gsux1p6yw4admeywow9c17hn1axou
43070
43069
2005-01-23T01:01:17Z
Eclecticology
1907
Reverted edit of 207.36.86.132, changed back to last version by Eclecticology
43070
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion]].'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
[[Category:Requests for deletion]]
</div>
</center>
2nv92v343k8ocdk9tsjxqn8307uwn4w
43071
43070
2005-05-16T03:06:15Z
Connel MacKenzie
1302
implementing experiment (see template talk for discussion)
43071
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]<big><small class="plainlinks">[{{lurl}}Wiktionary:Requests_for_deletion&action=edit§ion=new .]</small></big>'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]
[[Category:Requests for deletion]]
</div>
</center>
5r8z97m8pk2kxw7f88u8ur75dde3lzp
43072
43071
2005-10-08T19:20:53Z
Muke
1940
note for rfv
43072
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]<big><small class="plainlinks">[{{lurl}}Wiktionary:Requests_for_deletion&action=edit§ion=new .]</small></big>'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]].
[[Category:Requests for deletion]]
</div>
</center>
orahyq1k8trr4dd7nufbfnwmh9a0273
43073
43072
2005-10-11T16:57:31Z
Eclecticology
1907
Replacing template by its contents to prevent repeated appearance of template on edit pages
43073
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]<big><small class="plainlinks">[{{SERVER}}/w/wiki.phtml?title=Wiktionary:Requests_for_deletion&action=edit§ion=new .]</small></big>'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]].
[[Category:Requests for deletion]]
</div>
</center>
pcbftjijmi88b8kutog0jdbsl86nnjp
43074
43073
2005-10-26T08:57:18Z
Jon Harald Søby
4
<includeonly>
43074
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]<big><small class="plainlinks">[{{SERVER}}/w/wiki.phtml?title=Wiktionary:Requests_for_deletion&action=edit§ion=new .]</small></big>'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]].
</div>
</center>
<includeonly>[[Category:Requests for deletion]]</includeonly>
38xkjupovheu2z9hoqkyy3e2ecdevvq
43075
43074
2006-01-21T16:47:51Z
Dangherous
1941
[[Image:Icono consulta borrar.png]]
43075
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
[[Image:Icono consulta borrar.png|right|80px]]
'''This page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]<big><small class="plainlinks">[{{SERVER}}/w/wiki.phtml?title=Wiktionary:Requests_for_deletion&action=edit§ion=new .]</small></big>'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]].
</div>
</center>
<includeonly>[[Category:Requests for deletion]]</includeonly>
m9stpsl1i3jenu2tt5ihny23ofv051m
43076
43075
2006-02-03T01:09:36Z
Ncik
1942
-image
43076
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''This page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]<big><small class="plainlinks">[{{SERVER}}/w/wiki.phtml?title=Wiktionary:Requests_for_deletion&action=edit§ion=new .]</small></big>'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]].
</div>
</center>
<includeonly>[[Category:Requests for deletion]]</includeonly>
38xkjupovheu2z9hoqkyy3e2ecdevvq
43077
43076
2006-02-07T21:48:58Z
Connel MacKenzie
1302
Reverted edit of Ncik, changed back to last version by Dangherous
43077
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
[[Image:Icono consulta borrar.png|right|80px]]
'''This page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]<big><small class="plainlinks">[{{SERVER}}/w/wiki.phtml?title=Wiktionary:Requests_for_deletion&action=edit§ion=new .]</small></big>'''<br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]].
</div>
</center>
<includeonly>[[Category:Requests for deletion]]</includeonly>
m9stpsl1i3jenu2tt5ihny23ofv051m
43078
43077
2006-02-07T23:52:20Z
Connel MacKenzie
1302
43078
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
[[Image:Icono consulta borrar.png|right|80px]]
<big>'''This page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]'''</big>''' <small>[{{fullurle:Wiktionary:Requests_for_deletion&action=edit§ion=new}} (Add entry)]</small><br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
</div>
</center>
<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
</noinclude>
k3gclln61k45qh5q6kkmdnjpuhu0p61
43079
43078
2006-02-08T04:09:04Z
Connel MacKenzie
1302
43079
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
[[Image:Icono consulta borrar.png|right|80px]]
<big>'''This page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]'''</big>''' <small>[{{fullurle:Wiktionary:Requests_for_deletion}}&action=edit§ion=new (Add entry)]</small><br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
</div>
</center>
<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
</noinclude>
47z71x45la948m4jxazedzona7tvds1
43080
43079
2006-02-08T04:10:02Z
Connel MacKenzie
1302
43080
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
[[Image:Icono consulta borrar.png|right|80px]]
<big>'''This page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]'''</big>''' <small>[{{fullurle:Wiktionary:Requests_for_deletion}}?action=edit§ion=new (Add entry)]</small><br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
</div>
</center>
<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
</noinclude>
2pdwsmvatxm9tzk6fztos6w9q7neyot
43081
43080
2006-04-25T19:02:33Z
Vildricianus
1301
[[Template:Rfd]] moved to [[Template:rfd]]: decaps convention
43080
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
[[Image:Icono consulta borrar.png|right|80px]]
<big>'''This page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]'''</big>''' <small>[{{fullurle:Wiktionary:Requests_for_deletion}}?action=edit§ion=new (Add entry)]</small><br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
</div>
</center>
<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
</noinclude>
2pdwsmvatxm9tzk6fztos6w9q7neyot
43082
43081
2006-04-25T19:03:16Z
Vildricianus
1301
43082
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
[[Image:Icono consulta borrar.png|right|80px]]
<big>'''This page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]'''</big>''' <small>[{{fullurle:Wiktionary:Requests_for_deletion}}?action=edit§ion=new (Add entry)]</small><br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
</div>
</center>
<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates]]
</noinclude>
8b4f6obesasq97g7xquuptpk8tf1s15
43083
43082
2006-04-25T19:03:38Z
Vildricianus
1301
43083
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
[[Image:Icono consulta borrar.png|right|80px]]
<big>'''This page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]'''</big>''' <small>[{{fullurle:Wiktionary:Requests_for_deletion}}?action=edit§ion=new (Add entry)]</small><br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
</div>
</center>
<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
</noinclude>
is4onpe7eocrnjt143c23oin3bxkdjp
43084
43083
2006-05-01T13:25:26Z
Vildricianus
1301
43084
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin-top:.5em; margin-bottom:.5em; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
[[Image:Icono consulta borrar.png|right|80px]]
<big>'''This page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]'''</big>''' <small>[{{fullurle:Wiktionary:Requests_for_deletion}}?action=edit§ion=new (Add entry)]</small><br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
</div>
</center>
<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
</noinclude>
h5rw0xoi7myeyu4f5dq8s672iimo7gc
43085
43084
2006-05-01T13:26:53Z
Vildricianus
1301
43085
wikitext
text/x-wiki
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
[[Image:Icono consulta borrar.png|right|80px]]
<big>'''This page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]'''</big>''' <small>[{{fullurle:Wiktionary:Requests_for_deletion}}?action=edit§ion=new (Add entry)]</small><br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
</div>
</center>
<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
</noinclude>
r1kbd3ny6xsoimtzxy0gmhsug48y58a
43086
43085
2006-05-01T13:31:42Z
Vildricianus
1301
43086
wikitext
text/x-wiki
{| style="background-color: #F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA;"
| [[Image:Icono consulta borrar.png|right|80px]]
<big>'''This page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]'''</big>''' <small>[{{fullurle:Wiktionary:Requests_for_deletion}}?action=edit§ion=new (Add entry)]</small><br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
</noinclude>
85up62kn3s6nlfo0x216tg3mtu72n7w
43087
43086
2006-05-06T19:23:28Z
Vildricianus
1301
class="noprint"
43087
wikitext
text/x-wiki
{| class="noprint" style="background-color: #F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA;"
| [[Image:Icono consulta borrar.png|right|80px]]
<big>'''This page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]'''</big>''' <small>[{{fullurle:Wiktionary:Requests_for_deletion}}?action=edit§ion=new (Add entry)]</small><br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
</noinclude>
60w5xnffo1n0nm3b07183hmismpzznb
43088
43087
2006-05-27T17:53:36Z
Jon Harald Søby
4
changing image
43088
wikitext
text/x-wiki
{| class="noprint" style="background-color: #F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA;"
| [[Image:Crystal Clear filesystem trashcan full.png|right|100px]]
<big>'''This page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]'''</big>''' <small>[{{fullurle:Wiktionary:Requests_for_deletion}}?action=edit§ion=new (Add entry)]</small><br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
</noinclude>
ramfqxa43yacrpqhyzx7eb1ofjia0wq
43089
43088
2006-05-31T16:44:52Z
Davilla
1402
testing {namespace}
43089
wikitext
text/x-wiki
{| class="noprint" style="background-color: #F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA;"
| [[Image:Crystal Clear filesystem trashcan full.png|right|100px]]
<big>'''This {{NAMESPACE}} page has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]'''</big>''' <small>[{{fullurle:Wiktionary:Requests_for_deletion}}?action=edit§ion=new (Add entry)]</small><br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
</noinclude>
pgrsl4mdzp83zsntewh684rrwt9a9qg
43090
43089
2006-05-31T17:02:25Z
Davilla
1402
switch based on page namespace
43090
wikitext
text/x-wiki
{| class="noprint" style="background-color: #F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA;"
| [[Image:Crystal Clear filesystem trashcan full.png|right|100px]]
<big>'''This {{#switch:{{NAMESPACE}}|
Category=category|
Image=image|
Template=template|
Thesaurus=thesaurus entry|
=dictionary entry|
page}} has been listed on [[Wiktionary:Requests for deletion#{{PAGENAME}}|Wiktionary:Requests for deletion]]'''</big>''' <small>[{{fullurle:Wiktionary:Requests_for_deletion}}?action=edit§ion=new (Add entry)]</small><br />
Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:Rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
</noinclude>
42c1hpk141jbht03pmtp0dxhqqa3isa
43091
43090
2006-06-20T17:43:02Z
Vildricianus
1301
introducing tha new shit
43091
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
| [[Image:Crystal Clear filesystem trashcan full.png|right|100px]]
'''<big><!--
***START NAMESPACE-CHECKING CODE***
-->This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User=userpage has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User talk=user talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary=Wiktionary page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary talk=Wiktionary talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image=image has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image talk=image talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki=MediaWiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki talk=MediaWiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template=template has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template talk=template talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help=help page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help talk=help talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category=category has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category talk=category talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
</noinclude>
2fae66ezfz7flf9u2qp0ukd3rjyc2aw
43092
43091
2006-06-20T17:45:21Z
Vildricianus
1301
43092
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
| [[Image:Crystal Clear filesystem trashcan full.png|right|100px]]
<!--
***START NAMESPACE-CHECKING CODE***
-->'''<big>This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User=userpage has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User talk=user talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary=Wiktionary page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary talk=Wiktionary talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image=image has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image talk=image talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki=MediaWiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki talk=MediaWiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template=template has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template talk=template talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help=help page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help talk=help talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category=category has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category talk=category talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
</noinclude>
4l4bqagfq15k1kwz0m1qv09xwbxz6qh
43093
43092
2006-06-20T17:46:39Z
Vildricianus
1301
43093
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
| [[Image:Crystal Clear filesystem trashcan full.png|right|100px]]
<!--
***START NAMESPACE-CHECKING CODE***
-->'''<big>This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User=userpage has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User talk=user talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary=Wiktionary page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary talk=Wiktionary talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image=image has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image talk=image talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki=MediaWiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki talk=MediaWiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template=template has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template talk=template talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help=help page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help talk=help talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category=category has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category talk=category talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
</noinclude>
abieky5v7szl0ty07qv5r3frc6z8yf9
43094
43093
2006-06-20T17:48:34Z
Vildricianus
1301
Protected "[[Template:rfd]]" [edit=autoconfirmed:move=sysop]
43093
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
| [[Image:Crystal Clear filesystem trashcan full.png|right|100px]]
<!--
***START NAMESPACE-CHECKING CODE***
-->'''<big>This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User=userpage has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User talk=user talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary=Wiktionary page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary talk=Wiktionary talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image=image has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image talk=image talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki=MediaWiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki talk=MediaWiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template=template has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template talk=template talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help=help page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help talk=help talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category=category has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category talk=category talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
</noinclude>
abieky5v7szl0ty07qv5r3frc6z8yf9
43095
43094
2006-06-28T21:34:08Z
Vildricianus
1301
test new namespaces
43095
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
| [[Image:Crystal Clear filesystem trashcan full.png|right|100px]]
<!--
***START NAMESPACE-CHECKING CODE***
-->'''<big>This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User=userpage has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User talk=user talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary=Wiktionary page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary talk=Wiktionary talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image=image has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image talk=image talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki=MediaWiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki talk=MediaWiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template=template has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template talk=template talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help=help page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help talk=help talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category=category has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category talk=category talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix=appendix has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix talk=appendix talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance=concordance page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance talk=concordance talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index=index has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index talk=index talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes=rhymes page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes talk=rhymes talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki=transwiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki talk=transwiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus=Wikisaurus entry has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus talk=Wikisaurus talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT=shortcut has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT talk=shortcut talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
</noinclude>
tkdzv01wyg74q88indyntmplcjge1zp
43096
43095
2006-06-28T21:56:25Z
Vildricianus
1301
43096
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
| [[Image:Crystal Clear filesystem trashcan full.png|right|100px]]
<!--
***START NAMESPACE-CHECKING CODE***
-->'''<big>This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User=userpage has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User talk=user talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary=Wiktionary page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary talk=Wiktionary talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image=image has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image talk=image talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki=MediaWiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki talk=MediaWiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template=template has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template talk=template talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help=help page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help talk=help talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category=category has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category talk=category talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix=appendix has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix talk=appendix talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance=concordance page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance talk=concordance talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index=index has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index talk=index talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes=rhymes page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes talk=rhymes talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki=transwiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki talk=transwiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus=Wikisaurus entry has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus talk=Wikisaurus talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT=shortcut has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT talk=shortcut talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Special=page has been [[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Media=page has been [[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]<br />
'''Note to poster:''' If you are disputing the existence of a term, please use <tt><nowiki>{{rfv}}</nowiki></tt> to place it on [[WS:RFV|requests for verification]] instead.
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
</noinclude>
btsybkht7gvh2oe57k0f838uemje7pn
43097
43096
2006-06-28T22:01:54Z
Vildricianus
1301
43097
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
| [[Image:Crystal Clear filesystem trashcan full.png|right|75px]]
<!--
***START NAMESPACE-CHECKING CODE***
-->'''<big>This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User=userpage has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User talk=user talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary=Wiktionary page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary talk=Wiktionary talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image=image has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image talk=image talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki=MediaWiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki talk=MediaWiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template=template has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template talk=template talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help=help page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help talk=help talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category=category has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category talk=category talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix=appendix has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix talk=appendix talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance=concordance page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance talk=concordance talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index=index has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index talk=index talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes=rhymes page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes talk=rhymes talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki=transwiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki talk=transwiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus=Wikisaurus entry has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus talk=Wikisaurus talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT=shortcut has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT talk=shortcut talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Special=page has been [[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Media=page has been [[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]
{{#switch:{{NAMESPACE}}|<!--main-->=<br />'''Note to poster:''' If you are disputing the existence of a term, please use {{temp|rfv}} to place it on [[WS:RFV|requests for verification]] instead.}}
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
</noinclude>
m1kmcpdnoloflfbbz3y74sqju8if4iu
43098
43097
2007-05-21T11:48:06Z
Keene
1309
[[fr:Modèle:supprimer]]
43098
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
| [[Image:Crystal Clear filesystem trashcan full.png|right|75px]]
<!--
***START NAMESPACE-CHECKING CODE***
-->'''<big>This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User=userpage has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User talk=user talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary=Wiktionary page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary talk=Wiktionary talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image=image has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image talk=image talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki=MediaWiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki talk=MediaWiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template=template has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template talk=template talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help=help page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help talk=help talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category=category has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category talk=category talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix=appendix has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix talk=appendix talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance=concordance page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance talk=concordance talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index=index has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index talk=index talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes=rhymes page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes talk=rhymes talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki=transwiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki talk=transwiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus=Wikisaurus entry has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus talk=Wikisaurus talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT=shortcut has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT talk=shortcut talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Special=page has been [[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Media=page has been [[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]
{{#switch:{{NAMESPACE}}|<!--main-->=<br />'''Note to poster:''' If you are disputing the existence of a term, please use {{temp|rfv}} to place it on [[WS:RFV|requests for verification]] instead.}}
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
[[fr:Modèle:supprimer]]
</noinclude>
9mcz2y4gwamv1g9mim4p3kmou0mwoy4
43099
43098
2007-06-03T10:54:09Z
Derbeth
1916
interwiki
43099
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
| [[Image:Crystal Clear filesystem trashcan full.png|right|75px]]
<!--
***START NAMESPACE-CHECKING CODE***
-->'''<big>This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User=userpage has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User talk=user talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary=Wiktionary page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary talk=Wiktionary talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image=image has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image talk=image talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki=MediaWiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki talk=MediaWiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template=template has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template talk=template talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help=help page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help talk=help talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category=category has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category talk=category talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix=appendix has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix talk=appendix talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance=concordance page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance talk=concordance talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index=index has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index talk=index talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes=rhymes page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes talk=rhymes talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki=transwiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki talk=transwiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus=Wikisaurus entry has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus talk=Wikisaurus talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT=shortcut has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT talk=shortcut talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Special=page has been [[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Media=page has been [[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]
{{#switch:{{NAMESPACE}}|<!--main-->=<br />'''Note to poster:''' If you are disputing the existence of a term, please use {{temp|rfv}} to place it on [[WS:RFV|requests for verification]] instead.}}
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
[[de:Vorlage:Löschantrag]]
[[fr:Modèle:supprimer]]
[[pl:Szablon:SDU]]
</noinclude>
dnc3gkhq5bi8bjsv0vtrwjrat2cknia
43100
43099
2007-08-24T16:22:41Z
Connel MacKenzie
1302
+{{{1}}}
43100
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
| [[Image:Crystal Clear filesystem trashcan full.png|right|75px]]
<!--
***START NAMESPACE-CHECKING CODE***
-->'''<big>This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User=userpage has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User talk=user talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary=Wiktionary page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary talk=Wiktionary talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image=image has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image talk=image talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki=MediaWiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki talk=MediaWiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template=template has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template talk=template talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help=help page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help talk=help talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category=category has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category talk=category talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix=appendix has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix talk=appendix talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance=concordance page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance talk=concordance talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index=index has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index talk=index talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes=rhymes page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes talk=rhymes talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki=transwiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki talk=transwiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus=Wikisaurus entry has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus talk=Wikisaurus talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT=shortcut has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT talk=shortcut talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Special=page has been [[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Media=page has been [[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]
{{#switch:{{NAMESPACE}}|<!--main-->=<br />'''Note to poster:''' If you are disputing the existence of a term, please use {{temp|rfv}} to place it on [[WS:RFV|requests for verification]] instead.}}{{#if{{{1|}}}|<br />The person who added this tag also commented: {{{1|}}}|}}
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
[[de:Vorlage:Löschantrag]]
[[fr:Modèle:supprimer]]
[[pl:Szablon:SDU]]
</noinclude>
ezjo8q3aftvs0nef6fuss16assicgkk
43101
43100
2007-08-24T16:37:59Z
Connel MacKenzie
1302
+:
43101
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
| [[Image:Crystal Clear filesystem trashcan full.png|right|75px]]
<!--
***START NAMESPACE-CHECKING CODE***
-->'''<big>This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User=userpage has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User talk=user talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary=Wiktionary page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary talk=Wiktionary talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image=image has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image talk=image talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki=MediaWiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki talk=MediaWiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template=template has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template talk=template talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help=help page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help talk=help talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category=category has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category talk=category talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix=appendix has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix talk=appendix talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance=concordance page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance talk=concordance talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index=index has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index talk=index talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes=rhymes page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes talk=rhymes talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki=transwiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki talk=transwiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus=Wikisaurus entry has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus talk=Wikisaurus talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT=shortcut has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT talk=shortcut talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Special=page has been [[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Media=page has been [[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]
{{#switch:{{NAMESPACE}}|<!--main-->=<br />'''Note to poster:''' If you are disputing the existence of a term, please use {{temp|rfv}} to place it on [[WS:RFV|requests for verification]] instead.}}{{#if:{{{1|}}}|<br />The person who added this tag also commented: {{{1|}}}|}}
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
[[de:Vorlage:Löschantrag]]
[[fr:Modèle:supprimer]]
[[pl:Szablon:SDU]]
</noinclude>
qssl4pqinxtn39n2yupyppvhmmozw4r
43102
43101
2007-08-24T16:49:35Z
Connel MacKenzie
1302
+'''
43102
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
| [[Image:Crystal Clear filesystem trashcan full.png|right|75px]]
<!--
***START NAMESPACE-CHECKING CODE***
-->'''<big>This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User=userpage has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User talk=user talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary=Wiktionary page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary talk=Wiktionary talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image=image has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image talk=image talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki=MediaWiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki talk=MediaWiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template=template has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template talk=template talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help=help page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help talk=help talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category=category has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category talk=category talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix=appendix has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix talk=appendix talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance=concordance page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance talk=concordance talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index=index has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index talk=index talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes=rhymes page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes talk=rhymes talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki=transwiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki talk=transwiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus=Wikisaurus entry has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus talk=Wikisaurus talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT=shortcut has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT talk=shortcut talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Special=page has been [[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Media=page has been [[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]
{{#switch:{{NAMESPACE}}|<!--main-->=<br />'''Note to poster:''' If you are disputing the existence of a term, please use {{temp|rfv}} to place it on [[WS:RFV|requests for verification]] instead.}}{{#if:{{{1|}}}|<br />The person who added this tag also commented: '''{{{1|}}}'''|}}
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
[[de:Vorlage:Löschantrag]]
[[fr:Modèle:supprimer]]
[[pl:Szablon:SDU]]
</noinclude>
dze3u5beg42w6lg3uabc633vizod55s
43103
43102
2007-12-06T08:24:36Z
Language Lover
1943
43103
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
| [[Image:Crystal Clear filesystem trashcan full.png|right|75px]]
<!--
***START NAMESPACE-CHECKING CODE***
-->'''<big>This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User=userpage has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User talk=user talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary=Wiktionary page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary talk=Wiktionary talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image=image has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image talk=image talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki=MediaWiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki talk=MediaWiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template=template has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template talk=template talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help=help page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help talk=help talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category=category has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category talk=category talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix=appendix has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix talk=appendix talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance=concordance page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance talk=concordance talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index=index has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index talk=index talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes=rhymes page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes talk=rhymes talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki=transwiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki talk=transwiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus=Wikisaurus entry has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus talk=Wikisaurus talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT=shortcut has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT talk=shortcut talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Special=page has been [[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Media=page has been [[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]{{#if:{{{1|}}}|<br />The person who added this tag also commented: '''{{{1|}}}'''|}}
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WS:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WS:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WS:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
[[de:Vorlage:Löschantrag]]
[[fr:Modèle:supprimer]]
[[pl:Szablon:SDU]]
</noinclude>
qfbekgmoew73nzcwwti2cn8muq2j4gd
43104
43103
2008-01-05T00:06:10Z
Conrad.Irwin
1315
WS:->WT: (Using [[:mw:Extension:Autoedit]] Regexp)
43104
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
| [[Image:Crystal Clear filesystem trashcan full.png|right|75px]]
<!--
***START NAMESPACE-CHECKING CODE***
-->'''<big>This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User=userpage has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|User talk=user talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary=Wiktionary page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wiktionary talk=Wiktionary talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image=image has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Image talk=image talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki=MediaWiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|MediaWiki talk=MediaWiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template=template has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Template talk=template talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help=help page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Help talk=help talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category=category has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Category talk=category talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix=appendix has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Appendix talk=appendix talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance=concordance page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Concordance talk=concordance talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index=index has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Index talk=index talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes=rhymes page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Rhymes talk=rhymes talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki=transwiki page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Transwiki talk=transwiki talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus=Wikisaurus entry has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Wikisaurus talk=Wikisaurus talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT=shortcut has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|WT talk=shortcut talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
|Special=page has been [[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Media=page has been [[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]{{#if:{{{1|}}}|<br />The person who added this tag also commented: '''{{{1|}}}'''|}}
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WT:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WT:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WT:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
[[de:Vorlage:Löschantrag]]
[[fr:Modèle:supprimer]]
[[pl:Szablon:SDU]]
</noinclude>
kbk93mek2gufvdfv0rfy46w4q6ldvft
43105
43104
2008-02-08T10:07:50Z
Connel MacKenzie
1302
simplify, to add "Citations:" namespace
43105
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
|align="center"| [[Image:Crystal Clear filesystem trashcan full.png|right|75px]]
<!--
***START NAMESPACE-CHECKING CODE***
-->'''<big>This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>
| #default=page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]{{#if:{{{1|}}}|<br />The person who added this tag also commented: '''{{{1|}}}'''|}}
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WT:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WT:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WT:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
[[de:Vorlage:Löschantrag]]
[[fr:Modèle:supprimer]]
[[pl:Szablon:SDU]]
</noinclude>
l157hzc80v7w2rrbc0b4lzufkpb4h3x
43106
43105
2008-02-23T01:44:52Z
Ruakh
1334
&preloadtitle=%5B%5B{{urlencode:{{FULLPAGENAME}}}}%5D%5D}} x3
43106
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
|align="center"| [[Image:Crystal Clear filesystem trashcan full.png|right|75px]]
<!--
***START NAMESPACE-CHECKING CODE***
-->'''<big>This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle=%5B%5B{{urlencode:{{PAGENAME}}}}%5D%5D}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle=%5B%5B{{urlencode:{{FULLPAGENAME}}}}%5D%5D}} Add])</small>
| #default=page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle=%5B%5B{{urlencode:{{FULLPAGENAME}}}}%5D%5D}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]{{#if:{{{1|}}}|<br />The person who added this tag also commented: '''{{{1|}}}'''|}}
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WT:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WT:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WT:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
[[de:Vorlage:Löschantrag]]
[[fr:Modèle:supprimer]]
[[pl:Szablon:SDU]]
</noinclude>
pq3wemsfqhvhf708bvge1rpg1v5utct
43107
43106
2008-02-23T01:54:35Z
Ruakh
1334
fix category links; and, while I'm at it, I realized I can put the brackets inside the urlencode for clearer markup. Duh. :-
43107
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
|align="center"| [[Image:Crystal Clear filesystem trashcan full.png|right|75px]]
<!--
***START NAMESPACE-CHECKING CODE***
-->'''<big>This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{PAGENAME}}]]}}}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} Add])</small>
|Category=category has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} Add])</small>}}<!--
|#default=page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode[[{{FULLPAGENAME}}]]}}}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]{{#if:{{{1|}}}|<br />The person who added this tag also commented: '''{{{1|}}}'''|}}
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WT:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WT:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WT:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
[[de:Vorlage:Löschantrag]]
[[fr:Modèle:supprimer]]
[[pl:Szablon:SDU]]
</noinclude>
n1az463fys4333dcdzp0is4tfw5hh4g
43108
43107
2008-02-23T01:55:06Z
Ruakh
1334
I suck at copy and paste
43108
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
|align="center"| [[Image:Crystal Clear filesystem trashcan full.png|right|75px]]
<!--
***START NAMESPACE-CHECKING CODE***
-->'''<big>This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{PAGENAME}}]]}}}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} Add])</small>
|Category=category has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} Add])</small>
|#default=page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode[[{{FULLPAGENAME}}]]}}}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]{{#if:{{{1|}}}|<br />The person who added this tag also commented: '''{{{1|}}}'''|}}
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WT:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WT:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WT:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
[[de:Vorlage:Löschantrag]]
[[fr:Modèle:supprimer]]
[[pl:Szablon:SDU]]
</noinclude>
5mudh90635fko89yi3jykl8hed94gbb
43109
43108
2008-02-23T01:55:32Z
Ruakh
1334
restore missing colon
43109
wikitext
text/x-wiki
{| class="noprint" style="background:#F3F9FF; width:100%; margin-top:.5em; margin-bottom:.5em; border:1px solid #aaa; padding:0 10px 0 10px;"
|align="center"| [[Image:Crystal Clear filesystem trashcan full.png|right|75px]]
<!--
***START NAMESPACE-CHECKING CODE***
-->'''<big>This {{#switch:{{NAMESPACE}}
|<!--main-->=entry has been [[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{PAGENAME}}]]}}}} Add])</small>
|Talk=talk page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} Add])</small>
|Category=category has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} Add])</small>
|#default=page has been [[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]</big>''' <small>([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} Add])</small>}}<!--
***END NAMESPACE-CHECKING CODE***
--><br />Please see that page for justifications and discussion. Please do not remove this notice or blank this page while the question is being considered. However, you are welcome to make improvements to it[[Template:rfd|.]]{{#if:{{{1|}}}|<br />The person who added this tag also commented: '''{{{1|}}}'''|}}
|}<includeonly>[[Category:Requests for deletion]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfd}}</nowiki></tt> to an entry marks it for speedy deletion and adds it to [[:Category:Requests for deletion]]. It does not notify anyone reading the [[WT:RFD|requests page]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading the [[WT:RFD|requests page]] find the target page faster. Additionally, if the page has since been deleted, the red link is hard to miss.
Please enter a brief description of why you think it needs to be deleted on [[WT:RFD|the requests page]].
[[Category:Deletion templates|rfd]]
[[de:Vorlage:Löschantrag]]
[[fr:Modèle:supprimer]]
[[pl:Szablon:SDU]]
</noinclude>
m7juxncyh4jy0t3zjxk3dgr745ii972
43110
43109
2008-02-26T17:06:58Z
Conrad.Irwin
1315
complete re-jig
43110
wikitext
text/x-wiki
{| class="noprint" style="background:#EEEEFF; width:90%; margin:auto; margin-top:.5em; margin-bottom:.5em; border:1px dashed #4444AA; text-align:left"
| rowspan="2"| [[Image:Crystal Clear filesystem trashcan full.png|60px]]
! This <!--
Type of page depends on namespace:
-->{{#ifeq:{{TALKSPACE}}|{{NAMESPACE}}|talk page|{{#switch:{{NAMESPACE}}|<!--main-->=entry|Category=category|Template=template|#default=page}}}}<!--
--> has been {{#if:{{NAMESPACE}}|<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->|<!--
RFD -->[[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{PAGENAME}}]]}}}} +])</sup><!--
-->}}
|-
|Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this page as normal, though do not remove the {{temp|rfd}} until the debate has finished.
|}<includeonly>{{{demo|[[Category:Requests for deletion]]}}}</includeonly><noinclude>
Please see [[Template_talk:rfd|the talk page]] for details.
</noinclude>
opo95p9zm5hnsb31no36gmt0nzraa3x
43111
43110
2008-02-27T00:17:50Z
Ruakh
1334
+colon in RFDO case - I don't think it's ever harmful, and without it certain links won't work, notably category links.
43111
wikitext
text/x-wiki
{| class="noprint" style="background:#EEEEFF; width:90%; margin:auto; margin-top:.5em; margin-bottom:.5em; border:1px dashed #4444AA; text-align:left"
| rowspan="2"| [[Image:Crystal Clear filesystem trashcan full.png|60px]]
! This <!--
Type of page depends on namespace:
-->{{#ifeq:{{TALKSPACE}}|{{NAMESPACE}}|talk page|{{#switch:{{NAMESPACE}}|<!--main-->=entry|Category=category|Template=template|#default=page}}}}<!--
--> has been {{#if:{{NAMESPACE}}|<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->|<!--
RFD -->[[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{PAGENAME}}]]}}}} +])</sup><!--
-->}}
|-
|Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this page as normal, though do not remove the {{temp|rfd}} until the debate has finished.
|}<includeonly>{{{demo|[[Category:Requests for deletion]]}}}</includeonly><noinclude>
Please see [[Template_talk:rfd|the talk page]] for details.
</noinclude>
atapshw5k4gl2lw74wvfxgppoimws4t
43112
43111
2008-02-27T21:13:16Z
Conrad.Irwin
1315
use {{pagetype}}, should this template be red...?
43112
wikitext
text/x-wiki
{| class="noprint" style="background:#EEEEFF; width:90%; margin:auto; margin-top:.5em; margin-bottom:.5em; border:1px dashed #4444AA; text-align:left"
| rowspan="2"| [[Image:Crystal Clear filesystem trashcan full.png|60px]]
! This {{pagetype}} has been {{#if:{{NAMESPACE}}|<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->|<!--
RFD -->[[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{PAGENAME}}]]}}}} +])</sup><!--
-->}}
|-
|Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
|}<includeonly>{{{demo|[[Category:Requests for deletion]]}}}</includeonly><noinclude>
Please see [[Template_talk:rfd|the talk page]] for details.
</noinclude>
nartc359s3lwxnjznooyy0xd7u0tlhp
43113
43112
2008-02-28T01:27:34Z
Ruakh
1334
insert <noinclude>temp|</noinclude> into {{pagetype}} transclusions, so people visiting this template won't get confused about the intent.
43113
wikitext
text/x-wiki
{| class="noprint" style="background:#EEEEFF; width:90%; margin:auto; margin-top:.5em; margin-bottom:.5em; border:1px dashed #4444AA; text-align:left"
| rowspan="2"| [[Image:Crystal Clear filesystem trashcan full.png|60px]]
! This {{<noinclude>temp|</noinclude>pagetype}} has been {{#if:{{NAMESPACE}}|<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->|<!--
RFD -->[[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{PAGENAME}}]]}}}} +])</sup><!--
-->}}
|-
|Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
|}<includeonly>{{{demo|[[Category:Requests for deletion]]}}}</includeonly><noinclude>
Please see [[Template_talk:rfd|the talk page]] for details.
</noinclude>
sih4wncu7c6p2vwe3bfjcjwidf77rkv
43114
43113
2008-03-26T04:25:50Z
DAVilla
1405
send Transwiki, Citations to RFD not RFDO
43114
wikitext
text/x-wiki
{| class="noprint" style="background:#EEEEFF; width:90%; margin:auto; margin-top:.5em; margin-bottom:.5em; border:1px dashed #4444AA; text-align:left"
| rowspan="2"| [[Image:Crystal Clear filesystem trashcan full.png|60px]]
! This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Transwiki|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{PAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{PAGENAME}}]]}}}} +])</sup><!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->}}
|-
|Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
|}<includeonly>{{{demo|[[Category:Requests for deletion]]}}}</includeonly><noinclude>
Please see [[Template_talk:rfd|the talk page]] for details.
</noinclude>
iuz57ldm7sz7ebjn9roqkfccbe74prv
43115
43114
2008-03-26T04:30:12Z
DAVilla
1405
to include these spaces in titles, use FULLPAGENAME (which is just PAGENAME for Main space)
43115
wikitext
text/x-wiki
{| class="noprint" style="background:#EEEEFF; width:90%; margin:auto; margin-top:.5em; margin-bottom:.5em; border:1px dashed #4444AA; text-align:left"
| rowspan="2"| [[Image:Crystal Clear filesystem trashcan full.png|60px]]
! This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Transwiki|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->}}
|-
|Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
|}<includeonly>{{{demo|[[Category:Requests for deletion]]}}}</includeonly><noinclude>
Please see [[Template_talk:rfd|the talk page]] for details.
</noinclude>
q2soa7uorm7g0ivknzwusepst681cnd
43116
43115
2008-04-26T14:53:00Z
Conrad.Irwin
1315
categorise... I must be bored
43116
wikitext
text/x-wiki
{| class="noprint" style="background:#EEEEFF; width:90%; margin:auto; margin-top:.5em; margin-bottom:.5em; border:1px dashed #4444AA; text-align:left"
| rowspan="2"| [[Image:Crystal Clear filesystem trashcan full.png|60px]]
! This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Transwiki|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->}}
|-
|Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
|}<includeonly>{{{demo|[[Category:Requests for deletion<noinclude>|*</noinclude>]]}}}</includeonly><noinclude>
{{seeTalk}}
[[Category:Deletion templates]]
</noinclude>
45o8toc5nzsd6rsw8f20q1i67tsq8p3
43117
43116
2008-04-26T14:53:27Z
Conrad.Irwin
1315
add to top of RFD cat too
43117
wikitext
text/x-wiki
{| class="noprint" style="background:#EEEEFF; width:90%; margin:auto; margin-top:.5em; margin-bottom:.5em; border:1px dashed #4444AA; text-align:left"
| rowspan="2"| [[Image:Crystal Clear filesystem trashcan full.png|60px]]
! This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Transwiki|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->}}
|-
|Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
|}{{{demo|[[Category:Requests for deletion<noinclude>|*</noinclude>]]}}}<noinclude>
{{seeTalk}}
[[Category:Deletion templates]]
</noinclude>
tv2pn1k92pxvq03w76n55yrf04simwc
43118
43117
2008-05-18T11:59:07Z
Conrad.Irwin
1315
use maintenance box
43118
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Transwiki|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{{demo|[[Category:Requests for deletion<noinclude>|*</noinclude>]]}}}<noinclude>
{{seeTalk}}
[[Category:Deletion templates]]
[[Category:Wiktionary maintenance templates]]
</noinclude>
k6gy6w4qt56ttjstl7opzsgf9cq154j
43119
43118
2008-05-18T14:14:07Z
Ruakh
1334
fix catname
43119
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Transwiki|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{{demo|[[Category:Requests for deletion<noinclude>|*</noinclude>]]}}}<noinclude>
{{seeTalk}}
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
</noinclude>
r2l8bgi5dmw45i4hb886n1a5s7du4vx
43120
43119
2008-06-24T10:12:09Z
Conrad.Irwin
1315
{{UNLENCODE: {{FULLPAGENAME}}}} -> {{FULLPAGENAMEE}}
43120
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Transwiki|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle=%5B%5B{{FULLPAGENAMEE}}%5D%5D}} +])</sup><!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{{demo|[[Category:Requests for deletion<noinclude>|*</noinclude>]]}}}<noinclude>
{{seeTalk}}
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
</noinclude>
nfhn6bxz5472pv4s08dy5no4ojsqei3
43121
43120
2008-07-16T09:41:11Z
Conrad.Irwin
1315
Undo revision 4776209 by [[Special:Contributions/Conrad.Irwin|Conrad.Irwin]] ([[User talk:Conrad.Irwin|Talk]]) borks spaces
43121
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Transwiki|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{{demo|[[Category:Requests for deletion<noinclude>|*</noinclude>]]}}}<noinclude>
{{seeTalk}}
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
</noinclude>
r2l8bgi5dmw45i4hb886n1a5s7du4vx
43122
43121
2008-10-03T16:34:55Z
Random832
1944
Transwiki entries seem to be in /Others, both based on my reading of the instructions and what's currently used.
43122
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{{demo|[[Category:Requests for deletion<noinclude>|*</noinclude>]]}}}<noinclude>
{{seeTalk}}
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
</noinclude>
d2ddnncin3nvg4gyj7pd6n8mmcua2s6
43123
43122
2009-06-19T16:24:52Z
Mglovesfun
1369
[[fr:Modèle:supprimer]]
43123
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{FULLPAGENAME}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{{demo|[[Category:Requests for deletion<noinclude>|*</noinclude>]]}}}<noinclude>
{{seeTalk}}
[[Category:Deletion templates]]
[[Category:Maintenance templates]][[fr:Modèle:supprimer]]
</noinclude>
a6m4yn775sk6fsnekrbpf1stxktobzq
43124
43123
2010-04-22T15:45:52Z
Msh210
1325
+section
43124
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{section|{{FULLPAGENAME}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{section|{{FULLPAGENAME}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{{demo|[[Category:Requests for deletion<noinclude>|*</noinclude>]]}}}<noinclude>
{{seeTalk}}
[[Category:Deletion templates]]
[[Category:Maintenance templates]][[fr:Modèle:supprimer]]
</noinclude>
4hyup3ftale48t2dd7r6ki6w5eij4fb
43125
43124
2010-04-22T15:59:30Z
Msh210
1325
[[template:rft|rft]] already used {{{fragment}}}
43125
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{{demo|[[Category:Requests for deletion<noinclude>|*</noinclude>]]}}}<noinclude>
{{seeTalk}}
[[Category:Deletion templates]]
[[Category:Maintenance templates]][[fr:Modèle:supprimer]]
</noinclude>
ekxa883c4fx1n015hq8wor68if8ce2v
43126
43125
2010-05-25T15:15:33Z
Mglovesfun
1369
add nocat parameter, documentation link
43126
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{#if:{{{nocat|}}}||[[Category:Requests for deletion<noinclude>|*</noinclude>]]}}<noinclude>
{{documentation}}
[[Category:Deletion templates]]
[[Category:Maintenance templates]][[fr:Modèle:supprimer]]
</noinclude>
9d1pvxswf2jcvb3njdhdxnkkogtez3g
43127
43126
2011-02-14T19:59:18Z
Msh210
1325
43127
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{#if:{{{nocat|}}}||[[Category:Requests for deletion<noinclude>|*</noinclude>]]{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}}}<noinclude>
{{documentation}}
[[Category:Deletion templates]]
[[Category:Maintenance templates]][[fr:Modèle:supprimer]]
</noinclude>
95lwf5f5dk1tfgldz9pyi0yp14ey93r
43128
43127
2011-04-11T22:59:15Z
Internoob
1389
make {{rfd}} on /doc pages work as though they were not on a subpage
43128
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|{{#titleparts:{{FULLPAGENAME}}| -1}}|{{FULLPAGENAME}}}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|{{#titleparts:{{FULLPAGENAME}}| -1}}|:{{FULLPAGENAME}}}}]]}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{#if:{{{nocat|}}}||[[Category:Requests for deletion<noinclude>|*</noinclude>]]{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}}}<noinclude>
{{documentation}}
[[Category:Deletion templates]]
[[Category:Maintenance templates]][[fr:Modèle:supprimer]]
</noinclude>
4b9bc4o9fytgjxlmof25u3vanmd168x
43129
43128
2011-04-14T00:24:31Z
Internoob
1389
fix [[Thread:User talk:Internoob/Template:rfd|this]]
43129
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup><!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|{{#titleparts:{{FULLPAGENAME}}| -1}}|{{FULLPAGENAME}}}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|[[{{#titleparts:{{FULLPAGENAME}}| -1}}]]|[[:{{FULLPAGENAME}}]]}}}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{#if:{{{nocat|}}}||[[Category:Requests for deletion<noinclude>|*</noinclude>]]{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}}}<noinclude>
{{documentation}}
[[Category:Deletion templates]]
[[Category:Maintenance templates]][[fr:Modèle:supprimer]]
</noinclude>
5if61kupjoee4divxecfnmpo4j7txcj
43130
43129
2011-06-07T23:31:09Z
Mglovesfun
1369
if in the main namespace or citations, allow lang= to call attention. Also categories and interwikis to /doc
43130
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup>{{#if:{{{lang|}}}|[[Category:{{{{{lang}}}|l=}} terms needing attention]]}}<!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|{{#titleparts:{{FULLPAGENAME}}| -1}}|{{FULLPAGENAME}}}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|[[{{#titleparts:{{FULLPAGENAME}}| -1}}]]|[[:{{FULLPAGENAME}}]]}}}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{#if:{{{nocat|}}}||[[Category:Requests for deletion<noinclude>|*</noinclude>]]{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}}}<noinclude>{{documentation}}</noinclude>
80i8cn51wfr1x3knum1uab7ps93vxnw
43131
43130
2011-07-24T23:23:17Z
Ruakh
1334
per talk, {{rfd|lang=en}} does not need to add an entry to [[Category:English terms needing attention]]
43131
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup>{{#switch:{{{lang|}}}|en|=|[[Category:{{{{{lang}}}|l=}} terms needing attention]]}}<!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|{{#titleparts:{{FULLPAGENAME}}| -1}}|{{FULLPAGENAME}}}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|[[{{#titleparts:{{FULLPAGENAME}}| -1}}]]|[[:{{FULLPAGENAME}}]]}}}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{#if:{{{nocat|}}}||[[Category:Requests for deletion<noinclude>|*</noinclude>]]{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}}}<noinclude>{{documentation}}</noinclude>
p3yljuzjyd77odg2urtuxqh9vjmr2x9
43132
43131
2011-08-02T19:10:09Z
Msh210
1325
-[[Wiktionary:Todo/templates bypassing attention]]
43132
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup>{{#switch:{{{lang|}}}|en|=|{{attention|{{{lang}}}|topic={{{topic|}}}|rfd}}}}<!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|{{#titleparts:{{FULLPAGENAME}}| -1}}|{{FULLPAGENAME}}}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|[[{{#titleparts:{{FULLPAGENAME}}| -1}}]]|[[:{{FULLPAGENAME}}]]}}}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{#if:{{{nocat|}}}||[[Category:Requests for deletion<noinclude>|*</noinclude>]]}}<noinclude>{{documentation}}</noinclude>
2799d48hzb5gcoq2u1n5fdu2cag81um
43133
43132
2011-08-02T19:12:56Z
Msh210
1325
keep topic for English
43133
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup>{{#switch:{{{lang|}}}|en|=|{{attention|{{{lang}}}|rfd}}}}<!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|{{#titleparts:{{FULLPAGENAME}}| -1}}|{{FULLPAGENAME}}}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|[[{{#titleparts:{{FULLPAGENAME}}| -1}}]]|[[:{{FULLPAGENAME}}]]}}}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{#if:{{{nocat|}}}||[[Category:Requests for deletion<noinclude>|*</noinclude>]]{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}}}<noinclude>{{documentation}}</noinclude>
do9qlwx4bo01blk72zftewxrw6nsv7l
43134
43133
2011-08-02T19:17:45Z
Msh210
1325
forgot id
43134
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup>{{#switch:{{{lang|}}}|en|=|{{attention|{{{lang}}}|id=rfd|rfd}}}}<!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|{{#titleparts:{{FULLPAGENAME}}| -1}}|{{FULLPAGENAME}}}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|[[{{#titleparts:{{FULLPAGENAME}}| -1}}]]|[[:{{FULLPAGENAME}}]]}}}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{#if:{{{nocat|}}}||[[Category:Requests for deletion<noinclude>|*</noinclude>]]{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}}}<noinclude>{{documentation}}</noinclude>
tebba369t7uk0rwlem95j6sttnidlpm
43135
43134
2011-09-28T04:52:57Z
Liliana-60
1366
rfdo's go to separate category
43135
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup>{{#switch:{{{lang|}}}|en|=|{{attention|{{{lang}}}|id=rfd|rfd}}}}<!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|{{#titleparts:{{FULLPAGENAME}}| -1}}|{{FULLPAGENAME}}}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|[[{{#titleparts:{{FULLPAGENAME}}| -1}}]]|[[:{{FULLPAGENAME}}]]}}}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{#if:{{{nocat|}}}||<includeonly>{{#switch:{{NAMESPACE}}|<!--Main-->|Citations=[[Category:Requests for deletion]]|#default=[[Category:Requests for deletion/Others]]}}</includeonly>{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}}}<noinclude>{{documentation}}</noinclude>
jnxgl8k2uds3ii5uk437gyzobv6gl4i
43136
43135
2012-09-04T20:38:51Z
Msh210
1325
I think this makes more sense, since Transwiki: pages are (most of them) entries. Feel free to revert, with a comment on the talkpage.
43136
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations|Transwiki=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup>{{#switch:{{{lang|}}}|en|=|{{attention|{{{lang}}}|id=rfd|rfd}}}}<!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|{{#titleparts:{{FULLPAGENAME}}| -1}}|{{FULLPAGENAME}}}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|[[{{#titleparts:{{FULLPAGENAME}}| -1}}]]|[[:{{FULLPAGENAME}}]]}}}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{#if:{{{nocat|}}}||<includeonly>{{#switch:{{NAMESPACE}}|<!--Main-->|Citations=[[Category:Requests for deletion]]|#default=[[Category:Requests for deletion/Others]]}}</includeonly>{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}}}<noinclude>{{documentation}}</noinclude>
kgsgeqspgoo52gvzc9ajnv44x3mq4q1
43137
43136
2013-06-10T09:48:34Z
Mglovesfun
1369
43137
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations|Transwiki=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}}} +])</sup>{{#switch:{{{lang|}}}|en|=|{{attention|{{{lang}}}|id=rfd|rfd}}}}<!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|{{#titleparts:{{FULLPAGENAME}}| -1}}|{{FULLPAGENAME}}}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|[[{{#titleparts:{{FULLPAGENAME}}| -1}}]]|[[:{{FULLPAGENAME}}]]}}}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{#if:{{{nocat|}}}||<includeonly>{{#switch:{{NAMESPACE}}|<!--Main-->|Citations|Transwiki=[[Category:Requests for deletion]]|#default=[[Category:Requests for deletion/Others]]}}</includeonly>{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}}}<noinclude>{{documentation}}</noinclude>
dgw3dcdl68epbanpc9i5ecxzb7fzodu
43138
43137
2013-06-18T17:47:45Z
Msh210
1325
trying (per GP request)
43138
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations|Transwiki=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +])</sup>{{#switch:{{{lang|}}}|en|=|{{attention|{{{lang}}}|id=rfd|rfd}}}}<!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|{{#titleparts:{{FULLPAGENAME}}| -1}}|{{FULLPAGENAME}}}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|[[{{#titleparts:{{FULLPAGENAME}}| -1}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{#titleparts:{{FULLPAGENAME}}| -1}}]]|[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{#if:{{{nocat|}}}||<includeonly>{{#switch:{{NAMESPACE}}|<!--Main-->|Citations|Transwiki=[[Category:Requests for deletion]]|#default=[[Category:Requests for deletion/Others]]}}</includeonly>{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}}}<noinclude>{{documentation}}</noinclude>
0v2rojpis3i9iysmawbygla3ll8ifgr
43139
43138
2013-06-18T17:50:00Z
Msh210
1325
oops
43139
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= <span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"/>This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations|Transwiki=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +])</sup>{{#switch:{{{lang|}}}|en|=|{{attention|{{{lang}}}|id=rfd|rfd}}}}<!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|{{#titleparts:{{FULLPAGENAME}}| -1}}|{{FULLPAGENAME}}}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|[[{{#titleparts:{{FULLPAGENAME}}| -1}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{#titleparts:{{FULLPAGENAME}}| -1}}]]|[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{#if:{{{nocat|}}}||<includeonly>{{#switch:{{NAMESPACE}}|<!--Main-->|Citations|Transwiki=[[Category:Requests for deletion]]|#default=[[Category:Requests for deletion/Others]]}}</includeonly>{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}}}<noinclude>{{documentation}}</noinclude>
iganmv5tpu74ylov74l6qutzfoldbfy
43140
43139
2013-09-28T10:19:17Z
Atitarev
1355
43140
wikitext
text/x-wiki
{| class="prettytable" style="float:right;"
! Newest requests
|-
|style="font-size:0.9em;"|
<DynamicPageList>
category={{PAGENAME}}
namespace=0
count=10
addfirstcategorydate=true
mode=ordered
order=descending
</DynamicPageList>
|-
! Oldes requests
|-
|style="font-size:0.9em;"|
<DynamicPageList>
category={{PAGENAME}}
namespace=0
count=10
addfirstcategorydate=true
mode=ordered
order=ascending
</DynamicPageList>
|}
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= <span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"/>This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations|Transwiki=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +])</sup>{{#switch:{{{lang|}}}|en|=|{{attention|{{{lang}}}|id=rfd|rfd}}}}<!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|{{#titleparts:{{FULLPAGENAME}}| -1}}|{{FULLPAGENAME}}}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|[[{{#titleparts:{{FULLPAGENAME}}| -1}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{#titleparts:{{FULLPAGENAME}}| -1}}]]|[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{#if:{{{nocat|}}}||<includeonly>{{#switch:{{NAMESPACE}}|<!--Main-->|Citations|Transwiki=[[Category:Requests for deletion]]|#default=[[Category:Requests for deletion/Others]]}}</includeonly>{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}}}<noinclude>{{documentation}}</noinclude>
o0ts1m0v749ldfw2rr6qc9on1dx80jc
43141
43140
2013-09-28T10:20:29Z
Atitarev
1355
43141
wikitext
text/x-wiki
{| class="prettytable" style="float:right;"
! Newest requests
|-
|style="font-size:0.9em;"|
<DynamicPageList>
category={{PAGENAME}}
namespace=0
count=10
addfirstcategorydate=true
mode=ordered
order=descending
</DynamicPageList>
|-
! Oldes requests
|-
|style="font-size:0.9em;"|
<DynamicPageList>
category={{PAGENAME}}
namespace=0
count=10
addfirstcategorydate=true
mode=ordered
order=ascending
</DynamicPageList>
|}
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= <span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"/>This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations|Transwiki=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +])</sup>{{#switch:{{{lang|}}}|en|=|{{attention|{{{lang}}}|id=rfd|rfd}}}}<!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|{{#titleparts:{{FULLPAGENAME}}| -1}}|{{FULLPAGENAME}}}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|[[{{#titleparts:{{FULLPAGENAME}}| -1}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{#titleparts:{{FULLPAGENAME}}| -1}}]]|[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{#if:{{{nocat|}}}||<includeonly>{{#switch:{{NAMESPACE}}|<!--Main-->|Citations|Transwiki=[[Category:Requests for deletion]]|#default=[[Category:Requests for deletion/Others]]}}</includeonly>{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}}}<noinclude>{{documentation}}</noinclude>
ryh9fb67qkkcn3jjkm92xh6nawe1ab6
43142
43141
2013-09-28T10:20:52Z
Atitarev
1355
Reverted edits by [[Special:Contributions/Atitarev|Atitarev]]. If you think this rollback is in error, please leave a message on my talk page.
43142
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= <span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"/>This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations|Transwiki=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +])</sup>{{#switch:{{{lang|}}}|en|=|{{attention|{{{lang}}}|id=rfd|rfd}}}}<!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|{{#titleparts:{{FULLPAGENAME}}| -1}}|{{FULLPAGENAME}}}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|[[{{#titleparts:{{FULLPAGENAME}}| -1}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{#titleparts:{{FULLPAGENAME}}| -1}}]]|[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{#if:{{{nocat|}}}||<includeonly>{{#switch:{{NAMESPACE}}|<!--Main-->|Citations|Transwiki=[[Category:Requests for deletion]]|#default=[[Category:Requests for deletion/Others]]}}</includeonly>{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}}}<noinclude>{{documentation}}</noinclude>
iganmv5tpu74ylov74l6qutzfoldbfy
43143
43142
2016-07-15T09:26:10Z
Mahagaja
1364
fix code
43143
wikitext
text/x-wiki
{{maintenance box|red
|image= [[Image:Crystal Clear filesystem trashcan full.png|60px]]
|title= <span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span>This {{<noinclude>temp|</noinclude>pagetype}} has been {{#switch:{{NAMESPACE}}|<!--Main-->|Citations|Transwiki=<!--
RFD -->[[Wiktionary:Requests for deletion#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight:normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion|action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +])</sup>{{#switch:{{{lang|}}}|en|=|{{attention|{{{lang}}}|id=rfd|rfd}}}}<!--
-->|#default=<!--
RFDO -->[[Wiktionary:Requests for deletion/Others#{{{fragment|{{{section|{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|{{#titleparts:{{FULLPAGENAME}}| -1}}|{{FULLPAGENAME}}}}}}}}}}|nominated for deletion]]<sup class="plainlinks" style="font-weight: normal" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:{{#ifeq:{{NAMESPACE}} {{SUBPAGENAME}}|Template doc|[[{{#titleparts:{{FULLPAGENAME}}| -1}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{#titleparts:{{FULLPAGENAME}}| -1}}]]|[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}}}} +])</sup>}}
|text= Please see that page for discussion and justifications{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}. Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.
}}{{#if:{{{nocat|}}}||<includeonly>{{#switch:{{NAMESPACE}}|<!--Main-->|Citations|Transwiki=[[Category:Requests for deletion]]|#default=[[Category:Requests for deletion/Others]]}}</includeonly>{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}}}<noinclude>{{documentation}}</noinclude>
n5tququwsn1o21ju6181d47tf45w1of
43144
43143
2016-08-11T22:32:42Z
Rua
1351
43144
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#switch:{{NAMESPACE}}||Citations|Transwiki={{#switch:{{{lang|}}}|en|=|{{attention|{{{lang}}}|id=rfd|rfd}}}}}}<!--
-->{{#if:{{{lang|}}}||[[Category:language code missing/rfd]]}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki=[[Category:Requests for deletion]]<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
h4rlepjqcv1k1n5f4639dv7nfobc4mr
43145
43144
2016-08-11T22:33:18Z
Rua
1351
43145
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#switch:{{NAMESPACE}}||Citations|Transwiki={{#switch:{{{lang|}}}|en|=|{{attention|{{{lang}}}|id=rfd|rfd}}}}}}<!--
-->{{#if:{{{lang|}}}||[[Category:Language code missing/rfd]]}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki=[[Category:Requests for deletion]]<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
rocb8pe1di77gnosdyg0jenu8740d21
43146
43145
2017-04-26T02:56:52Z
Daniel Carrero
1329
rm attention
43146
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{lang|}}}||[[Category:Language code missing/rfd]]}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki=[[Category:Requests for deletion]]<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
r39xhovcw8zck9ha18pd83egvzpnv38
43147
43146
2017-05-21T01:22:17Z
Daniel Carrero
1329
Category:rfd with parameter 1
43147
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{lang|}}}||[[Category:Language code missing/rfd]]}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{1|}}}|[[Category:rfd with parameter 1]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki=[[Category:Requests for deletion]]<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
1pak7fkdh330yv902six5ku77jtrxh6
43148
43147
2017-05-23T16:58:11Z
Daniel Carrero
1329
43148
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: "{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{lang|}}}||[[Category:Language code missing/rfd]]}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{1|}}}|[[Category:rfd with parameter 1]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki=[[Category:Requests for deletion]]<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
qt5z5nfsxvid1eruc6du2otvxm0z65x
43149
43148
2017-05-23T16:59:44Z
Daniel Carrero
1329
The previous edit and this are to allow the format {{rfd|en|reason}}
43149
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{lang|}}}||[[Category:Language code missing/rfd]]}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{1|}}}|[[Category:rfd with parameter 1]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki=[[Category:Requests for deletion]]<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
qee417de1fykexccycao8jklbf5283g
43150
43149
2017-05-23T17:08:55Z
Daniel Carrero
1329
43150
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{lang|}}}|[[Category:rfd with lang]]|[[Category:Language code missing/rfd]]}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{1|}}}|[[Category:rfd with parameter 1]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki=[[Category:Requests for deletion]]<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
r3o288we0puu9b0sbp2o4qnfmnqtalb
43151
43150
2017-05-23T17:18:57Z
Daniel Carrero
1329
43151
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{lang|}}}|[[Category:rfd with lang]]|[[Category:Language code missing/rfd]]}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{1|}}}|<!--
-->[[Category:rfd with parameter 1]]<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki=[[Category:Requests for deletion]]<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
170zmd8dmhv04abizmpe3jjhp9s952v
43152
43151
2017-05-23T17:31:58Z
Daniel Carrero
1329
43152
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{lang|}}}|[[Category:rfd with lang]]|[[Category:Language code missing/rfd]]}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{1|}}}|<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|<!--
-->[[Category:rfd without parameter 1]]<!--
-->}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki=[[Category:Requests for deletion]]<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
eezmup0p2ew32g1s9yr9gddplogvunv
43153
43152
2017-05-23T17:32:46Z
Daniel Carrero
1329
43153
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{lang|}}}|[[Category:rfd with lang]]}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{1|}}}|<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|<!--
-->[[Category:Language code missing/rfd]]<!--
-->}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki=[[Category:Requests for deletion]]<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
rp98dywlotb2cekar4i6mfutsw17fqe
43154
43153
2017-05-23T18:06:22Z
Daniel Carrero
1329
rm category "Requests for deletion", replaced by language categories
43154
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{lang|}}}|[[Category:rfd with lang]]}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{1|}}}|<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|<!--
-->[[Category:Language code missing/rfd]]<!--
-->}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki=<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
56zyrcx1yw0qrmn32jxbjypbq1bt6g1
43155
43154
2017-05-23T18:43:59Z
Daniel Carrero
1329
43155
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{1|}}}|<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|<!--
-->[[Category:Language code missing/rfd]]<!--
-->}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki=<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
ea0chdas7yb6qtvyt8yvsnsqitqpie5
43156
43155
2017-05-24T11:00:49Z
Daniel Carrero
1329
43156
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{lang|{{{1|}}}}}}|<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|<!--
-->[[Category:Language code missing/rfd]]<!--
-->}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki=<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
n1b3ee6wsqgp3ylnluc2cd6mbh8bkyb
43157
43156
2017-05-24T11:02:46Z
Daniel Carrero
1329
43157
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{lang|{{{1|}}}}}}|<!--
-->|<!--
-->[[Category:Language code missing/rfd]]<!--
-->}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
nx0k2vi3p4gohq7m8awv2kr2rqes2bz
43158
43157
2017-05-24T11:26:36Z
Daniel Carrero
1329
No need for category "Language code missing/rfd" anymore. A lack of langcode will trigger a module error in entries, but not in templates, etc. which are in [[Category:Requests for deletion/Others]].
43158
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
acmg1gxsfkg1xlyt948h0mpvz8peyje
43159
43158
2017-05-26T22:43:52Z
-sche
1349
revert to revision of 26 April 2017; changes other than to require a language code could be re-added, but requiring a language code clearly lacks support
43159
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{{1|}}}| beyond the initial comment of: '''"{{{1}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{lang|}}}||[[Category:Language code missing/rfd]]}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki=[[Category:Requests for deletion]]<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
r39xhovcw8zck9ha18pd83egvzpnv38
43160
43159
2017-05-26T22:59:01Z
Daniel Carrero
1329
Give me a sec, I'll make the langcode optional.
43160
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
acmg1gxsfkg1xlyt948h0mpvz8peyje
43161
43160
2017-05-26T23:01:51Z
Daniel Carrero
1329
I'll test if it works without the langcode now.
43161
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{#if:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|<!--
-->[[Category:Language code missing/rfd]]<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
aj5yjgesxwzh6r5ekb8yjj7y72xy6va
43162
43161
2017-06-05T21:02:40Z
Daniel Carrero
1329
43162
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{#if:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|<!--
-->[[Category:Requests for deletion with the language code missing]]<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
jejfxrc9nuqc0xgher42qqfqvgadatz
43163
43162
2017-07-08T23:57:16Z
Erutuon
1339
removing "/documentation" from full page name so that anchor displays correctly on documentation pages
43163
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{#if:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|<!--
-->[[Category:Requests for deletion with the language code missing]]<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
2dq5e8eub9x817xfhmpsmairwld69gh
43164
43163
2017-11-25T13:23:13Z
Daniel Carrero
1329
Copying rfv template, that is: 1- making the langcode mandatory again, 2- auto-linking to the correct rfd page, English or Non-English
43164
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki=|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
ilp0ovn83pjwohyri8jd2ndjmeohqpa
43165
43164
2017-11-25T13:24:04Z
Daniel Carrero
1329
same as previous revision
43165
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
5e7vz2d6z70ugcgtbhnp6ci8zfs7fqr
43166
43165
2018-01-07T18:44:00Z
PUC
1484
test
43166
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
qrgjpa6ka73rrh9357j3qp3r95kntop
43167
43166
2018-01-07T19:00:32Z
PUC
1484
Undo revision 48383810 by [[Special:Contributions/Per utramque cavernam|Per utramque cavernam]] ([[User talk:Per utramque cavernam|talk]])
43167
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
5e7vz2d6z70ugcgtbhnp6ci8zfs7fqr
43168
43167
2019-02-25T16:41:45Z
Rua
1351
Include reconstructions on deletion pages for "terms"
43168
wikitext
text/x-wiki
{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
6tldtfd22f2p4x8fh826bx05zwfbdxx
43169
43168
2019-10-02T03:55:15Z
WingerBot
1359
Manually add {{check deprecated lang param usage}} to request and misc templates where lang= has been eliminated
43169
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
5sjaqg0x4n21llo2nah290xp8d9v2gy
43170
43169
2019-10-13T15:48:30Z
WingerBot
1359
Manually clean up request templates; if problems, contact [[User:Benwing2]]
43170
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{lang|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{langname|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
ftng4ctiig8etoit719o4d95kzynuch
43171
43170
2019-10-15T07:13:42Z
Benwing2
1346
bug fix
43171
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{langname|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
awowhbi1wmx4v2nz551gqlsu5oz7mma
43172
43171
2019-11-30T20:27:22Z
M. I. Wright
1945
Fixed "rfd-notice--" problem in the entry-creation thing (it was because the switch from lang= to 1= hadn't been accounted for in the "+" link)
43172
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|{{{1|}}}}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->Feel free to edit this {{<noinclude>temp|</noinclude>pagetype}} as normal, though do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{langname|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
ikhe0vdm0flm7q7lx5k0thmoy3jfeg4
43173
43172
2021-10-14T17:06:44Z
Mihia
1729
per [[Wiktionary:Beer_parlour/2021/October#Wording_of_RFD_banner]]
43173
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{lang|{{{1|}}}}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| beyond the initial comment of: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->. <!--
-->You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for deletion in {{langname|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
02nkoa8n15itb53sdrg8ipvv45nfm88
43174
43173
2021-11-07T07:09:23Z
Svartava
428
Removed |lang= parameter. That shouldn't be used anymore, and neither is it used. If it is used, page is automatically put into [[Category:Pages using deprecated templates]]. {{check deprecated lang param usage}} is already placed at the top.
43174
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
selclduk3zisfn7ykzdisig5kno8u00
43175
43174
2021-12-21T03:59:12Z
Benwing
1385
Changed protection settings for "[[Template:rfd]]": temporary, so [[User:Svartava]] can work on it ([Edit=Allow only autopatrollers] (expires 03:59, 22 December 2021 (UTC)) [Move=Allow only administrators] (indefinite))
43174
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image=[[Image:Crystal Clear filesystem trashcan full.png|60px]]<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->This {{<noinclude>temp|</noinclude>pagetype}} has been <!--
-->[[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|nominated for deletion]]<!--
--><sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup><!--
-->|text=<!--
-->Please see that page for discussion and justifications<!--
-->{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
selclduk3zisfn7ykzdisig5kno8u00
43176
43175
2021-12-21T10:05:05Z
Svartava
428
[[User_talk:Benwing2#New_parameter_for_RFV_and_RFD_templates]]: add |fail=1 param, allow non-admins to close RFD discussions
43176
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image= {{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as failed<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
--> [[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|requests for deletion]]}}<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|votes of editors|justifications{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The voting and discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you think this entry should not be deleted, please start an undeletion discussion for the same.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
iklgdyolyjyjpqekusjabfpoohwwnkp
43177
43176
2021-12-21T10:07:17Z
Svartava
428
43177
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as failed<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|requests for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|votes of editors|justifications{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The voting and discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you think this entry should not be deleted, please start an undeletion discussion for the same.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
p3yn7trxcshnk21b358ah4ap60ddh4e
43178
43177
2021-12-21T10:10:28Z
Svartava
428
43178
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as failed<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|requests for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|votes of editors|justifications{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The voting and discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you think this page should not be deleted, please start an undeletion discussion for the same.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
c1y06o50ntwzw01fo7fkvk096o5rvwf
43179
43178
2021-12-22T02:55:44Z
Benwing
1385
Changed protection settings for "[[Template:rfd]]": highly visible template ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only administrators] (indefinite))
43178
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as failed<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|requests for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|votes of editors|justifications{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The voting and discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you think this page should not be deleted, please start an undeletion discussion for the same.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
c1y06o50ntwzw01fo7fkvk096o5rvwf
43180
43179
2022-01-07T01:48:21Z
Benwing2
1346
[[User:Rishabhbhat]] [[User:Svartava2]] change wording for fail=1
43180
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|votes of editors|justifications{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The voting and discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you think this page should not be deleted, please start an undeletion discussion for the same.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
5vl3eui761shmd3o4qemcjjc2bp0r5c
43181
43180
2022-01-07T01:49:48Z
Benwing2
1346
needs a period at the end
43181
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|votes of editors|justifications{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The voting and discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you think this page should not be deleted, please start an undeletion discussion for the same.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
63wg4caq0yo0jv8cf2j406i0vgfz2av
43182
43181
2022-01-24T13:46:57Z
Fytcha
1383
Changed protection settings for "[[Template:rfd]]": temporarily: [[Wiktionary:Grease_pit/2021/December#Pre-filling_language_names_for_RFVN_and_RFDN]] ([Edit=Allow only autopatrollers] (indefinite) [Move=Allow only administrators] (indefinite))
43181
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|votes of editors|justifications{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The voting and discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you think this page should not be deleted, please start an undeletion discussion for the same.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
63wg4caq0yo0jv8cf2j406i0vgfz2av
43183
43182
2022-01-24T13:55:57Z
This, that and the other
894
add preloaded language name [[User:Fytcha]]
43183
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|votes of editors|justifications{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The voting and discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you think this page should not be deleted, please start an undeletion discussion for the same.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
5ewqdt9yhjhae81c143em0amkeruung
43184
43183
2022-01-24T13:57:41Z
This, that and the other
894
unbreak RFDO tagged pages
43184
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|votes of editors|justifications{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The voting and discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you think this page should not be deleted, please start an undeletion discussion for the same.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
2bmw3ww8e4lnuhdn7ddd9bvuxr2v8gg
43185
43184
2022-01-24T14:02:30Z
Fytcha
1383
Changed protection settings for "[[Template:rfd]]" ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only administrators] (indefinite))
43184
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|votes of editors|justifications{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The voting and discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you think this page should not be deleted, please start an undeletion discussion for the same.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
2bmw3ww8e4lnuhdn7ddd9bvuxr2v8gg
43186
43185
2022-01-25T02:45:58Z
Fytcha
1383
wrap langname in urlencode: as per [[Wiktionary:Grease_pit/2021/December#Pre-filling_language_names_for_RFVN_and_RFDN]]
43186
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|votes of editors|justifications{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The voting and discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you think this page should not be deleted, please start an undeletion discussion for the same.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
td8f7nisy162lu0dm2zpfv2vkcgbdwj
43187
43186
2022-04-22T16:04:12Z
Svartava
428
well, I wasn't aware of "reopening by objection" until [[Talk:barefaced liar|it was mentioned to me]], that was after I edited this page; hence: update own wording which I had added earlier
43187
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#ifeq:{{{1|}}}|en|/English|/Non-English}}|#default=/Others}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
0jozi08ziryvtrf0vip6ddk7ill874j
43188
43187
2022-07-04T14:35:59Z
Fytcha
1383
split CJK languages to [[WT:RFDCJK]] per [[Wiktionary:Beer_parlour/2022/June#The_State_of_WT:RFDN]], [[User:Benwing2]]
43188
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[Wiktionary:Requests for deletion/{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#switch:{{{1|}}}|en=English|zh|ja|ko|ryu|jje|och|ltc|ojp|oko|okm=CJK|#default=Non-English}}|#default=Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion/{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#switch:{{{1|}}}|en=English|zh|ja|ko|ryu|jje|och|ltc|ojp|oko|okm=CJK|#default=Non-English}}|#default=Others}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
05l3xnd803n9mqfrmrvvsr9v2r43kbs
43189
43188
2022-07-06T10:54:26Z
Fytcha
1383
add ko-ear to CJK per [[Special:Diff/67653561]]
43189
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[Wiktionary:Requests for deletion/{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#switch:{{{1|}}}|en=English|zh|ja|ko|ko-ear|ryu|jje|och|ltc|ojp|oko|okm=CJK|#default=Non-English}}|#default=Others}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:Wiktionary:Requests for deletion/{{#switch:{{NAMESPACE}}||Citations|Reconstruction|Transwiki={{#switch:{{{1|}}}|en=English|zh|ja|ko|ko-ear|ryu|jje|och|ltc|ojp|oko|okm=CJK|#default=Non-English}}|#default=Others}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
rna4r12drcdiob72sy9i5ntquu4eriy
43190
43189
2022-07-06T11:43:02Z
Fytcha
1383
use {{#invoke:request-forum|rfd|{{{1|}}}|{{NAMESPACE}}}} in order to avoid discrepancies
43190
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[{{#invoke:request-forum|rfd|{{{1|}}}|{{NAMESPACE}}}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:{{#invoke:request-forum|rfd|{{{1|}}}|{{NAMESPACE}}}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
qjbm4pfvb7fkn7ao7nl869ax67zuehg
43191
43190
2022-08-27T03:30:37Z
WingerBot
1359
remove extraneous spaces at end of line
43191
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[{{#invoke:request-forum|rfd|{{{1|}}}|{{NAMESPACE}}}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:{{#invoke:request-forum|rfd|{{{1|}}}|{{NAMESPACE}}}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
4jyua7w63nbcm1x2rukulpcoqrpp2ku
43192
43191
2023-01-12T03:28:16Z
Theknightwho
1347
43192
wikitext
text/x-wiki
{{ {{#if:{{{lang|}}}|check deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[{{#invoke:request-forum|rfd|{{{1|}}}|{{NAMESPACE}}}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:{{#invoke:request-forum|rfd|{{{1|}}}|{{NAMESPACE}}}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
7zujq4i5185jfyng3qu13judbtzfhsz
43193
43192
2023-01-31T17:12:50Z
Theknightwho
1347
43193
wikitext
text/x-wiki
{{ {{#if:{{{lang|}}}|deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[{{#invoke:request-forum|rfd|{{{1|}}}|{{NAMESPACE}}}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:{{#invoke:request-forum|rfd|{{{1|}}}|{{NAMESPACE}}}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
5hjha7m1ul0lbqgbpjrrat88fmryi9p
43194
43193
2023-01-31T17:16:32Z
Theknightwho
1347
43194
wikitext
text/x-wiki
{{ {{#if:{{{lang|}}}|deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[{{#invoke:request-forum|rfd|{{{1|}}}|{{NAMESPACE}}}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:{{#invoke:request-forum|rfd|{{{1|}}}|{{NAMESPACE}}}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
mok4mx4dmd8msip1g0kaskit79zrtke
43195
43194
2023-01-31T20:17:32Z
Theknightwho
1347
43195
wikitext
text/x-wiki
{{ {{#if:{{{lang|}}}|deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[{{#invoke:request-forum|rfd|{{{1|}}}|{{NAMESPACE}}}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:{{#invoke:request-forum|rfd|{{{1|}}}|{{NAMESPACE}}}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:rfd with topic]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
kjgzzia3oez13ii40he1tlsfg5wu1kb
43196
43195
2023-03-13T10:34:35Z
This, that and the other
894
remove obsolete topic category system
43196
wikitext
text/x-wiki
{{ {{#if:{{{lang|}}}|deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[{{#invoke:request-forum|rfd|{{{1|}}}|{{NAMESPACE}}}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:{{#invoke:request-forum|rfd|{{{1|}}}|{{NAMESPACE}}}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
399tcee39v8r7nonkhx2l0bhywe977v
43197
43196
2023-04-10T17:17:16Z
Theknightwho
1347
No longer necessary to pass namespace name to [[Module:request-forum]].
43197
wikitext
text/x-wiki
{{ {{#if:{{{lang|}}}|deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[{{#invoke:request-forum|rfd|{{{1|}}}}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:{{#invoke:request-forum|rfd|{{{1|}}}}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
36lrs007cntubpa2l5zkxo9l0krgwn4
43198
43197
2024-04-04T03:09:48Z
Theknightwho
1347
Validate template parameters.
43198
wikitext
text/x-wiki
{{#invoke:checkparams|warn}}<!-- Validate template parameters
-->{{ {{#if:{{{lang|}}}|deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[{{#invoke:request-forum|rfd|{{{1|}}}}}#{{{fragment|{{{section|{{#invoke:string|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:{{#invoke:request-forum|rfd|{{{1|}}}}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
7efypn474qn4vf70tmzq5mmitc6y74p
43199
43198
2025-04-05T18:55:31Z
SurjectionBot
1386
(bot:fi) rename [[Module:string]] to [[Module:string/templates]]
43199
wikitext
text/x-wiki
{{#invoke:checkparams|warn}}<!-- Validate template parameters
-->{{ {{#if:{{{lang|}}}|deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}|[[File:Icon delete.svg|50px]]|[[Image:Crystal Clear filesystem trashcan full.png|60px]]}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[{{#invoke:request-forum|rfd|{{{1|}}}}}#{{{fragment|{{{section|{{#invoke:string/templates|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:{{#invoke:request-forum|rfd|{{{1|}}}}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
dq2h47pw65miqblc49yqo6jhwbqmt3e
43200
43199
2025-09-30T20:34:46Z
Juwan
804
updated icons to Codex
43200
wikitext
text/x-wiki
{{#invoke:checkparams|warn}}<!-- Validate template parameters
-->{{{{#if:{{{lang|}}}|deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}<!--
-->|[[File:Codex icon Clock red.svg|alt=Speedy-delete|50px]]<!--
-->|[[File:Codex icon trash red.svg|60px|alt=Delete]]<!--
-->}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[{{#invoke:request-forum|rfd|{{{1|}}}}}#{{{fragment|{{{section|{{#invoke:string/templates|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:{{#invoke:request-forum|rfd|{{{1|}}}}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
jwcohiib0jsweoz6rrbp5i6sbnzia2z
43201
43200
2025-10-08T15:31:41Z
Surjection
380
43201
wikitext
text/x-wiki
{{#invoke:checkparams|warn}}<!-- Validate template parameters
-->{{{{#if:{{{lang|}}}|deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}<!--
-->|[[File:Codex icon Clock red.svg|alt=Speedy-delete|50px|link=]]<!--
-->|[[File:Codex icon trash red.svg|60px|alt=Delete|link=]]<!--
-->}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[{{#invoke:request-forum|rfd|{{{1|}}}}}#{{{fragment|{{{section|{{#invoke:string/templates|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:{{#invoke:request-forum|rfd|{{{1|}}}}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
opulmvye0vnn9mpsqjscau4qit22hsw
43202
43201
2025-10-08T15:36:04Z
Surjection
380
43202
wikitext
text/x-wiki
{{#invoke:checkparams|warn}}<!-- Validate template parameters
-->{{{{#if:{{{lang|}}}|deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}<!--
-->|[[File:Codex icon Clock red.svg|50px|alt=Speedy delete|link=]]<!--
-->|[[File:Codex icon trash red.svg|60px|alt=Delete|link=]]<!--
-->}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[{{#invoke:request-forum|rfd|{{{1|}}}}}#{{{fragment|{{{section|{{#invoke:string/templates|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:{{#invoke:request-forum|rfd|{{{1|}}}}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
hhxkjapqkvibptsdf5qodj0erko65rt
43203
43202
2025-10-08T15:47:11Z
Surjection
380
43203
wikitext
text/x-wiki
{{#invoke:checkparams|warn}}<!-- Validate template parameters
-->{{{{#if:{{{lang|}}}|deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}<!--
-->|[[File:Codex icon clock color-error.svg|50px|alt=Speedy delete|link=]]<!--
-->|[[File:Codex icon trash color-error.svg|60px|alt=Delete|link=]]<!--
-->}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[{{#invoke:request-forum|rfd|{{{1|}}}}}#{{{fragment|{{{section|{{#invoke:string/templates|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:{{#invoke:request-forum|rfd|{{{1|}}}}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
i6y8fd8hxce12y0y3d2yfc41a4i4cnv
43204
43203
2025-10-10T18:30:34Z
Surjection
380
use more standard 50px size
43204
wikitext
text/x-wiki
{{#invoke:checkparams|warn}}<!-- Validate template parameters
-->{{{{#if:{{{lang|}}}|deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}<!--
-->|[[File:Codex icon clock color-error.svg|50px|alt=Speedy delete|link=]]<!--
-->|[[File:Codex icon trash color-error.svg|50px|alt=Delete|link=]]<!--
-->}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[{{#invoke:request-forum|rfd|{{{1|}}}}}#{{{fragment|{{{section|{{#invoke:string/templates|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:{{#invoke:request-forum|rfd|{{{1|}}}}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
8n2xn9no0od6l79ykbqrdogwb0zc3yk
43205
43204
2025-10-23T16:54:23Z
AutoDooz
1452
no existing calls with bad parameters, throw error instead of warning to avoid future misuse
43205
wikitext
text/x-wiki
{{#invoke:checkparams|error}}<!-- Validate template parameters
-->{{{{#if:{{{lang|}}}|deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}<!--
-->|[[File:Codex icon clock color-error.svg|50px|alt=Speedy delete|link=]]<!--
-->|[[File:Codex icon trash color-error.svg|50px|alt=Delete|link=]]<!--
-->}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[{{#invoke:request-forum|rfd|{{{1|}}}}}#{{{fragment|{{{section|{{#invoke:string/templates|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:{{#invoke:request-forum|rfd|{{{1|}}}}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{p|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
psm7qjnondgxa85lq52wbgicyql9orb
43206
43205
2025-11-15T22:44:52Z
Benwing2
1346
43206
wikitext
text/x-wiki
{{#invoke:checkparams|error}}<!-- Validate template parameters
-->{{{{#if:{{{lang|}}}|deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}<!--
-->|[[File:Codex icon clock color-error.svg|50px|alt=Speedy delete|link=]]<!--
-->|[[File:Codex icon trash color-error.svg|50px|alt=Delete|link=]]<!--
-->}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[{{#invoke:request-forum|rfd|{{{1|}}}}}#{{{fragment|{{{section|{{#invoke:string/templates|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:{{#invoke:request-forum|rfd|{{{1|}}}}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{para|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
8w9do4fntv4tusx43dmsyn1v35tuhrs
43207
43206
2026-06-24T04:39:31Z
King ChristLike
964
160 revisions imported from [[:en:Template:rfd]]
43206
wikitext
text/x-wiki
{{#invoke:checkparams|error}}<!-- Validate template parameters
-->{{{{#if:{{{lang|}}}|deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{maintenance box|red<!--
-->|image={{#if:{{{fail|}}}<!--
-->|[[File:Codex icon clock color-error.svg|50px|alt=Speedy delete|link=]]<!--
-->|[[File:Codex icon trash color-error.svg|50px|alt=Delete|link=]]<!--
-->}}<!--
-->|title=<!--
--><span id="rfd-notice-{{{1|}}}-{{{topic|}}}"></span><!--
-->{{#if:{{{fail|}}}<!--
-->|A user has marked this {{<noinclude>temp|</noinclude>pagetype}} as having failed a<!--
-->|A user has added this {{<noinclude>temp|</noinclude>pagetype}} to<!--
-->}} [[{{#invoke:request-forum|rfd|{{{1|}}}}}#{{{fragment|{{{section|{{#invoke:string/templates|gsub|{{FULLPAGENAME}}|/documentation|}}}}}}}}|{{#if:{{{fail|}}}|request|requests}} for deletion]]<!--
-->{{#if:{{{fail|}}}||<sup class="plainlinks" style="font-weight:normal" title="Start discussion">(<!--
-->[{{fullurl:{{#invoke:request-forum|rfd|{{{1|}}}}}|action=edit§ion=new{{#switch:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|=|en=|#default=&preload=Template:rfd/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20}}&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}#rfd-notice-{{{1|}}}-{{{topic|}}}|{{FULLPAGENAME}}]]}}}} +]<!--
-->)</sup>}}.<!--
-->|text=<!--
-->Please see that page for discussion and {{#if:{{{fail|}}}|consensus|justifications}}{{#if:{{{2|}}}| beyond the initial comment of: '''“{{{2|}}}”'''}}<!--
-->. <!--
-->{{#if:{{{fail|}}}<!--
-->|The discussion is closed now, and this page is awaiting speedy-deletion by an administrator. If you object, please remove {{para|fail|1}} from the template and reopen the discussion.<!--
-->|You may continue to edit this {{<noinclude>temp|</noinclude>pagetype}} while the discussion proceeds, but please mention significant edits at the RFD discussion and ensure that the intention of votes already cast is not left unclear. Do not remove the {{temp|rfd}} until the debate has finished.<!--
-->}}<!--
-->}}<!--(end of {{maintenance box}})
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#if:{{{fail|}}}<!--
-->|[[Category:Candidates for speedy deletion]]<!--
-->|{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1|}}}<!--
-->|Requests for deletion in {{langname|{{{1|}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for deletion/Others]]<!--
-->}}<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
8w9do4fntv4tusx43dmsyn1v35tuhrs
Templeeti:rfd/documentation
10
8219
43213
2010-05-25T15:19:24Z
Mglovesfun
1369
Created page with '{{documentation subpage}} ==Usage== # Add {{temp|rfd|short reason here}} to the top of the page. # Click on the <sup>(+)</sup> to add the page to [[Wiktionary:Requests for deleti...'
43213
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
# Add {{temp|rfd|short reason here}} to the top of the page.
# Click on the <sup>(+)</sup> to add the page to [[Wiktionary:Requests for deletion]] or [[Wiktionary:Requests for deletion/Others]] as appropriate.
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows
{{rfd|short reason here|nocat=1}}
fgsmxtgk5aj6szasafi3evt85xli7u3
43214
43213
2011-06-07T23:31:51Z
Mglovesfun
1369
43214
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
# Add {{temp|rfd|short reason here}} to the top of the page.
# Click on the <sup>(+)</sup> to add the page to [[Wiktionary:Requests for deletion]] or [[Wiktionary:Requests for deletion/Others]] as appropriate.
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows
{{rfd|short reason here|nocat=1}}
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[fr:Modèle:supprimer]]
</includeonly>
si0zrfsutch80vlxoihp9c4c1xur562
43215
43214
2011-11-12T11:04:52Z
Mglovesfun
1369
[[ca:Plantilla:esborrar1]]
43215
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
# Add {{temp|rfd|short reason here}} to the top of the page.
# Click on the <sup>(+)</sup> to add the page to [[Wiktionary:Requests for deletion]] or [[Wiktionary:Requests for deletion/Others]] as appropriate.
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows
{{rfd|short reason here|nocat=1}}
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer]]
</includeonly>
0u5agm9z7o4gu6aczsi7wqfjrir34bv
43216
43215
2011-11-12T11:05:50Z
Mglovesfun
1369
43216
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
# Add {{temp|rfd|short reason here}} to the top of the page.
# Click on the <sup>(+)</sup> to add the page to [[Wiktionary:Requests for deletion]] or [[Wiktionary:Requests for deletion/Others]] as appropriate.
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows
{{rfd|short reason here|nocat=1}}
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
</includeonly>
kdk6a6fo9nor6n7yrubgw9bebh6p6sv
43217
43216
2012-01-17T00:49:08Z
Very trivial
1946
interwiki link
43217
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
# Add {{temp|rfd|short reason here}} to the top of the page.
# Click on the <sup>(+)</sup> to add the page to [[Wiktionary:Requests for deletion]] or [[Wiktionary:Requests for deletion/Others]] as appropriate.
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows
{{rfd|short reason here|nocat=1}}
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[uk:Шаблон:delete]]
</includeonly>
9jt4z869xl26b3orqgusj6xti2xmoam
43218
43217
2012-02-18T00:08:40Z
Mglovesfun
1369
[[pt:Predefinição:apagar]]
43218
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
# Add {{temp|rfd|short reason here}} to the top of the page.
# Click on the <sup>(+)</sup> to add the page to [[Wiktionary:Requests for deletion]] or [[Wiktionary:Requests for deletion/Others]] as appropriate.
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows
{{rfd|short reason here|nocat=1}}
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
2wn6awp05cgghpxtp7eg9dytjsj3jzy
43219
43218
2013-06-10T09:48:43Z
Mglovesfun
1369
Mglovesfun moved page [[Template:rfd/doc]] to [[Template:rfd/documentation]] without leaving a redirect: Moving documentation
43218
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
# Add {{temp|rfd|short reason here}} to the top of the page.
# Click on the <sup>(+)</sup> to add the page to [[Wiktionary:Requests for deletion]] or [[Wiktionary:Requests for deletion/Others]] as appropriate.
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows
{{rfd|short reason here|nocat=1}}
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
2wn6awp05cgghpxtp7eg9dytjsj3jzy
43220
43219
2015-07-04T13:09:38Z
Kephir
1378
43220
wikitext
text/x-wiki
{{documentation subpage}}
Despite the appearance, this template is not nominated for deletion.
==Usage==
# Add {{temp|rfd|<var>short reason here</var>}} to the top of the page.
# Click on the <sup>(+)</sup> to add the page to [[Wiktionary:Requests for deletion]] or [[Wiktionary:Requests for deletion/Others]] as appropriate.
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows:
{{rfd|short reason here|nocat=1}}
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
93hgnrpahhf6vd3x5v9xmyh8tqvlolf
43221
43220
2017-05-26T00:10:09Z
Daniel Carrero
1329
43221
wikitext
text/x-wiki
{{documentation subpage}}
Despite the appearance, this template is not nominated for deletion.
To use this template,
# Add {{temp|rfd|en|short reason here}} ("en" for English, replace with the appropriate language code) to the page source as appropriate.
# Start the discussion on to [[Wiktionary:Requests for deletion]] or [[Wiktionary:Requests for deletion/Others]] as appropriate by clicking the (+) link.
The language code is mandatory in entries, reconstruction and citation pages, otherwise the template will generate a module error. When adding rfc in templates, categories and appendices, the language code is optional.
This will add the page to the correct language category, e.g., [[:Category:Requests for deletion in English entries]].
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows:
{{rfd|short reason here|nocat=1}}
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
cw4mhmkx1srx2rujmg3pdv158bmmuw5
43222
43221
2017-05-26T00:10:19Z
Daniel Carrero
1329
43222
wikitext
text/x-wiki
{{documentation subpage}}
Despite the appearance, this template is not nominated for deletion.
To use this template,
# Add {{temp|rfd|en|short reason here}} ("en" for English, replace with the appropriate language code) to the page source as appropriate.
# Start the discussion on to [[Wiktionary:Requests for deletion]] or [[Wiktionary:Requests for deletion/Others]] as appropriate by clicking the (+) link.
The language code is mandatory in entries, reconstruction and citation pages, otherwise the template will generate a module error. When adding rfc in templates, categories and appendices, the language code is optional.
This will add the page to the correct language category, e.g., [[:Category:Requests for deletion in English entries]].
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows:
{{rfd|short reason here|nocat=1}}
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
qm76wu9852oa9ktdpl2yhyddiivzasb
43223
43222
2019-04-25T12:41:07Z
102.129.224.2
43223
wikitext
text/x-wiki
The FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. dingThe FitnessGram Pacer Test is a multistage aerobic capacity test that progressively gets more difficult as it continues. The 20 meter pacer test will begin in 30 seconds. Line up at the start. The running speed starts slowly but gets faster each minute after you hear this signal bodeboop. A sing lap should be completed every time you hear this sound. ding Remember to run in a straight line and run as long as possible. The second time you fail to complete a lap before the sound, your test is over. The test will begin on the word start. On your mark. Get ready!… Start. ding
mfxujwe4fj9okt24z3kfqe8emxktfnm
43224
43223
2019-04-25T14:26:06Z
Surjection
380
Reverted edits by [[Special:Contributions/102.129.224.2|102.129.224.2]]. If you think this rollback is in error, please leave a message on my [[User talk:Surjection|talk page]].
43224
wikitext
text/x-wiki
{{documentation subpage}}
Despite the appearance, this template is not nominated for deletion.
To use this template,
# Add {{temp|rfd|en|short reason here}} ("en" for English, replace with the appropriate language code) to the page source as appropriate.
# Start the discussion on to [[Wiktionary:Requests for deletion]] or [[Wiktionary:Requests for deletion/Others]] as appropriate by clicking the (+) link.
The language code is mandatory in entries, reconstruction and citation pages, otherwise the template will generate a module error. When adding rfc in templates, categories and appendices, the language code is optional.
This will add the page to the correct language category, e.g., [[:Category:Requests for deletion in English entries]].
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows:
{{rfd|short reason here|nocat=1}}
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
qm76wu9852oa9ktdpl2yhyddiivzasb
43225
43224
2019-05-06T18:09:29Z
41.113.108.81
43225
wikitext
text/x-wiki
{{documentation subpage}}
Despite the appearance, this template is not nominated for deletion.
To use this template,
# Add {{temp|rfd|en|short reason here}} ("en" for English, replace with the appropriate language code) to the page source as appropriate.
# Start the discussion on to [[Wiktionary:Requests for deletion]] or [[Wiktionary:Requests for deletion/Others]] as appropriate by clicking the (-_- link.
The language code is mandatory in entries, reconstruction and citation pages, otherwise the template will generate a module error. When adding rfc in templates, categories and appendices, the language code is optional.
This will add the page to the correct language category, e.g., [[:Category:Requests for deletion in English entries]].
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows:
{{rfd|short reason here|nocat=1}}
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
c9xo2kdd81wsdhqp9flav5z1u99d4iz
43226
43225
2019-05-06T18:18:04Z
Surjection
380
Reverted edits by [[Special:Contributions/41.113.108.81|41.113.108.81]]. If you think this rollback is in error, please leave a message on my [[User talk:Surjection|talk page]].
43226
wikitext
text/x-wiki
{{documentation subpage}}
Despite the appearance, this template is not nominated for deletion.
To use this template,
# Add {{temp|rfd|en|short reason here}} ("en" for English, replace with the appropriate language code) to the page source as appropriate.
# Start the discussion on to [[Wiktionary:Requests for deletion]] or [[Wiktionary:Requests for deletion/Others]] as appropriate by clicking the (+) link.
The language code is mandatory in entries, reconstruction and citation pages, otherwise the template will generate a module error. When adding rfc in templates, categories and appendices, the language code is optional.
This will add the page to the correct language category, e.g., [[:Category:Requests for deletion in English entries]].
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows:
{{rfd|short reason here|nocat=1}}
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
qm76wu9852oa9ktdpl2yhyddiivzasb
43227
43226
2019-08-10T17:31:20Z
Erutuon
1339
document fragment parameter
43227
wikitext
text/x-wiki
{{documentation subpage}}
Despite the appearance, this template is not nominated for deletion.
To use this template,
# Add {{temp|rfd|en|short reason here}} ("en" for English, replace with the appropriate language code) to the page source as appropriate.
# Start the discussion on to [[Wiktionary:Requests for deletion/English]], [[Wiktionary:Requests for deletion/Non-English]]{{,}} or [[Wiktionary:Requests for deletion/Others]] as appropriate by clicking the (+) link.
The language code is mandatory in entries, reconstruction and citation pages, otherwise the template will generate a module error. When adding rfc in templates, categories and appendices, the language code is optional.
This will add the page to the correct language category, e.g., [[:Category:Requests for deletion in English entries]].
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows:
{{rfd|short reason here|nocat=1}}
==Parameters==
; {{para|fragment}}
: The template will link to this section in [[Wiktionary:Requests for deletion/English]], [[Wiktionary:Requests for deletion/Non-English]]{{,}} or [[Wiktionary:Requests for deletion/Others]].
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
39lrvts0y8wuk7f6sjrc8l2gz3mbddm
43228
43227
2019-10-17T05:16:56Z
WingerBot
1359
Manual cleanups of request template documentation pages
43228
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
Despite the appearance, this template is not nominated for deletion.
To use this template,
# Add {{temp|rfd|en|short reason here}} ("en" for English, replace with the appropriate language code) to the page source as appropriate.
# Start the discussion on to [[Wiktionary:Requests for deletion/English]], [[Wiktionary:Requests for deletion/Non-English]]{{,}} or [[Wiktionary:Requests for deletion/Others]] as appropriate by clicking the (+) link.
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows:
{{rfd|en|short reason here|nocat=1}}
==Parameters==
; {{para|1|req=1}}
: The [[Wiktionary:LANGCODE|language code]] of the term needing cleanup. See [[Wiktionary:List of languages]]. Use <code>und</code> if a single language doesn't apply, e.g. in templates, categories and appendices.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fragment}}, {{para|section}}
: An optional URL section to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
; {{para|topic}}
: If given, add this page to [[:Category:Entries needing topical attention]] and (eventually, manually) to the list at [[Wiktionary:Entries needing topical attention]]. Also add the specified param value to a CSS span id contained in the title.
This template adds the page to the following categories (where LANG is the language whose code is specified using {{para|1}}):
* [[:Category:Requests for deletion in LANG entries]] (if in the main, Citations, Transwiki or Reconstruction namespaces)
* [[:Category:Requests for cleanup/Others]] (if in any other namespaces)
* [[:Category:Entries needing topical attention]] (if {{para|topic}} is given)
* [[:Category:rfd with topic]] (if {{para|topic}} is given; applies to all namespaces)
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[Category:Request templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
6djzdhct69b90bc9rouv0mzzgaqnbyb
43229
43228
2020-01-25T23:18:36Z
97.37.33.152
43229
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
Despite the appearance, this template is not nominated for deletion.
To use this template,
# Add {{temp|rfd|en|short reason here}} ("en" for English, replay ce with the appropriate language code) to the page source as appropriate.
# Start the discussion on to [[Wiktionary:Requests for deletion/English]], [[Wiktionary:Requests for deletion/Non-English]]{{,}} or [[Wiktionary:Requests for deletion/Others]] as appropriate by clicking the (+) link.
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows:
{{rfd|en|short reason here|nocat=1}}
==Parameters==
; {{para|1|req=1}}
: The [[Wiktionary:LANGCODE|language code]] of the term needing cleanup. See [[Wiktionary:List of languages]]. Use <code>und</code> if a single language doesn't apply, e.g. in templates, categories and appendices.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fragment}}, {{para|section}}
: An optional URL section to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
; {{para|topic}}
: If given, add this page to [[:Category:Entries needing topical attention]] and (eventually, manually) to the list at [[Wiktionary:Entries needing topical attention]]. Also add the specified param value to a CSS span id contained in the title.
This template adds the page to the following categories (where LANG is the language whose code is specified using {{para|1}}):
* [[:Category:Requests for deletion in LANG entries]] (if in the main, Citations, Transwiki or Reconstruction namespaces)
* [[:Category:Requests for cleanup/Others]] (if in any other namespaces)
* [[:Category:Entries needing topical attention]] (if {{para|topic}} is given)
* [[:Category:rfd with topic]] (if {{para|topic}} is given; applies to all namespaces)
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[Category:Request templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
2bfq4ygyiqd3c3uhs3227mq019gv8sk
43230
43229
2020-01-26T11:31:52Z
Robbie SWE
1487
Reverted edits by [[Special:Contributions/97.37.33.152|97.37.33.152]]. If you think this rollback is in error, please leave a message on my talk page.
43230
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
Despite the appearance, this template is not nominated for deletion.
To use this template,
# Add {{temp|rfd|en|short reason here}} ("en" for English, replace with the appropriate language code) to the page source as appropriate.
# Start the discussion on to [[Wiktionary:Requests for deletion/English]], [[Wiktionary:Requests for deletion/Non-English]]{{,}} or [[Wiktionary:Requests for deletion/Others]] as appropriate by clicking the (+) link.
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows:
{{rfd|en|short reason here|nocat=1}}
==Parameters==
; {{para|1|req=1}}
: The [[Wiktionary:LANGCODE|language code]] of the term needing cleanup. See [[Wiktionary:List of languages]]. Use <code>und</code> if a single language doesn't apply, e.g. in templates, categories and appendices.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fragment}}, {{para|section}}
: An optional URL section to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
; {{para|topic}}
: If given, add this page to [[:Category:Entries needing topical attention]] and (eventually, manually) to the list at [[Wiktionary:Entries needing topical attention]]. Also add the specified param value to a CSS span id contained in the title.
This template adds the page to the following categories (where LANG is the language whose code is specified using {{para|1}}):
* [[:Category:Requests for deletion in LANG entries]] (if in the main, Citations, Transwiki or Reconstruction namespaces)
* [[:Category:Requests for cleanup/Others]] (if in any other namespaces)
* [[:Category:Entries needing topical attention]] (if {{para|topic}} is given)
* [[:Category:rfd with topic]] (if {{para|topic}} is given; applies to all namespaces)
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[Category:Request templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
6djzdhct69b90bc9rouv0mzzgaqnbyb
43231
43230
2021-12-22T04:52:14Z
Svartava
428
/* Parameters */ new param
43231
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
Despite the appearance, this template is not nominated for deletion.
To use this template,
# Add {{temp|rfd|en|short reason here}} ("en" for English, replace with the appropriate language code) to the page source as appropriate.
# Start the discussion on to [[Wiktionary:Requests for deletion/English]], [[Wiktionary:Requests for deletion/Non-English]]{{,}} or [[Wiktionary:Requests for deletion/Others]] as appropriate by clicking the (+) link.
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows:
{{rfd|en|short reason here|nocat=1}}
==Parameters==
; {{para|1}}
: The [[Wiktionary:LANGCODE|language code]] of the deletion nomination (see [[Wiktionary:List of languages]]). Only needed in the main, Citations, Transwiki or Reconstruction namespaces.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fail|1}}
: To be used if an RFD discussion regarding that page has already completed and there is consensus to delete it. Adds the page to [[:Category:Candidates for speedy deletion]].
; {{para|fragment}}, {{para|section}}
: An optional URL section to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
; {{para|topic}}
: If given, add this page to [[:Category:Entries needing topical attention]] and (eventually, manually) to the list at [[Wiktionary:Entries needing topical attention]]. Also add the specified param value to a CSS span id contained in the title.
This template adds the page to the following categories (where LANG is the language whose code is specified using {{para|1}}):
* [[:Category:Requests for deletion in LANG entries]] (if in the main, Citations, Transwiki or Reconstruction namespaces)
* [[:Category:Requests for cleanup/Others]] (if in any other namespaces)
* [[:Category:Entries needing topical attention]] (if {{para|topic}} is given)
* [[:Category:rfd with topic]] (if {{para|topic}} is given; applies to all namespaces)
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[Category:Request templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
dsmfnrdzqmqpt7bugzit3s94jyu2xtl
43232
43231
2023-03-13T10:35:16Z
This, that and the other
894
/* Parameters */
43232
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
Despite the appearance, this template is not nominated for deletion.
To use this template,
# Add {{temp|rfd|en|short reason here}} ("en" for English, replace with the appropriate language code) to the page source as appropriate.
# Start the discussion on to [[Wiktionary:Requests for deletion/English]], [[Wiktionary:Requests for deletion/Non-English]]{{,}} or [[Wiktionary:Requests for deletion/Others]] as appropriate by clicking the (+) link.
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows:
{{rfd|en|short reason here|nocat=1}}
==Parameters==
; {{para|1}}
: The [[Wiktionary:LANGCODE|language code]] of the deletion nomination (see [[Wiktionary:List of languages]]). Only needed in the main, Citations, Transwiki or Reconstruction namespaces.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fail|1}}
: To be used if an RFD discussion regarding that page has already completed and there is consensus to delete it. Adds the page to [[:Category:Candidates for speedy deletion]].
; {{para|fragment}}, {{para|section}}
: An optional URL section to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
; {{para|topic}}
: If given, add the specified param value to a CSS span id contained in the request message. This can be used to distinguish multiple RFVs for the same language entry.
This template adds the page to the following categories (where LANG is the language whose code is specified using {{para|1}}):
* [[:Category:Requests for deletion in LANG entries]] (if in the main, Citations, Transwiki or Reconstruction namespaces)
* [[:Category:Requests for deletion/Others]] (if in any other namespaces)
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[Category:Request templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
62akguq0msvk57qe5lvf67hjwfumwn2
43233
43232
2023-04-28T05:43:26Z
113.166.110.126
Example
43233
wikitext
text/x-wiki
Template:RCD/documen…
tobxrunnkssb62vypdldgpk7t9h3giy
43234
43233
2023-04-28T05:43:55Z
113.166.110.126
43234
wikitext
text/x-wiki
Template:rfd/document…
hb9xoa57lfor5rj9ttnxn9rz90tkbqi
43235
43234
2023-04-28T06:29:22Z
Surjection
380
Reverted edits by [[Special:Contributions/113.166.110.126|113.166.110.126]]. If you think this rollback is in error, please leave a message on my [[User talk:Surjection|talk page]].
43235
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
Despite the appearance, this template is not nominated for deletion.
To use this template,
# Add {{temp|rfd|en|short reason here}} ("en" for English, replace with the appropriate language code) to the page source as appropriate.
# Start the discussion on to [[Wiktionary:Requests for deletion/English]], [[Wiktionary:Requests for deletion/Non-English]]{{,}} or [[Wiktionary:Requests for deletion/Others]] as appropriate by clicking the (+) link.
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows:
{{rfd|en|short reason here|nocat=1}}
==Parameters==
; {{para|1}}
: The [[Wiktionary:LANGCODE|language code]] of the deletion nomination (see [[Wiktionary:List of languages]]). Only needed in the main, Citations, Transwiki or Reconstruction namespaces.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fail|1}}
: To be used if an RFD discussion regarding that page has already completed and there is consensus to delete it. Adds the page to [[:Category:Candidates for speedy deletion]].
; {{para|fragment}}, {{para|section}}
: An optional URL section to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
; {{para|topic}}
: If given, add the specified param value to a CSS span id contained in the request message. This can be used to distinguish multiple RFVs for the same language entry.
This template adds the page to the following categories (where LANG is the language whose code is specified using {{para|1}}):
* [[:Category:Requests for deletion in LANG entries]] (if in the main, Citations, Transwiki or Reconstruction namespaces)
* [[:Category:Requests for deletion/Others]] (if in any other namespaces)
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[Category:Request templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
62akguq0msvk57qe5lvf67hjwfumwn2
43236
43235
2023-09-19T00:53:55Z
Soap
1417
43236
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
Despite the appearance, this template is not nominated for deletion.
To use this template,
# Add {{temp|rfd|en|short reason here}} ("en" for English, replace with the appropriate language code) to the page source as appropriate.
# Start the discussion on to [[Wiktionary:Requests for deletion/English]], [[Wiktionary:Requests for deletion/Non-English]]{{,}} or [[Wiktionary:Requests for deletion/Others]] as appropriate by clicking the (+) link.
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows:
{{rfd|en|short reason here|nocat=1}}
==Parameters==
; {{para|1}}
: The [[Wiktionary:LANGCODE|language code]] of the deletion nomination (see [[Wiktionary:List of languages]]). Only needed in the main, Citations, Transwiki or Reconstruction namespaces.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fail|1}}
: To be used if an RFD discussion regarding that page has already completed and there is consensus to delete it. Adds the page to [[:Category:Candidates for speedy deletion]].
; {{para|fragment}}, {{para|section}}
: An optional URL section to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
; {{para|topic}}
: If given, add the specified param value to a CSS span id contained in the request message. This can be used to distinguish multiple RFVs for the same language entry.
This template adds the page to the subcategory of [[:Category:Requests for deletion by language]] designated by the language code specified using {{para|1}} (if in the main, Citations, Transwiki or Reconstruction namespaces), or to [[:Category:Requests for deletion/Others]] (if in any other namespaces).
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[Category:Request templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
0r8cx25fj1kw7yahjsk5hjzsgjv28uu
43237
43236
2025-02-24T18:59:04Z
Emanuele6
1416
remove blank line
43237
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
Despite the appearance, this template is not nominated for deletion.
To use this template,
# Add {{temp|rfd|en|short reason here}} ("en" for English, replace with the appropriate language code) to the page source as appropriate.
# Start the discussion on to [[Wiktionary:Requests for deletion/English]], [[Wiktionary:Requests for deletion/Non-English]]{{,}} or [[Wiktionary:Requests for deletion/Others]] as appropriate by clicking the (+) link.
The title of the deletion discussion should be left as the [[wikify|wikified]], blue linked page name, which is automatically provided for you. The output is as follows:
{{rfd|en|short reason here|nocat=1}}
==Parameters==
; {{para|1}}
: The [[Wiktionary:LANGCODE|language code]] of the deletion nomination (see [[Wiktionary:List of languages]]). Only needed in the main, Citations, Transwiki or Reconstruction namespaces.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fail|1}}
: To be used if an RFD discussion regarding that page has already completed and there is consensus to delete it. Adds the page to [[:Category:Candidates for speedy deletion]].
; {{para|fragment}}, {{para|section}}
: An optional URL section to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
; {{para|topic}}
: If given, add the specified param value to a CSS span id contained in the request message. This can be used to distinguish multiple RFVs for the same language entry.
This template adds the page to the subcategory of [[:Category:Requests for deletion by language]] designated by the language code specified using {{para|1}} (if in the main, Citations, Transwiki or Reconstruction namespaces), or to [[:Category:Requests for deletion/Others]] (if in any other namespaces).
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[Category:Request templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
phzpmiizadcvseb6s3rhea12b8ink2o
43238
43237
2025-09-30T20:37:51Z
Juwan
804
43238
wikitext
text/x-wiki
{{documentation subpage}}
This generates a message box that informs editors that an entry has a request for deletion.
Despite the appearance, this template is not nominated for deletion.
==Usage==
To use this template, add {{temp|rfd|<var>language code</var>|<var>short reason here</var>}} to the page source as appropriate, then start a discussion under the subpages of [[Wiktionary:Requests for deletion]] by clicking the (+) link.
The title of the deletion discussion should be left as the wikified, blue linked page name, which is automatically provided for you.
==Parameters==
; {{para|1}}
: The [[Wiktionary:LANGCODE|language code]] of the deletion nomination (see [[Wiktionary:List of languages]]). Only needed in the main, Citations, Transwiki or Reconstruction namespaces.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fail|1}}
: To be used if an RFD discussion regarding that page has already completed and there is consensus to delete it. Adds the page to [[:Category:Candidates for speedy deletion]].
; {{para|fragment}}, {{para|section}}
: An optional URL section to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
; {{para|topic}}
: If given, add the specified param value to a CSS span id contained in the request message. This can be used to distinguish multiple RFVs for the same language entry.
This template adds the page to the subcategory of [[:Category:Requests for deletion by language]] designated by the language code specified using {{para|1}} (if in the main, Citations, Transwiki or Reconstruction namespaces), or to [[:Category:Requests for deletion/Others]] (if in any other namespaces).
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[Category:Request templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
8ize5rhkq648mftgzy2o0rlkw0atktj
43239
43238
2025-12-17T21:11:59Z
Surjection
380
/* Parameters */
43239
wikitext
text/x-wiki
{{documentation subpage}}
This generates a message box that informs editors that an entry has a request for deletion.
Despite the appearance, this template is not nominated for deletion.
==Usage==
To use this template, add {{temp|rfd|<var>language code</var>|<var>short reason here</var>}} to the page source as appropriate, then start a discussion under the subpages of [[Wiktionary:Requests for deletion]] by clicking the (+) link.
The title of the deletion discussion should be left as the wikified, blue linked page name, which is automatically provided for you.
==Parameters==
; {{para|1}}
: The [[Wiktionary:LANGCODE|language code]] of the deletion nomination (see [[Wiktionary:List of languages]]). Only needed in the main, Citations, Transwiki or Reconstruction namespaces.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fail|1}}
: To be used if an RFD discussion regarding that page has already completed and there is consensus to delete it. Adds the page to [[:Category:Candidates for speedy deletion]]. This is relevant when the entry is the only one on the page; if there are other entries, the relevant section should simply be removed.
; {{para|fragment}}, {{para|section}}
: An optional URL section to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
; {{para|topic}}
: If given, add the specified param value to a CSS span id contained in the request message. This can be used to distinguish multiple RFVs for the same language entry.
This template adds the page to the subcategory of [[:Category:Requests for deletion by language]] designated by the language code specified using {{para|1}} (if in the main, Citations, Transwiki or Reconstruction namespaces), or to [[:Category:Requests for deletion/Others]] (if in any other namespaces).
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[Category:Request templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
256mrhwgz7uthxbn7i5b24crwfbwkbm
43240
43239
2025-12-17T21:12:26Z
Surjection
380
/* Parameters */ (using [[MediaWiki:Gadget-AjaxEdit.js|AjaxEdit]])
43240
wikitext
text/x-wiki
{{documentation subpage}}
This generates a message box that informs editors that an entry has a request for deletion.
Despite the appearance, this template is not nominated for deletion.
==Usage==
To use this template, add {{temp|rfd|<var>language code</var>|<var>short reason here</var>}} to the page source as appropriate, then start a discussion under the subpages of [[Wiktionary:Requests for deletion]] by clicking the (+) link.
The title of the deletion discussion should be left as the wikified, blue linked page name, which is automatically provided for you.
==Parameters==
; {{para|1}}
: The [[Wiktionary:LANGCODE|language code]] of the deletion nomination (see [[Wiktionary:List of languages]]). Only needed in the main, Citations, Transwiki or Reconstruction namespaces.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fail|1}}
: To be used if an RFD discussion regarding that page has already completed and there is consensus to delete it. Adds the page to [[:Category:Candidates for speedy deletion]]. This is relevant when the entry is the only one on the page; if there are other entries, the relevant section should simply be removed (remember to use an appropriate edit summary).
; {{para|fragment}}, {{para|section}}
: An optional URL section to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
; {{para|topic}}
: If given, add the specified param value to a CSS span id contained in the request message. This can be used to distinguish multiple RFVs for the same language entry.
This template adds the page to the subcategory of [[:Category:Requests for deletion by language]] designated by the language code specified using {{para|1}} (if in the main, Citations, Transwiki or Reconstruction namespaces), or to [[:Category:Requests for deletion/Others]] (if in any other namespaces).
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[Category:Request templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
jtckjng0kq852eb9ynlozhydtcrlqz1
43241
43240
2025-12-29T02:27:08Z
Market pharmacy 1
1947
Market pharmacy
43241
wikitext
text/x-wiki
{{documentation subpage}}
Market pharmacy
==Usage==
To use this template, add {{temp|rfd|<var>language code</var>|<var>short reason here</var>}} to the page source as appropriate, then start a discussion under the subpages of [[Wiktionary:Requests for deletion]] by clicking the (+) link.
The title of the deletion discussion should be left as the wikified, blue linked page name, which is automatically provided for you.
==Parameters==
; {{para|1}}
: The [[Wiktionary:LANGCODE|language code]] of the deletion nomination (see [[Wiktionary:List of languages]]). Only needed in the main, Citations, Transwiki or Reconstruction namespaces.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fail|1}}
: To be used if an RFD discussion regarding that page has already completed and there is consensus to delete it. Adds the page to [[:Category:Candidates for speedy deletion]]. This is relevant when the entry is the only one on the page; if there are other entries, the relevant section should simply be removed (remember to use an appropriate edit summary).
; {{para|fragment}}, {{para|section}}
: An optional URL section to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
; {{para|topic}}
: If given, add the specified param value to a CSS span id contained in the request message. This can be used to distinguish multiple RFVs for the same language entry.
This template adds the page to the subcategory of [[:Category:Requests for deletion by language]] designated by the language code specified using {{para|1}} (if in the main, Citations, Transwiki or Reconstruction namespaces), or to [[:Category:Requests for deletion/Others]] (if in any other namespaces).
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[Category:Request templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
27vjwfmmv11mdeu6edytr15wrqrzf7g
43242
43241
2025-12-29T02:29:52Z
Chuck Entz
1231
Reverted edits by [[Special:Contributions/Market pharmacy 1|Market pharmacy 1]]. If you think this rollback is in error, please leave a message on my talk page.
43242
wikitext
text/x-wiki
{{documentation subpage}}
This generates a message box that informs editors that an entry has a request for deletion.
Despite the appearance, this template is not nominated for deletion.
==Usage==
To use this template, add {{temp|rfd|<var>language code</var>|<var>short reason here</var>}} to the page source as appropriate, then start a discussion under the subpages of [[Wiktionary:Requests for deletion]] by clicking the (+) link.
The title of the deletion discussion should be left as the wikified, blue linked page name, which is automatically provided for you.
==Parameters==
; {{para|1}}
: The [[Wiktionary:LANGCODE|language code]] of the deletion nomination (see [[Wiktionary:List of languages]]). Only needed in the main, Citations, Transwiki or Reconstruction namespaces.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fail|1}}
: To be used if an RFD discussion regarding that page has already completed and there is consensus to delete it. Adds the page to [[:Category:Candidates for speedy deletion]]. This is relevant when the entry is the only one on the page; if there are other entries, the relevant section should simply be removed (remember to use an appropriate edit summary).
; {{para|fragment}}, {{para|section}}
: An optional URL section to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
; {{para|topic}}
: If given, add the specified param value to a CSS span id contained in the request message. This can be used to distinguish multiple RFVs for the same language entry.
This template adds the page to the subcategory of [[:Category:Requests for deletion by language]] designated by the language code specified using {{para|1}} (if in the main, Citations, Transwiki or Reconstruction namespaces), or to [[:Category:Requests for deletion/Others]] (if in any other namespaces).
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[Category:Request templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
jtckjng0kq852eb9ynlozhydtcrlqz1
43243
43242
2026-06-24T04:39:34Z
King ChristLike
964
30 revisions imported from [[:en:Template:rfd/documentation]]
43242
wikitext
text/x-wiki
{{documentation subpage}}
This generates a message box that informs editors that an entry has a request for deletion.
Despite the appearance, this template is not nominated for deletion.
==Usage==
To use this template, add {{temp|rfd|<var>language code</var>|<var>short reason here</var>}} to the page source as appropriate, then start a discussion under the subpages of [[Wiktionary:Requests for deletion]] by clicking the (+) link.
The title of the deletion discussion should be left as the wikified, blue linked page name, which is automatically provided for you.
==Parameters==
; {{para|1}}
: The [[Wiktionary:LANGCODE|language code]] of the deletion nomination (see [[Wiktionary:List of languages]]). Only needed in the main, Citations, Transwiki or Reconstruction namespaces.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fail|1}}
: To be used if an RFD discussion regarding that page has already completed and there is consensus to delete it. Adds the page to [[:Category:Candidates for speedy deletion]]. This is relevant when the entry is the only one on the page; if there are other entries, the relevant section should simply be removed (remember to use an appropriate edit summary).
; {{para|fragment}}, {{para|section}}
: An optional URL section to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
; {{para|topic}}
: If given, add the specified param value to a CSS span id contained in the request message. This can be used to distinguish multiple RFVs for the same language entry.
This template adds the page to the subcategory of [[:Category:Requests for deletion by language]] designated by the language code specified using {{para|1}} (if in the main, Citations, Transwiki or Reconstruction namespaces), or to [[:Category:Requests for deletion/Others]] (if in any other namespaces).
<includeonly>
[[Category:Deletion templates]]
[[Category:Maintenance templates]]
[[Category:Request templates]]
[[ca:Plantilla:esborrar1]]
[[fr:Modèle:supprimer ?]]
[[pt:Predefinição:apagar]]
[[uk:Шаблон:delete]]
</includeonly>
jtckjng0kq852eb9ynlozhydtcrlqz1
Templeeti:no deprecated lang param usage
10
8220
43244
2023-01-12T03:21:45Z
Theknightwho
1347
Created page with "{{{1}}}"
43244
wikitext
text/x-wiki
{{{1}}}
cmn9dlq4osu63jqm4mfq9mfvdt3q6zw
43245
43244
2023-01-12T03:32:31Z
Theknightwho
1347
Protected "[[Template:no deprecated lang param usage]]" ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite))
43244
wikitext
text/x-wiki
{{{1}}}
cmn9dlq4osu63jqm4mfq9mfvdt3q6zw
43246
43245
2023-01-12T03:38:57Z
Theknightwho
1347
43246
wikitext
text/x-wiki
{{{1|}}}
1q02kdrntypnw4yt1t59ihaypiyeve1
43247
43246
2023-01-17T14:48:17Z
Theknightwho
1347
43247
wikitext
text/x-wiki
<onlyinclude>{{{1|}}}</onlyinclude>{{documentation}}
r4cd6eb8p4xjus4wmk4qvx6l1j575js
43248
43247
2026-06-24T04:39:34Z
King ChristLike
964
4 revisions imported from [[:en:Template:no_deprecated_lang_param_usage]]
43247
wikitext
text/x-wiki
<onlyinclude>{{{1|}}}</onlyinclude>{{documentation}}
r4cd6eb8p4xjus4wmk4qvx6l1j575js
Ojiarụ:配合比全额更好(说说而已)
2
8221
43249
2026-06-24T04:40:47Z
配合比全额更好(说说而已)
1939
Jiri 'Nnọọ!A bụ m 配合比全额更好(说说而已).' kere ihü
43249
wikitext
text/x-wiki
Nnọọ!A bụ m 配合比全额更好(说说而已).
ojixiud74i6v5dp1ja7pphfc69dfkwi
Module:request-forum
828
8222
43250
2022-07-06T11:19:48Z
Fytcha
1383
Created page with "local export = {} function export.rfv(frame) local lang_code = frame.args[1] require("Module:languages").getByCode(lang_code, true) local subforum if lang_code == "en" then subforum = "English" elseif lang_code == "zh" or lang_code == "ja" or lang_code == "ko" or lang_code == "ko-ear" or lang_code == "ryu" or lang_code == "jje" or lang_code == "och" or lang_code == "ltc" or lang_code == "ojp" or lang_code == "oko" or lang_code == "okm" then subforum = "CJK"..."
43250
Scribunto
text/plain
local export = {}
function export.rfv(frame)
local lang_code = frame.args[1]
require("Module:languages").getByCode(lang_code, true)
local subforum
if lang_code == "en" then
subforum = "English"
elseif lang_code == "zh" or lang_code == "ja" or lang_code == "ko" or lang_code == "ko-ear" or lang_code == "ryu" or lang_code == "jje" or lang_code == "och" or lang_code == "ltc" or lang_code == "ojp" or lang_code == "oko" or lang_code == "okm" then
subforum = "CJK"
else
subforum = "Non-English"
end
return "Wiktionary:Requests for verification/" .. subforum
end
return export
40kyqiv7fh2xp1sfubpmktxadxw6ush
43251
43250
2022-07-06T11:22:00Z
Fytcha
1383
Protected "[[Module:request-forum]]": Highly visible template/module ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only administrators] (indefinite))
43250
Scribunto
text/plain
local export = {}
function export.rfv(frame)
local lang_code = frame.args[1]
require("Module:languages").getByCode(lang_code, true)
local subforum
if lang_code == "en" then
subforum = "English"
elseif lang_code == "zh" or lang_code == "ja" or lang_code == "ko" or lang_code == "ko-ear" or lang_code == "ryu" or lang_code == "jje" or lang_code == "och" or lang_code == "ltc" or lang_code == "ojp" or lang_code == "oko" or lang_code == "okm" then
subforum = "CJK"
else
subforum = "Non-English"
end
return "Wiktionary:Requests for verification/" .. subforum
end
return export
40kyqiv7fh2xp1sfubpmktxadxw6ush
43252
43251
2022-07-06T11:31:38Z
Fytcha
1383
43252
Scribunto
text/plain
local export = {}
export.CJK = {}
export.CJK["zh"] = true
export.CJK["ja"] = true
export.CJK["ko"] = true
export.CJK["ko-ear"] = true
export.CJK["ryu"] = true
export.CJK["jje"] = true
export.CJK["och"] = true
export.CJK["ltc"] = true
export.CJK["ojp"] = true
export.CJK["oko"] = true
export.CJK["okm"] = true
function export.rfv(frame)
local lang_code = frame.args[1]
require("Module:languages").getByCode(lang_code, true)
local subforum
if lang_code == "en" then
subforum = "English"
elseif export.CJK[lang_code] then
subforum = "CJK"
else
subforum = "Non-English"
end
return "Wiktionary:Requests for verification/" .. subforum
end
return export
gd1i1c7h30if9fv0k9dxheaat3otldo
43253
43252
2022-07-06T11:39:36Z
Fytcha
1383
rfd
43253
Scribunto
text/plain
local export = {}
export.CJK = {}
export.CJK["zh"] = true
export.CJK["ja"] = true
export.CJK["ko"] = true
export.CJK["ko-ear"] = true
export.CJK["ryu"] = true
export.CJK["jje"] = true
export.CJK["och"] = true
export.CJK["ltc"] = true
export.CJK["ojp"] = true
export.CJK["oko"] = true
export.CJK["okm"] = true
function export.rfv(frame)
local lang_code = frame.args[1]
require("Module:languages").getByCode(lang_code, true)
local subforum
if lang_code == "en" then
subforum = "English"
elseif export.CJK[lang_code] then
subforum = "CJK"
else
subforum = "Non-English"
end
return "Wiktionary:Requests for verification/" .. subforum
end
function export.rfd(frame)
local lang_code = frame.args[1]
local namespace = frame.args[2]
local subforum
if namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
subforum = "Others"
else
require("Module:languages").getByCode(lang_code, true)
if lang_code == "en" then
subforum = "English"
elseif export.CJK[lang_code] then
subforum = "CJK"
else
subforum = "Non-English"
end
end
return "Wiktionary:Requests for deletion/" .. subforum
end
return export
suga3obavdmi559dboccy5kf8b5ir9i
43254
43253
2022-07-06T11:44:57Z
Fytcha
1383
namespace ~= nil
43254
Scribunto
text/plain
local export = {}
export.CJK = {}
export.CJK["zh"] = true
export.CJK["ja"] = true
export.CJK["ko"] = true
export.CJK["ko-ear"] = true
export.CJK["ryu"] = true
export.CJK["jje"] = true
export.CJK["och"] = true
export.CJK["ltc"] = true
export.CJK["ojp"] = true
export.CJK["oko"] = true
export.CJK["okm"] = true
function export.rfv(frame)
local lang_code = frame.args[1]
require("Module:languages").getByCode(lang_code, true)
local subforum
if lang_code == "en" then
subforum = "English"
elseif export.CJK[lang_code] then
subforum = "CJK"
else
subforum = "Non-English"
end
return "Wiktionary:Requests for verification/" .. subforum
end
function export.rfd(frame)
local lang_code = frame.args[1]
local namespace = frame.args[2]
local subforum
if namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
subforum = "Others"
else
require("Module:languages").getByCode(lang_code, true)
if lang_code == "en" then
subforum = "English"
elseif export.CJK[lang_code] then
subforum = "CJK"
else
subforum = "Non-English"
end
end
return "Wiktionary:Requests for deletion/" .. subforum
end
return export
f7edmhr49hb9ve6vjzqzbtg34bxdxld
43255
43254
2022-07-06T11:58:14Z
Fytcha
1383
43255
Scribunto
text/plain
local export = {}
export.CJK = {}
-- Chinese
export.CJK["zh"] = true
export.CJK["och"] = true
export.CJK["ltc"] = true
-- Japonic
export.CJK["ja"] = true
export.CJK["ojp"] = true
export.CJK["ryu"] = true
-- Koreanic
export.CJK["ko"] = true
export.CJK["ko-ear"] = true
export.CJK["okm"] = true
export.CJK["oko"] = true
export.CJK["jje"] = true
function export.rfv(frame)
local lang_code = frame.args[1]
require("Module:languages").getByCode(lang_code, true)
local subforum
if lang_code == "en" then
subforum = "English"
elseif export.CJK[lang_code] then
subforum = "CJK"
else
subforum = "Non-English"
end
return "Wiktionary:Requests for verification/" .. subforum
end
function export.rfd(frame)
local lang_code = frame.args[1]
local namespace = frame.args[2]
local subforum
if namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
subforum = "Others"
else
require("Module:languages").getByCode(lang_code, true)
if lang_code == "en" then
subforum = "English"
elseif export.CJK[lang_code] then
subforum = "CJK"
else
subforum = "Non-English"
end
end
return "Wiktionary:Requests for deletion/" .. subforum
end
return export
9h5wbyq644dyepca9sboonh3lxgpscm
43256
43255
2022-07-06T12:02:56Z
Fytcha
1383
comments
43256
Scribunto
text/plain
local export = {}
export.CJK = {}
-- Chinese
export.CJK["zh"] = true
export.CJK["och"] = true
export.CJK["ltc"] = true
-- Japonic
export.CJK["ja"] = true
export.CJK["ojp"] = true
export.CJK["ryu"] = true
-- Koreanic
export.CJK["ko"] = true
export.CJK["ko-ear"] = true
export.CJK["okm"] = true
export.CJK["oko"] = true
export.CJK["jje"] = true
function export.rfv(frame)
local lang_code = frame.args[1]
require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
local subforum
if lang_code == "en" then
subforum = "English"
elseif export.CJK[lang_code] then
subforum = "CJK"
else
subforum = "Non-English"
end
return "Wiktionary:Requests for verification/" .. subforum
end
function export.rfd(frame)
local lang_code = frame.args[1]
local namespace = frame.args[2]
local subforum
-- RFDs of articles in "abnormal" namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
subforum = "Others"
else
require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
if lang_code == "en" then
subforum = "English"
elseif export.CJK[lang_code] then
subforum = "CJK"
else
subforum = "Non-English"
end
end
return "Wiktionary:Requests for deletion/" .. subforum
end
return export
541pbpy1exb3pzz2f0k0j06nye12tkc
43257
43256
2023-01-10T21:05:54Z
Theknightwho
1347
Ensure all CJK (and CJK-adjacent) terms go to the CJK pages.
43257
Scribunto
text/plain
local export = {}
export.CJK = {}
-- Chinese
export.CJK["zh"] = true
export.CJK["och"] = true
export.CJK["ltc"] = true
-- Japonic
export.CJK["ja"] = true
export.CJK["ojp"] = true
export.CJK["ryu"] = true
-- Koreanic
export.CJK["ko"] = true
export.CJK["ko-ear"] = true
export.CJK["okm"] = true
export.CJK["oko"] = true
export.CJK["jje"] = true
export.SiniticScripts = {["Hani"] = true, ["Hant"] = true, ["Hans"] = true, ["Jpan"] = true, ["Hira"] = true, ["Kana"] = true, ["Kore"] = true, ["Hang"] = true, ["Jurc"] = true, ["Kitl"] = true, ["Kits"] = true, ["Shui"] = true, ["Tang"] = true}
function export.rfv(frame)
local lang_code = frame.args[1]
lang = require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
if lang_code == "en" then
return "Wiktionary:Requests for verification/English"
elseif export.CJK[lang_code] then
return "Wiktionary:Requests for verification/CJK"
end
local sc = require("Module:scripts").findBestScript(frame:getParent():preprocess("{{FULLPAGENAME}}"), lang)
if export.SiniticScripts[sc:getCode()] then
return "Wiktionary:Requests for verification/CJK"
else
return "Wiktionary:Requests for verification/Non-English"
end
end
function export.rfd(frame)
local lang_code = frame.args[1]
local lang
local namespace = frame.args[2]
-- RFDs of articles in "abnormal" namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
return "Wiktionary:Requests for deletion/Others"
else
lang = require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
end
if lang_code == "en" then
return "Wiktionary:Requests for deletion/English"
elseif export.CJK[lang_code] then
return "Wiktionary:Requests for deletion/CJK"
end
local sc = require("Module:scripts").findBestScript(frame:getParent():preprocess("{{FULLPAGENAME}}"), lang)
if export.SiniticScripts[sc:getCode()] then
return "Wiktionary:Requests for deletion/CJK"
else
return "Wiktionary:Requests for deletion/Non-English"
end
end
return export
jg4tn06g3m5b3ds3rtd2pzb7bjf3tjt
43258
43257
2023-01-10T21:25:45Z
Theknightwho
1347
Slight efficiency gains.
43258
Scribunto
text/plain
local export = {}
export.CJK = {}
-- Chinese
export.CJK["zh"] = true
export.CJK["och"] = true
export.CJK["ltc"] = true
-- Japonic
export.CJK["ja"] = true
export.CJK["ojp"] = true
export.CJK["ryu"] = true
-- Koreanic
export.CJK["ko"] = true
export.CJK["ko-ear"] = true
export.CJK["okm"] = true
export.CJK["oko"] = true
export.CJK["jje"] = true
export.SiniticScripts = {["Hani"] = true, ["Hant"] = true, ["Hans"] = true, ["Jpan"] = true, ["Hira"] = true, ["Kana"] = true, ["Kore"] = true, ["Hang"] = true, ["Jurc"] = true, ["Kitl"] = true, ["Kits"] = true, ["Shui"] = true, ["Tang"] = true}
local function subforum(frame, type)
local lang_code = frame.args[1]
local lang
local namespace = frame.args[2]
-- RFDs of articles in "abnormal" namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
return "Wiktionary:Requests for " .. type .. "/Others"
else
lang = require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
end
if lang_code == "en" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif export.CJK[lang_code] or export.SiniticScripts[require("Module:scripts").findBestScript(frame:getParent():preprocess("{{FULLPAGENAME}}"), lang):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame, "verification")
end
function export.rfd(frame)
return subforum(frame, "deletion")
end
return export
dqvm750na100qf0h6vqm7lk5rk9pur0
43259
43258
2023-02-07T17:21:10Z
Theknightwho
1347
Simplified by removing references to languages always written with Sinitic scripts, and made Proto-Japonic + Proto-Koreanic direct there (reflecting actual practice). Also add Nüshu as another Sinitic script.
43259
Scribunto
text/plain
local export = {}
export.SiniticScripts = {
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general code)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
-- Languages (sometimes) written with other scripts, which should always use the CJK page regardless.
export.additionalCJK = {
["ja"] = true, -- Japanese
["jpx-pro"] = true, -- Proto-Japonic
["ko"] = true, -- Korean
["ltc"] = true, -- Middle Chinese
["qfa-kor-pro"] = true, -- Proto-Koreanic
["zh"] = true, -- Chinese
}
local function subforum(frame, type)
local lang_code = frame.args[1]
local lang
local namespace = frame.args[2]
-- RFDs of articles in "abnormal" namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
return "Wiktionary:Requests for " .. type .. "/Others"
else
lang = require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
end
if lang_code == "en" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif export.additionalCJK[lang_code] or export.SiniticScripts[require("Module:scripts").findBestScript(frame:getParent():preprocess("{{FULLPAGENAME}}"), lang):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame, "verification")
end
function export.rfd(frame)
return subforum(frame, "deletion")
end
return export
ecfrcz05hd3zrib945qyw8td1810vqb
43260
43259
2023-02-14T23:41:31Z
Theknightwho
1347
Use findBestScript language method.
43260
Scribunto
text/plain
local export = {}
export.SiniticScripts = {
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general code)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
-- Languages (sometimes) written with other scripts, which should always use the CJK page regardless.
export.additionalCJK = {
["ja"] = true, -- Japanese
["jpx-pro"] = true, -- Proto-Japonic
["ko"] = true, -- Korean
["ltc"] = true, -- Middle Chinese
["qfa-kor-pro"] = true, -- Proto-Koreanic
["zh"] = true, -- Chinese
}
local function subforum(frame, type)
local lang_code = frame.args[1]
local lang
local namespace = frame.args[2]
-- RFDs of articles in "abnormal" namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
return "Wiktionary:Requests for " .. type .. "/Others"
else
lang = require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
end
if lang_code == "en" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif export.additionalCJK[lang_code] or export.SiniticScripts[lang:findBestScript(frame:getParent():preprocess("{{FULLPAGENAME}}")):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame, "verification")
end
function export.rfd(frame)
return subforum(frame, "deletion")
end
return export
obc8zqxzaxew2die50y3c0jwiwbdj54
43261
43260
2023-02-23T05:03:02Z
Benwing2
1346
support [[WT:RFVR]] for Reconstruction namespace
43261
Scribunto
text/plain
local export = {}
export.SiniticScripts = {
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general code)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
-- Languages (sometimes) written with other scripts, which should always use the CJK page regardless.
export.additionalCJK = {
["ja"] = true, -- Japanese
["jpx-pro"] = true, -- Proto-Japonic
["ko"] = true, -- Korean
["ltc"] = true, -- Middle Chinese
["qfa-kor-pro"] = true, -- Proto-Koreanic
["zh"] = true, -- Chinese
}
local function subforum(frame, type)
local lang_code = frame.args[1]
local lang
local namespace = frame.args[2]
-- RFDs of articles in "abnormal" namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
return "Wiktionary:Requests for " .. type .. "/Others"
else
lang = require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
end
if namespace == "Reconstruction" then
-- There is no 'Requests for deletion/Reconstruction'; everything vectors to RFVR.
return "Wiktionary:Requests for verification/Reconstruction"
elseif lang_code == "en" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif export.additionalCJK[lang_code] or export.SiniticScripts[lang:findBestScript(frame:getParent():preprocess("{{FULLPAGENAME}}")):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame, "verification")
end
function export.rfd(frame)
return subforum(frame, "deletion")
end
return export
9l6sekt9ikwldc4tp7x993y94r12u81
43262
43261
2023-02-23T06:08:14Z
Benwing2
1346
implement RFVI/RFDI (needs testing)
43262
Scribunto
text/plain
local export = {}
export.SiniticScripts = {
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general code)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
-- Languages (sometimes) written with other scripts, which should always use the CJK page regardless.
export.additionalCJK = {
["ja"] = true, -- Japanese
["jpx-pro"] = true, -- Proto-Japonic
["ko"] = true, -- Korean
["ltc"] = true, -- Middle Chinese
["qfa-kor-pro"] = true, -- Proto-Koreanic
["zh"] = true, -- Chinese
}
local function family_is_italic(family)
while true do
if not family then
return false
end
local code = family:getCode()
if code == "itc-pro" then
return true
elseif code == "qfa-not" then -- careful, qfa-not is its own parent
return false
else
family = family:getFamily()
end
end
end
local function lang_is_italic(lang)
-- First convert to non-etymological.
lang = require("Module:languages").getNonEtymological(lang)
if not lang then
return nil
end
local typ = lang:getType()
if typ == "etymology language" then
-- This shouldn't happen.
return false
elseif typ == "family" then
-- Some etymology languages have families as their nearest non-etymological ancestor.
return family_is_italic(lang)
elseif lang:getCode() == "itc-pro" then
return true
else
-- Some languages (e.g. some Creoles) have multiple ancestors; check them all.
local ancestors = lang:getAncestors()
for _, ancestor in ipairs(ancestors) do
if family_is_italic(ancestor:getFamily()) then
return true
end
end
return false
end
end
local function subforum(frame, type)
local lang_code = frame.args[1]
local lang
local namespace = frame.args[2]
-- RFDs of articles in "abnormal" namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
return "Wiktionary:Requests for " .. type .. "/Others"
else
lang = require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
end
if namespace == "Reconstruction" then
-- There is no 'Requests for deletion/Reconstruction'; everything vectors to RFVR.
return "Wiktionary:Requests for verification/Reconstruction"
elseif lang_code == "en" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif export.additionalCJK[lang_code] or export.SiniticScripts[lang:findBestScript(frame:getParent():preprocess("{{FULLPAGENAME}}")):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang_is_italic(lang) then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame, "verification")
end
function export.rfd(frame)
return subforum(frame, "deletion")
end
return export
8l4i6acdbnnxs7jvq907v4s0q32bi6l
43263
43262
2023-02-23T06:14:08Z
Benwing2
1346
bug fix for Italic
43263
Scribunto
text/plain
local export = {}
export.SiniticScripts = {
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general code)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
-- Languages (sometimes) written with other scripts, which should always use the CJK page regardless.
export.additionalCJK = {
["ja"] = true, -- Japanese
["jpx-pro"] = true, -- Proto-Japonic
["ko"] = true, -- Korean
["ltc"] = true, -- Middle Chinese
["qfa-kor-pro"] = true, -- Proto-Koreanic
["zh"] = true, -- Chinese
}
local function family_is_italic(family)
while true do
if not family then
return false
end
local code = family:getCode()
if code == "itc" then
return true
elseif code == "qfa-not" then -- careful, qfa-not is its own parent
return false
else
family = family:getFamily()
end
end
end
local function lang_is_italic(lang)
-- First convert to non-etymological.
lang = require("Module:languages").getNonEtymological(lang)
if not lang then
return nil
end
local typ = lang:getType()
if typ == "etymology language" then
-- This shouldn't happen.
return false
elseif typ == "family" then
-- Some etymology languages have families as their nearest non-etymological ancestor.
return family_is_italic(lang)
elseif lang:getCode() == "itc-pro" then
return true
else
-- Some languages (e.g. some Creoles) have multiple ancestors; check them all.
local ancestors = lang:getAncestors()
for _, ancestor in ipairs(ancestors) do
if family_is_italic(ancestor:getFamily()) then
return true
end
end
return false
end
end
local function subforum(frame, type)
local lang_code = frame.args[1]
local lang
local namespace = frame.args[2]
-- RFDs of articles in "abnormal" namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
return "Wiktionary:Requests for " .. type .. "/Others"
else
lang = require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
end
if namespace == "Reconstruction" then
-- There is no 'Requests for deletion/Reconstruction'; everything vectors to RFVR.
return "Wiktionary:Requests for verification/Reconstruction"
elseif lang_code == "en" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif export.additionalCJK[lang_code] or export.SiniticScripts[lang:findBestScript(frame:getParent():preprocess("{{FULLPAGENAME}}")):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang_is_italic(lang) then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame, "verification")
end
function export.rfd(frame)
return subforum(frame, "deletion")
end
return export
3jsb4unaf8zg8qdzrpengq6nf9zhf0b
43264
43263
2023-02-23T06:47:15Z
Benwing2
1346
for now, no RFDR or RFDI; will revisit that after further input
43264
Scribunto
text/plain
local export = {}
export.SiniticScripts = {
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general code)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
-- Languages (sometimes) written with other scripts, which should always use the CJK page regardless.
export.additionalCJK = {
["ja"] = true, -- Japanese
["jpx-pro"] = true, -- Proto-Japonic
["ko"] = true, -- Korean
["ltc"] = true, -- Middle Chinese
["qfa-kor-pro"] = true, -- Proto-Koreanic
["zh"] = true, -- Chinese
}
local function family_is_italic(family)
while true do
if not family then
return false
end
local code = family:getCode()
if code == "itc" then
return true
elseif code == "qfa-not" then -- careful, qfa-not is its own parent
return false
else
family = family:getFamily()
end
end
end
local function lang_is_italic(lang)
-- First convert to non-etymological.
lang = require("Module:languages").getNonEtymological(lang)
if not lang then
return nil
end
local typ = lang:getType()
if typ == "etymology language" then
-- This shouldn't happen.
return false
elseif typ == "family" then
-- Some etymology languages have families as their nearest non-etymological ancestor.
return family_is_italic(lang)
elseif lang:getCode() == "itc-pro" then
return true
else
-- Some languages (e.g. some Creoles) have multiple ancestors; check them all.
local ancestors = lang:getAncestors()
for _, ancestor in ipairs(ancestors) do
if family_is_italic(ancestor:getFamily()) then
return true
end
end
return false
end
end
local function subforum(frame, type)
local lang_code = frame.args[1]
local lang
local namespace = frame.args[2]
-- RFDs of articles in "abnormal" namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
return "Wiktionary:Requests for " .. type .. "/Others"
else
lang = require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
end
if type == "verification" and namespace == "Reconstruction" then
-- There is no 'Requests for deletion/Reconstruction'; everything vectors to RFVR.
return "Wiktionary:Requests for verification/Reconstruction"
elseif lang_code == "en" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif export.additionalCJK[lang_code] or export.SiniticScripts[lang:findBestScript(frame:getParent():preprocess("{{FULLPAGENAME}}")):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif type == "verification" and lang_is_italic(lang) then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame, "verification")
end
function export.rfd(frame)
return subforum(frame, "deletion")
end
return export
qp800ybnch6g791akjzqwmk78j4l78f
43265
43264
2023-02-23T23:16:54Z
Benwing2
1346
verification and deletion of reconstructed terms -> RFDR
43265
Scribunto
text/plain
local export = {}
export.SiniticScripts = {
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general code)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
-- Languages (sometimes) written with other scripts, which should always use the CJK page regardless.
export.additionalCJK = {
["ja"] = true, -- Japanese
["jpx-pro"] = true, -- Proto-Japonic
["ko"] = true, -- Korean
["ltc"] = true, -- Middle Chinese
["qfa-kor-pro"] = true, -- Proto-Koreanic
["zh"] = true, -- Chinese
}
local function family_is_italic(family)
while true do
if not family then
return false
end
local code = family:getCode()
if code == "itc" then
return true
elseif code == "qfa-not" then -- careful, qfa-not is its own parent
return false
else
family = family:getFamily()
end
end
end
local function lang_is_italic(lang)
-- First convert to non-etymological.
lang = require("Module:languages").getNonEtymological(lang)
if not lang then
return nil
end
local typ = lang:getType()
if typ == "etymology language" then
-- This shouldn't happen.
return false
elseif typ == "family" then
-- Some etymology languages have families as their nearest non-etymological ancestor.
return family_is_italic(lang)
elseif lang:getCode() == "itc-pro" then
return true
else
-- Some languages (e.g. some Creoles) have multiple ancestors; check them all.
local ancestors = lang:getAncestors()
for _, ancestor in ipairs(ancestors) do
if family_is_italic(ancestor:getFamily()) then
return true
end
end
return false
end
end
local function subforum(frame, type)
local lang_code = frame.args[1]
local lang
local namespace = frame.args[2]
-- RFDs of articles in "abnormal" namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
return "Wiktionary:Requests for " .. type .. "/Others"
else
lang = require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
end
if namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
elseif lang_code == "en" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif export.additionalCJK[lang_code] or export.SiniticScripts[lang:findBestScript(frame:getParent():preprocess("{{FULLPAGENAME}}")):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif type == "verification" and lang_is_italic(lang) then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame, "verification")
end
function export.rfd(frame)
return subforum(frame, "deletion")
end
return export
emg7dh2s1golv49ejtexxth6wgbzcf3
43266
43265
2023-02-23T23:55:02Z
Benwing2
1346
we now have [[WT:RFDN]]
43266
Scribunto
text/plain
local export = {}
export.SiniticScripts = {
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general code)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
-- Languages (sometimes) written with other scripts, which should always use the CJK page regardless.
export.additionalCJK = {
["ja"] = true, -- Japanese
["jpx-pro"] = true, -- Proto-Japonic
["ko"] = true, -- Korean
["ltc"] = true, -- Middle Chinese
["qfa-kor-pro"] = true, -- Proto-Koreanic
["zh"] = true, -- Chinese
}
local function family_is_italic(family)
while true do
if not family then
return false
end
local code = family:getCode()
if code == "itc" then
return true
elseif code == "qfa-not" then -- careful, qfa-not is its own parent
return false
else
family = family:getFamily()
end
end
end
local function lang_is_italic(lang)
-- First convert to non-etymological.
lang = require("Module:languages").getNonEtymological(lang)
if not lang then
return nil
end
local typ = lang:getType()
if typ == "etymology language" then
-- This shouldn't happen.
return false
elseif typ == "family" then
-- Some etymology languages have families as their nearest non-etymological ancestor.
return family_is_italic(lang)
elseif lang:getCode() == "itc-pro" then
return true
else
-- Some languages (e.g. some Creoles) have multiple ancestors; check them all.
local ancestors = lang:getAncestors()
for _, ancestor in ipairs(ancestors) do
if family_is_italic(ancestor:getFamily()) then
return true
end
end
return false
end
end
local function subforum(frame, type)
local lang_code = frame.args[1]
local lang
local namespace = frame.args[2]
-- RFDs of articles in "abnormal" namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
return "Wiktionary:Requests for " .. type .. "/Others"
else
lang = require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
end
if namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
elseif lang_code == "en" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif export.additionalCJK[lang_code] or export.SiniticScripts[lang:findBestScript(frame:getParent():preprocess("{{FULLPAGENAME}}")):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang_is_italic(lang) then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame, "verification")
end
function export.rfd(frame)
return subforum(frame, "deletion")
end
return export
9fs9bpv59ziwb1ouav8nhjkyaobvmgp
43267
43266
2023-02-25T19:50:52Z
Theknightwho
1347
Added more languages that should always go to the CJK page.
43267
Scribunto
text/plain
local export = {}
export.SiniticScripts = {
["Bopo"] = true, -- Zhuyin
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
-- Languages (sometimes) written with other scripts, which should always use the CJK page regardless.
export.additionalCJK = {
["bca"] = true, -- Central Bai
["bfc"] = true, -- Northern Bai
["bfs"] = true, -- Southern Bai
["cmn"] = true, -- Mandarin
["dng"] = true, -- Dungan
["ja"] = true, -- Japanese
["jpx-pro"] = true, -- Proto-Japonic
["ko"] = true, -- Korean
["lay"] = true, -- Lama Bai
["ltc"] = true, -- Middle Chinese
["nan"] = true, -- Min Nan
["qfa-kor-pro"] = true, -- Proto-Koreanic
["yue"] = true, -- Cantonese
["zh"] = true, -- Chinese
}
local function family_is_italic(family)
while true do
if not family then
return false
end
local code = family:getCode()
if code == "itc" then
return true
elseif code == "qfa-not" then -- careful, qfa-not is its own parent
return false
else
family = family:getFamily()
end
end
end
local function lang_is_italic(lang)
-- First convert to non-etymological.
lang = require("Module:languages").getNonEtymological(lang)
if not lang then
return nil
end
local typ = lang:getType()
if typ == "etymology language" then
-- This shouldn't happen.
return false
elseif typ == "family" then
-- Some etymology languages have families as their nearest non-etymological ancestor.
return family_is_italic(lang)
elseif lang:getCode() == "itc-pro" then
return true
else
-- Some languages (e.g. some Creoles) have multiple ancestors; check them all.
local ancestors = lang:getAncestors()
for _, ancestor in ipairs(ancestors) do
if family_is_italic(ancestor:getFamily()) then
return true
end
end
return false
end
end
local function subforum(frame, type)
local lang_code = frame.args[1]
local lang
local namespace = frame.args[2]
-- RFDs of articles in "abnormal" namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
return "Wiktionary:Requests for " .. type .. "/Others"
else
lang = require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
end
if namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
elseif lang_code == "en" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif export.additionalCJK[lang_code] or export.SiniticScripts[lang:findBestScript(frame:getParent():preprocess("{{FULLPAGENAME}}")):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang_is_italic(lang) then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame, "verification")
end
function export.rfd(frame)
return subforum(frame, "deletion")
end
return export
1ihh92u7ibq82zydbd2uuyvcslg7mrv
43268
43267
2023-04-01T03:28:13Z
Theknightwho
1347
Use inFamily method to determine if lang is Italic.
43268
Scribunto
text/plain
local export = {}
export.SiniticScripts = {
["Bopo"] = true, -- Zhuyin
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
-- Languages (sometimes) written with other scripts, which should always use the CJK page regardless.
export.additionalCJK = {
["bca"] = true, -- Central Bai
["bfc"] = true, -- Northern Bai
["bfs"] = true, -- Southern Bai
["cmn"] = true, -- Mandarin
["dng"] = true, -- Dungan
["ja"] = true, -- Japanese
["jpx-pro"] = true, -- Proto-Japonic
["ko"] = true, -- Korean
["lay"] = true, -- Lama Bai
["ltc"] = true, -- Middle Chinese
["nan"] = true, -- Min Nan
["qfa-kor-pro"] = true, -- Proto-Koreanic
["yue"] = true, -- Cantonese
["zh"] = true, -- Chinese
}
local function subforum(frame, type)
local lang_code = frame.args[1]
local lang
local namespace = frame.args[2]
-- RFDs of articles in "abnormal" namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
return "Wiktionary:Requests for " .. type .. "/Others"
else
lang = require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
end
if namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
elseif lang_code == "en" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif export.additionalCJK[lang_code] or export.SiniticScripts[lang:findBestScript(frame:getParent():preprocess("{{FULLPAGENAME}}")):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame, "verification")
end
function export.rfd(frame)
return subforum(frame, "deletion")
end
return export
plhinc11oy2v5c391csemxsuag2wexg
43269
43268
2023-04-03T04:50:12Z
Theknightwho
1347
Replace additionalCJK with inFamily check for Japonic, Koreanic and Sinitic families.
43269
Scribunto
text/plain
local export = {}
export.SiniticScripts = {
["Bopo"] = true, -- Zhuyin
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
local function subforum(frame, type)
local lang_code = frame.args[1]
local lang
local namespace = frame.args[2]
-- RFDs of articles in "abnormal" namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
return "Wiktionary:Requests for " .. type .. "/Others"
else
lang = require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
end
if namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
elseif lang_code == "en" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif lang:inFamily("jpx", "qfa-kor", "zhx") or export.SiniticScripts[lang:findBestScript(frame:getParent():preprocess("{{FULLPAGENAME}}")):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame, "verification")
end
function export.rfd(frame)
return subforum(frame, "deletion")
end
return export
jygm9qqtn66b9ej7mlsu0gci4397d9d
43270
43269
2023-04-03T05:07:54Z
Theknightwho
1347
Efficiency.
43270
Scribunto
text/plain
local export = {}
local SiniticScripts = {
["Bopo"] = true, -- Zhuyin
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
local function subforum(frame, type)
local lang_code = frame.args[1]
local lang
local namespace = frame.args[2]
-- RFDs of articles in "abnormal" namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
return "Wiktionary:Requests for " .. type .. "/Others"
else
lang = require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
end
if namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
elseif lang_code == "en" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif lang:inFamily("jpx", "qfa-kor", "zhx") or SiniticScripts[lang:findBestScript(mw.title.getCurrentTitle().subpageText):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame, "verification")
end
function export.rfd(frame)
return subforum(frame, "deletion")
end
return export
h3f9srghfuneplqhc600r8fh750yxb6
43271
43270
2023-04-03T05:15:51Z
Theknightwho
1347
43271
Scribunto
text/plain
local export = {}
local SiniticScripts = {
["Bopo"] = true, -- Zhuyin
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
local function subforum(frame, type)
local lang_code = frame.args[1]
local lang
local namespace = frame.args[2]
-- RFDs of articles in "abnormal" namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
return "Wiktionary:Requests for " .. type .. "/Others"
else
lang = require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
end
if namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
elseif lang_code == "en" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif lang:inFamily("jpx", "qfa-kor", "zhx") or SiniticScripts[lang:findBestScript(mw.title.getCurrentTitle().subpageText):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame, "verification")
end
function export.rfd(frame)
return subforum(frame, "deletion")
end
return export
15ng9rji287mw82ouut820brobrrphb
43272
43271
2023-04-03T05:22:38Z
Theknightwho
1347
Don’t bother grabbing language object unless it’s needed.
43272
Scribunto
text/plain
local export = {}
local SiniticScripts = {
["Bopo"] = true, -- Zhuyin
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
local function subforum(frame, type)
local lang_code = frame.args[1]
local namespace = frame.args[2]
-- RFDs of articles in "abnormal" namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and namespace ~= nil and namespace ~= "" and namespace ~= "Citations" and namespace ~= "Reconstruction" and namespace ~= "Transwiki" then
return "Wiktionary:Requests for " .. type .. "/Others"
elseif namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
elseif lang_code == "en" then
return "Wiktionary:Requests for " .. type .. "/English"
end
local lang = require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
if lang:inFamily("jpx", "qfa-kor", "zhx") or SiniticScripts[lang:findBestScript(mw.title.getCurrentTitle().subpageText):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame, "verification")
end
function export.rfd(frame)
return subforum(frame, "deletion")
end
return export
coba35vckmwfdg54ojzi0vu4u1jfulr
43273
43272
2023-04-10T17:15:13Z
Theknightwho
1347
Get the namespace via mw.title, and also compare to `standard_namespaces` table, which is tidier.
43273
Scribunto
text/plain
local export = {}
local standard_namespaces = {
[""] = true,
["Citations"] = true,
["Reconstruction"] = true,
["Transwiki"] = true,
}
local Sinitic_scripts = {
["Bopo"] = true, -- Zhuyin
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
local function subforum(lang_code, type)
local namespace = mw.title.getCurrentTitle().nsText
-- RFDs of articles in nonstandard namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and not standard_namespaces[namespace] then
return "Wiktionary:Requests for " .. type .. "/Others"
elseif namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
elseif lang_code == "en" then
return "Wiktionary:Requests for " .. type .. "/English"
end
local lang = require("Module:languages").getByCode(lang_code, true) -- print error if invalid code
if lang:inFamily("jpx", "qfa-kor", "zhx") or Sinitic_scripts[lang:findBestScript(mw.title.getCurrentTitle().subpageText):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame.args[1], "verification")
end
function export.rfd(frame)
return subforum(frame.args[1], "deletion")
end
return export
g21js2aezp1xvqhwyqffz2jsm65qfv9
43274
43273
2023-04-10T17:16:12Z
Theknightwho
1347
43274
Scribunto
text/plain
local export = {}
local standard_namespaces = {
[""] = true,
["Citations"] = true,
["Reconstruction"] = true,
["Transwiki"] = true,
}
local Sinitic_scripts = {
["Bopo"] = true, -- Zhuyin
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
local function subforum(lang_code, type)
local namespace = mw.title.getCurrentTitle().nsText
-- RFDs of articles in nonstandard namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and not standard_namespaces[namespace] then
return "Wiktionary:Requests for " .. type .. "/Others"
elseif namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
elseif lang_code == "en" then
return "Wiktionary:Requests for " .. type .. "/English"
end
local lang = require("Module:languages").getByCode(lang_code, 1) -- print error if invalid code
if lang:inFamily("jpx", "qfa-kor", "zhx") or Sinitic_scripts[lang:findBestScript(mw.title.getCurrentTitle().subpageText):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame.args[1], "verification")
end
function export.rfd(frame)
return subforum(frame.args[1], "deletion")
end
return export
if16v4izazbbrs28cmpqrmutux9smgt
43275
43274
2024-01-30T01:03:34Z
This, that and the other
894
expand remit of RFVE/RFDE to Middle English, Scots, Yola and Fingallian per [[Wiktionary:Beer_parlour/2024/January#Middle English and Scots to WT:RFVE and WT:RFDE]]
43275
Scribunto
text/plain
local export = {}
local standard_namespaces = {
[""] = true,
["Citations"] = true,
["Reconstruction"] = true,
["Transwiki"] = true,
}
local Sinitic_scripts = {
["Bopo"] = true, -- Zhuyin
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
local function subforum(lang_code, type)
local namespace = mw.title.getCurrentTitle().nsText
-- RFDs of articles in nonstandard namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and not standard_namespaces[namespace] then
return "Wiktionary:Requests for " .. type .. "/Others"
elseif namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
elseif lang_code == "en" or lang_code == "enm" or lang_code == "sco" or lang_code == "yol" or lang_code == "gmw-fin" then -- RFVE/RFDE is a closed class, it does not include all Anglic languages
return "Wiktionary:Requests for " .. type .. "/English"
end
local lang = require("Module:languages").getByCode(lang_code, 1) -- print error if invalid code
if lang:inFamily("jpx", "qfa-kor", "zhx") or Sinitic_scripts[lang:findBestScript(mw.title.getCurrentTitle().subpageText):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame.args[1], "verification")
end
function export.rfd(frame)
return subforum(frame.args[1], "deletion")
end
return export
mhpsmg32us571s3ksayug2dpt5xocrm
43276
43275
2024-02-01T18:04:08Z
Theknightwho
1347
[[User:This, that and the other]] - I've generalised it to what seemed to be the consensus. This still covers the same 5 languages for now, but would also catch (e.g.) Middle Scots or Early Modern English if those are ever split out.
43276
Scribunto
text/plain
local export = {}
local standard_namespaces = {
[""] = true,
["Citations"] = true,
["Reconstruction"] = true,
["Transwiki"] = true,
}
local Sinitic_scripts = {
["Bopo"] = true, -- Zhuyin
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
local function subforum(lang_code, type)
local namespace = mw.title.getCurrentTitle().nsText
-- RFDs of articles in nonstandard namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and not standard_namespaces[namespace] then
return "Wiktionary:Requests for " .. type .. "/Others"
elseif namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
end
local lang = require("Module:languages").getByCode(lang_code, 1) -- print error if invalid code
if lang:inFamily("gmw-ang") and not lang:inFamily("crp") and lang:getNonEtymologicalCode() ~= "ang" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif lang:inFamily("jpx", "qfa-kor", "zhx") or Sinitic_scripts[lang:findBestScript(mw.title.getCurrentTitle().subpageText):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame.args[1], "verification")
end
function export.rfd(frame)
return subforum(frame.args[1], "deletion")
end
return export
iy4jw2oa4gyuoo4k2hm1six5vwspgan
43277
43276
2024-02-16T20:06:24Z
Theknightwho
1347
Still use /CJK for Macro-Bai langs.
43277
Scribunto
text/plain
local export = {}
local standard_namespaces = {
[""] = true,
["Citations"] = true,
["Reconstruction"] = true,
["Transwiki"] = true,
}
local Sinitic_scripts = {
["Bopo"] = true, -- Zhuyin
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
local function subforum(lang_code, type)
local namespace = mw.title.getCurrentTitle().nsText
-- RFDs of articles in nonstandard namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and not standard_namespaces[namespace] then
return "Wiktionary:Requests for " .. type .. "/Others"
elseif namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
end
local lang = require("Module:languages").getByCode(lang_code, 1) -- print error if invalid code
if lang:inFamily("gmw-ang") and not lang:inFamily("crp") and lang:getNonEtymologicalCode() ~= "ang" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif lang:inFamily("jpx", "qfa-kor", "sit-mba", "zhx") or Sinitic_scripts[lang:findBestScript(mw.title.getCurrentTitle().subpageText):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame.args[1], "verification")
end
function export.rfd(frame)
return subforum(frame.args[1], "deletion")
end
return export
op1cepz183lm160nmdfqh3nzk3db6wm
43278
43277
2024-02-23T07:23:55Z
Theknightwho
1347
Use Sino-Bai instead of Sinitic and Macro-Bai separately.
43278
Scribunto
text/plain
local export = {}
local standard_namespaces = {
[""] = true,
["Citations"] = true,
["Reconstruction"] = true,
["Transwiki"] = true,
}
local Sinitic_scripts = {
["Bopo"] = true, -- Zhuyin
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
local function subforum(lang_code, type)
local namespace = mw.title.getCurrentTitle().nsText
-- RFDs of articles in nonstandard namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and not standard_namespaces[namespace] then
return "Wiktionary:Requests for " .. type .. "/Others"
elseif namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
end
local lang = require("Module:languages").getByCode(lang_code, 1) -- print error if invalid code
if lang:inFamily("gmw-ang") and not lang:inFamily("crp") and lang:getNonEtymologicalCode() ~= "ang" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif lang:inFamily("jpx", "qfa-kor", "sit-sba") or Sinitic_scripts[lang:findBestScript(mw.title.getCurrentTitle().subpageText):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame.args[1], "verification")
end
function export.rfd(frame)
return subforum(frame.args[1], "deletion")
end
return export
bbzhuummavorvpsrbvscokdf5sl3hxi
43279
43278
2024-04-05T07:39:55Z
WingerBot
1359
getNonEtymological{,Code,Name} -> getFull{,Code,Name} per rename of underlying functions to support renaming of 'etymology-only language' to 'language variety'; similar changes in comments (manually assisted)
43279
Scribunto
text/plain
local export = {}
local standard_namespaces = {
[""] = true,
["Citations"] = true,
["Reconstruction"] = true,
["Transwiki"] = true,
}
local Sinitic_scripts = {
["Bopo"] = true, -- Zhuyin
["Hani"] = true, -- Han
["Hans"] = true, -- Han (simplified)
["Hant"] = true, -- Han (traditional)
["Jpan"] = true, -- Japanese (general)
["Hira"] = true, -- Hiragana
["Kana"] = true, -- Katakana
["Kore"] = true, -- Korean (general)
["Hang"] = true, -- Hangul
["Jurc"] = true, -- Jurchen
["Kitl"] = true, -- Khitan large script
["Kits"] = true, -- Khitan small script
["Nshu"] = true, -- Nüshu
["Shui"] = true, -- Sui
["Tang"] = true, -- Tangut
}
local function subforum(lang_code, type)
local namespace = mw.title.getCurrentTitle().nsText
-- RFDs of articles in nonstandard namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and not standard_namespaces[namespace] then
return "Wiktionary:Requests for " .. type .. "/Others"
elseif namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
end
local lang = require("Module:languages").getByCode(lang_code, 1) -- print error if invalid code
if lang:inFamily("gmw-ang") and not lang:inFamily("crp") and lang:getFullCode() ~= "ang" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif lang:inFamily("jpx", "qfa-kor", "sit-sba") or Sinitic_scripts[lang:findBestScript(mw.title.getCurrentTitle().subpageText):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame.args[1], "verification")
end
function export.rfd(frame)
return subforum(frame.args[1], "deletion")
end
return export
4lv6vvnz9il1wwqso1fa2569jqrt3mt
43280
43279
2024-09-10T16:04:24Z
Theknightwho
1347
Use data in [[Module:requests/data]].
43280
Scribunto
text/plain
local m_data = mw.loadData("Module:requests/data")
local request_namespaces = m_data.request_namespaces
local Sinitic_scripts = m_data.Sinitic_scripts
local export = {}
local function subforum(lang_code, type)
local namespace = mw.title.getCurrentTitle().nsText
-- RFDs of articles in nonstandard namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and not request_namespaces[namespace] then
return "Wiktionary:Requests for " .. type .. "/Others"
elseif namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
end
local lang = require("Module:languages").getByCode(lang_code, 1) -- print error if invalid code
if lang:inFamily("gmw-ang") and not lang:inFamily("crp") and lang:getFullCode() ~= "ang" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif lang:inFamily("jpx", "qfa-kor", "sit-sba") or Sinitic_scripts[lang:findBestScript(mw.title.getCurrentTitle().subpageText):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame.args[1], "verification")
end
function export.rfd(frame)
return subforum(frame.args[1], "deletion")
end
return export
q6suuw1ipblljwxrtp1aao7admwid7m
43281
43280
2024-09-11T03:56:50Z
Fish bowl
1382
fix
43281
Scribunto
text/plain
local m_data = mw.loadData("Module:requests/data")
local request_namespaces = m_data.request_namespaces
local Sinitic_scripts = m_data.Sinitic_scripts
local export = {}
local function subforum(lang_code, type)
local namespace = mw.title.getCurrentTitle().namespace
-- RFDs of articles in nonstandard namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and not request_namespaces[namespace] then
return "Wiktionary:Requests for " .. type .. "/Others"
elseif namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
end
local lang = require("Module:languages").getByCode(lang_code, 1) -- print error if invalid code
if lang:inFamily("gmw-ang") and not lang:inFamily("crp") and lang:getFullCode() ~= "ang" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif lang:inFamily("jpx", "qfa-kor", "sit-sba") or Sinitic_scripts[lang:findBestScript(mw.title.getCurrentTitle().subpageText):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame.args[1], "verification")
end
function export.rfd(frame)
return subforum(frame.args[1], "deletion")
end
return export
2eqft1ugbkx0d5ll34it18ux17s7kmq
43282
43281
2024-09-11T13:44:15Z
Chuck Entz
1231
Undo revision [[Special:Diff/81570399|81570399]] by [[Special:Contributions/Fish bowl|Fish bowl]] ([[User talk:Fish bowl|talk]]) breaks rfd in Thesaurus namespace
43282
Scribunto
text/plain
local m_data = mw.loadData("Module:requests/data")
local request_namespaces = m_data.request_namespaces
local Sinitic_scripts = m_data.Sinitic_scripts
local export = {}
local function subforum(lang_code, type)
local namespace = mw.title.getCurrentTitle().nsText
-- RFDs of articles in nonstandard namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and not request_namespaces[namespace] then
return "Wiktionary:Requests for " .. type .. "/Others"
elseif namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
end
local lang = require("Module:languages").getByCode(lang_code, 1) -- print error if invalid code
if lang:inFamily("gmw-ang") and not lang:inFamily("crp") and lang:getFullCode() ~= "ang" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif lang:inFamily("jpx", "qfa-kor", "sit-sba") or Sinitic_scripts[lang:findBestScript(mw.title.getCurrentTitle().subpageText):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame.args[1], "verification")
end
function export.rfd(frame)
return subforum(frame.args[1], "deletion")
end
return export
q6suuw1ipblljwxrtp1aao7admwid7m
43283
43282
2024-09-11T18:15:30Z
Theknightwho
1347
Undo revision [[Special:Diff/81572774|81572774]] by [[Special:Contributions/Chuck Entz|Chuck Entz]] ([[User talk:Chuck Entz|talk]]) It's correct - the reason the RFD notice at [[Thesaurus:wild]] breaks is because it needs a language code.
43283
Scribunto
text/plain
local m_data = mw.loadData("Module:requests/data")
local request_namespaces = m_data.request_namespaces
local Sinitic_scripts = m_data.Sinitic_scripts
local export = {}
local function subforum(lang_code, type)
local namespace = mw.title.getCurrentTitle().namespace
-- RFDs of articles in nonstandard namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and not request_namespaces[namespace] then
return "Wiktionary:Requests for " .. type .. "/Others"
elseif namespace == "Reconstruction" then
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
end
local lang = require("Module:languages").getByCode(lang_code, 1) -- print error if invalid code
if lang:inFamily("gmw-ang") and not lang:inFamily("crp") and lang:getFullCode() ~= "ang" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif lang:inFamily("jpx", "qfa-kor", "sit-sba") or Sinitic_scripts[lang:findBestScript(mw.title.getCurrentTitle().subpageText):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame.args[1], "verification")
end
function export.rfd(frame)
return subforum(frame.args[1], "deletion")
end
return export
2eqft1ugbkx0d5ll34it18ux17s7kmq
43284
43283
2024-10-20T11:50:27Z
Theknightwho
1347
Bugfix: namespaces should be numbers, not names.
43284
Scribunto
text/plain
local m_data = mw.loadData("Module:requests/data")
local request_namespaces = m_data.request_namespaces
local Sinitic_scripts = m_data.Sinitic_scripts
local export = {}
local function subforum(lang_code, type)
local namespace = mw.title.getCurrentTitle().namespace
-- RFDs of articles in nonstandard namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and not request_namespaces[namespace] then
return "Wiktionary:Requests for " .. type .. "/Others"
elseif namespace == 118 then -- Reconstruction:
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
end
local lang = require("Module:languages").getByCode(lang_code, 1) -- print error if invalid code
if lang:inFamily("gmw-ang") and not lang:inFamily("crp") and lang:getFullCode() ~= "ang" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif lang:inFamily("jpx", "qfa-kor", "sit-sba") or Sinitic_scripts[lang:findBestScript(mw.title.getCurrentTitle().subpageText):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame.args[1], "verification")
end
function export.rfd(frame)
return subforum(frame.args[1], "deletion")
end
return export
c84pq5mlx9ibopfhn7rgax355ukwizw
43285
43284
2024-11-14T14:29:14Z
Theknightwho
1347
Avoid the paramForError parameter in getByCode in [[Module:languages]], as it's being deprecated.
43285
Scribunto
text/plain
local m_data = mw.loadData("Module:requests/data")
local request_namespaces = m_data.request_namespaces
local Sinitic_scripts = m_data.Sinitic_scripts
local export = {}
local function subforum(lang_code, type)
local namespace = mw.title.getCurrentTitle().namespace
-- RFDs of articles in nonstandard namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and not request_namespaces[namespace] then
return "Wiktionary:Requests for " .. type .. "/Others"
elseif namespace == 118 then -- Reconstruction:
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
end
-- Print error if invalid code.
local lang = require("Module:languages").getByCode(lang_code) or require("Module:languages/errorGetBy").code(lang_code, 1)
if lang:inFamily("gmw-ang") and not lang:inFamily("crp") and lang:getFullCode() ~= "ang" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif lang:inFamily("jpx", "qfa-kor", "sit-sba") or Sinitic_scripts[lang:findBestScript(mw.title.getCurrentTitle().subpageText):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame.args[1], "verification")
end
function export.rfd(frame)
return subforum(frame.args[1], "deletion")
end
return export
5dwpzosgcm2mv4a3pbmnym467k0oxk6
43286
43285
2025-03-10T20:58:55Z
Theknightwho
1347
43286
Scribunto
text/plain
local m_data = mw.loadData("Module:requests/data")
local request_namespaces = m_data.request_namespaces
local Sinitic_scripts = m_data.Sinitic_scripts
local export = {}
local function subforum(lang_code, type)
local namespace = mw.title.getCurrentTitle().namespace
-- RFDs of articles in nonstandard namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and not request_namespaces[namespace] then
return "Wiktionary:Requests for " .. type .. "/Others"
elseif namespace == 118 then -- Reconstruction:
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
end
-- Print error if invalid code.
local lang = require("Module:languages").getByCode(lang_code) or require("Module:languages/errorGetBy").code(lang_code, 1)
if lang:inFamily("gmw-ang") and not lang:inFamily("qfa-cnt") and lang:getFullCode() ~= "ang" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif lang:inFamily("jpx", "qfa-kor", "sit-sba") or Sinitic_scripts[lang:findBestScript(mw.title.getCurrentTitle().subpageText):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame.args[1], "verification")
end
function export.rfd(frame)
return subforum(frame.args[1], "deletion")
end
return export
cgljx5x98ds0ker9y62dj8cvqxqdyhx
43287
43286
2025-12-13T03:20:04Z
WingerBot
1359
use mw.loadData("Module:headword/data").pagename in place of directly fetching pagename using mw.title.getCurrentTitle().text or .subpageText to properly support mammoth (split) pages and unsupported titles (manually assisted)
43287
Scribunto
text/plain
local m_data = mw.loadData("Module:requests/data")
local request_namespaces = m_data.request_namespaces
local Sinitic_scripts = m_data.Sinitic_scripts
local export = {}
local function subforum(lang_code, type)
local namespace = mw.title.getCurrentTitle().namespace
-- RFDs of articles in nonstandard namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and not request_namespaces[namespace] then
return "Wiktionary:Requests for " .. type .. "/Others"
elseif namespace == 118 then -- Reconstruction:
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
end
-- Print error if invalid code.
local lang = require("Module:languages").getByCode(lang_code) or require("Module:languages/errorGetBy").code(lang_code, 1)
if lang:inFamily("gmw-ang") and not lang:inFamily("qfa-cnt") and lang:getFullCode() ~= "ang" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif lang:inFamily("jpx", "qfa-kor", "sit-sba") or Sinitic_scripts[lang:findBestScript(mw.loadData("Module:headword/data").pagename):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame.args[1], "verification")
end
function export.rfd(frame)
return subforum(frame.args[1], "deletion")
end
return export
san7u45chs9xeh2q90a869gsmgnugks
43288
43287
2026-06-24T04:41:02Z
King ChristLike
964
38 revisions imported from [[:en:Module:request-forum]]
43287
Scribunto
text/plain
local m_data = mw.loadData("Module:requests/data")
local request_namespaces = m_data.request_namespaces
local Sinitic_scripts = m_data.Sinitic_scripts
local export = {}
local function subforum(lang_code, type)
local namespace = mw.title.getCurrentTitle().namespace
-- RFDs of articles in nonstandard namespaces go straight to [[WT:RFDO]] without having their language code checked.
-- This branch is only used by [[Template:rfd]] because the other RFD templates ([[Template:rfd-sense]], [[Template:rfd-redundant]]) semantically presuppose the target to be a lingual element.
if type == "deletion" and not request_namespaces[namespace] then
return "Wiktionary:Requests for " .. type .. "/Others"
elseif namespace == 118 then -- Reconstruction:
-- There is no 'Requests for verification/Reconstruction'; everything vectors to RFDR.
return "Wiktionary:Requests for deletion/Reconstruction"
end
-- Print error if invalid code.
local lang = require("Module:languages").getByCode(lang_code) or require("Module:languages/errorGetBy").code(lang_code, 1)
if lang:inFamily("gmw-ang") and not lang:inFamily("qfa-cnt") and lang:getFullCode() ~= "ang" then
return "Wiktionary:Requests for " .. type .. "/English"
elseif lang:inFamily("jpx", "qfa-kor", "sit-sba") or Sinitic_scripts[lang:findBestScript(mw.loadData("Module:headword/data").pagename):getCode()] then
return "Wiktionary:Requests for " .. type .. "/CJK"
elseif lang:inFamily("itc") then
return "Wiktionary:Requests for " .. type .. "/Italic"
else
return "Wiktionary:Requests for " .. type .. "/Non-English"
end
end
function export.rfv(frame)
return subforum(frame.args[1], "verification")
end
function export.rfd(frame)
return subforum(frame.args[1], "deletion")
end
return export
san7u45chs9xeh2q90a869gsmgnugks
Module:string/templates
828
8223
43289
2013-07-30T23:35:44Z
Metaknowledge
1331
copied from [[w:Module:String]]
43289
Scribunto
text/plain
--[[
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters,
unnamed parameters, or a mixture. If named parameters are used, Mediawiki will
automatically remove any leading or trailing whitespace from the parameter.
Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
Global options
ignore_errors: If set to 'true' or 1, any error condition will result in
an empty string being returned rather than an error message.
error_category: If an error occurs, specifies the name of a category to
include with the error message. The default category is
[Category:Errors reported by Module String].
no_category: If set to 'true' or 1, no category will be added if an error
is generated.
Unit tests for this module are available at Module:String/tests.
]]
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:String|len|target_string|}}
OR
{{#invoke:String|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:String|sub|target_string|start_index|end_index}}
OR
{{#invoke:String|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:String|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str._escapePattern( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:String|pos|target_string|index_value}}
OR
{{#invoke:String|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:String|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns 0. If either "source" or "target" are missing / empty, this
function also returns 0.
This function should be safe for UTF-8 strings.
]]
function str.find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['target'] or '';
local start_pos = tonumber(new_args['start']) or 1;
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return 0;
end
plain = str._getBoolean( plain );
local start = mw.ustring.find( source_str, pattern, start_pos, plain )
if start == nil then
start = 0
end
return start
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str._escapePattern( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters so that they will be treated
as plain text.
]]
function str._escapePattern( pattern_str )
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
return str
l0shz7fzxb1bq626nihqwbptk7dfqd5
43290
43289
2014-07-05T11:47:06Z
AlchemistOfJoy
1931
See [[Module:string/documentation]].
43290
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:String|len|target_string|}}
OR
{{#invoke:String|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:String|sub|target_string|start_index|end_index}}
OR
{{#invoke:String|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:String|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str._escapePattern( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:String|pos|target_string|index_value}}
OR
{{#invoke:String|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:String|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns 0. If either "source" or "target" are missing / empty, this
function also returns 0.
This function should be safe for UTF-8 strings.
]]
function str.find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['target'] or '';
local start_pos = tonumber(new_args['start']) or 1;
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return 0;
end
plain = str._getBoolean( plain );
local start = mw.ustring.find( source_str, pattern, start_pos, plain )
if start == nil then
start = 0
end
return start
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str._escapePattern( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters so that they will be treated
as plain text.
]]
function str._escapePattern( pattern_str )
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
return str
8gm7qsgr1g4n5o100oquynrgi3hx18w
43291
43290
2015-12-19T22:02:28Z
Fish bowl
1382
"No such module 'String'."
43291
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str._escapePattern( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns 0. If either "source" or "target" are missing / empty, this
function also returns 0.
This function should be safe for UTF-8 strings.
]]
function str.find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['target'] or '';
local start_pos = tonumber(new_args['start']) or 1;
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return 0;
end
plain = str._getBoolean( plain );
local start = mw.ustring.find( source_str, pattern, start_pos, plain )
if start == nil then
start = 0
end
return start
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str._escapePattern( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters so that they will be treated
as plain text.
]]
function str._escapePattern( pattern_str )
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
return str
1963lxceshnskkzzwo4m2i8armwr4fx
43292
43291
2016-11-20T13:20:44Z
Rua
1351
43292
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str._escapePattern( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns 0. If either "source" or "target" are missing / empty, this
function also returns 0.
This function should be safe for UTF-8 strings.
]]
function str.find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['target'] or '';
local start_pos = tonumber(new_args['start']) or 1;
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return 0;
end
plain = str._getBoolean( plain );
local start = mw.ustring.find( source_str, pattern, start_pos, plain )
if start == nil then
start = 0
end
return start
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str._escapePattern( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.gsub(args[1], args[2], args[3], args[4])
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters so that they will be treated
as plain text.
]]
function str._escapePattern( pattern_str )
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
return str
0cguwsefhbslizp2j2qdo5gwqti57ml
43293
43292
2016-11-20T13:28:08Z
Rua
1351
43293
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str._escapePattern( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns 0. If either "source" or "target" are missing / empty, this
function also returns 0.
This function should be safe for UTF-8 strings.
]]
function str.find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['target'] or '';
local start_pos = tonumber(new_args['start']) or 1;
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return 0;
end
plain = str._getBoolean( plain );
local start = mw.ustring.find( source_str, pattern, start_pos, plain )
if start == nil then
start = 0
end
return start
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str._escapePattern( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters so that they will be treated
as plain text.
]]
function str._escapePattern( pattern_str )
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
return str
43nl8160blrs9k88jwp6mxdk6yv7h97
43294
43293
2017-01-19T07:09:48Z
Erutuon
1339
barebones function for converting to lowercase
43294
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str._escapePattern( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns 0. If either "source" or "target" are missing / empty, this
function also returns 0.
This function should be safe for UTF-8 strings.
]]
function str.find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['target'] or '';
local start_pos = tonumber(new_args['start']) or 1;
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return 0;
end
plain = str._getBoolean( plain );
local start = mw.ustring.find( source_str, pattern, start_pos, plain )
if start == nil then
start = 0
end
return start
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str._escapePattern( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters so that they will be treated
as plain text.
]]
function str._escapePattern( pattern_str )
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
return str
ivohqrbibr7mb8pc9vqhxrtskphx7tb
43295
43294
2017-01-19T07:13:15Z
Erutuon
1339
lc is commonly used in templates, so would be a good alias
43295
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str._escapePattern( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns 0. If either "source" or "target" are missing / empty, this
function also returns 0.
This function should be safe for UTF-8 strings.
]]
function str.find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['target'] or '';
local start_pos = tonumber(new_args['start']) or 1;
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return 0;
end
plain = str._getBoolean( plain );
local start = mw.ustring.find( source_str, pattern, start_pos, plain )
if start == nil then
start = 0
end
return start
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str._escapePattern( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters so that they will be treated
as plain text.
]]
function str._escapePattern( pattern_str )
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
return str
t43x8fbavqssy92es6udl7061dradsz
43296
43295
2017-01-23T05:46:41Z
Erutuon
1339
list escaped characters in comment
43296
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str._escapePattern( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns 0. If either "source" or "target" are missing / empty, this
function also returns 0.
This function should be safe for UTF-8 strings.
]]
function str.find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['target'] or '';
local start_pos = tonumber(new_args['start']) or 1;
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return 0;
end
plain = str._getBoolean( plain );
local start = mw.ustring.find( source_str, pattern, start_pos, plain )
if start == nil then
start = 0
end
return start
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str._escapePattern( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str._escapePattern( pattern_str )
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
return str
88q64vrkyk7uzvm97z53rnbimdyj0mi
43297
43296
2017-04-12T21:56:59Z
Rua
1351
43297
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str._escapePattern( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str._escapePattern( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str._escapePattern( pattern_str )
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
return str
tio28k005v6jw5940iajlwu8f6wxwfx
43298
43297
2017-05-15T20:06:42Z
Erutuon
1339
function for counting matches
43298
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str._escapePattern( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str._escapePattern( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str._escapePattern( pattern_str )
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
str._escapePattern(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
return str
e95t9c0rgkuz16x98bwsbi6pxb4ui3v
43299
43298
2017-05-18T03:21:08Z
Erutuon
1339
renaming the escaping function, because I like the name in [[Module:utilities]] better
43299
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
return str
dm8d6276dyf3z8fzxbacmtn55ypml7v
43300
43299
2017-05-18T03:22:11Z
Erutuon
1339
copied plain_gsub from [[Module:utilities]]
43300
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
return str
bner3p723trnilp0sgng7v7ppx4cm3i
43301
43300
2017-05-18T05:35:57Z
Erutuon
1339
make pattern_escape invokable, for testing
43301
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string or a frame object.")
end
end
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
return str
9n14mdexbjc0g5zpj0119skmck70nc2
43302
43301
2017-05-18T05:41:57Z
Erutuon
1339
another error message
43302
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
return str
jt7rzd7itizh5790rk1555838o1u7v4
43303
43302
2017-06-12T17:47:28Z
Erutuon
1339
add matchToArray function, in response to [[Wiktionary:Grease pit/2017/June#preg match all equivalent]]
43303
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local matches = {}
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
for match in mw.ustring.gmatch(text, pattern) do
table.insert(matches, match)
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
return str
grvra4gg5ntzf6dpvso1lvcecxbppym
43304
43303
2017-06-12T20:09:00Z
Erutuon
1339
failed to assign to variable
43304
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local matches = {}
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
for match in mw.ustring.gmatch(text, pattern) do
table.insert(matches, match)
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
return str
jeyf9qvrc9xyea4jluidtjc73a04jl6
43305
43304
2017-08-08T18:28:05Z
Erutuon
1339
attempt imatch function
43305
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local matches = {}
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
for match in mw.ustring.gmatch(text, pattern) do
table.insert(matches, match)
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
function str.imatch(text, pattern, start)
local i = 0
return function()
i = i + 1
local match = mw.ustring.match(text, pattern, start)
if match then
return i, match
else
return nil, nil
end
end
end
return str
hv0aqy3sdk4r9qmszcueo2siqtzjd82
43306
43305
2017-08-08T18:41:21Z
Erutuon
1339
fixed
43306
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local matches = {}
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
for match in mw.ustring.gmatch(text, pattern) do
table.insert(matches, match)
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
function str.imatch(text, pattern, start, plain)
local i = 0
local pos = start or 0
return function()
i = i + 1
pos = pos + 1
local start, j, match = mw.ustring.find(text, "(" .. pattern .. ")", pos, plain)
mw.log(start, j, match)
if match then
pos = j
return i, match
else
return nil, nil
end
end
end
return str
a4sll1kedmmh22mu24yzu3lrtj147r7
43307
43306
2017-08-08T19:02:49Z
Erutuon
1339
43307
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local matches = {}
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
for match in mw.ustring.gmatch(text, pattern) do
table.insert(matches, match)
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
function str.imatch(text, pattern, start, plain)
local i = 0
local pos = start or 0
return function()
i = i + 1
pos = pos + 1
local _, j, match = mw.ustring.find(text, "(" .. pattern .. ")", pos, plain)
if match then
pos = j
return i, match
else
return nil, nil
end
end
end
return str
j48dwnnrsvv8fsnz4mv0ngnqbv3dz95
43308
43307
2017-08-08T19:29:00Z
Erutuon
1339
description
43308
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local matches = {}
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
for match in mw.ustring.gmatch(text, pattern) do
table.insert(matches, match)
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[[
A function to iterate through the matches found in a string.
Similar to mw.ustring.gmatch(), but its first return value is the number
indicating the match's position in the list of all matches in the string,
something like ipairs(), and it can't handle multiple captures.
Invoke thus:
for i, match in require("Module:string").imatch(text, pattern) do
[ do something with i and capture ]
end
]]
function str.imatch(text, pattern, start, plain)
local i = 0
local pos = start or 0
return function()
i = i + 1
local _, j, match = mw.ustring.find(text, "(" .. pattern .. ")", pos, plain)
if match then
pos = j + 1
return i, match
else
return nil, nil
end
end
end
return str
2mtv36t1qn43u7srncukyxwgf4kq4jd
43309
43308
2017-08-30T00:27:12Z
Erutuon
1339
fancier imatch
43309
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local matches = {}
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
for match in mw.ustring.gmatch(text, pattern) do
table.insert(matches, match)
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[[
A function to iterate through the matches found in a string.
Similar to mw.ustring.gmatch(), but its first return value is the number
indicating the match's position in the list of all matches in the string,
something like ipairs(), and it can't handle multiple captures.
Invoke thus:
for i, match in require("Module:string").imatch(text, pattern) do
[ do something with i and capture ]
end
]]
function str.imatch(text, pattern, start, plain)
local i = 0
local pos = start or 0
if not mw.ustring.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
return function()
i = i + 1
local return_values = { mw.ustring.find(text, pattern, pos, plain) }
local j = return_values[2]
table.remove(return_values, 1)
table.remove(return_values, 1)
if #return_values > 0 then
pos = j + 1
return i, unpack(return_values)
else
return nil, nil
end
end
end
return str
euw0w6tqvhu4aq3ixpdgdjg2db3qbgy
43310
43309
2017-08-30T00:28:43Z
Erutuon
1339
describe
43310
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local matches = {}
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
for match in mw.ustring.gmatch(text, pattern) do
table.insert(matches, match)
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
A function to iterate through the matches found in a string.
Similar to mw.ustring.gmatch(), but its first return value is the number
indicating the match's position in the list of all matches in the string,
something like ipairs().
Invoke thus:
for i, match1[, match2[, match3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture ]
end
]=]
function str.imatch(text, pattern, start, plain)
local i = 0
local pos = start or 0
if not mw.ustring.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
return function()
i = i + 1
local return_values = { mw.ustring.find(text, pattern, pos, plain) }
local j = return_values[2]
table.remove(return_values, 1)
table.remove(return_values, 1)
if #return_values > 0 then
pos = j + 1
return i, unpack(return_values)
else
return nil, nil
end
end
end
return str
fhi9a6rya9smvwb75aslupalr9hs174
43311
43310
2017-08-30T00:30:27Z
Erutuon
1339
43311
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local matches = {}
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
for match in mw.ustring.gmatch(text, pattern) do
table.insert(matches, match)
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
A function to iterate through the matches found in a string.
Similar to mw.ustring.gmatch(), but its first return value is the number
indicating the match's position in the list of all matches in the string,
something like ipairs().
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture ]
end
]=]
function str.imatch(text, pattern, start, plain)
local i = 0
local pos = start or 0
if not mw.ustring.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
return function()
i = i + 1
local return_values = { mw.ustring.find(text, pattern, pos, plain) }
local j = return_values[2]
table.remove(return_values, 1)
table.remove(return_values, 1)
if #return_values > 0 then
pos = j + 1
return i, unpack(return_values)
else
return nil, nil
end
end
end
return str
cfjk9die16gmv8btnczipyy7hyda6o6
43312
43311
2017-09-07T08:26:19Z
Erutuon
1339
rephrase
43312
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local matches = {}
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
for match in mw.ustring.gmatch(text, pattern) do
table.insert(matches, match)
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
]=]
function str.imatch(text, pattern, start, plain)
local i = 0
local pos = start or 0
if not mw.ustring.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
return function()
i = i + 1
local return_values = { mw.ustring.find(text, pattern, pos, plain) }
local j = return_values[2]
table.remove(return_values, 1)
table.remove(return_values, 1)
if #return_values > 0 then
pos = j + 1
return i, unpack(return_values)
else
return nil, nil
end
end
end
return str
5guwy19w1tge7ac6fjvmosi3uig17n1
43313
43312
2017-09-14T03:54:39Z
Erutuon
1339
briefer
43313
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local matches = {}
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
for match in mw.ustring.gmatch(text, pattern) do
table.insert(matches, match)
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
]=]
function str.imatch(text, pattern, start, plain)
local i = 0
local pos = start or 0
if not mw.ustring.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
return function()
i = i + 1
local return_values = { mw.ustring.find(text, pattern, pos, plain) }
local j = return_values[2]
if #return_values > 0 then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
else
return nil, nil
end
end
end
return str
612fqgpp8j0hjigxcuugij3b3zk8b92
43314
43313
2017-11-02T05:10:59Z
Erutuon
1339
somewhat faster
43314
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
local matches = {}
local i = 1
for match in mw.ustring.gmatch(text, pattern) do
matches[i] = match
i = i + 1
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
]=]
function str.imatch(text, pattern, start, plain)
local i = 0
local pos = start or 0
if not mw.ustring.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
return function()
i = i + 1
local return_values = { mw.ustring.find(text, pattern, pos, plain) }
local j = return_values[2]
if #return_values > 0 then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
else
return nil, nil
end
end
end
return str
m0f537wcit30ncxelcpcox0xu5tiab1
43315
43314
2017-11-04T23:47:44Z
Erutuon
1339
fast length function
43315
Scribunto
text/plain
local str = {}
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
local matches = {}
local i = 1
for match in mw.ustring.gmatch(text, pattern) do
matches[i] = match
i = i + 1
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
]=]
function str.imatch(text, pattern, start, plain)
local i = 0
local pos = start or 0
if not mw.ustring.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
return function()
i = i + 1
local return_values = { mw.ustring.find(text, pattern, pos, plain) }
local j = return_values[2]
if #return_values > 0 then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
else
return nil, nil
end
end
end
--[[
Counts UTF-8 characters. Faster than mw.ustring.len. Assumes that encoding is
correct. Unlike mw.ustring.len, does not return nil if encoding is invalid. Will
not count the bytes 192, 193, and 245-255, which are not used in the UTF-8
encoding.
--]]
function str.len(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
return str
2tb23kqild8w14ecpve7s4v64kgwqfr
43316
43315
2017-11-05T01:55:34Z
Erutuon
1339
Undo revision 47956049 by [[Special:Contributions/Erutuon|Erutuon]] ([[User talk:Erutuon|talk]])
43316
Scribunto
text/plain
local str = {}
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
local matches = {}
local i = 1
for match in mw.ustring.gmatch(text, pattern) do
matches[i] = match
i = i + 1
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
]=]
function str.imatch(text, pattern, start, plain)
local i = 0
local pos = start or 0
if not mw.ustring.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
return function()
i = i + 1
local return_values = { mw.ustring.find(text, pattern, pos, plain) }
local j = return_values[2]
if #return_values > 0 then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
else
return nil, nil
end
end
end
return str
m0f537wcit30ncxelcpcox0xu5tiab1
43317
43316
2017-11-05T02:13:12Z
Erutuon
1339
re-added function under a different name
43317
Scribunto
text/plain
local str = {}
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
local matches = {}
local i = 1
for match in mw.ustring.gmatch(text, pattern) do
matches[i] = match
i = i + 1
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
]=]
function str.imatch(text, pattern, start, plain)
local i = 0
local pos = start or 0
if not mw.ustring.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
return function()
i = i + 1
local return_values = { mw.ustring.find(text, pattern, pos, plain) }
local j = return_values[2]
if #return_values > 0 then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
else
return nil, nil
end
end
end
return str
oivrn6x3fc10gl1pws0tws8ugdvl56u
43318
43317
2017-11-06T04:29:50Z
Erutuon
1339
forgot to define variable
43318
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
local matches = {}
local i = 1
for match in mw.ustring.gmatch(text, pattern) do
matches[i] = match
i = i + 1
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
]=]
function str.imatch(text, pattern, start, plain)
local i = 0
local pos = start or 0
if not mw.ustring.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
return function()
i = i + 1
local return_values = { mw.ustring.find(text, pattern, pos, plain) }
local j = return_values[2]
if #return_values > 0 then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
else
return nil, nil
end
end
end
return str
2w371ljcpuzaoo4wtcb3nm6r3exv11y
43319
43318
2017-11-06T22:05:05Z
Erutuon
1339
safe to use basic string function here
43319
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
local matches = {}
local i = 1
for match in mw.ustring.gmatch(text, pattern) do
matches[i] = match
i = i + 1
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
]=]
function str.imatch(text, pattern, start, plain)
local i = 0
local pos = start or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
return function()
i = i + 1
local return_values = { mw.ustring.find(text, pattern, pos, plain) }
local j = return_values[2]
if #return_values > 0 then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
else
return nil, nil
end
end
end
return str
bx2f0bde88x1is0v2etpgimqchkr2x7
43320
43319
2017-11-06T22:06:56Z
Erutuon
1339
allow basic Lua function to be used in imatch
43320
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
local matches = {}
local i = 1
for match in mw.ustring.gmatch(text, pattern) do
matches[i] = match
i = i + 1
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
]=]
function str.imatch(text, pattern, start, plain, use_basic_Lua_function)
local i = 0
local pos = start or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if #return_values > 0 then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
else
return nil, nil
end
end
end
return str
j1zc8nnbecogmo402qe6qf13pyl66ks
43321
43320
2017-11-06T22:12:04Z
Erutuon
1339
example
43321
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
local matches = {}
local i = 1
for match in mw.ustring.gmatch(text, pattern) do
matches[i] = match
i = i + 1
end
if #matches > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b"c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, start, plain, use_basic_Lua_function)
local i = 0
local pos = start or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if #return_values > 0 then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
else
return nil, nil
end
end
end
return str
5xxsodq1moq770idk3yn5dj2q5fnfmh
43322
43321
2017-11-28T04:23:34Z
Erutuon
1339
43322
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len( frame )
local new_args = str._getParameters( frame.args, {'s'} );
local s = new_args['s'] or '';
return mw.ustring.len( s )
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub( frame )
local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } );
local s = new_args['s'] or '';
local i = tonumber( new_args['i'] ) or 1;
local j = tonumber( new_args['j'] ) or -1;
local len = mw.ustring.len( s );
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error( 'String subset index out of range' );
end
if j < i then
return str._error( 'String subset indices out of order' );
end
return mw.ustring.sub( s, i, j )
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength( frame )
local i = tonumber( frame.args.i ) or 0
local len = tonumber( frame.args.len )
return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) )
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match( frame )
local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} );
local s = new_args['s'] or '';
local start = tonumber( new_args['start'] ) or 1;
local plain_flag = str._getBoolean( new_args['plain'] or false );
local pattern = new_args['pattern'] or '';
local match_index = math.floor( tonumber(new_args['match']) or 1 );
local nomatch = new_args['nomatch'];
if s == '' then
return str._error( 'Target string is empty' );
end
if pattern == '' then
return str._error( 'Pattern string is empty' );
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then
return str._error( 'Requested start is out of range' );
end
if match_index == 0 then
return str._error( 'Match index is out of range' );
end
if plain_flag then
pattern = str.pattern_escape( pattern );
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match( s, pattern, start )
else
if start > 1 then
s = mw.ustring.sub( s, start );
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[ count + match_index ];
end
end
if result == nil then
if nomatch == nil then
return str._error( 'Match not found' );
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos( frame )
local new_args = str._getParameters( frame.args, {'target', 'pos'} );
local target_str = new_args['target'] or '';
local pos = tonumber( new_args['pos'] ) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then
return str._error( 'String index out of range' );
end
return mw.ustring.sub( target_str, pos, pos );
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find( frame )
local new_args = str._getParameters( frame.args, {'source', 'target'} );
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find( source_str, target_str, 1, true )
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = {required = true},
[2] = {required = true},
[3] = {type = "number"},
[4] = {type = "boolean"},
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace( frame )
local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } );
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber( new_args['count'] );
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean( plain );
if plain then
pattern = str.pattern_escape( pattern );
replace = mw.ustring.gsub( replace, "%%", "%%%%" ); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub( source_str, pattern, replace, count );
else
result = mw.ustring.gsub( source_str, pattern, replace );
end
return result;
end
function str.gsub(frame)
local params = {
[1] = {required = true, allow_empty = true},
[2] = {required = true, allow_empty = true},
[3] = {required = true, allow_empty = true},
[4] = {type = "number"},
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep( frame )
local repetitions = tonumber( frame.args[2] )
if not repetitions then
return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' )
end
return string.rep( frame.args[1] or '', repetitions )
end
function str.lower( frame )
local text = frame.args[1] or ''
return mw.ustring.lower( text )
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters( frame_args, arg_list )
local new_args = {};
local index = 1;
local value;
for i,arg in ipairs( arg_list ) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error( error_str )
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean( no_category ) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean( boolean_str )
local boolean_value;
if type( boolean_str ) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type( boolean_str ) == 'boolean' then
boolean_value = boolean_str;
else
error( 'No boolean value found' );
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape( pattern_str )
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not ( type(pattern_str) == "string" or type(pattern_str) == "number" ) then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" )
return escaped
else
return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" );
end
end
function str.count(text, pattern, plain)
if not ( type(text) == "string" or type(text) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
if not ( type(replacement) == "string" or type(replacement) == "number" ) then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not ( type(pattern) == "string" or type(pattern) == "number" ) then
error("The second argument to plain_gsub should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b"c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
return str
ghuk6xi1pqebge3zfrsbjr27sltqkjd
43323
43322
2017-11-28T05:11:35Z
JohnC5
1345
autoformat
43323
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true },
[2] = { required = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub(source_str, pattern, replace, count);
else
result = mw.ustring.gsub(source_str, pattern, replace);
end
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { required = true, allow_empty = true },
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1")
return escaped
else
return mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1");
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b"c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
return str
edncprx2vfos3flfi9ccs6ed5c7zevr
43324
43323
2017-12-02T04:49:19Z
Erutuon
1339
escapebytes function for convenience
43324
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true },
[2] = { required = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub(source_str, pattern, replace, count);
else
result = mw.ustring.gsub(source_str, pattern, replace);
end
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { required = true, allow_empty = true },
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1")
return escaped
else
return mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1");
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b"c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
return str
57wpsn0ok9d584tapzwhmgwyv6bctah
43325
43324
2017-12-18T23:29:46Z
JohnC5
1345
43325
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true },
[2] = { required = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub(source_str, pattern, replace, count);
else
result = mw.ustring.gsub(source_str, pattern, replace);
end
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { required = true, allow_empty = true },
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1")
return escaped
else
return mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1");
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
return str
1gqo39yi86j40jp3j9vghc3rj3ooqvl
43326
43325
2018-01-17T08:17:25Z
Erutuon
1339
template-invokable URIdecode
43326
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true },
[2] = { required = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub(source_str, pattern, replace, count);
else
result = mw.ustring.gsub(source_str, pattern, replace);
end
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { required = true, allow_empty = true },
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1")
return escaped
else
return mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1");
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
return str
6zadq61wqzkvc6qok8zdlyrun4cwx6j
43327
43326
2018-09-03T07:51:49Z
Erutuon
1339
wrong function name in error message
43327
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true },
[2] = { required = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
if count ~= nil then
result = mw.ustring.gsub(source_str, pattern, replace, count);
else
result = mw.ustring.gsub(source_str, pattern, replace);
end
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { required = true, allow_empty = true },
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1")
return escaped
else
return mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1");
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
return str
siospdy6f90dribp7k4hwt96rx3fsv3
43328
43327
2018-10-18T08:33:33Z
Erutuon
1339
okay for count to be nil
43328
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true },
[2] = { required = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { required = true, allow_empty = true },
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1")
return escaped
else
return mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1");
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
return str
gng8dr59l8ach0rfi035pu6ngd94any
43329
43328
2019-04-25T00:31:25Z
en>Unknown user
0
43329
Scribunto
text/plain
phoiac9h4m842xq45sp7s6u21eteeq1
43330
43329
2019-04-25T00:40:03Z
DCDuring
1481
43330
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true },
[2] = { required = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { required = true, allow_empty = true },
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1")
return escaped
else
return mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1");
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
return str
gng8dr59l8ach0rfi035pu6ngd94any
43331
43330
2019-04-25T20:40:50Z
Surjection
380
Protected "[[Module:string]]": Highly visible template/module ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))
43330
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true },
[2] = { required = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { required = true, allow_empty = true },
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1")
return escaped
else
return mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1");
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
return str
gng8dr59l8ach0rfi035pu6ngd94any
43332
43331
2019-05-13T20:28:32Z
Rua
1351
43332
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true },
[2] = { required = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1")
return escaped
else
return mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1");
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
return str
kksutaavsi0ndbn5lygsjmxnyderseg
43333
43332
2021-05-30T16:52:09Z
Erutuon
1339
allow parameters 1 and 2 to find to be empty
43333
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1")
return escaped
else
return mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1");
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
return str
nuy4z4vuiyqvlxav5ww4zt88uz97k8s
43334
43333
2021-09-05T04:00:05Z
Erutuon
1339
add nowiki parameter to str.gsub to let it accept nowikified text
43334
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
nowiki = { type == "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
local text = args[1]
if args.nowiki then
text = mw.text.unstripNoWiki(text)
end
return (mw.ustring.gsub(text, args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1")
return escaped
else
return mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1");
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
return str
e4k49448hezlokt6gykx95cahv23l3y
43335
43334
2021-09-05T04:04:02Z
Erutuon
1339
Undo revision 63851301 by [[Special:Contributions/Erutuon|Erutuon]] ([[User talk:Erutuon|talk]]): meh, doesn't work like I wanted it to
43335
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1")
return escaped
else
return mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1");
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
return str
nuy4z4vuiyqvlxav5ww4zt88uz97k8s
43336
43335
2021-12-30T04:18:08Z
Benwing2
1346
add str.format
43336
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.format(frame)
local fmt = frame.args[1]
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1")
return escaped
else
return mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1");
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
return str
shadd8rr7xrxt4ix0fplv1mcxy1hp8w
43337
43336
2021-12-30T05:27:29Z
Benwing2
1346
oops
43337
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
local escaped = mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1")
return escaped
else
return mw.ustring.gsub(pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1");
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
return str
lehn00jj4k4b1fypw7xjhn9ru8q0qo0
43338
43337
2022-01-04T13:04:50Z
Surjection
380
43338
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
return str
oeq6i4dx2v1wn2dviuppuuuutmkonbn
43339
43338
2022-09-22T22:39:22Z
Theknightwho
1347
43339
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverse a UTF8 string
function str.reverse(s)
s = s:gsub("[%z\1-\127\194-\244][\128-\191]*", function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
return str
dghe1nzhdpdidie1urk5mitu1etssvr
43340
43339
2022-09-22T22:40:58Z
Theknightwho
1347
43340
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverse a UTF8 string
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
return str
izy3k38cm1aosqxe3mbi7d2mqagnns7
43341
43340
2022-09-23T07:32:24Z
Theknightwho
1347
43341
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
return str
0rgp63zhax506up1107q8qlunjjrkzq
43342
43341
2022-12-24T11:30:57Z
Catonif
1360
add len_visible function
43342
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
return str
l03tk053mmzbubo570b7pea4hr19trr
43343
43342
2023-01-01T21:16:15Z
Theknightwho
1347
43343
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode combining class.
local function fixNormalization(text)
-- New combining classes.
local fixedCombClasses = {
{"༹"},
{1}
}
local toFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
-- If no characters need fixing, just return text.
if mw.ustring.match(text, toFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, toFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
text = mw.ustring.gsub(text, "(.)", "%1 ")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
1i0hiho0u7taf1mqvizter0drucf262
43344
43343
2023-01-01T21:20:46Z
Theknightwho
1347
43344
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode combining class.
local function fixNormalization(text)
-- New combining classes.
local fixedCombClasses = {
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
local toFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
-- If no characters need fixing, just return text.
if mw.ustring.match(text, toFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, toFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
text = mw.ustring.gsub(text, "(.)", "%1 ")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
9v1r08cxaipjjhopolzndw904ftlbhe
43345
43344
2023-01-01T21:27:16Z
Theknightwho
1347
43345
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode combining class.
local function fixNormalization(text)
-- New combining classes.
local fixedCombClasses = {
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
local toFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
-- If no characters need fixing, just return text.
if mw.ustring.match(text, toFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, toFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
hvxb2peme2imxj40tqnqa95gquv0ta2
43346
43345
2023-01-01T22:59:27Z
Theknightwho
1347
43346
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode combining class.
local function fixNormalization(text)
local data = mw.loadData("Module:string/data")
local charsToFix = {}
for character, _ in pairs(data.fixedCombClasses) do
table.insert(charsToFix, character)
end
charsToFix = "[" .. table.concat(charsToFix) .. "]"
-- If no characters need fixing, just return text.
if mw.ustring.match(text, charsToFix) then
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, charsToFix) do
local intermediaryChars = {}
for character, combClass in pairs(data.defaultCombClasses) do
if combClass <= data.defaultCombClasses[charToFix] and combClass > data.fixedCombClasses[charToFix] then
table.insert(intermediaryChars, character)
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
ckjysy3fuy1xflu7mq2zv1k3i92lkx6
43347
43346
2023-01-01T23:22:58Z
Theknightwho
1347
43347
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode combining class.
local function fixNormalization(text)
local data = mw.loadData("Module:string/data")
local charsToFix = {}
for character, _ in pairs(data.fixedCombClasses) do
table.insert(charsToFix, character)
end
charsToFix = "[" .. table.concat(charsToFix) .. "]"
-- If no characters need fixing, just return text.
if mw.ustring.match(text, charsToFix) then
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, charsToFix) do
local intermediaryChars = {}
for character, combClass in pairs(data.defaultCombClasses) do
if combClass <= data.defaultCombClasses[charToFix] and combClass > data.fixedCombClasses[charToFix] then
table.insert(intermediaryChars, character)
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(require("ustring").toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(require("ustring").toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(require("ustring").toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(require("ustring").toNFKD(text))
end
return str
2wycplmt1h88iqy6d5lnf13lmucv9ll
43348
43347
2023-01-01T23:30:48Z
Theknightwho
1347
43348
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode combining class.
local function fixNormalization(text)
-- New combining classes.
local fixedCombClasses = {
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
local toFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
-- If no characters need fixing, just return text.
if mw.ustring.match(text, toFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, toFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
hvxb2peme2imxj40tqnqa95gquv0ta2
43349
43348
2023-01-01T23:48:55Z
Theknightwho
1347
43349
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode combining class.
local function fixNormalization(text)
-- New combining classes.
local fixedCombClasses = {
-- Fixes:
-- (1) Fix for Tibetan, where the tsa-phru is wrongly placed after any vowel signs following normalization (due to its canonical combining class), despite being part of the previous consonant. See Unicode L2/05-244 (N2985).
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
local toFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
-- If no characters need fixing, just return text.
if mw.ustring.match(text, toFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, toFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
iybqjpdsvk85l5lof8d9wev1qseoana
43350
43349
2023-01-04T13:56:31Z
Theknightwho
1347
43350
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode decompositions or combining classes.
local function fixNormalization(text)
-- New decompositions. These *must* be desirable in all normalizations (e.g. the composed character is deprecated is discouraged from use).
local fixedDecompositions = {
{"ཷ", "ཹ"}, -- List of characters.
{"ྲཱྀ", "ླཱྀ"} -- List of new decompositions, in the same order.
}
-- New combining classes.
local fixedCombClasses = {
-- Fixes:
-- (1) Fix for Tibetan, where the tsa-phru is wrongly placed after any vowel signs following normalization (due to its canonical combining class), despite being part of the previous consonant. See Unicode L2/05-244 (N2985).
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
-- If no characters need fixing, just return text.
if mw.ustring.match(text, "[" .. table.concat(fixedDecompositions[1]) .. "]") then
for i, charToFix in ipairs(fixedDecompositions[1]) do
text = mw.ustring.gsub(text, charToFix, fixedDecompositions[2][i])
end
end
local combClassesToFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
if mw.ustring.match(text, combClassesToFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, combClassesToFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
7rotulx9xnj2226adf28teklp8wngju
43351
43350
2023-01-04T13:57:11Z
Theknightwho
1347
43351
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode decompositions or combining classes.
local function fixNormalization(text)
-- New decompositions. These *must* be desirable in all normalizations (e.g. the composed character is deprecated or discouraged from use).
local fixedDecompositions = {
{"ཷ", "ཹ"}, -- List of characters.
{"ྲཱྀ", "ླཱྀ"} -- List of new decompositions, in the same order.
}
-- New combining classes.
local fixedCombClasses = {
-- Fixes:
-- (1) Fix for Tibetan, where the tsa-phru is wrongly placed after any vowel signs following normalization (due to its canonical combining class), despite being part of the previous consonant. See Unicode L2/05-244 (N2985).
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
-- If no characters need fixing, just return text.
if mw.ustring.match(text, "[" .. table.concat(fixedDecompositions[1]) .. "]") then
for i, charToFix in ipairs(fixedDecompositions[1]) do
text = mw.ustring.gsub(text, charToFix, fixedDecompositions[2][i])
end
end
local combClassesToFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
if mw.ustring.match(text, combClassesToFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, combClassesToFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
kcgauchn7pqs3zfil8ivlsbosmk9ihr
43352
43351
2023-01-06T01:36:08Z
Theknightwho
1347
43352
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode decompositions or combining classes.
local function fixNormalization(text)
-- New decompositions. These *must* be desirable in all normalizations (e.g. the composed character is deprecated or discouraged from use).
local fixedDecompositions = {
{"ឣ", "ឤ", "ཷ", "ཹ"}, -- List of characters.
{"អ", "អា", "ྲཱྀ", "ླཱྀ"} -- List of new decompositions, in the same order.
}
-- New combining classes.
local fixedCombClasses = {
-- Fixes:
-- (1) Fix for Tibetan, where the tsa-phru is wrongly placed after any vowel signs following normalization (due to its canonical combining class), despite being part of the previous consonant. See Unicode L2/05-244 (N2985).
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
-- If no characters need fixing, just return text.
if mw.ustring.match(text, "[" .. table.concat(fixedDecompositions[1]) .. "]") then
for i, charToFix in ipairs(fixedDecompositions[1]) do
text = mw.ustring.gsub(text, charToFix, fixedDecompositions[2][i])
end
end
local combClassesToFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
if mw.ustring.match(text, combClassesToFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, combClassesToFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
pgxx88dj8vlw82knly3ju0tg1cr6p2m
43353
43352
2023-01-19T04:26:55Z
Theknightwho
1347
43353
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode compositions or combining classes.
local function fixNormalization(text)
-- New compositions. These *must* be desirable in all normalizations (e.g. the composed character is deprecated or discouraged from use).
local fixedCompositions = {
{ -- List of characters.
"्?ा", -- Devanagari
"অা", "ঋৃ", "ঌৢ", -- Bengali
"ਅਾ", "ਅੈ", "ਅੌ", "ੲਿ", "ੲੀ", "ੲੇ", "ੳੁ", "ੳੂ", "ੳੋ", -- Gurmukhi
"ઓ", "અાૈ", "અા", "અૅ", "અે", "અૈ", "અૉ", "અો", "અૌ", "આૅ", "આૈ", "ૅા", -- Gujarati
"ଅା", "ଏୗ", "ଓୗ", -- Oriya
"அூ", -- Tamil
"ఒౌ", "ఒౕ", "ిౕ", "ెౕ", "ొౕ", -- Telugu
"ಉಾ", "ಋಾ", "ಒೌ", -- Kannada
"ഇൗ", "ഉൗ", "എെ", "ഒാ", "ഒൗ", -- Malayalam
"අා", "අැ", "අෑ", "උෟ", "ඍෘ", "ඏෟ", "එ්", "එෙ", "ඔෟ", "ෘෘ", -- Sinhala
"ཷ", "ཹ", -- Tibetan
"ឣ", "ឤ", -- Khmer
"𑀅𑀸", "𑀋𑀾", "𑀏𑁂", -- Brahmi
"𑈀𑈬𑈱", "𑈀𑈬", "𑈀𑈱", "𑈀𑈳", "𑈁𑈱", "𑈆𑈬", "𑈬𑈰", "𑈬𑈱", "𑉀𑈮", -- Khojki
"𑊰𑋠", "𑊰𑋥", "𑊰𑋦", "𑊰𑋧", "𑊰𑋨", -- Khudawadi
"𑒁𑒰", "𑒋𑒺", "𑒍𑒺", "𑒪𑒵", "𑒪𑒶", -- Tirhuta
"𑘀𑘹", "𑘀𑘺", "𑘁𑘹", "𑘁𑘺", -- Modi
"𑚀𑚭", "𑚀𑚴", "𑚀𑚵", "𑚆𑚲", -- Takri
"𓈗", "𓃁", "𓆖", -- Egyptian
},
{ -- List of new compositions, in the same order.
"", -- Devanagari
"আ", "ৠ", "ৡ", -- Bengali
"ਆ", "ਐ", "ਔ", "ਇ", "ਈ", "ਏ", "ਉ", "ਊ", "ਓ", -- Gurmukhi
"અાૅ", "ઔ", "આ", "ઍ", "એ", "ઐ", "ઑ", "ઓ", "ઔ", "ઓ", "ઔ", "ૉ", -- Gujarati
"ଆ", "ଐ", "ଔ", -- Oriya
"ஆ", -- Tamil
"ఔ", "ఓ", "ీ", "ే", "ో", -- Telugu
"ಊ", "ೠ", "ಔ", -- Kannada
"ഈ", "ഊ", "ഐ", "ഓ", "ഔ", -- Malayalam
"ආ", "ඇ", "ඈ", "ඌ", "ඎ", "ඐ", "ඒ", "ඓ", "ඖ", "ෲ", -- Sinhala
"ྲཱྀ", "ླཱྀ", -- Tibetan
"អ", "អា", -- Khmer
"𑀆", "𑀌", "𑀐", -- Brahmi
"𑈇", "𑈁", "𑈅", "𑈇", "𑈇", "𑈃", "𑈲", "𑈳", "𑈂", -- Khojki
"𑊱", "𑊶", "𑊷", "𑊸", "𑊹", -- Khudawadi
"𑒂", "𑒌", "𑒎", "𑒉", "𑒊", -- Tirhuta
"𑘊", "𑘋", "𑘌", "𑘍", -- Modi
"𑚁", "𑚈", "𑚉", "𑚇", -- Takri
"𓈖𓈖𓈖", "𓃀𓂝", "𓆓𓏏𓇿", -- Egyptian
}
}
-- New combining classes.
local fixedCombClasses = {
-- Fixes:
-- (1) Fix for Tibetan, where the tsa-phru is wrongly placed after any vowel signs following normalization (due to its canonical combining class), despite being part of the previous consonant. See Unicode L2/05-244 (N2985).
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
-- If no characters need fixing, just return text.
if mw.ustring.match(text, "[" .. table.concat(fixedCompositions[1]) .. "]") then
for i, charToFix in ipairs(fixedCompositions[1]) do
text = mw.ustring.gsub(text, charToFix, fixedCompositions[2][i])
end
end
local combClassesToFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
if mw.ustring.match(text, combClassesToFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, combClassesToFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
bbytqxghjiecta4f0sw4x6odxzjwgjp
43354
43353
2023-01-19T04:36:51Z
Theknightwho
1347
43354
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode compositions or combining classes.
local function fixNormalization(text)
-- New compositions. These *must* be desirable in all normalizations (e.g. the sequence to be changed is deprecated or discouraged from use).
local fixedCompositions = {
{ -- List of characters.
"्?ा", -- Devanagari
"অা", "ঋৃ", "ঌৢ", -- Bengali
"ਅਾ", "ਅੈ", "ਅੌ", "ੲਿ", "ੲੀ", "ੲੇ", "ੳੁ", "ੳੂ", "ੳੋ", -- Gurmukhi
"ઓ", "અાૈ", "અા", "અૅ", "અે", "અૈ", "અૉ", "અો", "અૌ", "આૅ", "આૈ", "ૅા", -- Gujarati
"ଅା", "ଏୗ", "ଓୗ", -- Oriya
"அூ", -- Tamil
"ఒౌ", "ఒౕ", "ిౕ", "ెౕ", "ొౕ", -- Telugu
"ಉಾ", "ಋಾ", "ಒೌ", -- Kannada
"ഇൗ", "ഉൗ", "എെ", "ഒാ", "ഒൗ", -- Malayalam
"අා", "අැ", "අෑ", "උෟ", "ඍෘ", "ඏෟ", "එ්", "එෙ", "ඔෟ", "ෘෘ", -- Sinhala
"ཷ", "ཹ", -- Tibetan
"ឣ", "ឤ", -- Khmer
"𑀅𑀸", "𑀋𑀾", "𑀏𑁂", -- Brahmi
"𑈀𑈬𑈱", "𑈀𑈬", "𑈀𑈱", "𑈀𑈳", "𑈁𑈱", "𑈆𑈬", "𑈬𑈰", "𑈬𑈱", "𑉀𑈮", -- Khojki
"𑊰𑋠", "𑊰𑋥", "𑊰𑋦", "𑊰𑋧", "𑊰𑋨", -- Khudawadi
"𑒁𑒰", "𑒋𑒺", "𑒍𑒺", "𑒪𑒵", "𑒪𑒶", -- Tirhuta
"𑘀𑘹", "𑘀𑘺", "𑘁𑘹", "𑘁𑘺", -- Modi
"𑚀𑚭", "𑚀𑚴", "𑚀𑚵", "𑚆𑚲", -- Takri
"𓈗", "𓃁", "𓆖", -- Egyptian
},
{ -- List of new compositions, in the same order.
"", -- Devanagari
"আ", "ৠ", "ৡ", -- Bengali
"ਆ", "ਐ", "ਔ", "ਇ", "ਈ", "ਏ", "ਉ", "ਊ", "ਓ", -- Gurmukhi
"અાૅ", "ઔ", "આ", "ઍ", "એ", "ઐ", "ઑ", "ઓ", "ઔ", "ઓ", "ઔ", "ૉ", -- Gujarati
"ଆ", "ଐ", "ଔ", -- Oriya
"ஆ", -- Tamil
"ఔ", "ఓ", "ీ", "ే", "ో", -- Telugu
"ಊ", "ೠ", "ಔ", -- Kannada
"ഈ", "ഊ", "ഐ", "ഓ", "ഔ", -- Malayalam
"ආ", "ඇ", "ඈ", "ඌ", "ඎ", "ඐ", "ඒ", "ඓ", "ඖ", "ෲ", -- Sinhala
"ྲཱྀ", "ླཱྀ", -- Tibetan
"អ", "អា", -- Khmer
"𑀆", "𑀌", "𑀐", -- Brahmi
"𑈇", "𑈁", "𑈅", "𑈇", "𑈇", "𑈃", "𑈲", "𑈳", "𑈂", -- Khojki
"𑊱", "𑊶", "𑊷", "𑊸", "𑊹", -- Khudawadi
"𑒂", "𑒌", "𑒎", "𑒉", "𑒊", -- Tirhuta
"𑘊", "𑘋", "𑘌", "𑘍", -- Modi
"𑚁", "𑚈", "𑚉", "𑚇", -- Takri
"𓈖𓈖𓈖", "𓃀𓂝", "𓆓𓏏𓇿", -- Egyptian
}
}
-- New combining classes.
local fixedCombClasses = {
-- Fixes:
-- (1) Fix for Tibetan, where the tsa-phru is wrongly placed after any vowel signs following normalization (due to its canonical combining class), despite being part of the previous consonant. See Unicode L2/05-244 (N2985).
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
-- If no characters need fixing, just return text.
if mw.ustring.match(text, "[" .. table.concat(fixedCompositions[1]) .. "]") then
for i, charToFix in ipairs(fixedCompositions[1]) do
text = mw.ustring.gsub(text, charToFix, fixedCompositions[2][i])
end
end
local combClassesToFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
if mw.ustring.match(text, combClassesToFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, combClassesToFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
285prcqfr9eo242oxtv9qkoqh8lx448
43355
43354
2023-01-19T06:05:10Z
Theknightwho
1347
Move the correction of discouraged character sequences out into its own function, so it can be called externally.
43355
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Corrects discouraged sequences of Unicode characters to the encouraged equivalents. The corrected sequences *must* be desirable in all normalizations (e.g. the sequence to be changed is deprecated or discouraged from use).
function str.fixDiscouragedSequences(text)
local fixedCompositions = {
{ -- List of characters.
"्?ा", -- Devanagari
"অা", "ঋৃ", "ঌৢ", -- Bengali
"ਅਾ", "ਅੈ", "ਅੌ", "ੲਿ", "ੲੀ", "ੲੇ", "ੳੁ", "ੳੂ", "ੳੋ", -- Gurmukhi
"ઓ", "અાૈ", "અા", "અૅ", "અે", "અૈ", "અૉ", "અો", "અૌ", "આૅ", "આૈ", "ૅા", -- Gujarati
"ଅା", "ଏୗ", "ଓୗ", -- Oriya
"அூ", -- Tamil
"ఒౌ", "ఒౕ", "ిౕ", "ెౕ", "ొౕ", -- Telugu
"ಉಾ", "ಋಾ", "ಒೌ", -- Kannada
"ഇൗ", "ഉൗ", "എെ", "ഒാ", "ഒൗ", -- Malayalam
"අා", "අැ", "අෑ", "උෟ", "ඍෘ", "ඏෟ", "එ්", "එෙ", "ඔෟ", "ෘෘ", -- Sinhala
"ཷ", "ཹ", -- Tibetan
"ឣ", "ឤ", -- Khmer
"𑀅𑀸", "𑀋𑀾", "𑀏𑁂", -- Brahmi
"𑈀𑈬𑈱", "𑈀𑈬", "𑈀𑈱", "𑈀𑈳", "𑈁𑈱", "𑈆𑈬", "𑈬𑈰", "𑈬𑈱", "𑉀𑈮", -- Khojki
"𑊰𑋠", "𑊰𑋥", "𑊰𑋦", "𑊰𑋧", "𑊰𑋨", -- Khudawadi
"𑒁𑒰", "𑒋𑒺", "𑒍𑒺", "𑒪𑒵", "𑒪𑒶", -- Tirhuta
"𑘀𑘹", "𑘀𑘺", "𑘁𑘹", "𑘁𑘺", -- Modi
"𑚀𑚭", "𑚀𑚴", "𑚀𑚵", "𑚆𑚲", -- Takri
"𓈗", "𓃁", "𓆖", -- Egyptian
},
{ -- List of new compositions, in the same order.
"", -- Devanagari
"আ", "ৠ", "ৡ", -- Bengali
"ਆ", "ਐ", "ਔ", "ਇ", "ਈ", "ਏ", "ਉ", "ਊ", "ਓ", -- Gurmukhi
"અાૅ", "ઔ", "આ", "ઍ", "એ", "ઐ", "ઑ", "ઓ", "ઔ", "ઓ", "ઔ", "ૉ", -- Gujarati
"ଆ", "ଐ", "ଔ", -- Oriya
"ஆ", -- Tamil
"ఔ", "ఓ", "ీ", "ే", "ో", -- Telugu
"ಊ", "ೠ", "ಔ", -- Kannada
"ഈ", "ഊ", "ഐ", "ഓ", "ഔ", -- Malayalam
"ආ", "ඇ", "ඈ", "ඌ", "ඎ", "ඐ", "ඒ", "ඓ", "ඖ", "ෲ", -- Sinhala
"ྲཱྀ", "ླཱྀ", -- Tibetan
"អ", "អា", -- Khmer
"𑀆", "𑀌", "𑀐", -- Brahmi
"𑈇", "𑈁", "𑈅", "𑈇", "𑈇", "𑈃", "𑈲", "𑈳", "𑈂", -- Khojki
"𑊱", "𑊶", "𑊷", "𑊸", "𑊹", -- Khudawadi
"𑒂", "𑒌", "𑒎", "𑒉", "𑒊", -- Tirhuta
"𑘊", "𑘋", "𑘌", "𑘍", -- Modi
"𑚁", "𑚈", "𑚉", "𑚇", -- Takri
"𓈖𓈖𓈖", "𓃀𓂝", "𓆓𓏏𓇿", -- Egyptian
}
}
-- If no characters need fixing, just return text.
if mw.ustring.match(text, "[" .. table.concat(fixedCompositions[1]) .. "]") then
for i, charToFix in ipairs(fixedCompositions[1]) do
text = mw.ustring.gsub(text, charToFix, fixedCompositions[2][i])
end
end
return text
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode compositions or combining classes.
local function fixNormalization(text)
-- Fix discouraged character sequences.
text = str.fixDiscouragedSequences(text)
-- New combining classes.
local fixedCombClasses = {
-- Fixes:
-- (1) Fix for Tibetan, where the tsa-phru is wrongly placed after any vowel signs following normalization (due to its canonical combining class), despite being part of the previous consonant. See Unicode L2/05-244 (N2985).
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
local combClassesToFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
if mw.ustring.match(text, combClassesToFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, combClassesToFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
1oekjy39twpcu8nkyxyb2xsv94kwk6i
43356
43355
2023-01-19T06:23:33Z
Theknightwho
1347
Changed protection settings for "[[Module:string]]": Highly visible template/module ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite))
43355
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Corrects discouraged sequences of Unicode characters to the encouraged equivalents. The corrected sequences *must* be desirable in all normalizations (e.g. the sequence to be changed is deprecated or discouraged from use).
function str.fixDiscouragedSequences(text)
local fixedCompositions = {
{ -- List of characters.
"्?ा", -- Devanagari
"অা", "ঋৃ", "ঌৢ", -- Bengali
"ਅਾ", "ਅੈ", "ਅੌ", "ੲਿ", "ੲੀ", "ੲੇ", "ੳੁ", "ੳੂ", "ੳੋ", -- Gurmukhi
"ઓ", "અાૈ", "અા", "અૅ", "અે", "અૈ", "અૉ", "અો", "અૌ", "આૅ", "આૈ", "ૅા", -- Gujarati
"ଅା", "ଏୗ", "ଓୗ", -- Oriya
"அூ", -- Tamil
"ఒౌ", "ఒౕ", "ిౕ", "ెౕ", "ొౕ", -- Telugu
"ಉಾ", "ಋಾ", "ಒೌ", -- Kannada
"ഇൗ", "ഉൗ", "എെ", "ഒാ", "ഒൗ", -- Malayalam
"අා", "අැ", "අෑ", "උෟ", "ඍෘ", "ඏෟ", "එ්", "එෙ", "ඔෟ", "ෘෘ", -- Sinhala
"ཷ", "ཹ", -- Tibetan
"ឣ", "ឤ", -- Khmer
"𑀅𑀸", "𑀋𑀾", "𑀏𑁂", -- Brahmi
"𑈀𑈬𑈱", "𑈀𑈬", "𑈀𑈱", "𑈀𑈳", "𑈁𑈱", "𑈆𑈬", "𑈬𑈰", "𑈬𑈱", "𑉀𑈮", -- Khojki
"𑊰𑋠", "𑊰𑋥", "𑊰𑋦", "𑊰𑋧", "𑊰𑋨", -- Khudawadi
"𑒁𑒰", "𑒋𑒺", "𑒍𑒺", "𑒪𑒵", "𑒪𑒶", -- Tirhuta
"𑘀𑘹", "𑘀𑘺", "𑘁𑘹", "𑘁𑘺", -- Modi
"𑚀𑚭", "𑚀𑚴", "𑚀𑚵", "𑚆𑚲", -- Takri
"𓈗", "𓃁", "𓆖", -- Egyptian
},
{ -- List of new compositions, in the same order.
"", -- Devanagari
"আ", "ৠ", "ৡ", -- Bengali
"ਆ", "ਐ", "ਔ", "ਇ", "ਈ", "ਏ", "ਉ", "ਊ", "ਓ", -- Gurmukhi
"અાૅ", "ઔ", "આ", "ઍ", "એ", "ઐ", "ઑ", "ઓ", "ઔ", "ઓ", "ઔ", "ૉ", -- Gujarati
"ଆ", "ଐ", "ଔ", -- Oriya
"ஆ", -- Tamil
"ఔ", "ఓ", "ీ", "ే", "ో", -- Telugu
"ಊ", "ೠ", "ಔ", -- Kannada
"ഈ", "ഊ", "ഐ", "ഓ", "ഔ", -- Malayalam
"ආ", "ඇ", "ඈ", "ඌ", "ඎ", "ඐ", "ඒ", "ඓ", "ඖ", "ෲ", -- Sinhala
"ྲཱྀ", "ླཱྀ", -- Tibetan
"អ", "អា", -- Khmer
"𑀆", "𑀌", "𑀐", -- Brahmi
"𑈇", "𑈁", "𑈅", "𑈇", "𑈇", "𑈃", "𑈲", "𑈳", "𑈂", -- Khojki
"𑊱", "𑊶", "𑊷", "𑊸", "𑊹", -- Khudawadi
"𑒂", "𑒌", "𑒎", "𑒉", "𑒊", -- Tirhuta
"𑘊", "𑘋", "𑘌", "𑘍", -- Modi
"𑚁", "𑚈", "𑚉", "𑚇", -- Takri
"𓈖𓈖𓈖", "𓃀𓂝", "𓆓𓏏𓇿", -- Egyptian
}
}
-- If no characters need fixing, just return text.
if mw.ustring.match(text, "[" .. table.concat(fixedCompositions[1]) .. "]") then
for i, charToFix in ipairs(fixedCompositions[1]) do
text = mw.ustring.gsub(text, charToFix, fixedCompositions[2][i])
end
end
return text
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode compositions or combining classes.
local function fixNormalization(text)
-- Fix discouraged character sequences.
text = str.fixDiscouragedSequences(text)
-- New combining classes.
local fixedCombClasses = {
-- Fixes:
-- (1) Fix for Tibetan, where the tsa-phru is wrongly placed after any vowel signs following normalization (due to its canonical combining class), despite being part of the previous consonant. See Unicode L2/05-244 (N2985).
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
local combClassesToFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
if mw.ustring.match(text, combClassesToFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, combClassesToFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
1oekjy39twpcu8nkyxyb2xsv94kwk6i
43357
43356
2023-01-19T07:23:58Z
Theknightwho
1347
43357
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Corrects discouraged sequences of Unicode characters to the encouraged equivalents. The corrected sequences *must* be desirable in all normalizations (e.g. the sequence to be changed is deprecated or discouraged from use).
function str.fixDiscouragedSequences(text)
local fixedCompositions = {
{ -- List of characters.
"्?ा", -- Devanagari
"অা", "ঋৃ", "ঌৢ", -- Bengali
"ਅਾ", "ਅੈ", "ਅੌ", "ੲਿ", "ੲੀ", "ੲੇ", "ੳੁ", "ੳੂ", "ੳੋ", -- Gurmukhi
"ઓ", "અાૈ", "અા", "અૅ", "અે", "અૈ", "અૉ", "અો", "અૌ", "આૅ", "આૈ", "ૅા", -- Gujarati
"ଅା", "ଏୗ", "ଓୗ", -- Oriya
"அூ", -- Tamil
"ఒౌ", "ఒౕ", "ిౕ", "ెౕ", "ొౕ", -- Telugu
"ಉಾ", "ಋಾ", "ಒೌ", -- Kannada
"ഇൗ", "ഉൗ", "എെ", "ഒാ", "ഒൗ", "ണ്", "ന്", "ര്", "ല്", "ള്", -- Malayalam
"අා", "අැ", "අෑ", "උෟ", "ඍෘ", "ඏෟ", "එ්", "එෙ", "ඔෟ", "ෘෘ", -- Sinhala
"ཷ", "ཹ", -- Tibetan
"ឣ", "ឤ", -- Khmer
"𑀅𑀸", "𑀋𑀾", "𑀏𑁂", -- Brahmi
"𑈀𑈬𑈱", "𑈀𑈬", "𑈀𑈱", "𑈀𑈳", "𑈁𑈱", "𑈆𑈬", "𑈬𑈰", "𑈬𑈱", "𑉀𑈮", -- Khojki
"𑊰𑋠", "𑊰𑋥", "𑊰𑋦", "𑊰𑋧", "𑊰𑋨", -- Khudawadi
"𑒁𑒰", "𑒋𑒺", "𑒍𑒺", "𑒪𑒵", "𑒪𑒶", -- Tirhuta
"𑘀𑘹", "𑘀𑘺", "𑘁𑘹", "𑘁𑘺", -- Modi
"𑚀𑚭", "𑚀𑚴", "𑚀𑚵", "𑚆𑚲", -- Takri
"𓈗", "𓃁", "𓆖", -- Egyptian
},
{ -- List of new compositions, in the same order.
"", -- Devanagari
"আ", "ৠ", "ৡ", -- Bengali
"ਆ", "ਐ", "ਔ", "ਇ", "ਈ", "ਏ", "ਉ", "ਊ", "ਓ", -- Gurmukhi
"અાૅ", "ઔ", "આ", "ઍ", "એ", "ઐ", "ઑ", "ઓ", "ઔ", "ઓ", "ઔ", "ૉ", -- Gujarati
"ଆ", "ଐ", "ଔ", -- Oriya
"ஆ", -- Tamil
"ఔ", "ఓ", "ీ", "ే", "ో", -- Telugu
"ಊ", "ೠ", "ಔ", -- Kannada
"ഈ", "ഊ", "ഐ", "ഓ", "ഔ", "ൺ", "ൻ", "ർ", "ൽ", "ൾ", -- Malayalam
"ආ", "ඇ", "ඈ", "ඌ", "ඎ", "ඐ", "ඒ", "ඓ", "ඖ", "ෲ", -- Sinhala
"ྲཱྀ", "ླཱྀ", -- Tibetan
"អ", "អា", -- Khmer
"𑀆", "𑀌", "𑀐", -- Brahmi
"𑈇", "𑈁", "𑈅", "𑈇", "𑈇", "𑈃", "𑈲", "𑈳", "𑈂", -- Khojki
"𑊱", "𑊶", "𑊷", "𑊸", "𑊹", -- Khudawadi
"𑒂", "𑒌", "𑒎", "𑒉", "𑒊", -- Tirhuta
"𑘊", "𑘋", "𑘌", "𑘍", -- Modi
"𑚁", "𑚈", "𑚉", "𑚇", -- Takri
"𓈖𓈖𓈖", "𓃀𓂝", "𓆓𓏏𓇿", -- Egyptian
}
}
-- If no characters need fixing, just return text.
if mw.ustring.match(text, "[" .. table.concat(fixedCompositions[1]) .. "]") then
for i, charToFix in ipairs(fixedCompositions[1]) do
text = mw.ustring.gsub(text, charToFix, fixedCompositions[2][i])
end
end
return text
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode compositions or combining classes.
local function fixNormalization(text)
-- Fix discouraged character sequences.
text = str.fixDiscouragedSequences(text)
-- New combining classes.
local fixedCombClasses = {
-- Fixes:
-- (1) Fix for Tibetan, where the tsa-phru is wrongly placed after any vowel signs following normalization (due to its canonical combining class), despite being part of the previous consonant. See Unicode L2/05-244 (N2985).
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
local combClassesToFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
if mw.ustring.match(text, combClassesToFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, combClassesToFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
8w104f4hcqal4owtaxpxp2lura5o9op
43358
43357
2023-01-19T07:30:50Z
Theknightwho
1347
43358
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Corrects discouraged sequences of Unicode characters to the encouraged equivalents. The corrected sequences *must* be desirable in all normalizations (e.g. the sequence to be changed is deprecated or discouraged from use).
function str.fixDiscouragedSequences(text)
local fixedCompositions = {
{ -- List of characters.
"्?ा", -- Devanagari
"অা", "ঋৃ", "ঌৢ", -- Bengali
"ਅਾ", "ਅੈ", "ਅੌ", "ੲਿ", "ੲੀ", "ੲੇ", "ੳੁ", "ੳੂ", "ੳੋ", -- Gurmukhi
"ઓ", "અાૈ", "અા", "અૅ", "અે", "અૈ", "અૉ", "અો", "અૌ", "આૅ", "આૈ", "ૅા", -- Gujarati
"ଅା", "ଏୗ", "ଓୗ", -- Oriya
"அூ", "ஸ்ரீ", -- Tamil
"ఒౌ", "ఒౕ", "ిౕ", "ెౕ", "ొౕ", -- Telugu
"ಉಾ", "ಋಾ", "ಒೌ", -- Kannada
"ഇൗ", "ഉൗ", "എെ", "ഒാ", "ഒൗ", "ണ്", "ന്", "ര്", "ല്", "ള്", -- Malayalam
"අා", "අැ", "අෑ", "උෟ", "ඍෘ", "ඏෟ", "එ්", "එෙ", "ඔෟ", "ෘෘ", -- Sinhala
"ཷ", "ཹ", -- Tibetan
"ឣ", "ឤ", -- Khmer
"𑀅𑀸", "𑀋𑀾", "𑀏𑁂", -- Brahmi
"𑈀𑈬𑈱", "𑈀𑈬", "𑈀𑈱", "𑈀𑈳", "𑈁𑈱", "𑈆𑈬", "𑈬𑈰", "𑈬𑈱", "𑉀𑈮", -- Khojki
"𑊰𑋠", "𑊰𑋥", "𑊰𑋦", "𑊰𑋧", "𑊰𑋨", -- Khudawadi
"𑒁𑒰", "𑒋𑒺", "𑒍𑒺", "𑒪𑒵", "𑒪𑒶", -- Tirhuta
"𑘀𑘹", "𑘀𑘺", "𑘁𑘹", "𑘁𑘺", -- Modi
"𑚀𑚭", "𑚀𑚴", "𑚀𑚵", "𑚆𑚲", -- Takri
"𓈗", "𓃁", "𓆖", -- Egyptian
},
{ -- List of new compositions, in the same order.
"", -- Devanagari
"আ", "ৠ", "ৡ", -- Bengali
"ਆ", "ਐ", "ਔ", "ਇ", "ਈ", "ਏ", "ਉ", "ਊ", "ਓ", -- Gurmukhi
"અાૅ", "ઔ", "આ", "ઍ", "એ", "ઐ", "ઑ", "ઓ", "ઔ", "ઓ", "ઔ", "ૉ", -- Gujarati
"ଆ", "ଐ", "ଔ", -- Oriya
"ஆ", "ஶ்ரீ", -- Tamil
"ఔ", "ఓ", "ీ", "ే", "ో", -- Telugu
"ಊ", "ೠ", "ಔ", -- Kannada
"ഈ", "ഊ", "ഐ", "ഓ", "ഔ", "ൺ", "ൻ", "ർ", "ൽ", "ൾ", -- Malayalam
"ආ", "ඇ", "ඈ", "ඌ", "ඎ", "ඐ", "ඒ", "ඓ", "ඖ", "ෲ", -- Sinhala
"ྲཱྀ", "ླཱྀ", -- Tibetan
"អ", "អា", -- Khmer
"𑀆", "𑀌", "𑀐", -- Brahmi
"𑈇", "𑈁", "𑈅", "𑈇", "𑈇", "𑈃", "𑈲", "𑈳", "𑈂", -- Khojki
"𑊱", "𑊶", "𑊷", "𑊸", "𑊹", -- Khudawadi
"𑒂", "𑒌", "𑒎", "𑒉", "𑒊", -- Tirhuta
"𑘊", "𑘋", "𑘌", "𑘍", -- Modi
"𑚁", "𑚈", "𑚉", "𑚇", -- Takri
"𓈖𓈖𓈖", "𓃀𓂝", "𓆓𓏏𓇿", -- Egyptian
}
}
-- If no characters need fixing, just return text.
if mw.ustring.match(text, "[" .. table.concat(fixedCompositions[1]) .. "]") then
for i, charToFix in ipairs(fixedCompositions[1]) do
text = mw.ustring.gsub(text, charToFix, fixedCompositions[2][i])
end
end
return text
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode compositions or combining classes.
local function fixNormalization(text)
-- Fix discouraged character sequences.
text = str.fixDiscouragedSequences(text)
-- New combining classes.
local fixedCombClasses = {
-- Fixes:
-- (1) Fix for Tibetan, where the tsa-phru is wrongly placed after any vowel signs following normalization (due to its canonical combining class), despite being part of the previous consonant. See Unicode L2/05-244 (N2985).
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
local combClassesToFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
if mw.ustring.match(text, combClassesToFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, combClassesToFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
4439g6ocd95u6rc68865n9x1uzmp1fm
43359
43358
2023-01-19T08:09:28Z
Theknightwho
1347
43359
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Corrects discouraged sequences of Unicode characters to the encouraged equivalents. The corrected sequences *must* be desirable in all normalizations (e.g. the sequence to be changed is deprecated or discouraged from use).
function str.fixDiscouragedSequences(text)
local fixedCompositions = {
{ -- List of characters.
"्?ा", -- Devanagari
"অা", "ঋৃ", "ঌৢ", -- Bengali
"ਅਾ", "ਅੈ", "ਅੌ", "ੲਿ", "ੲੀ", "ੲੇ", "ੳੁ", "ੳੂ", "ੳੋ", -- Gurmukhi
"ઓ", "અાૈ", "અા", "અૅ", "અે", "અૈ", "અૉ", "અો", "અૌ", "આૅ", "આૈ", "ૅા", -- Gujarati
"ଅା", "ଏୗ", "ଓୗ", -- Oriya
"அூ", "ஸ்ரீ", -- Tamil
"ఒౌ", "ఒౕ", "ిౕ", "ెౕ", "ొౕ", -- Telugu
"ಉಾ", "ಋಾ", "ಒೌ", -- Kannada
"ഇൗ", "ഉൗ", "എെ", "ഒാ", "ഒൗ", "ണ്", "ന്റ", "ന്", "ര്", "ല്", "ള്", -- Malayalam
"අා", "අැ", "අෑ", "උෟ", "ඍෘ", "ඏෟ", "එ්", "එෙ", "ඔෟ", "ෘෘ", -- Sinhala
"ཷ", "ཹ", -- Tibetan
"ឣ", "ឤ", -- Khmer
"𑀅𑀸", "𑀋𑀾", "𑀏𑁂", -- Brahmi
"𑈀𑈬𑈱", "𑈀𑈬", "𑈀𑈱", "𑈀𑈳", "𑈁𑈱", "𑈆𑈬", "𑈬𑈰", "𑈬𑈱", "𑉀𑈮", -- Khojki
"𑊰𑋠", "𑊰𑋥", "𑊰𑋦", "𑊰𑋧", "𑊰𑋨", -- Khudawadi
"𑒁𑒰", "𑒋𑒺", "𑒍𑒺", "𑒪𑒵", "𑒪𑒶", -- Tirhuta
"𑘀𑘹", "𑘀𑘺", "𑘁𑘹", "𑘁𑘺", -- Modi
"𑚀𑚭", "𑚀𑚴", "𑚀𑚵", "𑚆𑚲", -- Takri
"𓈗", "𓃁", "𓆖", -- Egyptian
},
{ -- List of new compositions, in the same order.
"", -- Devanagari
"আ", "ৠ", "ৡ", -- Bengali
"ਆ", "ਐ", "ਔ", "ਇ", "ਈ", "ਏ", "ਉ", "ਊ", "ਓ", -- Gurmukhi
"અાૅ", "ઔ", "આ", "ઍ", "એ", "ઐ", "ઑ", "ઓ", "ઔ", "ઓ", "ઔ", "ૉ", -- Gujarati
"ଆ", "ଐ", "ଔ", -- Oriya
"ஆ", "ஶ்ரீ", -- Tamil
"ఔ", "ఓ", "ీ", "ే", "ో", -- Telugu
"ಊ", "ೠ", "ಔ", -- Kannada
"ഈ", "ഊ", "ഐ", "ഓ", "ഔ", "ൺ", "ൻ്റ", "ൻ", "ർ", "ൽ", "ൾ", -- Malayalam
"ආ", "ඇ", "ඈ", "ඌ", "ඎ", "ඐ", "ඒ", "ඓ", "ඖ", "ෲ", -- Sinhala
"ྲཱྀ", "ླཱྀ", -- Tibetan
"អ", "អា", -- Khmer
"𑀆", "𑀌", "𑀐", -- Brahmi
"𑈇", "𑈁", "𑈅", "𑈇", "𑈇", "𑈃", "𑈲", "𑈳", "𑈂", -- Khojki
"𑊱", "𑊶", "𑊷", "𑊸", "𑊹", -- Khudawadi
"𑒂", "𑒌", "𑒎", "𑒉", "𑒊", -- Tirhuta
"𑘊", "𑘋", "𑘌", "𑘍", -- Modi
"𑚁", "𑚈", "𑚉", "𑚇", -- Takri
"𓈖𓈖𓈖", "𓃀𓂝", "𓆓𓏏𓇿", -- Egyptian
}
}
-- If no characters need fixing, just return text.
if mw.ustring.match(text, "[" .. table.concat(fixedCompositions[1]) .. "]") then
for i, charToFix in ipairs(fixedCompositions[1]) do
text = mw.ustring.gsub(text, charToFix, fixedCompositions[2][i])
end
end
return text
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode compositions or combining classes.
local function fixNormalization(text)
-- Fix discouraged character sequences.
text = str.fixDiscouragedSequences(text)
-- New combining classes.
local fixedCombClasses = {
-- Fixes:
-- (1) Fix for Tibetan, where the tsa-phru is wrongly placed after any vowel signs following normalization (due to its canonical combining class), despite being part of the previous consonant. See Unicode L2/05-244 (N2985).
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
local combClassesToFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
if mw.ustring.match(text, combClassesToFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, combClassesToFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
tbpkyyurno53wbxofm5jtwx2c84xqm4
43360
43359
2023-01-19T08:23:47Z
Theknightwho
1347
43360
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Corrects discouraged sequences of Unicode characters to the encouraged equivalents. The corrected sequences *must* be desirable in all normalizations (e.g. the sequence to be changed is deprecated or discouraged from use).
function str.fixDiscouragedSequences(text)
local fixedCompositions = {
{ -- List of characters.
"्?ा", -- Devanagari
"অা", "ঋৃ", "ঌৢ", -- Bengali
"ਅਾ", "ਅੈ", "ਅੌ", "ੲਿ", "ੲੀ", "ੲੇ", "ੳੁ", "ੳੂ", "ੳੋ", -- Gurmukhi
"ઓ", "અાૈ", "અા", "અૅ", "અે", "અૈ", "અૉ", "અો", "અૌ", "આૅ", "આૈ", "ૅા", -- Gujarati
"ଅା", "ଏୗ", "ଓୗ", -- Oriya
"அூ", "ஸ்ரீ", -- Tamil
"ఒౌ", "ఒౕ", "ిౕ", "ెౕ", "ొౕ", -- Telugu
"ಉಾ", "ಋಾ", "ಒೌ", -- Kannada
"ഇൗ", "ഉൗ", "എെ", "ഒാ", "ഒൗ", "ണ്", "ന്റ", "ന്റ", "ന്", "ര്", "ല്", "ള്", -- Malayalam
"අා", "අැ", "අෑ", "උෟ", "ඍෘ", "ඏෟ", "එ්", "එෙ", "ඔෟ", "ෘෘ", -- Sinhala
"ཷ", "ཹ", -- Tibetan
"ឣ", "ឤ", -- Khmer
"𑀅𑀸", "𑀋𑀾", "𑀏𑁂", -- Brahmi
"𑈀𑈬𑈱", "𑈀𑈬", "𑈀𑈱", "𑈀𑈳", "𑈁𑈱", "𑈆𑈬", "𑈬𑈰", "𑈬𑈱", "𑉀𑈮", -- Khojki
"𑊰𑋠", "𑊰𑋥", "𑊰𑋦", "𑊰𑋧", "𑊰𑋨", -- Khudawadi
"𑒁𑒰", "𑒋𑒺", "𑒍𑒺", "𑒪𑒵", "𑒪𑒶", -- Tirhuta
"𑘀𑘹", "𑘀𑘺", "𑘁𑘹", "𑘁𑘺", -- Modi
"𑚀𑚭", "𑚀𑚴", "𑚀𑚵", "𑚆𑚲", -- Takri
"𓈗", "𓃁", "𓆖", -- Egyptian
},
{ -- List of new compositions, in the same order.
"", -- Devanagari
"আ", "ৠ", "ৡ", -- Bengali
"ਆ", "ਐ", "ਔ", "ਇ", "ਈ", "ਏ", "ਉ", "ਊ", "ਓ", -- Gurmukhi
"અાૅ", "ઔ", "આ", "ઍ", "એ", "ઐ", "ઑ", "ઓ", "ઔ", "ઓ", "ઔ", "ૉ", -- Gujarati
"ଆ", "ଐ", "ଔ", -- Oriya
"ஆ", "ஶ்ரீ", -- Tamil
"ఔ", "ఓ", "ీ", "ే", "ో", -- Telugu
"ಊ", "ೠ", "ಔ", -- Kannada
"ഈ", "ഊ", "ഐ", "ഓ", "ഔ", "ൺ", "ൻ്റ", "ൻറ", "ൻ", "ർ", "ൽ", "ൾ", -- Malayalam
"ආ", "ඇ", "ඈ", "ඌ", "ඎ", "ඐ", "ඒ", "ඓ", "ඖ", "ෲ", -- Sinhala
"ྲཱྀ", "ླཱྀ", -- Tibetan
"អ", "អា", -- Khmer
"𑀆", "𑀌", "𑀐", -- Brahmi
"𑈇", "𑈁", "𑈅", "𑈇", "𑈇", "𑈃", "𑈲", "𑈳", "𑈂", -- Khojki
"𑊱", "𑊶", "𑊷", "𑊸", "𑊹", -- Khudawadi
"𑒂", "𑒌", "𑒎", "𑒉", "𑒊", -- Tirhuta
"𑘊", "𑘋", "𑘌", "𑘍", -- Modi
"𑚁", "𑚈", "𑚉", "𑚇", -- Takri
"𓈖𓈖𓈖", "𓃀𓂝", "𓆓𓏏𓇿", -- Egyptian
}
}
-- If no characters need fixing, just return text.
if mw.ustring.match(text, "[" .. table.concat(fixedCompositions[1]) .. "]") then
for i, charToFix in ipairs(fixedCompositions[1]) do
text = mw.ustring.gsub(text, charToFix, fixedCompositions[2][i])
end
end
return text
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode compositions or combining classes.
local function fixNormalization(text)
-- Fix discouraged character sequences.
text = str.fixDiscouragedSequences(text)
-- New combining classes.
local fixedCombClasses = {
-- Fixes:
-- (1) Fix for Tibetan, where the tsa-phru is wrongly placed after any vowel signs following normalization (due to its canonical combining class), despite being part of the previous consonant. See Unicode L2/05-244 (N2985).
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
local combClassesToFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
if mw.ustring.match(text, combClassesToFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, combClassesToFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
jpjjnmgypim76dvn24re0zs7de7sc5f
43361
43360
2023-01-19T09:17:26Z
Theknightwho
1347
43361
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Corrects discouraged sequences of Unicode characters to the encouraged equivalents. The corrected sequences *must* be desirable in all normalizations (e.g. the sequence to be changed is deprecated or discouraged from use).
function str.fixDiscouragedSequences(text)
local fixedCompositions = {
{ -- List of characters.
"ٳ", -- Arabic
"्?ा", -- Devanagari
"অা", "ঋৃ", "ঌৢ", -- Bengali
"ਅਾ", "ਅੈ", "ਅੌ", "ੲਿ", "ੲੀ", "ੲੇ", "ੳੁ", "ੳੂ", "ੳੋ", -- Gurmukhi
"ઓ", "અાૈ", "અા", "અૅ", "અે", "અૈ", "અૉ", "અો", "અૌ", "આૅ", "આૈ", "ૅા", -- Gujarati
"ଅା", "ଏୗ", "ଓୗ", -- Oriya
"அூ", "ஸ்ரீ", -- Tamil
"ఒౌ", "ఒౕ", "ిౕ", "ెౕ", "ొౕ", -- Telugu
"ಉಾ", "ಋಾ", "ಒೌ", -- Kannada
"ഇൗ", "ഉൗ", "എെ", "ഒാ", "ഒൗ", "ണ്", "ന്റ", "ന്റ", "ന്", "ര്", "ല്", "ള്", -- Malayalam
"අා", "අැ", "අෑ", "උෟ", "ඍෘ", "ඏෟ", "එ්", "එෙ", "ඔෟ", "ෘෘ", -- Sinhala
"ཷ", "ཹ", -- Tibetan
"ឣ", "ឤ", -- Khmer
"𑀅𑀸", "𑀋𑀾", "𑀏𑁂", -- Brahmi
"𑈀𑈬𑈱", "𑈀𑈬", "𑈀𑈱", "𑈀𑈳", "𑈁𑈱", "𑈆𑈬", "𑈬𑈰", "𑈬𑈱", "𑉀𑈮", -- Khojki
"𑊰𑋠", "𑊰𑋥", "𑊰𑋦", "𑊰𑋧", "𑊰𑋨", -- Khudawadi
"𑒁𑒰", "𑒋𑒺", "𑒍𑒺", "𑒪𑒵", "𑒪𑒶", -- Tirhuta
"𑘀𑘹", "𑘀𑘺", "𑘁𑘹", "𑘁𑘺", -- Modi
"𑚀𑚭", "𑚀𑚴", "𑚀𑚵", "𑚆𑚲", -- Takri
"𓈗", "𓃁", "𓆖", -- Egyptian
},
{ -- List of new compositions, in the same order.
"اٟ", -- Arabic
"", -- Devanagari
"আ", "ৠ", "ৡ", -- Bengali
"ਆ", "ਐ", "ਔ", "ਇ", "ਈ", "ਏ", "ਉ", "ਊ", "ਓ", -- Gurmukhi
"અાૅ", "ઔ", "આ", "ઍ", "એ", "ઐ", "ઑ", "ઓ", "ઔ", "ઓ", "ઔ", "ૉ", -- Gujarati
"ଆ", "ଐ", "ଔ", -- Oriya
"ஆ", "ஶ்ரீ", -- Tamil
"ఔ", "ఓ", "ీ", "ే", "ో", -- Telugu
"ಊ", "ೠ", "ಔ", -- Kannada
"ഈ", "ഊ", "ഐ", "ഓ", "ഔ", "ൺ", "ൻ്റ", "ൻറ", "ൻ", "ർ", "ൽ", "ൾ", -- Malayalam
"ආ", "ඇ", "ඈ", "ඌ", "ඎ", "ඐ", "ඒ", "ඓ", "ඖ", "ෲ", -- Sinhala
"ྲཱྀ", "ླཱྀ", -- Tibetan
"អ", "អា", -- Khmer
"𑀆", "𑀌", "𑀐", -- Brahmi
"𑈇", "𑈁", "𑈅", "𑈇", "𑈇", "𑈃", "𑈲", "𑈳", "𑈂", -- Khojki
"𑊱", "𑊶", "𑊷", "𑊸", "𑊹", -- Khudawadi
"𑒂", "𑒌", "𑒎", "𑒉", "𑒊", -- Tirhuta
"𑘊", "𑘋", "𑘌", "𑘍", -- Modi
"𑚁", "𑚈", "𑚉", "𑚇", -- Takri
"𓈖𓈖𓈖", "𓃀𓂝", "𓆓𓏏𓇿", -- Egyptian
}
}
-- If no characters need fixing, just return text.
if mw.ustring.match(text, "[" .. table.concat(fixedCompositions[1]) .. "]") then
for i, charToFix in ipairs(fixedCompositions[1]) do
text = mw.ustring.gsub(text, charToFix, fixedCompositions[2][i])
end
end
return text
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode compositions or combining classes.
local function fixNormalization(text)
-- Fix discouraged character sequences.
text = str.fixDiscouragedSequences(text)
-- New combining classes.
local fixedCombClasses = {
-- Fixes:
-- (1) Fix for Tibetan, where the tsa-phru is wrongly placed after any vowel signs following normalization (due to its canonical combining class), despite being part of the previous consonant. See Unicode L2/05-244 (N2985).
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
local combClassesToFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
if mw.ustring.match(text, combClassesToFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, combClassesToFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
cwz3xul8lhd0414vm79pzgg1gei8r41
43362
43361
2023-01-19T10:01:24Z
Theknightwho
1347
43362
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Corrects discouraged sequences of Unicode characters to the encouraged equivalents. The corrected sequences *must* be desirable in all normalizations (e.g. the sequence to be changed is deprecated or discouraged from use).
function str.fixDiscouragedSequences(text)
local fixedCompositions = {
{ -- List of characters.
"ٳ", -- Arabic
"्?ा", -- Devanagari
"অা", "ঋৃ", "ঌৢ", -- Bengali
"ਅਾ", "ਅੈ", "ਅੌ", "ੲਿ", "ੲੀ", "ੲੇ", "ੳੁ", "ੳੂ", "ੳੋ", -- Gurmukhi
"ઓ", "અાૈ", "અા", "અૅ", "અે", "અૈ", "અૉ", "અો", "અૌ", "આૅ", "આૈ", "ૅા", -- Gujarati
"ଅା", "ଏୗ", "ଓୗ", -- Oriya
"அூ", "ஸ்ரீ", -- Tamil
"ఒౌ", "ఒౕ", "ిౕ", "ెౕ", "ొౕ", -- Telugu
"ಉಾ", "ಋಾ", "ಒೌ", -- Kannada
"ഇൗ", "ഉൗ", "എെ", "ഒാ", "ഒൗ", "ണ്", "ൻ്റ", "ന്റ", "ന്", "ര്", "ല്", "ള്", -- Malayalam
"අා", "අැ", "අෑ", "උෟ", "ඍෘ", "ඏෟ", "එ්", "එෙ", "ඔෟ", "ෘෘ", -- Sinhala
"ཷ", "ཹ", -- Tibetan
"ឣ", "ឤ", -- Khmer
"𑀅𑀸", "𑀋𑀾", "𑀏𑁂", -- Brahmi
"𑈀𑈬𑈱", "𑈀𑈬", "𑈀𑈱", "𑈀𑈳", "𑈁𑈱", "𑈆𑈬", "𑈬𑈰", "𑈬𑈱", "𑉀𑈮", -- Khojki
"𑊰𑋠", "𑊰𑋥", "𑊰𑋦", "𑊰𑋧", "𑊰𑋨", -- Khudawadi
"𑒁𑒰", "𑒋𑒺", "𑒍𑒺", "𑒪𑒵", "𑒪𑒶", -- Tirhuta
"𑘀𑘹", "𑘀𑘺", "𑘁𑘹", "𑘁𑘺", -- Modi
"𑚀𑚭", "𑚀𑚴", "𑚀𑚵", "𑚆𑚲", -- Takri
"𓈗", "𓃁", "𓆖", -- Egyptian
},
{ -- List of new compositions, in the same order.
"اٟ", -- Arabic
"", -- Devanagari
"আ", "ৠ", "ৡ", -- Bengali
"ਆ", "ਐ", "ਔ", "ਇ", "ਈ", "ਏ", "ਉ", "ਊ", "ਓ", -- Gurmukhi
"અાૅ", "ઔ", "આ", "ઍ", "એ", "ઐ", "ઑ", "ઓ", "ઔ", "ઓ", "ઔ", "ૉ", -- Gujarati
"ଆ", "ଐ", "ଔ", -- Oriya
"ஆ", "ஶ்ரீ", -- Tamil
"ఔ", "ఓ", "ీ", "ే", "ో", -- Telugu
"ಊ", "ೠ", "ಔ", -- Kannada
"ഈ", "ഊ", "ഐ", "ഓ", "ഔ", "ൺ", "ന്റ", "ൻറ", "ൻ", "ർ", "ൽ", "ൾ", -- Malayalam
"ආ", "ඇ", "ඈ", "ඌ", "ඎ", "ඐ", "ඒ", "ඓ", "ඖ", "ෲ", -- Sinhala
"ྲཱྀ", "ླཱྀ", -- Tibetan
"អ", "អា", -- Khmer
"𑀆", "𑀌", "𑀐", -- Brahmi
"𑈇", "𑈁", "𑈅", "𑈇", "𑈇", "𑈃", "𑈲", "𑈳", "𑈂", -- Khojki
"𑊱", "𑊶", "𑊷", "𑊸", "𑊹", -- Khudawadi
"𑒂", "𑒌", "𑒎", "𑒉", "𑒊", -- Tirhuta
"𑘊", "𑘋", "𑘌", "𑘍", -- Modi
"𑚁", "𑚈", "𑚉", "𑚇", -- Takri
"𓈖𓈖𓈖", "𓃀𓂝", "𓆓𓏏𓇿", -- Egyptian
}
}
-- If no characters need fixing, just return text.
if mw.ustring.match(text, "[" .. table.concat(fixedCompositions[1]) .. "]") then
for i, charToFix in ipairs(fixedCompositions[1]) do
text = mw.ustring.gsub(text, charToFix, fixedCompositions[2][i])
end
end
return text
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode compositions or combining classes.
local function fixNormalization(text)
-- Fix discouraged character sequences.
text = str.fixDiscouragedSequences(text)
-- New combining classes.
local fixedCombClasses = {
-- Fixes:
-- (1) Fix for Tibetan, where the tsa-phru is wrongly placed after any vowel signs following normalization (due to its canonical combining class), despite being part of the previous consonant. See Unicode L2/05-244 (N2985).
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
local combClassesToFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
if mw.ustring.match(text, combClassesToFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, combClassesToFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
lb328txjufgixooi09602zh7pwt6rti
43363
43362
2023-01-19T10:26:58Z
Theknightwho
1347
43363
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Corrects discouraged sequences of Unicode characters to the encouraged equivalents. The corrected sequences *must* be desirable in all normalizations (e.g. the sequence to be changed is deprecated or discouraged from use).
function str.fixDiscouragedSequences(text)
local fixedCompositions = {
{ -- List of characters.
"ٳ", -- Arabic
"्?ा", -- Devanagari
"অা", "ঋৃ", "ঌৢ", -- Bengali
"ਅਾ", "ਅੈ", "ਅੌ", "ੲਿ", "ੲੀ", "ੲੇ", "ੳੁ", "ੳੂ", "ੳੋ", -- Gurmukhi
"ઓ", "અાૈ", "અા", "અૅ", "અે", "અૈ", "અૉ", "અો", "અૌ", "આૅ", "આૈ", "ૅા", -- Gujarati
"ଅା", "ଏୗ", "ଓୗ", -- Oriya
"அூ", "ஸ்ரீ", -- Tamil
"ఒౌ", "ఒౕ", "ిౕ", "ెౕ", "ొౕ", -- Telugu
"ಉಾ", "ಋಾ", "ಒೌ", -- Kannada
"ഇൗ", "ഉൗ", "എെ", "ഒാ", "ഒൗ", "ക്", "ണ്", "ന്റ", "ന്", "മ്", "യ്", "ര്", "ല്", "ള്", "ഴ്", "ൻ്റ", -- Malayalam
"අා", "අැ", "අෑ", "උෟ", "ඍෘ", "ඏෟ", "එ්", "එෙ", "ඔෟ", "ෘෘ", -- Sinhala
"ཷ", "ཹ", -- Tibetan
"ឣ", "ឤ", -- Khmer
"𑀅𑀸", "𑀋𑀾", "𑀏𑁂", -- Brahmi
"𑈀𑈬𑈱", "𑈀𑈬", "𑈀𑈱", "𑈀𑈳", "𑈁𑈱", "𑈆𑈬", "𑈬𑈰", "𑈬𑈱", "𑉀𑈮", -- Khojki
"𑊰𑋠", "𑊰𑋥", "𑊰𑋦", "𑊰𑋧", "𑊰𑋨", -- Khudawadi
"𑒁𑒰", "𑒋𑒺", "𑒍𑒺", "𑒪𑒵", "𑒪𑒶", -- Tirhuta
"𑘀𑘹", "𑘀𑘺", "𑘁𑘹", "𑘁𑘺", -- Modi
"𑚀𑚭", "𑚀𑚴", "𑚀𑚵", "𑚆𑚲", -- Takri
"𓈗", "𓃁", "𓆖", -- Egyptian
},
{ -- List of new compositions, in the same order.
"اٟ", -- Arabic
"", -- Devanagari
"আ", "ৠ", "ৡ", -- Bengali
"ਆ", "ਐ", "ਔ", "ਇ", "ਈ", "ਏ", "ਉ", "ਊ", "ਓ", -- Gurmukhi
"અાૅ", "ઔ", "આ", "ઍ", "એ", "ઐ", "ઑ", "ઓ", "ઔ", "ઓ", "ઔ", "ૉ", -- Gujarati
"ଆ", "ଐ", "ଔ", -- Oriya
"ஆ", "ஶ்ரீ", -- Tamil
"ఔ", "ఓ", "ీ", "ే", "ో", -- Telugu
"ಊ", "ೠ", "ಔ", -- Kannada
"ഈ", "ഊ", "ഐ", "ഓ", "ഔ", "ൿ", "ൺ", "ൻറ", "ൻ", "ൔ", "ൕ", "ർ", "ൽ", "ൾ", "ൖ", "ന്റ", -- Malayalam
"ආ", "ඇ", "ඈ", "ඌ", "ඎ", "ඐ", "ඒ", "ඓ", "ඖ", "ෲ", -- Sinhala
"ྲཱྀ", "ླཱྀ", -- Tibetan
"អ", "អា", -- Khmer
"𑀆", "𑀌", "𑀐", -- Brahmi
"𑈇", "𑈁", "𑈅", "𑈇", "𑈇", "𑈃", "𑈲", "𑈳", "𑈂", -- Khojki
"𑊱", "𑊶", "𑊷", "𑊸", "𑊹", -- Khudawadi
"𑒂", "𑒌", "𑒎", "𑒉", "𑒊", -- Tirhuta
"𑘊", "𑘋", "𑘌", "𑘍", -- Modi
"𑚁", "𑚈", "𑚉", "𑚇", -- Takri
"𓈖𓈖𓈖", "𓃀𓂝", "𓆓𓏏𓇿", -- Egyptian
}
}
-- If no characters need fixing, just return text.
if mw.ustring.match(text, "[" .. table.concat(fixedCompositions[1]) .. "]") then
for i, charToFix in ipairs(fixedCompositions[1]) do
text = mw.ustring.gsub(text, charToFix, fixedCompositions[2][i])
end
end
return text
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode compositions or combining classes.
local function fixNormalization(text)
-- Fix discouraged character sequences.
text = str.fixDiscouragedSequences(text)
-- New combining classes.
local fixedCombClasses = {
-- Fixes:
-- (1) Fix for Tibetan, where the tsa-phru is wrongly placed after any vowel signs following normalization (due to its canonical combining class), despite being part of the previous consonant. See Unicode L2/05-244 (N2985).
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
local combClassesToFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
if mw.ustring.match(text, combClassesToFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, combClassesToFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
fh7m3yayg2i5fyu9or0jefwzxp2c41w
43364
43363
2023-01-19T14:42:40Z
Theknightwho
1347
43364
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Corrects discouraged sequences of Unicode characters to the encouraged equivalents. The corrected sequences *must* be desirable in all normalizations (e.g. the sequence to be changed is deprecated or discouraged from use).
function str.fixDiscouragedSequences(text)
local fixedCompositions = {
{ -- List of characters.
"ٳ", -- Arabic
"्?ा", "ॆॆ", "ेे", "ाॅ", "ाॆ", "ाꣿ", "ाे", "ाै", "ाऺ", "ॖॖ", "अॅ", "अॆ", "अा", "एॅ", "एॆ", "एे", "एꣿ", "अॉ", "अॊ", "अो", "अौ", "अऺ", "अऻ", "अाꣿ", "अॖ", "अॗ", -- Devanagari
"অা", "ঋৃ", "ঌৢ", -- Bengali
"ਅਾ", "ਅੈ", "ਅੌ", "ੲਿ", "ੲੀ", "ੲੇ", "ੳੁ", "ੳੂ", "ੳੋ", -- Gurmukhi
"ઓ", "અાૈ", "અા", "અૅ", "અે", "અૈ", "અૉ", "અો", "અૌ", "આૅ", "આૈ", "ૅા", -- Gujarati
"ଅା", "ଏୗ", "ଓୗ", -- Oriya
"அூ", "ஸ்ரீ", -- Tamil
"ఒౌ", "ఒౕ", "ిౕ", "ెౕ", "ొౕ", -- Telugu
"ಉಾ", "ಋಾ", "ಒೌ", -- Kannada
"ഇൗ", "ഉൗ", "എെ", "ഒാ", "ഒൗ", "ക്", "ണ്", "ന്റ", "ന്", "മ്", "യ്", "ര്", "ല്", "ള്", "ഴ്", "െെ", "ൻ്റ", -- Malayalam
"අා", "අැ", "අෑ", "උෟ", "ඍෘ", "ඏෟ", "එ්", "එෙ", "ඔෟ", "ෘෘ", -- Sinhala
"ཷ", "ཹ", -- Tibetan
"ឣ", "ឤ", -- Khmer
"𑀅𑀸", "𑀋𑀾", "𑀏𑁂", -- Brahmi
"𑈀𑈬𑈱", "𑈀𑈬", "𑈀𑈱", "𑈀𑈳", "𑈁𑈱", "𑈆𑈬", "𑈬𑈰", "𑈬𑈱", "𑉀𑈮", -- Khojki
"𑊰𑋠", "𑊰𑋥", "𑊰𑋦", "𑊰𑋧", "𑊰𑋨", -- Khudawadi
"𑒁𑒰", "𑒋𑒺", "𑒍𑒺", "𑒪𑒵", "𑒪𑒶", -- Tirhuta
"𑘀𑘹", "𑘀𑘺", "𑘁𑘹", "𑘁𑘺", -- Modi
"𑚀𑚭", "𑚀𑚴", "𑚀𑚵", "𑚆𑚲", -- Takri
"𓈗", "𓃁", "𓆖", -- Egyptian
},
{ -- List of new compositions, in the same order.
"اٟ", -- Arabic
"", "ꣿ", "ै", "ॉ", "ॊ", "ॏ", "ो", "ौ", "ऻ", "ॗ", "ॲ", "ऄ", "आ", "ऍ", "ऎ", "ऐ", "ꣾ", "ऑ", "ऒ", "ओ", "औ", "ॳ", "ॴ", "ॵ", "ॶ", "ॷ", -- Devanagari
"আ", "ৠ", "ৡ", -- Bengali
"ਆ", "ਐ", "ਔ", "ਇ", "ਈ", "ਏ", "ਉ", "ਊ", "ਓ", -- Gurmukhi
"અાૅ", "ઔ", "આ", "ઍ", "એ", "ઐ", "ઑ", "ઓ", "ઔ", "ઓ", "ઔ", "ૉ", -- Gujarati
"ଆ", "ଐ", "ଔ", -- Oriya
"ஆ", "ஶ்ரீ", -- Tamil
"ఔ", "ఓ", "ీ", "ే", "ో", -- Telugu
"ಊ", "ೠ", "ಔ", -- Kannada
"ഈ", "ഊ", "ഐ", "ഓ", "ഔ", "ൿ", "ൺ", "ൻറ", "ൻ", "ൔ", "ൕ", "ർ", "ൽ", "ൾ", "ൖ", "ൈ", "ന്റ", -- Malayalam
"ආ", "ඇ", "ඈ", "ඌ", "ඎ", "ඐ", "ඒ", "ඓ", "ඖ", "ෲ", -- Sinhala
"ྲཱྀ", "ླཱྀ", -- Tibetan
"អ", "អា", -- Khmer
"𑀆", "𑀌", "𑀐", -- Brahmi
"𑈇", "𑈁", "𑈅", "𑈇", "𑈇", "𑈃", "𑈲", "𑈳", "𑈂", -- Khojki
"𑊱", "𑊶", "𑊷", "𑊸", "𑊹", -- Khudawadi
"𑒂", "𑒌", "𑒎", "𑒉", "𑒊", -- Tirhuta
"𑘊", "𑘋", "𑘌", "𑘍", -- Modi
"𑚁", "𑚈", "𑚉", "𑚇", -- Takri
"𓈖𓈖𓈖", "𓃀𓂝", "𓆓𓏏𓇿", -- Egyptian
}
}
-- If no characters need fixing, just return text.
if mw.ustring.match(text, "[" .. table.concat(fixedCompositions[1]) .. "]") then
for i, charToFix in ipairs(fixedCompositions[1]) do
text = mw.ustring.gsub(text, charToFix, fixedCompositions[2][i])
end
end
return text
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode compositions or combining classes.
local function fixNormalization(text)
-- Fix discouraged character sequences.
text = str.fixDiscouragedSequences(text)
-- New combining classes.
local fixedCombClasses = {
-- Fixes:
-- (1) Fix for Tibetan, where the tsa-phru is wrongly placed after any vowel signs following normalization (due to its canonical combining class), despite being part of the previous consonant. See Unicode L2/05-244 (N2985).
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
local combClassesToFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
if mw.ustring.match(text, combClassesToFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, combClassesToFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
k9du53ectt8jm67uzuv1jmts0c2ufz0
43365
43364
2023-01-19T16:29:33Z
Theknightwho
1347
43365
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
-- Corrects discouraged sequences of Unicode characters to the encouraged equivalents. The corrected sequences *must* be desirable in all normalizations (e.g. the sequence to be changed is deprecated or discouraged from use).
function str.fixDiscouragedSequences(text)
local fixedCompositions = {
{ -- List of characters.
"ٳ", -- Arabic
"्?ा", "ॆॆ", "ेे", "ाॅ", "ाॆ", "ाꣿ", "ॊॆ", "ाे", "ाै", "ोे", "ाऺ", "ॖॖ", "अॅ", "अॆ", "अा", "एॅ", "एॆ", "एे", "एꣿ", "ऎॆ", "अॉ", "आॅ", "अॊ", "आॆ", "अो", "आे", "अौ", "आै", "ओे", "अऺ", "अऻ", "आऺ", "अाꣿ", "आꣿ", "ऒॆ", "अॖ", "अॗ", "ॶॖ", -- Devanagari
"অা", "ঋৃ", "ঌৢ", -- Bengali
"ਅਾ", "ਅੈ", "ਅੌ", "ੲਿ", "ੲੀ", "ੲੇ", "ੳੁ", "ੳੂ", "ੳੋ", -- Gurmukhi
"ઓ", "અાૈ", "અા", "અૅ", "અે", "અૈ", "અૉ", "અો", "અૌ", "આૅ", "આૈ", "ૅા", -- Gujarati
"ଅା", "ଏୗ", "ଓୗ", -- Oriya
"அூ", "ஸ்ரீ", -- Tamil
"ఒౌ", "ఒౕ", "ిౕ", "ెౕ", "ొౕ", -- Telugu
"ಉಾ", "ಋಾ", "ಒೌ", -- Kannada
"ഇൗ", "ഉൗ", "എെ", "ഒാ", "ഒൗ", "ക്", "ണ്", "ന്റ", "ന്", "മ്", "യ്", "ര്", "ല്", "ള്", "ഴ്", "െെ", "ൻ്റ", -- Malayalam
"අා", "අැ", "අෑ", "උෟ", "ඍෘ", "ඏෟ", "එ්", "එෙ", "ඔෟ", "ෘෘ", -- Sinhala
"ཷ", "ཹ", -- Tibetan
"ឣ", "ឤ", -- Khmer
"𑀅𑀸", "𑀋𑀾", "𑀏𑁂", -- Brahmi
"𑈀𑈬𑈱", "𑈀𑈬", "𑈀𑈱", "𑈀𑈳", "𑈁𑈱", "𑈆𑈬", "𑈬𑈰", "𑈬𑈱", "𑉀𑈮", -- Khojki
"𑊰𑋠", "𑊰𑋥", "𑊰𑋦", "𑊰𑋧", "𑊰𑋨", -- Khudawadi
"𑒁𑒰", "𑒋𑒺", "𑒍𑒺", "𑒪𑒵", "𑒪𑒶", -- Tirhuta
"𑘀𑘹", "𑘀𑘺", "𑘁𑘹", "𑘁𑘺", -- Modi
"𑚀𑚭", "𑚀𑚴", "𑚀𑚵", "𑚆𑚲", -- Takri
"𓈗", "𓃁", "𓆖", -- Egyptian
},
{ -- List of new compositions, in the same order.
"اٟ", -- Arabic
"", "ꣿ", "ै", "ॉ", "ॊ", "ॏ", "ॏ", "ो", "ौ", "ौ", "ऻ", "ॗ", "ॲ", "ऄ", "आ", "ऍ", "ऎ", "ऐ", "ꣾ", "ꣾ", "ऑ", "ऑ", "ऒ", "ऒ", "ओ", "ओ", "औ", "औ", "औ", "ॳ", "ॴ", "ॴ", "ॵ", "ॵ", "ॵ", "ॶ", "ॷ", "ॷ", -- Devanagari
"আ", "ৠ", "ৡ", -- Bengali
"ਆ", "ਐ", "ਔ", "ਇ", "ਈ", "ਏ", "ਉ", "ਊ", "ਓ", -- Gurmukhi
"અાૅ", "ઔ", "આ", "ઍ", "એ", "ઐ", "ઑ", "ઓ", "ઔ", "ઓ", "ઔ", "ૉ", -- Gujarati
"ଆ", "ଐ", "ଔ", -- Oriya
"ஆ", "ஶ்ரீ", -- Tamil
"ఔ", "ఓ", "ీ", "ే", "ో", -- Telugu
"ಊ", "ೠ", "ಔ", -- Kannada
"ഈ", "ഊ", "ഐ", "ഓ", "ഔ", "ൿ", "ൺ", "ൻറ", "ൻ", "ൔ", "ൕ", "ർ", "ൽ", "ൾ", "ൖ", "ൈ", "ന്റ", -- Malayalam
"ආ", "ඇ", "ඈ", "ඌ", "ඎ", "ඐ", "ඒ", "ඓ", "ඖ", "ෲ", -- Sinhala
"ྲཱྀ", "ླཱྀ", -- Tibetan
"អ", "អា", -- Khmer
"𑀆", "𑀌", "𑀐", -- Brahmi
"𑈇", "𑈁", "𑈅", "𑈇", "𑈇", "𑈃", "𑈲", "𑈳", "𑈂", -- Khojki
"𑊱", "𑊶", "𑊷", "𑊸", "𑊹", -- Khudawadi
"𑒂", "𑒌", "𑒎", "𑒉", "𑒊", -- Tirhuta
"𑘊", "𑘋", "𑘌", "𑘍", -- Modi
"𑚁", "𑚈", "𑚉", "𑚇", -- Takri
"𓈖𓈖𓈖", "𓃀𓂝", "𓆓𓏏𓇿", -- Egyptian
}
}
-- If no characters need fixing, just return text.
if mw.ustring.match(text, "[" .. table.concat(fixedCompositions[1]) .. "]") then
for i, charToFix in ipairs(fixedCompositions[1]) do
text = mw.ustring.gsub(text, charToFix, fixedCompositions[2][i])
end
end
return text
end
-- Implements fixes to Unicode normalization, for instances where there are identified deficiencies in the default Unicode compositions or combining classes.
local function fixNormalization(text)
-- Fix discouraged character sequences.
text = str.fixDiscouragedSequences(text)
-- New combining classes.
local fixedCombClasses = {
-- Fixes:
-- (1) Fix for Tibetan, where the tsa-phru is wrongly placed after any vowel signs following normalization (due to its canonical combining class), despite being part of the previous consonant. See Unicode L2/05-244 (N2985).
{"༹"}, -- List of characters.
{1} -- List of new combining classes, in the same order.
}
local combClassesToFix = "[" .. table.concat(fixedCombClasses[1]) .. "]"
if mw.ustring.match(text, combClassesToFix) then
-- Obtain the list of default combining characters.
local combClasses = require("ustring/normalization-data").combclass
-- For each character that needs fixing, find all characters with combining classes equal to or lower than its default class, and greater than its new class (intermediary characters)
for charToFix in mw.ustring.gmatch(text, combClassesToFix) do
local intermediaryChars = {}
for character, combClass in pairs(combClasses) do
if combClass <= combClasses[mw.ustring.codepoint(charToFix)] and combClass > fixedCombClasses[2][require("Module:table").invert(fixedCombClasses[1])[charToFix]] then
table.insert(intermediaryChars, mw.ustring.char(character))
end
end
-- Swap the character with any intermediary characters that are immediately before it.
text = mw.ustring.gsub(text, "([" .. table.concat(intermediaryChars) .. "]+)(" .. charToFix .. ")", "%2%1")
end
end
return text
end
function str.toFixedNFC(text)
return fixNormalization(mw.ustring.toNFC(text))
end
function str.toFixedNFD(text)
return fixNormalization(mw.ustring.toNFD(text))
end
function str.toFixedNFKC(text)
return fixNormalization(mw.ustring.toNFKC(text))
end
function str.toFixedNFKD(text)
return fixNormalization(mw.ustring.toNFKD(text))
end
return str
e9wgp7gj428127dtvls7pujdrhhwmdv
43366
43365
2023-01-25T02:53:38Z
Theknightwho
1347
Removing normalization fix functions, as this has been implemented in [[Module:scripts]] instead.
43366
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
--[[
Helper function that escapes all pattern characters – ().%+-*?[^$] – so that they will be treated
as plain text.
]]
function str.pattern_escape(pattern_str)
local invoked = false
local escape = require("Module:string/pattern_escape")
if type(pattern_str) == "table" then
if pattern_str.args then
local frame = pattern_str
invoked = true
if frame.args[1] then
pattern_str = frame.args[1]
else
pattern_str = frame:getParent().args[1]
end
else
error("First argument to pattern_escape should be a string, a number, or a frame object.")
end
elseif not (type(pattern_str) == "string" or type(pattern_str) == "number") then
error("First argument to pattern_escape should be a string or a number.")
end
if invoked then
return (escape(pattern_str)) -- only the first value
else
return escape(pattern_str)
end
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
return str
l03tk053mmzbubo570b7pea4hr19trr
43367
43366
2024-02-21T15:22:07Z
Theknightwho
1347
pattern_escape moved into submodule which is accessed via a metatable.
43367
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.plain_gsub(text, pattern, replacement)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = {},
[2] = {},
[3] = { allow_empty = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
replacement = args[3]
else
error("If the first argument to plain_gsub is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to plain_gsub should be a string or a number.")
end
if not (type(replacement) == "string" or type(replacement) == "number") then
error("The third argument to plain_gsub should be a string or a number.")
end
end
pattern = str.pattern_escape(pattern)
if invoked then
text = mw.ustring.gsub(text, pattern, replacement)
return text
else
return mw.ustring.gsub(text, pattern, replacement)
end
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
function str:__index(k)
self[k] = package.loaders[2]("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
25zciqbaj6pxgymo986lez07l8mkdw3
43368
43367
2024-02-21T15:38:10Z
Theknightwho
1347
plain_gsub moved into [[Module:string/plain gsub]] and now accessed via metatable (i.e. it's loaded on demand).
43368
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len or i < 1 or j < 1 then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
function str:__index(k)
self[k] = package.loaders[2]("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
14ycksvmdxm666q932n3qb71eh73j7x
43369
43368
2024-04-05T02:33:13Z
Theknightwho
1347
No reason to throw an error if i or j are 0.
43369
Scribunto
text/plain
local str = {}
-- Cannot include null byte.
local UTF8_char = "[\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = str.pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = str.pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = str.pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
function str:__index(k)
self[k] = package.loaders[2]("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
m7vwbka79g2bwx9lyaa21a7viropnf0
43370
43369
2024-04-08T19:12:49Z
Theknightwho
1347
Consolidating various instances of pattern_escape into [[Module:string utilities]].
43370
Scribunto
text/plain
local str = {}
local pattern_escape = require("Module:string utilities").pattern_escape
local UTF8_char = "[%z\1-\127\194-\244][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
function str:__index(k)
self[k] = package.loaders[2]("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
dz2idb85hydkvf34j1jfb31nkog9z9u
43371
43370
2024-04-11T05:34:32Z
Theknightwho
1347
Slightly more efficient pattern.
43371
Scribunto
text/plain
local str = {}
local pattern_escape = require("Module:string utilities").pattern_escape
local UTF8_char = "[^\128-\191][\128-\191]*"
--[[
ulen
Counts UTF-8 characters. Faster than mw.ustring.len.
Assumes that the encoding is correct. Unlike mw.ustring.len, does not return nil
if encoding is invalid.
Does not count the bytes 192, 193, and 245-255. They are not used in UTF-8 and
will not occur if the string is valid. They are replaced with the replacement
character (U+FFFD) on MediaWiki pages.
--]]
function str.ulen(text)
local _, length = string.gsub(text, UTF8_char, "")
return length
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
function str:__index(k)
self[k] = package.loaders[2]("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
ftcbedi7fj4px91c9md5ltswepc8tuk
43372
43371
2024-04-11T17:10:45Z
Theknightwho
1347
Remve ulen, as it's redundant to "len" in [[Module:script utilities]], and the method it uses becomes very slow with page-length strings.
43372
Scribunto
text/plain
local m_string_utils = require("Module:string utilities")
local str = {}
local pattern_escape = m_string_utils.pattern_escape
local UTF8_char = "[^\128-\191][\128-\191]*"
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(s)
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
local new_args = str._getParameters(frame.args, { 's' });
local s = new_args['s'] or '';
return mw.ustring.len(mw.ustring.gsub(s, "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, { 's', 'i', 'j' });
local s = new_args['s'] or '';
local i = tonumber(new_args['i']) or 1;
local j = tonumber(new_args['j']) or -1;
local len = mw.ustring.len(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return mw.ustring.sub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return mw.ustring.sub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > mw.ustring.len(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = mw.ustring.match(s, pattern, start)
else
if start > 1 then
s = mw.ustring.sub(s, start);
end
local iterator = mw.ustring.gmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > mw.ustring.len(target_str) then
return str._error('String index out of range');
end
return mw.ustring.sub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = mw.ustring.find(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local params = {
[1] = { required = true, allow_empty = true },
[2] = { required = true, allow_empty = true },
[3] = { type = "number" },
[4] = { type = "boolean" },
}
local args = require("Module:parameters").process(frame.args, params)
return mw.ustring.find(args[1], args[2], args[3], args[4])
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = pattern_escape(pattern);
replace = mw.ustring.gsub(replace, "%%", "%%%%"); --Only need to escape replacement sequences.
end
local result;
result = mw.ustring.gsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local params = {
[1] = { required = true, allow_empty = true, allow_whitespace = true},
[2] = { required = true, allow_empty = true, allow_whitespace = true},
[3] = { required = true, allow_empty = true, allow_whitespace = true},
[4] = { type = "number" },
}
local args = require("Module:parameters").process(frame.args, params)
return (mw.ustring.gsub(args[1], args[2], args[3], args[4]))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
local text = frame.args[1] or ''
return mw.ustring.lower(text)
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = pattern_escape(pattern)
end
local _, count = mw.ustring.gsub(text, pattern, "")
return count
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = require("Module:parameters").process(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in mw.ustring.gmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or mw.ustring.find
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
function str:__index(k)
self[k] = package.loaders[2]("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
fzjh99372b2n1k4jepkwy7bcnn6ucuq
43373
43372
2024-04-11T17:35:13Z
Theknightwho
1347
Use [[Module:string utilities]] functions for speed + minor refactor of some functions (though this needs more work).
43373
Scribunto
text/plain
local m_string_utils = require("Module:string utilities")
local str = {}
local pattern_escape = m_string_utils.pattern_escape
local process_params = require("Module:parameters").process
local replacement_escape = m_string_utils.replacement_escape
local ufind = m_string_utils.find
local ugmatch = m_string_utils.gmatch
local ugsub = m_string_utils.gsub
local ulen = m_string_utils.len
local ulower = m_string_utils.lower
local umatch = m_string_utils.match
local unpack = unpack
local usub = m_string_utils.sub
local UTF8_char = "[^\128-\191][\128-\191]*"
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
return ulen(str._getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
return ulen(ugsub(str._getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, {"s", "i", "j"});
local s = new_args["s"] or "";
local i = tonumber(new_args["i"]) or 1;
local j = tonumber(new_args["j"]) or -1;
local len = ulen(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > ulen(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start);
end
local iterator = ugmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > ulen(target_str) then
return str._error('String index out of range');
end
return usub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = pattern_escape(pattern);
replace = replacement_escape(pattern);
end
local result;
result = ugsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local main_param = {required = true, allow_empty = true, allow_whitespace = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
return ulower(frame.args[1] or "")
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = pattern_escape(pattern)
end
local _, count = ugsub(text, pattern, "")
return count
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or ufind
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
function str:__index(k)
self[k] = package.loaders[2]("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
hwuqc0e9bg023i84ehte1q1fateipda
43374
43373
2024-04-11T18:01:28Z
Theknightwho
1347
This pattern is even faster for UTF-8, since we have to assume compliance anyway.
43374
Scribunto
text/plain
local m_string_utils = require("Module:string utilities")
local str = {}
local pattern_escape = m_string_utils.pattern_escape
local process_params = require("Module:parameters").process
local replacement_escape = m_string_utils.replacement_escape
local ufind = m_string_utils.find
local ugmatch = m_string_utils.gmatch
local ugsub = m_string_utils.gsub
local ulen = m_string_utils.len
local ulower = m_string_utils.lower
local umatch = m_string_utils.match
local unpack = unpack
local usub = m_string_utils.sub
local UTF8_char = ".[\128-\191]*"
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
return ulen(str._getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
return ulen(ugsub(str._getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, {"s", "i", "j"});
local s = new_args["s"] or "";
local i = tonumber(new_args["i"]) or 1;
local j = tonumber(new_args["j"]) or -1;
local len = ulen(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > ulen(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start);
end
local iterator = ugmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > ulen(target_str) then
return str._error('String index out of range');
end
return usub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = pattern_escape(pattern);
replace = replacement_escape(pattern);
end
local result;
result = ugsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local main_param = {required = true, allow_empty = true, allow_whitespace = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
return ulower(frame.args[1] or "")
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = pattern_escape(pattern)
end
local _, count = ugsub(text, pattern, "")
return count
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or ufind
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
function str:__index(k)
self[k] = package.loaders[2]("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
hajhw66i7m41jbxj430oo0r1kjjcbth
43375
43374
2024-04-12T08:15:41Z
Theknightwho
1347
Bugfix.
43375
Scribunto
text/plain
local m_string_utils = require("Module:string utilities")
local str = {}
local pattern_escape = m_string_utils.pattern_escape
local process_params = require("Module:parameters").process
local replacement_escape = m_string_utils.replacement_escape
local ufind = m_string_utils.find
local ugmatch = m_string_utils.gmatch
local ugsub = m_string_utils.gsub
local ulen = m_string_utils.len
local ulower = m_string_utils.lower
local umatch = m_string_utils.match
local unpack = unpack
local usub = m_string_utils.sub
local UTF8_char = ".[\128-\191]*"
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
return ulen(str._getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
return ulen(ugsub(str._getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, {"s", "i", "j"});
local s = new_args["s"] or "";
local i = tonumber(new_args["i"]) or 1;
local j = tonumber(new_args["j"]) or -1;
local len = ulen(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > ulen(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start);
end
local iterator = ugmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > ulen(target_str) then
return str._error('String index out of range');
end
return usub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = pattern_escape(pattern);
replace = replacement_escape(replace);
end
local result;
result = ugsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local main_param = {required = true, allow_empty = true, allow_whitespace = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
return ulower(frame.args[1] or "")
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = pattern_escape(pattern)
end
local _, count = ugsub(text, pattern, "")
return count
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or ufind
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
s = s:gsub(UTF8_char, function (c) return #c > 1 and c:reverse() end)
return s:reverse()
end
function str:__index(k)
self[k] = package.loaders[2]("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
dvlu2cv72ib0dm71u5uh8f8pyhd7u0p
43376
43375
2024-04-12T08:32:07Z
Theknightwho
1347
More sensible way of doing reverse.
43376
Scribunto
text/plain
local m_string_utils = require("Module:string utilities")
local str = {}
local gsub = string.gsub
local pattern_escape = m_string_utils.pattern_escape
local process_params = require("Module:parameters").process
local replacement_escape = m_string_utils.replacement_escape
local reverse = string.reverse
local ufind = m_string_utils.find
local ugmatch = m_string_utils.gmatch
local ugsub = m_string_utils.gsub
local ulen = m_string_utils.len
local ulower = m_string_utils.lower
local umatch = m_string_utils.match
local unpack = unpack
local usub = m_string_utils.sub
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
return ulen(str._getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
return ulen(ugsub(str._getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, {"s", "i", "j"});
local s = new_args["s"] or "";
local i = tonumber(new_args["i"]) or 1;
local j = tonumber(new_args["j"]) or -1;
local len = ulen(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > ulen(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start);
end
local iterator = ugmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > ulen(target_str) then
return str._error('String index out of range');
end
return usub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = pattern_escape(pattern);
replace = replacement_escape(replace);
end
local result;
result = ugsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local main_param = {required = true, allow_empty = true, allow_whitespace = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
return ulower(frame.args[1] or "")
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = pattern_escape(pattern)
end
local _, count = ugsub(text, pattern, "")
return count
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or ufind
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
--Reverses a UTF8 string; equivalent to string.reverse
function str.reverse(s)
return reverse(gsub(s, "[\194-\244][\128-\191]*", reverse))
end
function str:__index(k)
self[k] = package.loaders[2]("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
hhvrat90fedh1e3upsmsnml5p8dij0l
43377
43376
2024-04-12T09:39:48Z
Theknightwho
1347
Function reverse moved to [[Module:string utilities]].
43377
Scribunto
text/plain
local m_string_utils = require("Module:string utilities")
local str = {}
local gsub = string.gsub
local pattern_escape = m_string_utils.pattern_escape
local process_params = require("Module:parameters").process
local replacement_escape = m_string_utils.replacement_escape
local reverse = string.reverse
local ufind = m_string_utils.find
local ugmatch = m_string_utils.gmatch
local ugsub = m_string_utils.gsub
local ulen = m_string_utils.len
local ulower = m_string_utils.lower
local umatch = m_string_utils.match
local unpack = unpack
local usub = m_string_utils.sub
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
return ulen(str._getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
return ulen(ugsub(str._getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, {"s", "i", "j"});
local s = new_args["s"] or "";
local i = tonumber(new_args["i"]) or 1;
local j = tonumber(new_args["j"]) or -1;
local len = ulen(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > ulen(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start);
end
local iterator = ugmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > ulen(target_str) then
return str._error('String index out of range');
end
return usub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = pattern_escape(pattern);
replace = replacement_escape(replace);
end
local result;
result = ugsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local main_param = {required = true, allow_empty = true, allow_whitespace = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
return ulower(frame.args[1] or "")
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = pattern_escape(pattern)
end
local _, count = ugsub(text, pattern, "")
return count
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or ufind
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.escapebytes(s)
return (string.gsub(s,
'.',
function(char)
return ('\\%03d'):format(string.byte(char))
end))
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
function str:__index(k)
self[k] = package.loaders[2]("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
ovm5gvuyxhea24siz3mbc9wsbevrvsp
43378
43377
2024-04-12T10:25:52Z
Theknightwho
1347
Also move escapebytes to [[Module:string utilities]].
43378
Scribunto
text/plain
local m_string_utils = require("Module:string utilities")
local str = {}
local gsub = string.gsub
local pattern_escape = m_string_utils.pattern_escape
local process_params = require("Module:parameters").process
local replacement_escape = m_string_utils.replacement_escape
local reverse = string.reverse
local ufind = m_string_utils.find
local ugmatch = m_string_utils.gmatch
local ugsub = m_string_utils.gsub
local ulen = m_string_utils.len
local ulower = m_string_utils.lower
local umatch = m_string_utils.match
local unpack = unpack
local usub = m_string_utils.sub
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
return ulen(str._getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
return ulen(ugsub(str._getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, {"s", "i", "j"});
local s = new_args["s"] or "";
local i = tonumber(new_args["i"]) or 1;
local j = tonumber(new_args["j"]) or -1;
local len = ulen(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > ulen(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start);
end
local iterator = ugmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > ulen(target_str) then
return str._error('String index out of range');
end
return usub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = pattern_escape(pattern);
replace = replacement_escape(replace);
end
local result;
result = ugsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local main_param = {required = true, allow_empty = true, allow_whitespace = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
return ulower(frame.args[1] or "")
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = pattern_escape(pattern)
end
local _, count = ugsub(text, pattern, "")
return count
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or ufind
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.URIdecode(frame)
return mw.uri.decode(frame.args[1], frame.args[2] or "PATH")
end
function str:__index(k)
self[k] = package.loaders[2]("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
cc57hat5sw2yesyjjz3a2abdf0ti8vl
43379
43378
2024-04-20T20:01:55Z
Theknightwho
1347
Use decode_uri in [[Module:string utilities]], as it's faster.
43379
Scribunto
text/plain
local m_string_utils = require("Module:string utilities")
local str = {}
local decode_uri = m_string_utils.decode_uri
local gsub = string.gsub
local pattern_escape = m_string_utils.pattern_escape
local process_params = require("Module:parameters").process
local replacement_escape = m_string_utils.replacement_escape
local reverse = string.reverse
local ufind = m_string_utils.find
local ugmatch = m_string_utils.gmatch
local ugsub = m_string_utils.gsub
local ulen = m_string_utils.len
local ulower = m_string_utils.lower
local umatch = m_string_utils.match
local unpack = unpack
local usub = m_string_utils.sub
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
return ulen(str._getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
return ulen(ugsub(str._getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, {"s", "i", "j"});
local s = new_args["s"] or "";
local i = tonumber(new_args["i"]) or 1;
local j = tonumber(new_args["j"]) or -1;
local len = ulen(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > ulen(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start);
end
local iterator = ugmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > ulen(target_str) then
return str._error('String index out of range');
end
return usub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = pattern_escape(pattern);
replace = replacement_escape(replace);
end
local result;
result = ugsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local main_param = {required = true, allow_empty = true, allow_whitespace = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
return ulower(frame.args[1] or "")
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = pattern_escape(pattern)
end
local _, count = ugsub(text, pattern, "")
return count
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or ufind
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
function str:__index(k)
self[k] = package.loaders[2]("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
7r3yxfx32w2o4ld6mx99j41v053ubve
43380
43379
2024-08-30T11:49:22Z
Theknightwho
1347
allow_whitespace flag in [[Module:parameters]] changed to no_trim, as it's more intuitive.
43380
Scribunto
text/plain
local m_string_utils = require("Module:string utilities")
local str = {}
local decode_uri = m_string_utils.decode_uri
local gsub = string.gsub
local pattern_escape = m_string_utils.pattern_escape
local process_params = require("Module:parameters").process
local replacement_escape = m_string_utils.replacement_escape
local reverse = string.reverse
local ufind = m_string_utils.find
local ugmatch = m_string_utils.gmatch
local ugsub = m_string_utils.gsub
local ulen = m_string_utils.len
local ulower = m_string_utils.lower
local umatch = m_string_utils.match
local unpack = unpack
local usub = m_string_utils.sub
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
return ulen(str._getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
return ulen(ugsub(str._getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The fist index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, {"s", "i", "j"});
local s = new_args["s"] or "";
local i = tonumber(new_args["i"]) or 1;
local j = tonumber(new_args["j"]) or -1;
local len = ulen(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > ulen(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start);
end
local iterator = ugmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > ulen(target_str) then
return str._error('String index out of range');
end
return usub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = pattern_escape(pattern);
replace = replacement_escape(replace);
end
local result;
result = ugsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
return ulower(frame.args[1] or "")
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = pattern_escape(pattern)
end
local _, count = ugsub(text, pattern, "")
return count
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or ufind
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
function str:__index(k)
self[k] = package.loaders[2]("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
720zosi4ssr98jqtft45ktfdluzc7l6
43381
43380
2025-03-09T21:08:48Z
Sgconlaw
1735
Corrected typo
43381
Scribunto
text/plain
local m_string_utils = require("Module:string utilities")
local str = {}
local decode_uri = m_string_utils.decode_uri
local gsub = string.gsub
local pattern_escape = m_string_utils.pattern_escape
local process_params = require("Module:parameters").process
local replacement_escape = m_string_utils.replacement_escape
local reverse = string.reverse
local ufind = m_string_utils.find
local ugmatch = m_string_utils.gmatch
local ugsub = m_string_utils.gsub
local ulen = m_string_utils.len
local ulower = m_string_utils.lower
local umatch = m_string_utils.match
local unpack = unpack
local usub = m_string_utils.sub
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
return ulen(str._getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
return ulen(ugsub(str._getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The first index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = str._getParameters(frame.args, {"s", "i", "j"});
local s = new_args["s"] or "";
local i = tonumber(new_args["i"]) or 1;
local j = tonumber(new_args["j"]) or -1;
local len = ulen(s);
-- Convert negatives for range checking
if i < 0 then
i = len + i + 1;
end
if j < 0 then
j = len + j + 1;
end
if i > len or j > len then
return str._error('String subset index out of range');
end
if j < i then
return str._error('String subset indices out of order');
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = str._getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' });
local s = new_args['s'] or '';
local start = tonumber(new_args['start']) or 1;
local plain_flag = str._getBoolean(new_args['plain'] or false);
local pattern = new_args['pattern'] or '';
local match_index = math.floor(tonumber(new_args['match']) or 1);
local nomatch = new_args['nomatch'];
if s == '' then
return str._error('Target string is empty');
end
if pattern == '' then
return str._error('Pattern string is empty');
end
if math.abs(start) < 1 or math.abs(start) > ulen(s) then
return str._error('Requested start is out of range');
end
if match_index == 0 then
return str._error('Match index is out of range');
end
if plain_flag then
pattern = pattern_escape(pattern);
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start);
end
local iterator = ugmatch(s, pattern);
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1;
if match_index == 0 then
result = w;
break;
end
end
else
-- Reverse search
local result_table = {};
local count = 1;
for w in iterator do
result_table[count] = w;
count = count + 1;
end
result = result_table[count + match_index];
end
end
if result == nil then
if nomatch == nil then
return str._error('Match not found');
else
return nomatch;
end
else
return result;
end
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = str._getParameters(frame.args, { 'target', 'pos' });
local target_str = new_args['target'] or '';
local pos = tonumber(new_args['pos']) or 0;
if pos == 0 or math.abs(pos) > ulen(target_str) then
return str._error('String index out of range');
end
return usub(target_str, pos, pos);
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = str._getParameters(frame.args, { 'source', 'target' });
local source_str = new_args['source'] or '';
local target_str = new_args['target'] or '';
if target_str == '' then
return 1;
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = str._getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' });
local source_str = new_args['source'] or '';
local pattern = new_args['pattern'] or '';
local replace = new_args['replace'] or '';
local count = tonumber(new_args['count']);
local plain = new_args['plain'] or true;
if source_str == '' or pattern == '' then
return source_str;
end
plain = str._getBoolean(plain);
if plain then
pattern = pattern_escape(pattern);
replace = replacement_escape(replace);
end
local result;
result = ugsub(source_str, pattern, replace, count);
return result;
end
function str.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return string.rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
return ulower(frame.args[1] or "")
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return fmt:format(unpack(args))
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
function str._getParameters(frame_args, arg_list)
local new_args = {};
local index = 1;
local value;
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[index];
index = index + 1;
end
new_args[arg] = value;
end
return new_args;
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame();
local error_category = frame.args.error_category or 'Errors reported by Module String';
local ignore_errors = frame.args.ignore_errors or false;
local no_category = frame.args.no_category or false;
if str._getBoolean(ignore_errors) then
return '';
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>';
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str;
end
return error_str;
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_value;
if type(boolean_str) == 'string' then
boolean_str = boolean_str:lower();
if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0'
or boolean_str == '' then
boolean_value = false;
else
boolean_value = true;
end
elseif type(boolean_str) == 'boolean' then
boolean_value = boolean_str;
else
error('No boolean value found');
end
return boolean_value
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
end
if plain then
pattern = pattern_escape(pattern)
end
local _, count = ugsub(text, pattern, "")
return count
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not string.find(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local find = use_basic_Lua_function and string.find or ufind
return function()
i = i + 1
local return_values = { find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
function str:__index(k)
self[k] = package.loaders[2]("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
8vo0dh23slbn9n60dk6y2zlb89a24up
43382
43381
2025-04-01T21:49:19Z
Theknightwho
1347
Various optimisations.
43382
Scribunto
text/plain
local str = {}
local parameters_module = "Module:parameters"
local patterns_module = "Module:patterns"
local string_utilities_module = "Module:string utilities"
local abs = math.abs
local find = string.find
local format = string.format
local floor = math.floor
local loader = package.loaders[2]
local lower = string.lower
local match = string.match
local rep = string.rep
local require = require
local select = select
local tonumber = tonumber
local type = type
local unpack = unpack
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function pattern_escape(...)
pattern_escape = require(patterns_module).pattern_escape
return pattern_escape(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function replacement_escape(...)
replacement_escape = require(patterns_module).replacement_escape
return replacement_escape(...)
end
local function ufind(...)
ufind = require(string_utilities_module).find
return ufind(...)
end
local function ugmatch(...)
ugmatch = require(string_utilities_module).gmatch
return ugmatch(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function ulen(...)
ulen = require(string_utilities_module).len
return ulen(...)
end
local function ulower(...)
ulower = require(string_utilities_module).lower
return ulower(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local function usub(...)
usub = require(string_utilities_module).sub
return usub(...)
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
local function _getParameters(frame_args, arg_list)
local new_args, i, value = {}, 1
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[i]
i = i + 1
end
new_args[arg] = value
end
return new_args
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
return ulen(_getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
return ulen(ugsub(_getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The first index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = _getParameters(frame.args, {"s", "i", "j"})
local s = new_args["s"] or ""
local i = tonumber(new_args["i"]) or 1
local j = tonumber(new_args["j"]) or -1
local s_len = ulen(s)
-- Convert negatives for range checking
if i < 0 then
i = s_len + i + 1
end
if j < 0 then
j = s_len + j + 1
end
if i > s_len or j > s_len then
return str._error('String subset index out of range')
elseif j < i then
return str._error('String subset indices out of order')
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = _getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' })
local s = new_args['s'] or ''
local start = tonumber(new_args['start']) or 1
local plain_flag = str._getBoolean(new_args['plain'] or false)
local pattern = new_args['pattern'] or ''
local match_index = floor(tonumber(new_args['match']) or 1)
local nomatch = new_args['nomatch']
if s == '' then
return str._error('Target string is empty')
elseif pattern == '' then
return str._error('Pattern string is empty')
elseif abs(start) < 1 or abs(start) > ulen(s) then
return str._error('Requested start is out of range')
elseif match_index == 0 then
return str._error('Match index is out of range')
elseif plain_flag then
pattern = pattern_escape(pattern)
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start)
end
local iterator = ugmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table, i = {}, 0
for w in iterator do
i = i + 1
result_table[i] = w
end
result = result_table[i + match_index]
end
end
if result ~= nil then
return result
elseif nomatch == nil then
return str._error('Match not found')
end
return nomatch
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = _getParameters(frame.args, { 'target', 'pos' })
local target_str = new_args['target'] or ''
local pos = tonumber(new_args['pos']) or 0
if pos == 0 or abs(pos) > ulen(target_str) then
return str._error('String index out of range')
end
return usub(target_str, pos, pos)
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = _getParameters(frame.args, { 'source', 'target' })
local source_str = new_args['source'] or ''
local target_str = new_args['target'] or ''
if target_str == '' then
return 1
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = _getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' })
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber(new_args['count'])
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = str._getBoolean(plain)
if plain then
pattern = pattern_escape(pattern)
replace = replacement_escape(replace)
end
return (ugsub(source_str, pattern, replace, count))
end
function str.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
return ulower(frame.args[1] or "")
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return format(fmt, unpack(args))
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame()
local error_category = frame.args.error_category or 'Errors reported by Module String'
local ignore_errors = frame.args.ignore_errors or false
local no_category = frame.args.no_category or false
if str._getBoolean(ignore_errors) then
return ''
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>'
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str
end
return error_str
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_str_type = type(boolean_str)
if boolean_str_type == 'boolean' then
return boolean_str
elseif boolean_str_type ~= "string" then
error('No boolean value found')
end
boolean_str = lower(boolean_str)
return not (
boolean_str == 'false' or
boolean_str == 'no' or
boolean_str == '0' or
boolean_str == ''
)
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
elseif not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
elseif plain then
pattern = pattern_escape(pattern)
end
return select(2, ugsub(text, pattern, ""))
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not match(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local _find = use_basic_Lua_function and find or ufind
return function()
i = i + 1
local return_values = { _find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
function str:__index(k)
self[k] = loader("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
hp0ma54xre89hga0316wf1okvc321ph
43383
43382
2025-04-05T18:48:07Z
Surjection
380
Surjection moved page [[Module:string]] to [[Module:string/templates]]: overwhelmingly used in templates; [[Module:string utilities]] will likely be moved to [[Module:string]] in the long term
43382
Scribunto
text/plain
local str = {}
local parameters_module = "Module:parameters"
local patterns_module = "Module:patterns"
local string_utilities_module = "Module:string utilities"
local abs = math.abs
local find = string.find
local format = string.format
local floor = math.floor
local loader = package.loaders[2]
local lower = string.lower
local match = string.match
local rep = string.rep
local require = require
local select = select
local tonumber = tonumber
local type = type
local unpack = unpack
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function pattern_escape(...)
pattern_escape = require(patterns_module).pattern_escape
return pattern_escape(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function replacement_escape(...)
replacement_escape = require(patterns_module).replacement_escape
return replacement_escape(...)
end
local function ufind(...)
ufind = require(string_utilities_module).find
return ufind(...)
end
local function ugmatch(...)
ugmatch = require(string_utilities_module).gmatch
return ugmatch(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function ulen(...)
ulen = require(string_utilities_module).len
return ulen(...)
end
local function ulower(...)
ulower = require(string_utilities_module).lower
return ulower(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local function usub(...)
usub = require(string_utilities_module).sub
return usub(...)
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
local function _getParameters(frame_args, arg_list)
local new_args, i, value = {}, 1
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[i]
i = i + 1
end
new_args[arg] = value
end
return new_args
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string|len|target_string|}}
OR
{{#invoke:string|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
return ulen(_getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
return ulen(ugsub(_getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string|sub|target_string|start_index|end_index}}
OR
{{#invoke:string|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The first index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = _getParameters(frame.args, {"s", "i", "j"})
local s = new_args["s"] or ""
local i = tonumber(new_args["i"]) or 1
local j = tonumber(new_args["j"]) or -1
local s_len = ulen(s)
-- Convert negatives for range checking
if i < 0 then
i = s_len + i + 1
end
if j < 0 then
j = s_len + j + 1
end
if i > s_len or j > s_len then
return str._error('String subset index out of range')
elseif j < i then
return str._error('String subset indices out of order')
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = _getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' })
local s = new_args['s'] or ''
local start = tonumber(new_args['start']) or 1
local plain_flag = str._getBoolean(new_args['plain'] or false)
local pattern = new_args['pattern'] or ''
local match_index = floor(tonumber(new_args['match']) or 1)
local nomatch = new_args['nomatch']
if s == '' then
return str._error('Target string is empty')
elseif pattern == '' then
return str._error('Pattern string is empty')
elseif abs(start) < 1 or abs(start) > ulen(s) then
return str._error('Requested start is out of range')
elseif match_index == 0 then
return str._error('Match index is out of range')
elseif plain_flag then
pattern = pattern_escape(pattern)
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start)
end
local iterator = ugmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table, i = {}, 0
for w in iterator do
i = i + 1
result_table[i] = w
end
result = result_table[i + match_index]
end
end
if result ~= nil then
return result
elseif nomatch == nil then
return str._error('Match not found')
end
return nomatch
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string|pos|target_string|index_value}}
OR
{{#invoke:string|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = _getParameters(frame.args, { 'target', 'pos' })
local target_str = new_args['target'] or ''
local pos = tonumber(new_args['pos']) or 0
if pos == 0 or abs(pos) > ulen(target_str) then
return str._error('String index out of range')
end
return usub(target_str, pos, pos)
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = _getParameters(frame.args, { 'source', 'target' })
local source_str = new_args['source'] or ''
local target_str = new_args['target'] or ''
if target_str == '' then
return 1
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = _getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' })
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber(new_args['count'])
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = str._getBoolean(plain)
if plain then
pattern = pattern_escape(pattern)
replace = replacement_escape(replace)
end
return (ugsub(source_str, pattern, replace, count))
end
function str.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
return ulower(frame.args[1] or "")
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return format(fmt, unpack(args))
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame()
local error_category = frame.args.error_category or 'Errors reported by Module String'
local ignore_errors = frame.args.ignore_errors or false
local no_category = frame.args.no_category or false
if str._getBoolean(ignore_errors) then
return ''
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>'
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str
end
return error_str
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_str_type = type(boolean_str)
if boolean_str_type == 'boolean' then
return boolean_str
elseif boolean_str_type ~= "string" then
error('No boolean value found')
end
boolean_str = lower(boolean_str)
return not (
boolean_str == 'false' or
boolean_str == 'no' or
boolean_str == '0' or
boolean_str == ''
)
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
elseif not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
elseif plain then
pattern = pattern_escape(pattern)
end
return select(2, ugsub(text, pattern, ""))
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not match(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local _find = use_basic_Lua_function and find or ufind
return function()
i = i + 1
local return_values = { _find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
function str:__index(k)
self[k] = loader("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
hp0ma54xre89hga0316wf1okvc321ph
43384
43383
2025-04-05T19:10:40Z
Surjection
380
43384
Scribunto
text/plain
local str = {}
local parameters_module = "Module:parameters"
local patterns_module = "Module:patterns"
local string_utilities_module = "Module:string utilities"
local abs = math.abs
local find = string.find
local format = string.format
local floor = math.floor
local loader = package.loaders[2]
local lower = string.lower
local match = string.match
local rep = string.rep
local require = require
local select = select
local tonumber = tonumber
local type = type
local unpack = unpack
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function pattern_escape(...)
pattern_escape = require(patterns_module).pattern_escape
return pattern_escape(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function replacement_escape(...)
replacement_escape = require(patterns_module).replacement_escape
return replacement_escape(...)
end
local function ufind(...)
ufind = require(string_utilities_module).find
return ufind(...)
end
local function ugmatch(...)
ugmatch = require(string_utilities_module).gmatch
return ugmatch(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function ulen(...)
ulen = require(string_utilities_module).len
return ulen(...)
end
local function ulower(...)
ulower = require(string_utilities_module).lower
return ulower(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local function usub(...)
usub = require(string_utilities_module).sub
return usub(...)
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
local function _getParameters(frame_args, arg_list)
local new_args, i, value = {}, 1
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[i]
i = i + 1
end
new_args[arg] = value
end
return new_args
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string/templates|len|target_string|}}
OR
{{#invoke:string/templates|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
return ulen(_getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
return ulen(ugsub(_getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string/templates|sub|target_string|start_index|end_index}}
OR
{{#invoke:string/templates|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The first index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = _getParameters(frame.args, {"s", "i", "j"})
local s = new_args["s"] or ""
local i = tonumber(new_args["i"]) or 1
local j = tonumber(new_args["j"]) or -1
local s_len = ulen(s)
-- Convert negatives for range checking
if i < 0 then
i = s_len + i + 1
end
if j < 0 then
j = s_len + j + 1
end
if i > s_len or j > s_len then
return str._error('String subset index out of range')
elseif j < i then
return str._error('String subset indices out of order')
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string/templates|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string/templates|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = _getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' })
local s = new_args['s'] or ''
local start = tonumber(new_args['start']) or 1
local plain_flag = str._getBoolean(new_args['plain'] or false)
local pattern = new_args['pattern'] or ''
local match_index = floor(tonumber(new_args['match']) or 1)
local nomatch = new_args['nomatch']
if s == '' then
return str._error('Target string is empty')
elseif pattern == '' then
return str._error('Pattern string is empty')
elseif abs(start) < 1 or abs(start) > ulen(s) then
return str._error('Requested start is out of range')
elseif match_index == 0 then
return str._error('Match index is out of range')
elseif plain_flag then
pattern = pattern_escape(pattern)
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start)
end
local iterator = ugmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table, i = {}, 0
for w in iterator do
i = i + 1
result_table[i] = w
end
result = result_table[i + match_index]
end
end
if result ~= nil then
return result
elseif nomatch == nil then
return str._error('Match not found')
end
return nomatch
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string/templates|pos|target_string|index_value}}
OR
{{#invoke:string/templates|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = _getParameters(frame.args, { 'target', 'pos' })
local target_str = new_args['target'] or ''
local pos = tonumber(new_args['pos']) or 0
if pos == 0 or abs(pos) > ulen(target_str) then
return str._error('String index out of range')
end
return usub(target_str, pos, pos)
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = _getParameters(frame.args, { 'source', 'target' })
local source_str = new_args['source'] or ''
local target_str = new_args['target'] or ''
if target_str == '' then
return 1
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string/templates|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string/templates|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = _getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' })
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber(new_args['count'])
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = str._getBoolean(plain)
if plain then
pattern = pattern_escape(pattern)
replace = replacement_escape(replace)
end
return (ugsub(source_str, pattern, replace, count))
end
function str.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
return ulower(frame.args[1] or "")
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string/templates|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return format(fmt, unpack(args))
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame()
local error_category = frame.args.error_category or 'Errors reported by Module String'
local ignore_errors = frame.args.ignore_errors or false
local no_category = frame.args.no_category or false
if str._getBoolean(ignore_errors) then
return ''
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>'
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str
end
return error_str
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_str_type = type(boolean_str)
if boolean_str_type == 'boolean' then
return boolean_str
elseif boolean_str_type ~= "string" then
error('No boolean value found')
end
boolean_str = lower(boolean_str)
return not (
boolean_str == 'false' or
boolean_str == 'no' or
boolean_str == '0' or
boolean_str == ''
)
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
elseif not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
elseif plain then
pattern = pattern_escape(pattern)
end
return select(2, ugsub(text, pattern, ""))
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string/templates").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not match(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local _find = use_basic_Lua_function and find or ufind
return function()
i = i + 1
local return_values = { _find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
function str:__index(k)
self[k] = loader("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
n853kqtu2ux52h9yazck96q57hl6pih
43385
43384
2025-04-05T19:30:13Z
Surjection
380
43385
Scribunto
text/plain
local str = {}
local parameters_module = "Module:parameters"
local patterns_module = "Module:patterns"
local string_utilities_module = "Module:string utilities"
local abs = math.abs
local find = string.find
local format = string.format
local floor = math.floor
local loader = package.loaders[2]
local lower = string.lower
local match = string.match
local rep = string.rep
local require = require
local select = select
local tonumber = tonumber
local type = type
local unpack = unpack
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function pattern_escape(...)
pattern_escape = require(patterns_module).pattern_escape
return pattern_escape(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function replacement_escape(...)
replacement_escape = require(patterns_module).replacement_escape
return replacement_escape(...)
end
local function ufind(...)
ufind = require(string_utilities_module).find
return ufind(...)
end
local function ugmatch(...)
ugmatch = require(string_utilities_module).gmatch
return ugmatch(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function ulen(...)
ulen = require(string_utilities_module).len
return ulen(...)
end
local function ulower(...)
ulower = require(string_utilities_module).lower
return ulower(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local function usub(...)
usub = require(string_utilities_module).sub
return usub(...)
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
local function _getParameters(frame_args, arg_list)
local new_args, i, value = {}, 1
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[i]
i = i + 1
end
new_args[arg] = value
end
return new_args
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string/templates|len|target_string|}}
OR
{{#invoke:string/templates|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
return ulen(_getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
return ulen(ugsub(_getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string/templates|sub|target_string|start_index|end_index}}
OR
{{#invoke:string/templates|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The first index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = _getParameters(frame.args, {"s", "i", "j"})
local s = new_args["s"] or ""
local i = tonumber(new_args["i"]) or 1
local j = tonumber(new_args["j"]) or -1
local s_len = ulen(s)
-- Convert negatives for range checking
if i < 0 then
i = s_len + i + 1
end
if j < 0 then
j = s_len + j + 1
end
if i > s_len or j > s_len then
return str._error('String subset index out of range')
elseif j < i then
return str._error('String subset indices out of order')
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string/templates|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string/templates|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = _getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' })
local s = new_args['s'] or ''
local start = tonumber(new_args['start']) or 1
local plain_flag = str._getBoolean(new_args['plain'] or false)
local pattern = new_args['pattern'] or ''
local match_index = floor(tonumber(new_args['match']) or 1)
local nomatch = new_args['nomatch']
if s == '' then
return str._error('Target string is empty')
elseif pattern == '' then
return str._error('Pattern string is empty')
elseif abs(start) < 1 or abs(start) > ulen(s) then
return str._error('Requested start is out of range')
elseif match_index == 0 then
return str._error('Match index is out of range')
elseif plain_flag then
pattern = pattern_escape(pattern)
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start)
end
local iterator = ugmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table, i = {}, 0
for w in iterator do
i = i + 1
result_table[i] = w
end
result = result_table[i + match_index]
end
end
if result ~= nil then
return result
elseif nomatch == nil then
return str._error('Match not found')
end
return nomatch
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string/templates|pos|target_string|index_value}}
OR
{{#invoke:string/templates|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = _getParameters(frame.args, { 'target', 'pos' })
local target_str = new_args['target'] or ''
local pos = tonumber(new_args['pos']) or 0
if pos == 0 or abs(pos) > ulen(target_str) then
return str._error('String index out of range')
end
return usub(target_str, pos, pos)
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = _getParameters(frame.args, { 'source', 'target' })
local source_str = new_args['source'] or ''
local target_str = new_args['target'] or ''
if target_str == '' then
return 1
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string/templates|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string/templates|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = _getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' })
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber(new_args['count'])
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = str._getBoolean(plain)
if plain then
pattern = pattern_escape(pattern)
replace = replacement_escape(replace)
end
return (ugsub(source_str, pattern, replace, count))
end
function str.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
return ulower(frame.args[1] or "")
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string/templates|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return format(fmt, unpack(args))
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame()
local error_category = frame.args.error_category or 'Errors reported by Module String Templates'
local ignore_errors = frame.args.ignore_errors or false
local no_category = frame.args.no_category or false
if str._getBoolean(ignore_errors) then
return ''
end
local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>'
if error_category ~= '' and not str._getBoolean(no_category) then
error_str = '[[Category:' .. error_category .. ']]' .. error_str
end
return error_str
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_str_type = type(boolean_str)
if boolean_str_type == 'boolean' then
return boolean_str
elseif boolean_str_type ~= "string" then
error('No boolean value found')
end
boolean_str = lower(boolean_str)
return not (
boolean_str == 'false' or
boolean_str == 'no' or
boolean_str == '0' or
boolean_str == ''
)
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
elseif not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
elseif plain then
pattern = pattern_escape(pattern)
end
return select(2, ugsub(text, pattern, ""))
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string/templates").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not match(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local _find = use_basic_Lua_function and find or ufind
return function()
i = i + 1
local return_values = { _find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
function str:__index(k)
self[k] = loader("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
gn89llpyk2u6d5235xb2iwzdp8ywapb
43386
43385
2025-04-08T16:42:30Z
Theknightwho
1347
We don't need a custom error category for this module - it just means errors don't get spotted.
43386
Scribunto
text/plain
local str = {}
local parameters_module = "Module:parameters"
local patterns_module = "Module:patterns"
local string_utilities_module = "Module:string utilities"
local abs = math.abs
local find = string.find
local format = string.format
local floor = math.floor
local loader = package.loaders[2]
local lower = string.lower
local match = string.match
local rep = string.rep
local require = require
local select = select
local tonumber = tonumber
local type = type
local unpack = unpack
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function pattern_escape(...)
pattern_escape = require(patterns_module).pattern_escape
return pattern_escape(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function replacement_escape(...)
replacement_escape = require(patterns_module).replacement_escape
return replacement_escape(...)
end
local function ufind(...)
ufind = require(string_utilities_module).find
return ufind(...)
end
local function ugmatch(...)
ugmatch = require(string_utilities_module).gmatch
return ugmatch(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function ulen(...)
ulen = require(string_utilities_module).len
return ulen(...)
end
local function ulower(...)
ulower = require(string_utilities_module).lower
return ulower(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local function usub(...)
usub = require(string_utilities_module).sub
return usub(...)
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
local function _getParameters(frame_args, arg_list)
local new_args, i, value = {}, 1
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[i]
i = i + 1
end
new_args[arg] = value
end
return new_args
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string/templates|len|target_string|}}
OR
{{#invoke:string/templates|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
return ulen(_getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
return ulen(ugsub(_getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string/templates|sub|target_string|start_index|end_index}}
OR
{{#invoke:string/templates|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The first index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = _getParameters(frame.args, {"s", "i", "j"})
local s = new_args["s"] or ""
local i = tonumber(new_args["i"]) or 1
local j = tonumber(new_args["j"]) or -1
local s_len = ulen(s)
-- Convert negatives for range checking
if i < 0 then
i = s_len + i + 1
end
if j < 0 then
j = s_len + j + 1
end
if i > s_len or j > s_len then
return str._error('String subset index out of range')
elseif j < i then
return str._error('String subset indices out of order')
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string/templates|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string/templates|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = _getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' })
local s = new_args['s'] or ''
local start = tonumber(new_args['start']) or 1
local plain_flag = str._getBoolean(new_args['plain'] or false)
local pattern = new_args['pattern'] or ''
local match_index = floor(tonumber(new_args['match']) or 1)
local nomatch = new_args['nomatch']
if s == '' then
return str._error('Target string is empty')
elseif pattern == '' then
return str._error('Pattern string is empty')
elseif abs(start) < 1 or abs(start) > ulen(s) then
return str._error('Requested start is out of range')
elseif match_index == 0 then
return str._error('Match index is out of range')
elseif plain_flag then
pattern = pattern_escape(pattern)
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start)
end
local iterator = ugmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table, i = {}, 0
for w in iterator do
i = i + 1
result_table[i] = w
end
result = result_table[i + match_index]
end
end
if result ~= nil then
return result
elseif nomatch == nil then
return str._error('Match not found')
end
return nomatch
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string/templates|pos|target_string|index_value}}
OR
{{#invoke:string/templates|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = _getParameters(frame.args, { 'target', 'pos' })
local target_str = new_args['target'] or ''
local pos = tonumber(new_args['pos']) or 0
if pos == 0 or abs(pos) > ulen(target_str) then
return str._error('String index out of range')
end
return usub(target_str, pos, pos)
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = _getParameters(frame.args, { 'source', 'target' })
local source_str = new_args['source'] or ''
local target_str = new_args['target'] or ''
if target_str == '' then
return 1
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string/templates|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string/templates|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = _getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' })
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber(new_args['count'])
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = str._getBoolean(plain)
if plain then
pattern = pattern_escape(pattern)
replace = replacement_escape(replace)
end
return (ugsub(source_str, pattern, replace, count))
end
function str.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
return ulower(frame.args[1] or "")
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string/templates|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return format(fmt, unpack(args))
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame()
local ignore_errors = frame.args.ignore_errors or false
if str._getBoolean(ignore_errors) then
return ''
end
error(error_str)
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_str_type = type(boolean_str)
if boolean_str_type == 'boolean' then
return boolean_str
elseif boolean_str_type ~= "string" then
error('No boolean value found')
end
boolean_str = lower(boolean_str)
return not (
boolean_str == 'false' or
boolean_str == 'no' or
boolean_str == '0' or
boolean_str == ''
)
end
function str.count(text, pattern, plain)
if not (type(text) == "string" or type(text) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
elseif not (type(pattern) == "string" or type(pattern) == "number") then
error('The first argument to the function "count" must be a string or a number, not a ' .. type(text) .. '.')
elseif plain then
pattern = pattern_escape(pattern)
end
return select(2, ugsub(text, pattern, ""))
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string/templates").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not match(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local _find = use_basic_Lua_function and find or ufind
return function()
i = i + 1
local return_values = { _find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
function str:__index(k)
self[k] = loader("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
kyr4jb0cvwuy03dl09ee7ki3iadxvlj
43387
43386
2025-04-08T17:09:38Z
Theknightwho
1347
count() moved to [[Module:string utilities]].
43387
Scribunto
text/plain
local str = {}
local parameters_module = "Module:parameters"
local patterns_module = "Module:patterns"
local string_utilities_module = "Module:string utilities"
local abs = math.abs
local find = string.find
local format = string.format
local floor = math.floor
local loader = package.loaders[2]
local lower = string.lower
local match = string.match
local rep = string.rep
local require = require
local select = select
local tonumber = tonumber
local type = type
local unpack = unpack
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function pattern_escape(...)
pattern_escape = require(patterns_module).pattern_escape
return pattern_escape(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function replacement_escape(...)
replacement_escape = require(patterns_module).replacement_escape
return replacement_escape(...)
end
local function ufind(...)
ufind = require(string_utilities_module).find
return ufind(...)
end
local function ugmatch(...)
ugmatch = require(string_utilities_module).gmatch
return ugmatch(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function ulen(...)
ulen = require(string_utilities_module).len
return ulen(...)
end
local function ulower(...)
ulower = require(string_utilities_module).lower
return ulower(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local function usub(...)
usub = require(string_utilities_module).sub
return usub(...)
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
local function _getParameters(frame_args, arg_list)
local new_args, i, value = {}, 1
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[i]
i = i + 1
end
new_args[arg] = value
end
return new_args
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string/templates|len|target_string|}}
OR
{{#invoke:string/templates|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function str.len(frame)
return ulen(_getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function str.len_visible(frame)
return ulen(ugsub(_getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string/templates|sub|target_string|start_index|end_index}}
OR
{{#invoke:string/templates|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The first index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function str.sub(frame)
local new_args = _getParameters(frame.args, {"s", "i", "j"})
local s = new_args["s"] or ""
local i = tonumber(new_args["i"]) or 1
local j = tonumber(new_args["j"]) or -1
local s_len = ulen(s)
-- Convert negatives for range checking
if i < 0 then
i = s_len + i + 1
end
if j < 0 then
j = s_len + j + 1
end
if i > s_len or j > s_len then
return str._error('String subset index out of range')
elseif j < i then
return str._error('String subset indices out of order')
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function str.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string/templates|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string/templates|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function str.match(frame)
local new_args = _getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' })
local s = new_args['s'] or ''
local start = tonumber(new_args['start']) or 1
local plain_flag = str._getBoolean(new_args['plain'] or false)
local pattern = new_args['pattern'] or ''
local match_index = floor(tonumber(new_args['match']) or 1)
local nomatch = new_args['nomatch']
if s == '' then
return str._error('Target string is empty')
elseif pattern == '' then
return str._error('Pattern string is empty')
elseif abs(start) < 1 or abs(start) > ulen(s) then
return str._error('Requested start is out of range')
elseif match_index == 0 then
return str._error('Match index is out of range')
elseif plain_flag then
pattern = pattern_escape(pattern)
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start)
end
local iterator = ugmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table, i = {}, 0
for w in iterator do
i = i + 1
result_table[i] = w
end
result = result_table[i + match_index]
end
end
if result ~= nil then
return result
elseif nomatch == nil then
return str._error('Match not found')
end
return nomatch
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string/templates|pos|target_string|index_value}}
OR
{{#invoke:string/templates|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function str.pos(frame)
local new_args = _getParameters(frame.args, { 'target', 'pos' })
local target_str = new_args['target'] or ''
local pos = tonumber(new_args['pos']) or 0
if pos == 0 or abs(pos) > ulen(target_str) then
return str._error('String index out of range')
end
return usub(target_str, pos, pos)
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function str.str_find(frame)
local new_args = _getParameters(frame.args, { 'source', 'target' })
local source_str = new_args['source'] or ''
local target_str = new_args['target'] or ''
if target_str == '' then
return 1
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string/templates|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function str.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string/templates|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function str.replace(frame)
local new_args = _getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' })
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber(new_args['count'])
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = str._getBoolean(plain)
if plain then
pattern = pattern_escape(pattern)
replace = replacement_escape(replace)
end
return (ugsub(source_str, pattern, replace, count))
end
function str.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function str.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return str._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return rep(frame.args[1] or '', repetitions)
end
function str.lower(frame)
return ulower(frame.args[1] or "")
end
str.lc = str.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
str.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string/templates|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function str.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return format(fmt, unpack(args))
end
--[[
Helper function to handle error messages.
]]
function str._error(error_str)
local frame = mw.getCurrentFrame()
local ignore_errors = frame.args.ignore_errors or false
if str._getBoolean(ignore_errors) then
return ''
end
error(error_str)
end
--[[
Helper Function to interpret boolean strings
]]
function str._getBoolean(boolean_str)
local boolean_str_type = type(boolean_str)
if boolean_str_type == 'boolean' then
return boolean_str
elseif boolean_str_type ~= "string" then
error('No boolean value found')
end
boolean_str = lower(boolean_str)
return not (
boolean_str == 'false' or
boolean_str == 'no' or
boolean_str == '0' or
boolean_str == ''
)
end
function str.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string/templates").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function str.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not match(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local _find = use_basic_Lua_function and find or ufind
return function()
i = i + 1
local return_values = { _find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function str.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
function str:__index(k)
self[k] = loader("Module:string/" .. k)()
return self[k]
end
return setmetatable(str, str)
6irw7u9r8eddj8i61nwzfewzuudt3mp
43388
43387
2025-04-08T17:17:18Z
Theknightwho
1347
Remove subpage calling, as this module is now dedicated to template calls.
43388
Scribunto
text/plain
local export = {}
local parameters_module = "Module:parameters"
local patterns_module = "Module:patterns"
local string_utilities_module = "Module:string utilities"
local abs = math.abs
local find = string.find
local format = string.format
local floor = math.floor
local lower = string.lower
local match = string.match
local rep = string.rep
local require = require
local tonumber = tonumber
local type = type
local unpack = unpack
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function pattern_escape(...)
pattern_escape = require(patterns_module).pattern_escape
return pattern_escape(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function replacement_escape(...)
replacement_escape = require(patterns_module).replacement_escape
return replacement_escape(...)
end
local function ufind(...)
ufind = require(string_utilities_module).find
return ufind(...)
end
local function ugmatch(...)
ugmatch = require(string_utilities_module).gmatch
return ugmatch(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function ulen(...)
ulen = require(string_utilities_module).len
return ulen(...)
end
local function ulower(...)
ulower = require(string_utilities_module).lower
return ulower(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local function usub(...)
usub = require(string_utilities_module).sub
return usub(...)
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
local function _getParameters(frame_args, arg_list)
local new_args, i, value = {}, 1
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[i]
i = i + 1
end
new_args[arg] = value
end
return new_args
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string/templates|len|target_string|}}
OR
{{#invoke:string/templates|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function export.len(frame)
return ulen(_getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function export.len_visible(frame)
return ulen(ugsub(_getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string/templates|sub|target_string|start_index|end_index}}
OR
{{#invoke:string/templates|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The first index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function export.sub(frame)
local new_args = _getParameters(frame.args, {"s", "i", "j"})
local s = new_args["s"] or ""
local i = tonumber(new_args["i"]) or 1
local j = tonumber(new_args["j"]) or -1
local s_len = ulen(s)
-- Convert negatives for range checking
if i < 0 then
i = s_len + i + 1
end
if j < 0 then
j = s_len + j + 1
end
if i > s_len or j > s_len then
return export._error('String subset index out of range')
elseif j < i then
return export._error('String subset indices out of order')
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function export.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string/templates|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string/templates|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function export.match(frame)
local new_args = _getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' })
local s = new_args['s'] or ''
local start = tonumber(new_args['start']) or 1
local plain_flag = export._getBoolean(new_args['plain'] or false)
local pattern = new_args['pattern'] or ''
local match_index = floor(tonumber(new_args['match']) or 1)
local nomatch = new_args['nomatch']
if s == '' then
return export._error('Target string is empty')
elseif pattern == '' then
return export._error('Pattern string is empty')
elseif abs(start) < 1 or abs(start) > ulen(s) then
return export._error('Requested start is out of range')
elseif match_index == 0 then
return export._error('Match index is out of range')
elseif plain_flag then
pattern = pattern_escape(pattern)
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start)
end
local iterator = ugmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table, i = {}, 0
for w in iterator do
i = i + 1
result_table[i] = w
end
result = result_table[i + match_index]
end
end
if result ~= nil then
return result
elseif nomatch == nil then
return export._error('Match not found')
end
return nomatch
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string/templates|pos|target_string|index_value}}
OR
{{#invoke:string/templates|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function export.pos(frame)
local new_args = _getParameters(frame.args, { 'target', 'pos' })
local target_str = new_args['target'] or ''
local pos = tonumber(new_args['pos']) or 0
if pos == 0 or abs(pos) > ulen(target_str) then
return export._error('String index out of range')
end
return usub(target_str, pos, pos)
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function export.str_find(frame)
local new_args = _getParameters(frame.args, { 'source', 'target' })
local source_str = new_args['source'] or ''
local target_str = new_args['target'] or ''
if target_str == '' then
return 1
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string/templates|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function export.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string/templates|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function export.replace(frame)
local new_args = _getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' })
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber(new_args['count'])
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = export._getBoolean(plain)
if plain then
pattern = pattern_escape(pattern)
replace = replacement_escape(replace)
end
return (ugsub(source_str, pattern, replace, count))
end
function export.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function export.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return export._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return rep(frame.args[1] or '', repetitions)
end
function export.lower(frame)
return ulower(frame.args[1] or "")
end
export.lc = export.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
export.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string/templates|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function export.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return format(fmt, unpack(args))
end
--[[
Helper function to handle error messages.
]]
function export._error(error_str)
local frame = mw.getCurrentFrame()
local ignore_errors = frame.args.ignore_errors or false
if export._getBoolean(ignore_errors) then
return ''
end
error(error_str)
end
--[[
Helper Function to interpret boolean strings
]]
function export._getBoolean(boolean_str)
local boolean_str_type = type(boolean_str)
if boolean_str_type == 'boolean' then
return boolean_str
elseif boolean_str_type ~= "string" then
error('No boolean value found')
end
boolean_str = lower(boolean_str)
return not (
boolean_str == 'false' or
boolean_str == 'no' or
boolean_str == '0' or
boolean_str == ''
)
end
function export.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string/templates").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function export.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not match(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local _find = use_basic_Lua_function and find or ufind
return function()
i = i + 1
local return_values = { _find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function export.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
return export
e1b6pj5oiqhw2kzmbii338aeh2f79yx
43389
43388
2025-04-09T01:20:48Z
Theknightwho
1347
It's fine for the index to be out of range - this is normal and expected.
43389
Scribunto
text/plain
local export = {}
local parameters_module = "Module:parameters"
local patterns_module = "Module:patterns"
local string_utilities_module = "Module:string utilities"
local abs = math.abs
local find = string.find
local format = string.format
local floor = math.floor
local lower = string.lower
local match = string.match
local rep = string.rep
local require = require
local tonumber = tonumber
local type = type
local unpack = unpack
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function pattern_escape(...)
pattern_escape = require(patterns_module).pattern_escape
return pattern_escape(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function replacement_escape(...)
replacement_escape = require(patterns_module).replacement_escape
return replacement_escape(...)
end
local function ufind(...)
ufind = require(string_utilities_module).find
return ufind(...)
end
local function ugmatch(...)
ugmatch = require(string_utilities_module).gmatch
return ugmatch(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function ulen(...)
ulen = require(string_utilities_module).len
return ulen(...)
end
local function ulower(...)
ulower = require(string_utilities_module).lower
return ulower(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local function usub(...)
usub = require(string_utilities_module).sub
return usub(...)
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
local function _getParameters(frame_args, arg_list)
local new_args, i, value = {}, 1
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[i]
i = i + 1
end
new_args[arg] = value
end
return new_args
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string/templates|len|target_string|}}
OR
{{#invoke:string/templates|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function export.len(frame)
return ulen(_getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function export.len_visible(frame)
return ulen(ugsub(_getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string/templates|sub|target_string|start_index|end_index}}
OR
{{#invoke:string/templates|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The first index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function export.sub(frame)
local new_args = _getParameters(frame.args, {"s", "i", "j"})
local s = new_args["s"] or ""
local i = tonumber(new_args["i"]) or 1
local j = tonumber(new_args["j"]) or -1
local s_len = ulen(s)
-- Convert negatives for range checking
if i < 0 then
i = s_len + i + 1
end
if j < 0 then
j = s_len + j + 1
end
if j < i then
return export._error('String subset indices out of order')
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function export.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string/templates|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string/templates|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function export.match(frame)
local new_args = _getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' })
local s = new_args['s'] or ''
local start = tonumber(new_args['start']) or 1
local plain_flag = export._getBoolean(new_args['plain'] or false)
local pattern = new_args['pattern'] or ''
local match_index = floor(tonumber(new_args['match']) or 1)
local nomatch = new_args['nomatch']
if s == '' then
return export._error('Target string is empty')
elseif pattern == '' then
return export._error('Pattern string is empty')
elseif abs(start) < 1 or abs(start) > ulen(s) then
return export._error('Requested start is out of range')
elseif match_index == 0 then
return export._error('Match index is out of range')
elseif plain_flag then
pattern = pattern_escape(pattern)
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start)
end
local iterator = ugmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table, i = {}, 0
for w in iterator do
i = i + 1
result_table[i] = w
end
result = result_table[i + match_index]
end
end
if result ~= nil then
return result
elseif nomatch == nil then
return export._error('Match not found')
end
return nomatch
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string/templates|pos|target_string|index_value}}
OR
{{#invoke:string/templates|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function export.pos(frame)
local new_args = _getParameters(frame.args, { 'target', 'pos' })
local target_str = new_args['target'] or ''
local pos = tonumber(new_args['pos']) or 0
if pos == 0 or abs(pos) > ulen(target_str) then
return export._error('String index out of range')
end
return usub(target_str, pos, pos)
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function export.str_find(frame)
local new_args = _getParameters(frame.args, { 'source', 'target' })
local source_str = new_args['source'] or ''
local target_str = new_args['target'] or ''
if target_str == '' then
return 1
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string/templates|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function export.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string/templates|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function export.replace(frame)
local new_args = _getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' })
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber(new_args['count'])
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = export._getBoolean(plain)
if plain then
pattern = pattern_escape(pattern)
replace = replacement_escape(replace)
end
return (ugsub(source_str, pattern, replace, count))
end
function export.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function export.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return export._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return rep(frame.args[1] or '', repetitions)
end
function export.lower(frame)
return ulower(frame.args[1] or "")
end
export.lc = export.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
export.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string/templates|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function export.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return format(fmt, unpack(args))
end
--[[
Helper function to handle error messages.
]]
function export._error(error_str)
local frame = mw.getCurrentFrame()
local ignore_errors = frame.args.ignore_errors or false
if export._getBoolean(ignore_errors) then
return ''
end
error(error_str)
end
--[[
Helper Function to interpret boolean strings
]]
function export._getBoolean(boolean_str)
local boolean_str_type = type(boolean_str)
if boolean_str_type == 'boolean' then
return boolean_str
elseif boolean_str_type ~= "string" then
error('No boolean value found')
end
boolean_str = lower(boolean_str)
return not (
boolean_str == 'false' or
boolean_str == 'no' or
boolean_str == '0' or
boolean_str == ''
)
end
function export.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string/templates").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function export.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not match(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local _find = use_basic_Lua_function and find or ufind
return function()
i = i + 1
local return_values = { _find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function export.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
return export
g5unx43oam6sbl2mfadjhs7xpgwck5p
43390
43389
2025-04-09T01:24:08Z
Theknightwho
1347
Same for the indices being in the "wrong order" as well - this is common when one is positive and one is negative, with a short string. Again - not error-worthy.
43390
Scribunto
text/plain
local export = {}
local parameters_module = "Module:parameters"
local patterns_module = "Module:patterns"
local string_utilities_module = "Module:string utilities"
local abs = math.abs
local find = string.find
local format = string.format
local floor = math.floor
local lower = string.lower
local match = string.match
local rep = string.rep
local require = require
local tonumber = tonumber
local type = type
local unpack = unpack
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function pattern_escape(...)
pattern_escape = require(patterns_module).pattern_escape
return pattern_escape(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function replacement_escape(...)
replacement_escape = require(patterns_module).replacement_escape
return replacement_escape(...)
end
local function ufind(...)
ufind = require(string_utilities_module).find
return ufind(...)
end
local function ugmatch(...)
ugmatch = require(string_utilities_module).gmatch
return ugmatch(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function ulen(...)
ulen = require(string_utilities_module).len
return ulen(...)
end
local function ulower(...)
ulower = require(string_utilities_module).lower
return ulower(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local function usub(...)
usub = require(string_utilities_module).sub
return usub(...)
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
local function _getParameters(frame_args, arg_list)
local new_args, i, value = {}, 1
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[i]
i = i + 1
end
new_args[arg] = value
end
return new_args
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string/templates|len|target_string|}}
OR
{{#invoke:string/templates|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function export.len(frame)
return ulen(_getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function export.len_visible(frame)
return ulen(ugsub(_getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string/templates|sub|target_string|start_index|end_index}}
OR
{{#invoke:string/templates|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The first index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function export.sub(frame)
local new_args = _getParameters(frame.args, {"s", "i", "j"})
local s = new_args["s"] or ""
local i = tonumber(new_args["i"]) or 1
local j = tonumber(new_args["j"]) or -1
local s_len = ulen(s)
-- Convert negatives for range checking.
if i < 0 then
i = s_len + i + 1
end
if j < 0 then
j = s_len + j + 1
end
if j < i then
return export._error('String subset indices out of order')
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function export.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string/templates|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string/templates|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function export.match(frame)
local new_args = _getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' })
local s = new_args['s'] or ''
local start = tonumber(new_args['start']) or 1
local plain_flag = export._getBoolean(new_args['plain'] or false)
local pattern = new_args['pattern'] or ''
local match_index = floor(tonumber(new_args['match']) or 1)
local nomatch = new_args['nomatch']
if s == '' then
return export._error('Target string is empty')
elseif pattern == '' then
return export._error('Pattern string is empty')
elseif abs(start) < 1 or abs(start) > ulen(s) then
return export._error('Requested start is out of range')
elseif match_index == 0 then
return export._error('Match index is out of range')
elseif plain_flag then
pattern = pattern_escape(pattern)
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start)
end
local iterator = ugmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table, i = {}, 0
for w in iterator do
i = i + 1
result_table[i] = w
end
result = result_table[i + match_index]
end
end
if result ~= nil then
return result
elseif nomatch == nil then
return export._error('Match not found')
end
return nomatch
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string/templates|pos|target_string|index_value}}
OR
{{#invoke:string/templates|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function export.pos(frame)
local new_args = _getParameters(frame.args, { 'target', 'pos' })
local target_str = new_args['target'] or ''
local pos = tonumber(new_args['pos']) or 0
if pos == 0 or abs(pos) > ulen(target_str) then
return export._error('String index out of range')
end
return usub(target_str, pos, pos)
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function export.str_find(frame)
local new_args = _getParameters(frame.args, { 'source', 'target' })
local source_str = new_args['source'] or ''
local target_str = new_args['target'] or ''
if target_str == '' then
return 1
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string/templates|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function export.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string/templates|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function export.replace(frame)
local new_args = _getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' })
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber(new_args['count'])
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = export._getBoolean(plain)
if plain then
pattern = pattern_escape(pattern)
replace = replacement_escape(replace)
end
return (ugsub(source_str, pattern, replace, count))
end
function export.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function export.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return export._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return rep(frame.args[1] or '', repetitions)
end
function export.lower(frame)
return ulower(frame.args[1] or "")
end
export.lc = export.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
export.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string/templates|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function export.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return format(fmt, unpack(args))
end
--[[
Helper function to handle error messages.
]]
function export._error(error_str)
local frame = mw.getCurrentFrame()
local ignore_errors = frame.args.ignore_errors or false
if export._getBoolean(ignore_errors) then
return ''
end
error(error_str)
end
--[[
Helper Function to interpret boolean strings
]]
function export._getBoolean(boolean_str)
local boolean_str_type = type(boolean_str)
if boolean_str_type == 'boolean' then
return boolean_str
elseif boolean_str_type ~= "string" then
error('No boolean value found')
end
boolean_str = lower(boolean_str)
return not (
boolean_str == 'false' or
boolean_str == 'no' or
boolean_str == '0' or
boolean_str == ''
)
end
function export.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string/templates").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function export.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not match(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local _find = use_basic_Lua_function and find or ufind
return function()
i = i + 1
local return_values = { _find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function export.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
return export
3jq7ag5bleixmcdj0mo79fy7em7f1lf
43391
43390
2025-04-09T01:27:01Z
Theknightwho
1347
43391
Scribunto
text/plain
local export = {}
local parameters_module = "Module:parameters"
local patterns_module = "Module:patterns"
local string_utilities_module = "Module:string utilities"
local abs = math.abs
local find = string.find
local format = string.format
local floor = math.floor
local lower = string.lower
local match = string.match
local rep = string.rep
local require = require
local tonumber = tonumber
local type = type
local unpack = unpack
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function pattern_escape(...)
pattern_escape = require(patterns_module).pattern_escape
return pattern_escape(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function replacement_escape(...)
replacement_escape = require(patterns_module).replacement_escape
return replacement_escape(...)
end
local function ufind(...)
ufind = require(string_utilities_module).find
return ufind(...)
end
local function ugmatch(...)
ugmatch = require(string_utilities_module).gmatch
return ugmatch(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function ulen(...)
ulen = require(string_utilities_module).len
return ulen(...)
end
local function ulower(...)
ulower = require(string_utilities_module).lower
return ulower(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local function usub(...)
usub = require(string_utilities_module).sub
return usub(...)
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
local function _getParameters(frame_args, arg_list)
local new_args, i, value = {}, 1
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[i]
i = i + 1
end
new_args[arg] = value
end
return new_args
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string/templates|len|target_string|}}
OR
{{#invoke:string/templates|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function export.len(frame)
return ulen(_getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function export.len_visible(frame)
return ulen(ugsub(_getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string/templates|sub|target_string|start_index|end_index}}
OR
{{#invoke:string/templates|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The first index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function export.sub(frame)
local new_args = _getParameters(frame.args, {"s", "i", "j"})
local s = new_args["s"] or ""
local i, j = new_args["i"], new_args["j"]
if i then
i = tonumber(i)
end
if j then
j = tonumber(j)
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function export.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string/templates|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string/templates|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function export.match(frame)
local new_args = _getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' })
local s = new_args['s'] or ''
local start = tonumber(new_args['start']) or 1
local plain_flag = export._getBoolean(new_args['plain'] or false)
local pattern = new_args['pattern'] or ''
local match_index = floor(tonumber(new_args['match']) or 1)
local nomatch = new_args['nomatch']
if s == '' then
return export._error('Target string is empty')
elseif pattern == '' then
return export._error('Pattern string is empty')
elseif abs(start) < 1 or abs(start) > ulen(s) then
return export._error('Requested start is out of range')
elseif match_index == 0 then
return export._error('Match index is out of range')
elseif plain_flag then
pattern = pattern_escape(pattern)
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start)
end
local iterator = ugmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table, i = {}, 0
for w in iterator do
i = i + 1
result_table[i] = w
end
result = result_table[i + match_index]
end
end
if result ~= nil then
return result
elseif nomatch == nil then
return export._error('Match not found')
end
return nomatch
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string/templates|pos|target_string|index_value}}
OR
{{#invoke:string/templates|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function export.pos(frame)
local new_args = _getParameters(frame.args, { 'target', 'pos' })
local target_str = new_args['target'] or ''
local pos = tonumber(new_args['pos']) or 0
if pos == 0 or abs(pos) > ulen(target_str) then
return export._error('String index out of range')
end
return usub(target_str, pos, pos)
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function export.str_find(frame)
local new_args = _getParameters(frame.args, { 'source', 'target' })
local source_str = new_args['source'] or ''
local target_str = new_args['target'] or ''
if target_str == '' then
return 1
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string/templates|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function export.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string/templates|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function export.replace(frame)
local new_args = _getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' })
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber(new_args['count'])
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = export._getBoolean(plain)
if plain then
pattern = pattern_escape(pattern)
replace = replacement_escape(replace)
end
return (ugsub(source_str, pattern, replace, count))
end
function export.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function export.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return export._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return rep(frame.args[1] or '', repetitions)
end
function export.lower(frame)
return ulower(frame.args[1] or "")
end
export.lc = export.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
export.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string/templates|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function export.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return format(fmt, unpack(args))
end
--[[
Helper function to handle error messages.
]]
function export._error(error_str)
local frame = mw.getCurrentFrame()
local ignore_errors = frame.args.ignore_errors or false
if export._getBoolean(ignore_errors) then
return ''
end
error(error_str)
end
--[[
Helper Function to interpret boolean strings
]]
function export._getBoolean(boolean_str)
local boolean_str_type = type(boolean_str)
if boolean_str_type == 'boolean' then
return boolean_str
elseif boolean_str_type ~= "string" then
error('No boolean value found')
end
boolean_str = lower(boolean_str)
return not (
boolean_str == 'false' or
boolean_str == 'no' or
boolean_str == '0' or
boolean_str == ''
)
end
function export.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string/templates").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function export.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not match(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local _find = use_basic_Lua_function and find or ufind
return function()
i = i + 1
local return_values = { _find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function export.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
return export
kk500u7nfoh1b33tle04u0ze4wfbbwt
43392
43391
2025-04-09T09:29:07Z
Benwing2
1346
[[User:Theknightwho]] disable errors on out-of-range pos; instead, log and track it
43392
Scribunto
text/plain
local export = {}
local parameters_module = "Module:parameters"
local patterns_module = "Module:patterns"
local string_utilities_module = "Module:string utilities"
local abs = math.abs
local find = string.find
local format = string.format
local floor = math.floor
local lower = string.lower
local match = string.match
local rep = string.rep
local require = require
local tonumber = tonumber
local type = type
local unpack = unpack
local dump = mw.dumpObject
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function pattern_escape(...)
pattern_escape = require(patterns_module).pattern_escape
return pattern_escape(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function replacement_escape(...)
replacement_escape = require(patterns_module).replacement_escape
return replacement_escape(...)
end
local function ufind(...)
ufind = require(string_utilities_module).find
return ufind(...)
end
local function ugmatch(...)
ugmatch = require(string_utilities_module).gmatch
return ugmatch(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function ulen(...)
ulen = require(string_utilities_module).len
return ulen(...)
end
local function ulower(...)
ulower = require(string_utilities_module).lower
return ulower(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local function usub(...)
usub = require(string_utilities_module).sub
return usub(...)
end
local function track(page)
return require("Module:debug/track")("string/templates/" .. page)
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
local function _getParameters(frame_args, arg_list)
local new_args, i, value = {}, 1
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[i]
i = i + 1
end
new_args[arg] = value
end
return new_args
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string/templates|len|target_string|}}
OR
{{#invoke:string/templates|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function export.len(frame)
return ulen(_getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function export.len_visible(frame)
return ulen(ugsub(_getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string/templates|sub|target_string|start_index|end_index}}
OR
{{#invoke:string/templates|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The first index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function export.sub(frame)
local new_args = _getParameters(frame.args, {"s", "i", "j"})
local s = new_args["s"] or ""
local i, j = new_args["i"], new_args["j"]
if i then
i = tonumber(i)
end
if j then
j = tonumber(j)
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function export.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string/templates|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string/templates|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function export.match(frame)
local new_args = _getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' })
local s = new_args['s'] or ''
local start = tonumber(new_args['start']) or 1
local plain_flag = export._getBoolean(new_args['plain'] or false)
local pattern = new_args['pattern'] or ''
local match_index = floor(tonumber(new_args['match']) or 1)
local nomatch = new_args['nomatch']
if s == '' then
return export._error('Target string is empty')
elseif pattern == '' then
return export._error('Pattern string is empty')
elseif abs(start) < 1 or abs(start) > ulen(s) then
return export._error('Requested start is out of range')
elseif match_index == 0 then
return export._error('Match index is out of range')
elseif plain_flag then
pattern = pattern_escape(pattern)
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start)
end
local iterator = ugmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table, i = {}, 0
for w in iterator do
i = i + 1
result_table[i] = w
end
result = result_table[i + match_index]
end
end
if result ~= nil then
return result
elseif nomatch == nil then
return export._error('Match not found')
end
return nomatch
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string/templates|pos|target_string|index_value}}
OR
{{#invoke:string/templates|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function export.pos(frame)
local new_args = _getParameters(frame.args, { 'target', 'pos' })
local target_str = new_args['target'] or ''
local pos = tonumber(new_args['pos']) or 0
if pos == 0 or abs(pos) > ulen(target_str) then
mw.log(("String index %s from original %s out of range: should be in range [1,%s]"):format(
dump(pos), dump(new_args['pos']), dump(ulen(target_str))))
track("string-index-out-of-range")
-- return export._error('String index out of range')
end
return usub(target_str, pos, pos)
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function export.str_find(frame)
local new_args = _getParameters(frame.args, { 'source', 'target' })
local source_str = new_args['source'] or ''
local target_str = new_args['target'] or ''
if target_str == '' then
return 1
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string/templates|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function export.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string/templates|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function export.replace(frame)
local new_args = _getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' })
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber(new_args['count'])
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = export._getBoolean(plain)
if plain then
pattern = pattern_escape(pattern)
replace = replacement_escape(replace)
end
return (ugsub(source_str, pattern, replace, count))
end
function export.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function export.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return export._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return rep(frame.args[1] or '', repetitions)
end
function export.lower(frame)
return ulower(frame.args[1] or "")
end
export.lc = export.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
export.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string/templates|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function export.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return format(fmt, unpack(args))
end
--[[
Helper function to handle error messages.
]]
function export._error(error_str)
local frame = mw.getCurrentFrame()
local ignore_errors = frame.args.ignore_errors or false
if export._getBoolean(ignore_errors) then
return ''
end
error(error_str)
end
--[[
Helper Function to interpret boolean strings
]]
function export._getBoolean(boolean_str)
local boolean_str_type = type(boolean_str)
if boolean_str_type == 'boolean' then
return boolean_str
elseif boolean_str_type ~= "string" then
error('No boolean value found')
end
boolean_str = lower(boolean_str)
return not (
boolean_str == 'false' or
boolean_str == 'no' or
boolean_str == '0' or
boolean_str == ''
)
end
function export.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string/templates").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function export.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not match(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local _find = use_basic_Lua_function and find or ufind
return function()
i = i + 1
local return_values = { _find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function export.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
return export
5duxv0yei0gsbpzyay7gaxrdrida0x5
43393
43392
2025-04-10T05:12:38Z
Theknightwho
1347
Make match() less trigger-happy with errors.
43393
Scribunto
text/plain
local export = {}
local parameters_module = "Module:parameters"
local patterns_module = "Module:patterns"
local string_utilities_module = "Module:string utilities"
local abs = math.abs
local find = string.find
local format = string.format
local floor = math.floor
local lower = string.lower
local match = string.match
local rep = string.rep
local require = require
local tonumber = tonumber
local type = type
local unpack = unpack
local dump = mw.dumpObject
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function pattern_escape(...)
pattern_escape = require(patterns_module).pattern_escape
return pattern_escape(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function replacement_escape(...)
replacement_escape = require(patterns_module).replacement_escape
return replacement_escape(...)
end
local function ufind(...)
ufind = require(string_utilities_module).find
return ufind(...)
end
local function ugmatch(...)
ugmatch = require(string_utilities_module).gmatch
return ugmatch(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function ulen(...)
ulen = require(string_utilities_module).len
return ulen(...)
end
local function ulower(...)
ulower = require(string_utilities_module).lower
return ulower(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local function usub(...)
usub = require(string_utilities_module).sub
return usub(...)
end
local function track(page)
return require("Module:debug/track")("string/templates/" .. page)
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
local function _getParameters(frame_args, arg_list)
local new_args, i, value = {}, 1
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[i]
i = i + 1
end
new_args[arg] = value
end
return new_args
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string/templates|len|target_string|}}
OR
{{#invoke:string/templates|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function export.len(frame)
return ulen(_getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function export.len_visible(frame)
return ulen(ugsub(_getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string/templates|sub|target_string|start_index|end_index}}
OR
{{#invoke:string/templates|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The first index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function export.sub(frame)
local new_args = _getParameters(frame.args, {"s", "i", "j"})
local s = new_args["s"] or ""
local i, j = new_args["i"], new_args["j"]
if i then
i = tonumber(i)
end
if j then
j = tonumber(j)
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function export.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string/templates|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string/templates|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function export.match(frame)
local new_args = _getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' })
local s = new_args['s'] or ''
local start = tonumber(new_args['start']) or 1
local plain_flag = export._getBoolean(new_args['plain'] or false)
local pattern = new_args['pattern'] or ''
local match_index = floor(tonumber(new_args['match']) or 1)
local nomatch = new_args['nomatch']
if pattern == "" then
return export._error('Pattern string is empty')
elseif match_index == 0 or abs(start) > ulen(s) then
return nomatch or ""
elseif plain_flag then
pattern = pattern_escape(pattern)
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start)
end
local iterator = ugmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table, i = {}, 0
for w in iterator do
i = i + 1
result_table[i] = w
end
result = result_table[i + match_index]
end
end
return result or nomatch or ""
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string/templates|pos|target_string|index_value}}
OR
{{#invoke:string/templates|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function export.pos(frame)
local new_args = _getParameters(frame.args, { 'target', 'pos' })
local target_str = new_args['target'] or ''
local pos = tonumber(new_args['pos']) or 0
if pos == 0 or abs(pos) > ulen(target_str) then
mw.log(("String index %s from original %s out of range: should be in range [1,%s]"):format(
dump(pos), dump(new_args['pos']), dump(ulen(target_str))))
track("string-index-out-of-range")
-- return export._error('String index out of range')
end
return usub(target_str, pos, pos)
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function export.str_find(frame)
local new_args = _getParameters(frame.args, { 'source', 'target' })
local source_str = new_args['source'] or ''
local target_str = new_args['target'] or ''
if target_str == '' then
return 1
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string/templates|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function export.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string/templates|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function export.replace(frame)
local new_args = _getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' })
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber(new_args['count'])
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = export._getBoolean(plain)
if plain then
pattern = pattern_escape(pattern)
replace = replacement_escape(replace)
end
return (ugsub(source_str, pattern, replace, count))
end
function export.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function export.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return export._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return rep(frame.args[1] or '', repetitions)
end
function export.lower(frame)
return ulower(frame.args[1] or "")
end
export.lc = export.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
export.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string/templates|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function export.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return format(fmt, unpack(args))
end
--[[
Helper function to handle error messages.
]]
function export._error(error_str)
local frame = mw.getCurrentFrame()
local ignore_errors = frame.args.ignore_errors or false
if export._getBoolean(ignore_errors) then
return ''
end
error(error_str)
end
--[[
Helper Function to interpret boolean strings
]]
function export._getBoolean(boolean_str)
local boolean_str_type = type(boolean_str)
if boolean_str_type == 'boolean' then
return boolean_str
elseif boolean_str_type ~= "string" then
error('No boolean value found')
end
boolean_str = lower(boolean_str)
return not (
boolean_str == 'false' or
boolean_str == 'no' or
boolean_str == '0' or
boolean_str == ''
)
end
function export.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string/templates").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function export.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not match(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local _find = use_basic_Lua_function and find or ufind
return function()
i = i + 1
local return_values = { _find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function export.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
return export
avlxzrta0bxny4ym5vvzq44fem2zq0g
43394
43393
2025-04-24T09:49:39Z
Surjection
380
43394
Scribunto
text/plain
local export = {}
local parameters_module = "Module:parameters"
local patterns_module = "Module:patterns"
local string_utilities_module = "Module:string utilities"
local abs = math.abs
local find = string.find
local format = string.format
local floor = math.floor
local lower = string.lower
local match = string.match
local rep = string.rep
local require = require
local tonumber = tonumber
local type = type
local unpack = table.unpack or unpack -- Lua 5.2 compatibility
local dump = mw.dumpObject
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function pattern_escape(...)
pattern_escape = require(patterns_module).pattern_escape
return pattern_escape(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function replacement_escape(...)
replacement_escape = require(patterns_module).replacement_escape
return replacement_escape(...)
end
local function ufind(...)
ufind = require(string_utilities_module).find
return ufind(...)
end
local function ugmatch(...)
ugmatch = require(string_utilities_module).gmatch
return ugmatch(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function ulen(...)
ulen = require(string_utilities_module).len
return ulen(...)
end
local function ulower(...)
ulower = require(string_utilities_module).lower
return ulower(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local function usub(...)
usub = require(string_utilities_module).sub
return usub(...)
end
local function track(page)
return require("Module:debug/track")("string/templates/" .. page)
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
local function _getParameters(frame_args, arg_list)
local new_args, i, value = {}, 1
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[i]
i = i + 1
end
new_args[arg] = value
end
return new_args
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string/templates|len|target_string|}}
OR
{{#invoke:string/templates|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function export.len(frame)
return ulen(_getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function export.len_visible(frame)
return ulen(ugsub(_getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string/templates|sub|target_string|start_index|end_index}}
OR
{{#invoke:string/templates|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The first index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function export.sub(frame)
local new_args = _getParameters(frame.args, {"s", "i", "j"})
local s = new_args["s"] or ""
local i, j = new_args["i"], new_args["j"]
if i then
i = tonumber(i)
end
if j then
j = tonumber(j)
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function export.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string/templates|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string/templates|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function export.match(frame)
local new_args = _getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' })
local s = new_args['s'] or ''
local start = tonumber(new_args['start']) or 1
local plain_flag = export._getBoolean(new_args['plain'] or false)
local pattern = new_args['pattern'] or ''
local match_index = floor(tonumber(new_args['match']) or 1)
local nomatch = new_args['nomatch']
if pattern == "" then
return export._error('Pattern string is empty')
elseif match_index == 0 or abs(start) > ulen(s) then
return nomatch or ""
elseif plain_flag then
pattern = pattern_escape(pattern)
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start)
end
local iterator = ugmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table, i = {}, 0
for w in iterator do
i = i + 1
result_table[i] = w
end
result = result_table[i + match_index]
end
end
return result or nomatch or ""
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string/templates|pos|target_string|index_value}}
OR
{{#invoke:string/templates|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function export.pos(frame)
local new_args = _getParameters(frame.args, { 'target', 'pos' })
local target_str = new_args['target'] or ''
local pos = tonumber(new_args['pos']) or 0
if pos == 0 or abs(pos) > ulen(target_str) then
mw.log(("String index %s from original %s out of range: should be in range [1,%s]"):format(
dump(pos), dump(new_args['pos']), dump(ulen(target_str))))
track("string-index-out-of-range")
-- return export._error('String index out of range')
end
return usub(target_str, pos, pos)
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function export.str_find(frame)
local new_args = _getParameters(frame.args, { 'source', 'target' })
local source_str = new_args['source'] or ''
local target_str = new_args['target'] or ''
if target_str == '' then
return 1
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string/templates|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function export.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string/templates|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function export.replace(frame)
local new_args = _getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' })
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber(new_args['count'])
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = export._getBoolean(plain)
if plain then
pattern = pattern_escape(pattern)
replace = replacement_escape(replace)
end
return (ugsub(source_str, pattern, replace, count))
end
function export.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function export.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return export._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return rep(frame.args[1] or '', repetitions)
end
function export.lower(frame)
return ulower(frame.args[1] or "")
end
export.lc = export.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
export.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string/templates|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function export.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return format(fmt, unpack(args))
end
--[[
Helper function to handle error messages.
]]
function export._error(error_str)
local frame = mw.getCurrentFrame()
local ignore_errors = frame.args.ignore_errors or false
if export._getBoolean(ignore_errors) then
return ''
end
error(error_str)
end
--[[
Helper Function to interpret boolean strings
]]
function export._getBoolean(boolean_str)
local boolean_str_type = type(boolean_str)
if boolean_str_type == 'boolean' then
return boolean_str
elseif boolean_str_type ~= "string" then
error('No boolean value found')
end
boolean_str = lower(boolean_str)
return not (
boolean_str == 'false' or
boolean_str == 'no' or
boolean_str == '0' or
boolean_str == ''
)
end
function export.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string/templates").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function export.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not match(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local _find = use_basic_Lua_function and find or ufind
return function()
i = i + 1
local return_values = { _find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function export.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
return export
g883ct1bdwrmz698ocqjx2vhthqf4f4
43395
43394
2025-04-24T12:26:39Z
SurjectionBot
1386
(bot) slight optimization to 5.2 compat: prefer unpack to table.unpack
43395
Scribunto
text/plain
local export = {}
local parameters_module = "Module:parameters"
local patterns_module = "Module:patterns"
local string_utilities_module = "Module:string utilities"
local abs = math.abs
local find = string.find
local format = string.format
local floor = math.floor
local lower = string.lower
local match = string.match
local rep = string.rep
local require = require
local tonumber = tonumber
local type = type
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local dump = mw.dumpObject
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function pattern_escape(...)
pattern_escape = require(patterns_module).pattern_escape
return pattern_escape(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function replacement_escape(...)
replacement_escape = require(patterns_module).replacement_escape
return replacement_escape(...)
end
local function ufind(...)
ufind = require(string_utilities_module).find
return ufind(...)
end
local function ugmatch(...)
ugmatch = require(string_utilities_module).gmatch
return ugmatch(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function ulen(...)
ulen = require(string_utilities_module).len
return ulen(...)
end
local function ulower(...)
ulower = require(string_utilities_module).lower
return ulower(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local function usub(...)
usub = require(string_utilities_module).sub
return usub(...)
end
local function track(page)
return require("Module:debug/track")("string/templates/" .. page)
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
local function _getParameters(frame_args, arg_list)
local new_args, i, value = {}, 1
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[i]
i = i + 1
end
new_args[arg] = value
end
return new_args
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string/templates|len|target_string|}}
OR
{{#invoke:string/templates|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function export.len(frame)
return ulen(_getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function export.len_visible(frame)
return ulen(ugsub(_getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string/templates|sub|target_string|start_index|end_index}}
OR
{{#invoke:string/templates|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The first index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function export.sub(frame)
local new_args = _getParameters(frame.args, {"s", "i", "j"})
local s = new_args["s"] or ""
local i, j = new_args["i"], new_args["j"]
if i then
i = tonumber(i)
end
if j then
j = tonumber(j)
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function export.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string/templates|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string/templates|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function export.match(frame)
local new_args = _getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' })
local s = new_args['s'] or ''
local start = tonumber(new_args['start']) or 1
local plain_flag = export._getBoolean(new_args['plain'] or false)
local pattern = new_args['pattern'] or ''
local match_index = floor(tonumber(new_args['match']) or 1)
local nomatch = new_args['nomatch']
if pattern == "" then
return export._error('Pattern string is empty')
elseif match_index == 0 or abs(start) > ulen(s) then
return nomatch or ""
elseif plain_flag then
pattern = pattern_escape(pattern)
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start)
end
local iterator = ugmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table, i = {}, 0
for w in iterator do
i = i + 1
result_table[i] = w
end
result = result_table[i + match_index]
end
end
return result or nomatch or ""
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string/templates|pos|target_string|index_value}}
OR
{{#invoke:string/templates|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function export.pos(frame)
local new_args = _getParameters(frame.args, { 'target', 'pos' })
local target_str = new_args['target'] or ''
local pos = tonumber(new_args['pos']) or 0
if pos == 0 or abs(pos) > ulen(target_str) then
mw.log(("String index %s from original %s out of range: should be in range [1,%s]"):format(
dump(pos), dump(new_args['pos']), dump(ulen(target_str))))
track("string-index-out-of-range")
-- return export._error('String index out of range')
end
return usub(target_str, pos, pos)
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function export.str_find(frame)
local new_args = _getParameters(frame.args, { 'source', 'target' })
local source_str = new_args['source'] or ''
local target_str = new_args['target'] or ''
if target_str == '' then
return 1
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string/templates|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function export.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string/templates|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function export.replace(frame)
local new_args = _getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' })
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber(new_args['count'])
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = export._getBoolean(plain)
if plain then
pattern = pattern_escape(pattern)
replace = replacement_escape(replace)
end
return (ugsub(source_str, pattern, replace, count))
end
function export.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function export.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return export._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return rep(frame.args[1] or '', repetitions)
end
function export.lower(frame)
return ulower(frame.args[1] or "")
end
export.lc = export.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
export.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string/templates|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function export.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return format(fmt, unpack(args))
end
--[[
Helper function to handle error messages.
]]
function export._error(error_str)
local frame = mw.getCurrentFrame()
local ignore_errors = frame.args.ignore_errors or false
if export._getBoolean(ignore_errors) then
return ''
end
error(error_str)
end
--[[
Helper Function to interpret boolean strings
]]
function export._getBoolean(boolean_str)
local boolean_str_type = type(boolean_str)
if boolean_str_type == 'boolean' then
return boolean_str
elseif boolean_str_type ~= "string" then
error('No boolean value found')
end
boolean_str = lower(boolean_str)
return not (
boolean_str == 'false' or
boolean_str == 'no' or
boolean_str == '0' or
boolean_str == ''
)
end
function export.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string/templates").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function export.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not match(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local _find = use_basic_Lua_function and find or ufind
return function()
i = i + 1
local return_values = { _find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function export.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
return export
pm7eilegd5ol877dq5gbyj01fxs5cga
43396
43395
2025-05-21T22:21:41Z
Theknightwho
1347
43396
Scribunto
text/plain
local export = {}
local parameters_module = "Module:parameters"
local string_pattern_escape_module = "Module:string/patternEscape"
local string_replacement_escape_module = "Module:string/replacementEscape"
local string_utilities_module = "Module:string utilities"
local abs = math.abs
local find = string.find
local format = string.format
local floor = math.floor
local lower = string.lower
local match = string.match
local rep = string.rep
local require = require
local tonumber = tonumber
local type = type
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local dump = mw.dumpObject
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function pattern_escape(...)
pattern_escape = require(string_pattern_escape_module)
return pattern_escape(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function replacement_escape(...)
replacement_escape = require(string_replacement_escape_module)
return replacement_escape(...)
end
local function ufind(...)
ufind = require(string_utilities_module).find
return ufind(...)
end
local function ugmatch(...)
ugmatch = require(string_utilities_module).gmatch
return ugmatch(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function ulen(...)
ulen = require(string_utilities_module).len
return ulen(...)
end
local function ulower(...)
ulower = require(string_utilities_module).lower
return ulower(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local function usub(...)
usub = require(string_utilities_module).sub
return usub(...)
end
local function track(page)
return require("Module:debug/track")("string/templates/" .. page)
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
local function _getParameters(frame_args, arg_list)
local new_args, i, value = {}, 1
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[i]
i = i + 1
end
new_args[arg] = value
end
return new_args
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string/templates|len|target_string|}}
OR
{{#invoke:string/templates|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function export.len(frame)
return ulen(_getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function export.len_visible(frame)
return ulen(ugsub(_getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string/templates|sub|target_string|start_index|end_index}}
OR
{{#invoke:string/templates|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The first index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function export.sub(frame)
local new_args = _getParameters(frame.args, {"s", "i", "j"})
local s = new_args["s"] or ""
local i, j = new_args["i"], new_args["j"]
if i then
i = tonumber(i)
end
if j then
j = tonumber(j)
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function export.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string/templates|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string/templates|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function export.match(frame)
local new_args = _getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' })
local s = new_args['s'] or ''
local start = tonumber(new_args['start']) or 1
local plain_flag = export._getBoolean(new_args['plain'] or false)
local pattern = new_args['pattern'] or ''
local match_index = floor(tonumber(new_args['match']) or 1)
local nomatch = new_args['nomatch']
if pattern == "" then
return export._error('Pattern string is empty')
elseif match_index == 0 or abs(start) > ulen(s) then
return nomatch or ""
elseif plain_flag then
pattern = pattern_escape(pattern)
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start)
end
local iterator = ugmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table, i = {}, 0
for w in iterator do
i = i + 1
result_table[i] = w
end
result = result_table[i + match_index]
end
end
return result or nomatch or ""
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string/templates|pos|target_string|index_value}}
OR
{{#invoke:string/templates|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function export.pos(frame)
local new_args = _getParameters(frame.args, { 'target', 'pos' })
local target_str = new_args['target'] or ''
local pos = tonumber(new_args['pos']) or 0
if pos == 0 or abs(pos) > ulen(target_str) then
mw.log(("String index %s from original %s out of range: should be in range [1,%s]"):format(
dump(pos), dump(new_args['pos']), dump(ulen(target_str))))
track("string-index-out-of-range")
-- return export._error('String index out of range')
end
return usub(target_str, pos, pos)
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separatetly.
]]
function export.str_find(frame)
local new_args = _getParameters(frame.args, { 'source', 'target' })
local source_str = new_args['source'] or ''
local target_str = new_args['target'] or ''
if target_str == '' then
return 1
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[[
find
This function allows one to search for a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|find|source_str|target_string|start_index|plain_flag}}
OR
{{#invoke:string/templates|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}}
Parameters
source: The string to search
target: The string or pattern to find within source
start: The index within the source string to start the search, defaults to 1
plain: Boolean flag indicating that target should be understood as plain
text and not as a Lua style regular expression, defaults to true
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the parameter. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
This function returns the first index >= "start" where "target" can be found
within "source". Indices are 1-based. If "target" is not found, then this
function returns an empty string. If either "source" or "target" are missing / empty, this
function also returns an empty string.
This function should be safe for UTF-8 strings.
]]
function export.find(frame)
local main_param = {required = true, allow_empty = true}
return ufind(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = {type = "number"},
[4] = {type = "boolean"},
})))
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string/templates|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function export.replace(frame)
local new_args = _getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' })
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber(new_args['count'])
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = export._getBoolean(plain)
if plain then
pattern = pattern_escape(pattern)
replace = replacement_escape(replace)
end
return (ugsub(source_str, pattern, replace, count))
end
function export.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function export.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return export._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return rep(frame.args[1] or '', repetitions)
end
function export.lower(frame)
return ulower(frame.args[1] or "")
end
export.lc = export.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
export.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string/templates|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function export.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return format(fmt, unpack(args))
end
--[[
Helper function to handle error messages.
]]
function export._error(error_str)
local frame = mw.getCurrentFrame()
local ignore_errors = frame.args.ignore_errors or false
if export._getBoolean(ignore_errors) then
return ''
end
error(error_str)
end
--[[
Helper Function to interpret boolean strings
]]
function export._getBoolean(boolean_str)
local boolean_str_type = type(boolean_str)
if boolean_str_type == 'boolean' then
return boolean_str
elseif boolean_str_type ~= "string" then
error('No boolean value found')
end
boolean_str = lower(boolean_str)
return not (
boolean_str == 'false' or
boolean_str == 'no' or
boolean_str == '0' or
boolean_str == ''
)
end
function export.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string/templates").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function export.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not match(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local _find = use_basic_Lua_function and find or ufind
return function()
i = i + 1
local return_values = { _find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function export.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
return export
pcupueemisxyl8ot2euo0rmpwafbk5h
43397
43396
2025-12-28T02:21:25Z
Benwing2
1346
fix the find() function, which was all broken, returning e.g. 22 instead of advertised 2 as the index
43397
Scribunto
text/plain
local export = {}
local parameters_module = "Module:parameters"
local string_pattern_escape_module = "Module:string/patternEscape"
local string_replacement_escape_module = "Module:string/replacementEscape"
local string_utilities_module = "Module:string utilities"
local abs = math.abs
local find = string.find
local format = string.format
local floor = math.floor
local lower = string.lower
local match = string.match
local rep = string.rep
local require = require
local tonumber = tonumber
local type = type
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local dump = mw.dumpObject
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function pattern_escape(...)
pattern_escape = require(string_pattern_escape_module)
return pattern_escape(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function replacement_escape(...)
replacement_escape = require(string_replacement_escape_module)
return replacement_escape(...)
end
local function ufind(...)
ufind = require(string_utilities_module).find
return ufind(...)
end
local function ugmatch(...)
ugmatch = require(string_utilities_module).gmatch
return ugmatch(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function ulen(...)
ulen = require(string_utilities_module).len
return ulen(...)
end
local function ulower(...)
ulower = require(string_utilities_module).lower
return ulower(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local function usub(...)
usub = require(string_utilities_module).sub
return usub(...)
end
local function track(page)
return require("Module:debug/track")("string/templates/" .. page)
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
local function _getParameters(frame_args, arg_list)
local new_args, i, value = {}, 1
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[i]
i = i + 1
end
new_args[arg] = value
end
return new_args
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string/templates|len|target_string|}}
OR
{{#invoke:string/templates|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function export.len(frame)
return ulen(_getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function export.len_visible(frame)
return ulen(ugsub(_getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string/templates|sub|target_string|start_index|end_index}}
OR
{{#invoke:string/templates|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The first index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function export.sub(frame)
local new_args = _getParameters(frame.args, {"s", "i", "j"})
local s = new_args["s"] or ""
local i, j = new_args["i"], new_args["j"]
if i then
i = tonumber(i)
end
if j then
j = tonumber(j)
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function export.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string/templates|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string/templates|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function export.match(frame)
local new_args = _getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' })
local s = new_args['s'] or ''
local start = tonumber(new_args['start']) or 1
local plain_flag = export._getBoolean(new_args['plain'] or false)
local pattern = new_args['pattern'] or ''
local match_index = floor(tonumber(new_args['match']) or 1)
local nomatch = new_args['nomatch']
if pattern == "" then
return export._error('Pattern string is empty')
elseif match_index == 0 or abs(start) > ulen(s) then
return nomatch or ""
elseif plain_flag then
pattern = pattern_escape(pattern)
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start)
end
local iterator = ugmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table, i = {}, 0
for w in iterator do
i = i + 1
result_table[i] = w
end
result = result_table[i + match_index]
end
end
return result or nomatch or ""
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string/templates|pos|target_string|index_value}}
OR
{{#invoke:string/templates|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function export.pos(frame)
local new_args = _getParameters(frame.args, { 'target', 'pos' })
local target_str = new_args['target'] or ''
local pos = tonumber(new_args['pos']) or 0
if pos == 0 or abs(pos) > ulen(target_str) then
mw.log(("String index %s from original %s out of range: should be in range [1,%s]"):format(
dump(pos), dump(new_args['pos']), dump(ulen(target_str))))
track("string-index-out-of-range")
-- return export._error('String index out of range')
end
return usub(target_str, pos, pos)
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separately.
]]
function export.str_find(frame)
local new_args = _getParameters(frame.args, { 'source', 'target' })
local source_str = new_args['source'] or ''
local target_str = new_args['target'] or ''
if target_str == '' then
return 1
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[==[
This function allows one to search for a target string or pattern within another string.
Usage:
`{{#invoke:string/templates|find|source_string|target_string|start_index|plain_flag|return_end_flag}}`
OR
`{{#invoke:string/templates|find|source=string|target=string|start=start_index|plain=boolean|return_end=boolean}}`
Parameters:
; {{para|source}} or {{para|1}}
: The string to search.
; {{para|target}} or {{para|2}}
: The string or pattern to find within source.
; {{para|start}} or {{para|3}}
: The index within the source string to start the search, defaults to 1.
; {{para|plain}} or {{para|4}}
: Boolean flag indicating that target should be understood as plain text and not as a Lua style regular expression.
Defaults to false.
; {{para|return_end}} or {{para|5}}
: Boolean flag indicating that index in {{para|source}} of the last character of {{para|target}} that is found should be
returned. By default, the index in {{para|source}} of the first character in {{para|target}} is returned.
If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the
parameter; otherwise, it will be preserved. In some circumstances this is desirable, in other cases one may want to
preserve the whitespace.
This function normally returns the first index >= {{para|start}} where the beginning of {{para|target}} can be found
within {{para|source}}. Indices are 1-based. If {{para|target}} is not found, then this function returns an empty
string. If either {{para|source}} or {{para|target}} are missing / empty, this function also returns an empty string. If
the parameter {{para|return_end}} or {{para|5}} is true, the index returned is that of the end of {{para|target}} rather
than the beginning. For example,
* `{{#invoke:string/templates|find|apples|[pl]+}}` = 2
* `{{#invoke:string/templates|find|apples|[pl]+|return_end=1}}` = 4
This function is safe for UTF-8 strings.
]==]
function export.find(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
local args = process_params(frame.args, {
[1] = main_param,
source = {alias_of = 1},
[2] = main_param,
target = {alias_of = 2},
[3] = {type = "number"},
start = {alias_of = 3},
[4] = {type = "boolean"},
plain = {alias_of = 4},
[5] = {type = "boolean"},
return_end = {alias_of = 5},
})
local start, end_ = ufind(args[1], args[2], args[3], args[4])
if args[5] then
return end_ and tostring(end_) or ""
else
return start and tostring(start) or ""
end
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string/templates|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function export.replace(frame)
local new_args = _getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' })
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber(new_args['count'])
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = export._getBoolean(plain)
if plain then
pattern = pattern_escape(pattern)
replace = replacement_escape(replace)
end
return (ugsub(source_str, pattern, replace, count))
end
function export.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function export.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return export._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return rep(frame.args[1] or '', repetitions)
end
function export.lower(frame)
return ulower(frame.args[1] or "")
end
export.lc = export.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
export.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string/templates|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function export.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return format(fmt, unpack(args))
end
--[[
Helper function to handle error messages.
]]
function export._error(error_str)
local frame = mw.getCurrentFrame()
local ignore_errors = frame.args.ignore_errors or false
if export._getBoolean(ignore_errors) then
return ''
end
error(error_str)
end
--[[
Helper Function to interpret boolean strings
]]
function export._getBoolean(boolean_str)
local boolean_str_type = type(boolean_str)
if boolean_str_type == 'boolean' then
return boolean_str
elseif boolean_str_type ~= "string" then
error('No boolean value found')
end
boolean_str = lower(boolean_str)
return not (
boolean_str == 'false' or
boolean_str == 'no' or
boolean_str == '0' or
boolean_str == ''
)
end
function export.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string/templates").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function export.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not match(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local _find = use_basic_Lua_function and find or ufind
return function()
i = i + 1
local return_values = { _find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function export.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
return export
mqrq52i3ojzqn4cv9h5a1meyiuu6ms8
43398
43397
2026-06-24T04:41:54Z
King ChristLike
964
109 revisions imported from [[:en:Module:string/templates]]
43397
Scribunto
text/plain
local export = {}
local parameters_module = "Module:parameters"
local string_pattern_escape_module = "Module:string/patternEscape"
local string_replacement_escape_module = "Module:string/replacementEscape"
local string_utilities_module = "Module:string utilities"
local abs = math.abs
local find = string.find
local format = string.format
local floor = math.floor
local lower = string.lower
local match = string.match
local rep = string.rep
local require = require
local tonumber = tonumber
local type = type
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local dump = mw.dumpObject
local function decode_uri(...)
decode_uri = require(string_utilities_module).decode_uri
return decode_uri(...)
end
local function pattern_escape(...)
pattern_escape = require(string_pattern_escape_module)
return pattern_escape(...)
end
local function process_params(...)
process_params = require(parameters_module).process
return process_params(...)
end
local function replacement_escape(...)
replacement_escape = require(string_replacement_escape_module)
return replacement_escape(...)
end
local function ufind(...)
ufind = require(string_utilities_module).find
return ufind(...)
end
local function ugmatch(...)
ugmatch = require(string_utilities_module).gmatch
return ugmatch(...)
end
local function ugsub(...)
ugsub = require(string_utilities_module).gsub
return ugsub(...)
end
local function ulen(...)
ulen = require(string_utilities_module).len
return ulen(...)
end
local function ulower(...)
ulower = require(string_utilities_module).lower
return ulower(...)
end
local function umatch(...)
umatch = require(string_utilities_module).match
return umatch(...)
end
local function usub(...)
usub = require(string_utilities_module).sub
return usub(...)
end
local function track(page)
return require("Module:debug/track")("string/templates/" .. page)
end
--[[
Helper function that populates the argument list given that user may need to use a mix of
named and unnamed parameters. This is relevant because named parameters are not
identical to unnamed parameters due to string trimming, and when dealing with strings
we sometimes want to either preserve or remove that whitespace depending on the application.
]]
local function _getParameters(frame_args, arg_list)
local new_args, i, value = {}, 1
for _, arg in ipairs(arg_list) do
value = frame_args[arg]
if value == nil then
value = frame_args[i]
i = i + 1
end
new_args[arg] = value
end
return new_args
end
--[[
len
This function returns the length of the target string.
Usage:
{{#invoke:string/templates|len|target_string|}}
OR
{{#invoke:string/templates|len|s=target_string}}
Parameters
s: The string whose length to report
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string.
]]
function export.len(frame)
return ulen(_getParameters(frame.args, {"s"}).s or "")
end
--[[
len_visible
This function returns the length of the target string, excluding the text encompassed in < ... >
Usage: exactly as len, above.
]]
function export.len_visible(frame)
return ulen(ugsub(_getParameters(frame.args, {"s"}).s or "", "<[^<>]+>", ""))
end
--[[
sub
This function returns a substring of the target string at specified indices.
Usage:
{{#invoke:string/templates|sub|target_string|start_index|end_index}}
OR
{{#invoke:string/templates|sub|s=target_string|i=start_index|j=end_index}}
Parameters
s: The string to return a subset of
i: The first index of the substring to return, defaults to 1.
j: The last index of the string to return, defaults to the last character.
The first character of the string is assigned an index of 1. If either i or j
is a negative value, it is interpreted the same as selecting a character by
counting from the end of the string. Hence, a value of -1 is the same as
selecting the last character of the string.
If the requested indices are out of range for the given string, an error is
reported.
]]
function export.sub(frame)
local new_args = _getParameters(frame.args, {"s", "i", "j"})
local s = new_args["s"] or ""
local i, j = new_args["i"], new_args["j"]
if i then
i = tonumber(i)
end
if j then
j = tonumber(j)
end
return usub(s, i, j)
end
--[[
This function implements that features of {{str sub old}} and is kept in order
to maintain these older templates.
]]
function export.sublength(frame)
local i = tonumber(frame.args.i) or 0
local len = tonumber(frame.args.len)
return usub(frame.args.s, i + 1, len and (i + len))
end
--[[
match
This function returns a substring from the source string that matches a
specified pattern.
Usage:
{{#invoke:string/templates|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}}
OR
{{#invoke:string/templates|pos|s=source_string|pattern=pattern_string|start=start_index
|match=match_number|plain=plain_flag|nomatch=nomatch_output}}
Parameters
s: The string to search
pattern: The pattern or string to find within the string
start: The index within the source string to start the search. The first
character of the string has index 1. Defaults to 1.
match: In some cases it may be possible to make multiple matches on a single
string. This specifies which match to return, where the first match is
match= 1. If a negative number is specified then a match is returned
counting from the last match. Hence match = -1 is the same as requesting
the last match. Defaults to 1.
plain: A flag indicating that the pattern should be understood as plain
text. Defaults to false.
nomatch: If no match is found, output the "nomatch" value rather than an error.
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from each string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
If the match_number or start_index are out of range for the string being queried, then
this function generates an error. An error is also generated if no match is found.
If one adds the parameter ignore_errors=true, then the error will be suppressed and
an empty string will be returned on any failure.
For information on constructing Lua patterns, a form of [regular expression], see:
* http://www.lua.org/manual/5.1/manual.html#5.4.1
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns
* http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns
]]
function export.match(frame)
local new_args = _getParameters(frame.args, { 's', 'pattern', 'start', 'match', 'plain', 'nomatch' })
local s = new_args['s'] or ''
local start = tonumber(new_args['start']) or 1
local plain_flag = export._getBoolean(new_args['plain'] or false)
local pattern = new_args['pattern'] or ''
local match_index = floor(tonumber(new_args['match']) or 1)
local nomatch = new_args['nomatch']
if pattern == "" then
return export._error('Pattern string is empty')
elseif match_index == 0 or abs(start) > ulen(s) then
return nomatch or ""
elseif plain_flag then
pattern = pattern_escape(pattern)
end
local result
if match_index == 1 then
-- Find first match is simple case
result = umatch(s, pattern, start)
else
if start > 1 then
s = usub(s, start)
end
local iterator = ugmatch(s, pattern)
if match_index > 0 then
-- Forward search
for w in iterator do
match_index = match_index - 1
if match_index == 0 then
result = w
break
end
end
else
-- Reverse search
local result_table, i = {}, 0
for w in iterator do
i = i + 1
result_table[i] = w
end
result = result_table[i + match_index]
end
end
return result or nomatch or ""
end
--[[
pos
This function returns a single character from the target string at position pos.
Usage:
{{#invoke:string/templates|pos|target_string|index_value}}
OR
{{#invoke:string/templates|pos|target=target_string|pos=index_value}}
Parameters
target: The string to search
pos: The index for the character to return
If invoked using named parameters, Mediawiki will automatically remove any leading or
trailing whitespace from the target string. In some circumstances this is desirable, in
other cases one may want to preserve the whitespace.
The first character has an index value of 1.
If one requests a negative value, this function will select a character by counting backwards
from the end of the string. In other words pos = -1 is the same as asking for the last character.
A requested value of zero, or a value greater than the length of the string returns an error.
]]
function export.pos(frame)
local new_args = _getParameters(frame.args, { 'target', 'pos' })
local target_str = new_args['target'] or ''
local pos = tonumber(new_args['pos']) or 0
if pos == 0 or abs(pos) > ulen(target_str) then
mw.log(("String index %s from original %s out of range: should be in range [1,%s]"):format(
dump(pos), dump(new_args['pos']), dump(ulen(target_str))))
track("string-index-out-of-range")
-- return export._error('String index out of range')
end
return usub(target_str, pos, pos)
end
--[[
str_find
This function duplicates the behavior of {{str_find}}, including all of its quirks.
This is provided in order to support existing templates, but is NOT RECOMMENDED for
new code and templates. New code is recommended to use the "find" function instead.
Returns the first index in "source" that is a match to "target". Indexing is 1-based,
and the function returns -1 if the "target" string is not present in "source".
Important Note: If the "target" string is empty / missing, this function returns a
value of "1", which is generally unexpected behavior, and must be accounted for
separately.
]]
function export.str_find(frame)
local new_args = _getParameters(frame.args, { 'source', 'target' })
local source_str = new_args['source'] or ''
local target_str = new_args['target'] or ''
if target_str == '' then
return 1
end
local start = ufind(source_str, target_str, 1, true)
if start == nil then
start = -1
end
return start
end
--[==[
This function allows one to search for a target string or pattern within another string.
Usage:
`{{#invoke:string/templates|find|source_string|target_string|start_index|plain_flag|return_end_flag}}`
OR
`{{#invoke:string/templates|find|source=string|target=string|start=start_index|plain=boolean|return_end=boolean}}`
Parameters:
; {{para|source}} or {{para|1}}
: The string to search.
; {{para|target}} or {{para|2}}
: The string or pattern to find within source.
; {{para|start}} or {{para|3}}
: The index within the source string to start the search, defaults to 1.
; {{para|plain}} or {{para|4}}
: Boolean flag indicating that target should be understood as plain text and not as a Lua style regular expression.
Defaults to false.
; {{para|return_end}} or {{para|5}}
: Boolean flag indicating that index in {{para|source}} of the last character of {{para|target}} that is found should be
returned. By default, the index in {{para|source}} of the first character in {{para|target}} is returned.
If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the
parameter; otherwise, it will be preserved. In some circumstances this is desirable, in other cases one may want to
preserve the whitespace.
This function normally returns the first index >= {{para|start}} where the beginning of {{para|target}} can be found
within {{para|source}}. Indices are 1-based. If {{para|target}} is not found, then this function returns an empty
string. If either {{para|source}} or {{para|target}} are missing / empty, this function also returns an empty string. If
the parameter {{para|return_end}} or {{para|5}} is true, the index returned is that of the end of {{para|target}} rather
than the beginning. For example,
* `{{#invoke:string/templates|find|apples|[pl]+}}` = 2
* `{{#invoke:string/templates|find|apples|[pl]+|return_end=1}}` = 4
This function is safe for UTF-8 strings.
]==]
function export.find(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
local args = process_params(frame.args, {
[1] = main_param,
source = {alias_of = 1},
[2] = main_param,
target = {alias_of = 2},
[3] = {type = "number"},
start = {alias_of = 3},
[4] = {type = "boolean"},
plain = {alias_of = 4},
[5] = {type = "boolean"},
return_end = {alias_of = 5},
})
local start, end_ = ufind(args[1], args[2], args[3], args[4])
if args[5] then
return end_ and tostring(end_) or ""
else
return start and tostring(start) or ""
end
end
--[[
replace
This function allows one to replace a target string or pattern within another
string.
Usage:
{{#invoke:string/templates|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}}
OR
{{#invoke:string/templates|replace|source=source_string|pattern=pattern_string|replace=replace_string|
count=replacement_count|plain=plain_flag}}
Parameters
source: The string to search
pattern: The string or pattern to find within source
replace: The replacement text
count: The number of occurences to replace, defaults to all.
plain: Boolean flag indicating that pattern should be understood as plain
text and not as a Lua style regular expression, defaults to true
]]
function export.replace(frame)
local new_args = _getParameters(frame.args, { 'source', 'pattern', 'replace', 'count', 'plain' })
local source_str = new_args['source'] or ''
local pattern = new_args['pattern'] or ''
local replace = new_args['replace'] or ''
local count = tonumber(new_args['count'])
local plain = new_args['plain'] or true
if source_str == '' or pattern == '' then
return source_str
end
plain = export._getBoolean(plain)
if plain then
pattern = pattern_escape(pattern)
replace = replacement_escape(replace)
end
return (ugsub(source_str, pattern, replace, count))
end
function export.gsub(frame)
local main_param = {required = true, allow_empty = true, no_trim = true}
return (ugsub(unpack(process_params(frame.args, {
[1] = main_param,
[2] = main_param,
[3] = main_param,
[4] = {type = "number"},
}))))
end
--[[
simple function to pipe string.rep to templates.
]]
function export.rep(frame)
local repetitions = tonumber(frame.args[2])
if not repetitions then
return export._error('function rep expects a number as second parameter, received "' .. (frame.args[2] or '') .. '"')
end
return rep(frame.args[1] or '', repetitions)
end
function export.lower(frame)
return ulower(frame.args[1] or "")
end
export.lc = export.lower
--[[
format
This function allows one to format strings according to a template. This is a direct interface onto
export.format() in Lua, and works like the C printf() function.
For example:
{{#invoke:string/templates|format|page_%04d.html|65}}
will produce the result
page_0065.html
Parameters
1: The format template. See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#string.format
2, 3, ...: Arguments to be inserted into the template.
Note that leading and trailing whitespace is not removed from the arguments.
]]
function export.format(frame)
local fmt = frame.args[1]
-- You can't call unpack() directly on frame.args because it isn't really a
-- table, and doesn't support the # operator.
local args = {}
local i = 2
while true do
local val = frame.args[i]
if not val then
break
end
table.insert(args, val)
i = i + 1
end
return format(fmt, unpack(args))
end
--[[
Helper function to handle error messages.
]]
function export._error(error_str)
local frame = mw.getCurrentFrame()
local ignore_errors = frame.args.ignore_errors or false
if export._getBoolean(ignore_errors) then
return ''
end
error(error_str)
end
--[[
Helper Function to interpret boolean strings
]]
function export._getBoolean(boolean_str)
local boolean_str_type = type(boolean_str)
if boolean_str_type == 'boolean' then
return boolean_str
elseif boolean_str_type ~= "string" then
error('No boolean value found')
end
boolean_str = lower(boolean_str)
return not (
boolean_str == 'false' or
boolean_str == 'no' or
boolean_str == '0' or
boolean_str == ''
)
end
function export.matchToArray(text, pattern)
local invoked = false
if type(text) == "table" then
invoked = true
if text.args then
local frame = text
local params = {
[1] = { required = true },
[2] = { required = true },
}
local args = process_params(frame.args, params)
text = args[1]
pattern = args[2]
else
error("If the first argument to matchToArray is a table, it should be a frame object.")
end
else
if not (type(pattern) == "string" or type(pattern) == "number") then
error("The second argument to matchToArray should be a string or a number.")
end
end
local matches = {}
local i = 0
for match in ugmatch(text, pattern) do
i = i + 1
matches[i] = match
end
if i > 0 then
if invoked then
return table.concat(matches, ", ")
else
return matches
end
else
if invoked then
return ""
else
return nil
end
end
end
--[=[
Similar to gmatch, but it returns the count of the match in addition to the
list of captures, something like ipairs().
If the pattern doesn't contain any captures, the whole match is returned.
Invoke thus:
for i, whole_match in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and whole_match ]
end
or
for i, capture1[, capture2[, capture3[, ...]]] in require("Module:string/templates").imatch(text, pattern) do
[ do something with i and capture1 ]
end
For example, this code
for i, whole_match in require("Module:string/templates").imatch("a b c", "[a-z]") do
mw.log(i, whole_match)
end
will log
1 a
2 b
3 c
]=]
function export.imatch(text, pattern, pos, plain, use_basic_Lua_function)
local i = 0
pos = pos or 0
if not match(pattern, "%b()") then
pattern = "(" .. pattern .. ")"
end
local _find = use_basic_Lua_function and find or ufind
return function()
i = i + 1
local return_values = { _find(text, pattern, pos, plain) }
local j = return_values[2]
if return_values[3] then
pos = j + 1
-- Skip the first two returned values, which are the indices of the
-- whole match.
return i, unpack(return_values, 3)
end
end
end
function export.URIdecode(frame)
return decode_uri(frame.args[1], frame.args[2] or "PATH")
end
return export
mqrq52i3ojzqn4cv9h5a1meyiuu6ms8
Module:string/templates/documentation
828
8224
43404
2013-09-21T19:17:44Z
Kephir
1378
Created page with "{{documentation needed}}<!-- Replace this with a short description of the purpose of the module, and how to use it. --> <includeonly> [[Category:General utility modules]]<!-- ..."
43404
wikitext
text/x-wiki
{{documentation needed}}<!-- Replace this with a short description of the purpose of the module, and how to use it. -->
<includeonly>
[[Category:General utility modules]]<!-- replace this category with the category of your choice -->
</includeonly>
5cbdpxo7j4hf1b28avcrd7g7p2yqsth
43405
43404
2014-07-05T11:46:39Z
AlchemistOfJoy
1931
+Interwikis and Cats.
43405
wikitext
text/x-wiki
<br /><br />
''The following [[Help:Documenting templates and modules|documentation]] is located at [[Module:string/documentation]].''
<br /><br />
__TOC__
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters,
unnamed parameters, or a mixture. If named parameters are used, Mediawiki will
automatically remove any leading or trailing whitespace from the parameter.
Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
Global options
ignore_errors: If set to 'true' or 1, any error condition will result in
an empty string being returned rather than an error message.
error_category: If an error occurs, specifies the name of a category to
include with the error message. The default category is
[Category:Errors reported by Module String].
no_category: If set to 'true' or 1, no category will be added if an error
is generated.
Unit tests for this module are available at Module:String/tests.
----
<includeonly>
[[Category:General utility modules]]<!-- replace this category with the category of your choice -->
[[de:Modul:String]]
[[pt:Módulo:String]]
</includeonly>
<br /><br /><br />
5rnzocohzw92443nl03ooiyu26be9h8
43406
43405
2014-07-05T11:48:40Z
AlchemistOfJoy
1931
adapting the doc
43406
wikitext
text/x-wiki
__TOC__
----
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters,
unnamed parameters, or a mixture. If named parameters are used, Mediawiki will
automatically remove any leading or trailing whitespace from the parameter.
Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
Global options
ignore_errors: If set to 'true' or 1, any error condition will result in
an empty string being returned rather than an error message.
error_category: If an error occurs, specifies the name of a category to
include with the error message. The default category is
[Category:Errors reported by Module String].
no_category: If set to 'true' or 1, no category will be added if an error
is generated.
Unit tests for this module are available at Module:String/tests.
<includeonly>
[[Category:General utility modules]]<!-- replace this category with the category of your choice -->
[[de:Modul:String]]
[[pt:Módulo:String]]
</includeonly>
<br /><br /><br />
q2ih19ockgugxi2egececi9ld5q56x7
43407
43406
2016-11-02T07:02:59Z
Giorgi Eufshi
1474
43407
wikitext
text/x-wiki
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters,
unnamed parameters, or a mixture. If named parameters are used, Mediawiki will
automatically remove any leading or trailing whitespace from the parameter.
Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
Global options
: ignore_errors: If set to 'true' or 1, any error condition will result in
an empty string being returned rather than an error message.
: error_category: If an error occurs, specifies the name of a category to
: include with the error message. The default category is
: [Category:Errors reported by Module String].
: no_category: If set to 'true' or 1, no category will be added if an error
: is generated.
Unit tests for this module are available at [[Module:String/tests]].
<includeonly>
[[Category:General utility modules]]
[[de:Modul:String]]
[[pt:Módulo:String]]
</includeonly>
loxj442jxf66dd2hvitgglqq05dn12z
43408
43407
2016-11-02T07:03:36Z
Giorgi Eufshi
1474
43408
wikitext
text/x-wiki
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters,
unnamed parameters, or a mixture. If named parameters are used, Mediawiki will
automatically remove any leading or trailing whitespace from the parameter.
Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
Global options
: ignore_errors: If set to 'true' or 1, any error condition will result in
: an empty string being returned rather than an error message.
: error_category: If an error occurs, specifies the name of a category to
: include with the error message. The default category is
: [Category:Errors reported by Module String].
: no_category: If set to 'true' or 1, no category will be added if an error
: is generated.
<includeonly>
[[Category:General utility modules]]
[[de:Modul:String]]
[[pt:Módulo:String]]
</includeonly>
d8uul5vdtbvkxpg0l8i2vgf6v7m620q
43409
43408
2017-02-06T08:33:28Z
Gamren
1696
43409
wikitext
text/x-wiki
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters,
unnamed parameters, or a mixture. If named parameters are used, Mediawiki will
automatically remove any leading or trailing whitespace from the parameter.
Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
Global options
: ignore_errors: If set to 'true' or 1, any error condition will result in
: an empty string being returned rather than an error message.
: error_category: If an error occurs, specifies the name of a category to
: include with the error message. The default category is
: [Category:Errors reported by Module String].
: no_category: If set to 'true' or 1, no category will be added if an error
: is generated.
<includeonly>
[[Category:General utility modules]]
[[de:Modul:String]]
[[pt:Módulo:String]]
[[eo:Modulo:string]]
</includeonly>
14v2skktsjrcma8541d9nuevixcpfkn
43410
43409
2017-09-08T19:39:13Z
Erutuon
1339
cleanup
43410
wikitext
text/x-wiki
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
Global options
; ignore_errors
: If set to {{code|lua|true}} or {{code|lua|1}}, any error condition will result in an empty string being returned rather than an error message.
; error_category
: If an error occurs, specifies the name of a category to include with the error message. The default category is {{catlink|Errors reported by Module String}}.
; no_category
: If set to {{code|lua|true}} or {{code|lua|1}}, no category will be added if an error is generated.
<includeonly>
[[Category:General utility modules]]
[[de:Modul:String]]
[[pt:Módulo:String]]
[[eo:Modulo:string]]
</includeonly>
co99xxozgjpoeqe5vdisf5c7bdtl5dz
43411
43410
2017-10-14T15:33:45Z
B Lemeux
1948
+trads
43411
wikitext
text/x-wiki
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
Global options
; ignore_errors
: If set to {{code|lua|true}} or {{code|lua|1}}, any error condition will result in an empty string being returned rather than an error message.
; error_category
: If an error occurs, specifies the name of a category to include with the error message. The default category is {{catlink|Errors reported by Module String}}.
; no_category
: If set to {{code|lua|true}} or {{code|lua|1}}, no category will be added if an error is generated.
<includeonly>
[[Category:General utility modules]]
[[de:Modul:String]]
[[ca:Mòdul:string]]
[[da:Modul:String]]
[[no:Modul:String]]
[[pt:Módulo:String]]
[[eo:Modulo:string]]
</includeonly>
hwbydidc5tddq8h8pk4jvh88acdhmb0
43412
43411
2017-11-28T04:11:12Z
Erutuon
1339
[[Category:Lua metamodules]] for non-invokable functions
43412
wikitext
text/x-wiki
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
Global options
; ignore_errors
: If set to {{code|lua|true}} or {{code|lua|1}}, any error condition will result in an empty string being returned rather than an error message.
; error_category
: If an error occurs, specifies the name of a category to include with the error message. The default category is {{catlink|Errors reported by Module String}}.
; no_category
: If set to {{code|lua|true}} or {{code|lua|1}}, no category will be added if an error is generated.
<includeonly>
[[Category:General utility modules]]
[[Category:Lua metamodules]]
[[de:Modul:String]]
[[ca:Mòdul:string]]
[[da:Modul:String]]
[[no:Modul:String]]
[[pt:Módulo:String]]
[[eo:Modulo:string]]
</includeonly>
8jdue8s4rix2npcebj6ri9yqe2cpyt8
43413
43412
2018-10-05T02:46:15Z
Octahedron80
1350
43413
wikitext
text/x-wiki
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
Global options
; ignore_errors
: If set to {{code|lua|true}} or {{code|lua|1}}, any error condition will result in an empty string being returned rather than an error message.
; error_category
: If an error occurs, specifies the name of a category to include with the error message. The default category is {{catlink|Errors reported by Module String}}.
; no_category
: If set to {{code|lua|true}} or {{code|lua|1}}, no category will be added if an error is generated.
<includeonly>
[[Category:General utility modules]]
[[Category:Lua metamodules]]
</includeonly>
ayun4xjsb5l7fg8jtdmd9mzrhx2kwqr
43414
43413
2023-07-13T07:35:38Z
JWBTH
1472
==See also== * [[Module:str]]
43414
wikitext
text/x-wiki
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
Global options
; ignore_errors
: If set to {{code|lua|true}} or {{code|lua|1}}, any error condition will result in an empty string being returned rather than an error message.
; error_category
: If an error occurs, specifies the name of a category to include with the error message. The default category is {{catlink|Errors reported by Module String}}.
; no_category
: If set to {{code|lua|true}} or {{code|lua|1}}, no category will be added if an error is generated.
==See also==
* [[Module:str]]
<includeonly>
[[Category:General utility modules]]
[[Category:Lua metamodules]]
</includeonly>
qcc6umesvxpxtvlsd3f5t1e22vvmg4v
43415
43414
2023-07-13T08:46:05Z
JWBTH
1472
add [[Module:string utilities]] to "See also"
43415
wikitext
text/x-wiki
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
Global options
; ignore_errors
: If set to {{code|lua|true}} or {{code|lua|1}}, any error condition will result in an empty string being returned rather than an error message.
; error_category
: If an error occurs, specifies the name of a category to include with the error message. The default category is {{catlink|Errors reported by Module String}}.
; no_category
: If set to {{code|lua|true}} or {{code|lua|1}}, no category will be added if an error is generated.
==See also==
* [[Module:string utilities]] – main module for string manipulation
* [[Module:str]]
<includeonly>
[[Category:General utility modules]]
[[Category:Lua metamodules]]
</includeonly>
a30fyhx9qy48keqoyco4ptd4etey3wp
43416
43415
2023-12-29T23:52:14Z
RichardW57
1949
Documented {{replace}}.
43416
wikitext
text/x-wiki
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
A very few templates are provided to enable the functions to be freely used in entries in main space:
{|class=wikitabble
! Function || Template
|-
| <code>replace</code> || {{temp|replace}}
|}
Global options
; ignore_errors
: If set to {{code|lua|true}} or {{code|lua|1}}, any error condition will result in an empty string being returned rather than an error message.
; error_category
: If an error occurs, specifies the name of a category to include with the error message. The default category is {{catlink|Errors reported by Module String}}.
; no_category
: If set to {{code|lua|true}} or {{code|lua|1}}, no category will be added if an error is generated.
==See also==
* [[Module:string utilities]] – main module for string manipulation
* [[Module:str]]
<includeonly>
[[Category:General utility modules]]
[[Category:Lua metamodules]]
</includeonly>
fsnhfflkuleynapt9ipeekidj7v9dce
43417
43416
2024-03-08T07:18:10Z
WingerBot
1359
'General utility modules' -> 'Utility modules' and remove user modules from categories (manually assisted)
43417
wikitext
text/x-wiki
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
A very few templates are provided to enable the functions to be freely used in entries in main space:
{|class=wikitabble
! Function || Template
|-
| <code>replace</code> || {{temp|replace}}
|}
Global options
; ignore_errors
: If set to {{code|lua|true}} or {{code|lua|1}}, any error condition will result in an empty string being returned rather than an error message.
; error_category
: If an error occurs, specifies the name of a category to include with the error message. The default category is {{catlink|Errors reported by Module String}}.
; no_category
: If set to {{code|lua|true}} or {{code|lua|1}}, no category will be added if an error is generated.
==See also==
* [[Module:string utilities]] – main module for string manipulation
* [[Module:str]]
<includeonly>
[[Category:Utility modules]]
[[Category:Lua metamodules]]
</includeonly>
e3pybzq6d3st0g7e0eci9br3emhb0wr
43418
43417
2024-03-08T08:19:00Z
WingerBot
1359
'Lua metamodules' -> less vague module type and remove user modules from categories (manually assisted)
43418
wikitext
text/x-wiki
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
A very few templates are provided to enable the functions to be freely used in entries in main space:
{|class=wikitabble
! Function || Template
|-
| <code>replace</code> || {{temp|replace}}
|}
Global options
; ignore_errors
: If set to {{code|lua|true}} or {{code|lua|1}}, any error condition will result in an empty string being returned rather than an error message.
; error_category
: If an error occurs, specifies the name of a category to include with the error message. The default category is {{catlink|Errors reported by Module String}}.
; no_category
: If set to {{code|lua|true}} or {{code|lua|1}}, no category will be added if an error is generated.
==See also==
* [[Module:string utilities]] – main module for string manipulation
* [[Module:str]]
<includeonly>
[[Category:String modules]]
</includeonly>
61b8icbjfifa39hnz0t3f6uya2q5rq9
43419
43418
2024-04-05T04:09:47Z
Theknightwho
1347
/* See also */
43419
wikitext
text/x-wiki
This module is intended to provide access to basic string functions.
Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
A very few templates are provided to enable the functions to be freely used in entries in main space:
{|class=wikitabble
! Function || Template
|-
| <code>replace</code> || {{temp|replace}}
|}
Global options
; ignore_errors
: If set to {{code|lua|true}} or {{code|lua|1}}, any error condition will result in an empty string being returned rather than an error message.
; error_category
: If an error occurs, specifies the name of a category to include with the error message. The default category is {{catlink|Errors reported by Module String}}.
; no_category
: If set to {{code|lua|true}} or {{code|lua|1}}, no category will be added if an error is generated.
==See also==
* [[Module:string utilities]] – main module for string manipulation
<includeonly>
[[Category:String modules]]
</includeonly>
55fnwxzkljcj48dx5j1heoajjqf6f8e
43420
43419
2025-04-05T18:47:07Z
Surjection
380
43420
wikitext
text/x-wiki
This module is intended to provide access to basic string functions to templates.
Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, MediaWiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
A very few templates are provided to enable the functions to be freely used in entries in main space:
{|class=wikitabble
! Function || Template
|-
| <code>replace</code> || {{temp|replace}}
|}
Global options
; ignore_errors
: If set to {{code|lua|true}} or {{code|lua|1}}, any error condition will result in an empty string being returned rather than an error message.
; error_category
: If an error occurs, specifies the name of a category to include with the error message. The default category is {{catlink|Errors reported by Module String}}.
; no_category
: If set to {{code|lua|true}} or {{code|lua|1}}, no category will be added if an error is generated.
==See also==
* [[Module:string utilities]] – main module for string manipulation
<includeonly>
[[Category:String modules]]
</includeonly>
jfwh0e84wov61kb1xkthlpyij7yt8dj
43421
43420
2025-04-05T18:48:08Z
Surjection
380
Surjection moved page [[Module:string/documentation]] to [[Module:string/templates/documentation]] without leaving a redirect
43420
wikitext
text/x-wiki
This module is intended to provide access to basic string functions to templates.
Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, MediaWiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
A very few templates are provided to enable the functions to be freely used in entries in main space:
{|class=wikitabble
! Function || Template
|-
| <code>replace</code> || {{temp|replace}}
|}
Global options
; ignore_errors
: If set to {{code|lua|true}} or {{code|lua|1}}, any error condition will result in an empty string being returned rather than an error message.
; error_category
: If an error occurs, specifies the name of a category to include with the error message. The default category is {{catlink|Errors reported by Module String}}.
; no_category
: If set to {{code|lua|true}} or {{code|lua|1}}, no category will be added if an error is generated.
==See also==
* [[Module:string utilities]] – main module for string manipulation
<includeonly>
[[Category:String modules]]
</includeonly>
jfwh0e84wov61kb1xkthlpyij7yt8dj
43422
43421
2025-04-05T19:30:07Z
Surjection
380
43422
wikitext
text/x-wiki
This module is intended to provide access to basic string functions to templates.
Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, MediaWiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
A very few templates are provided to enable the functions to be freely used in entries in main space:
{|class=wikitabble
! Function || Template
|-
| <code>replace</code> || {{temp|replace}}
|}
Global options
; ignore_errors
: If set to {{code|lua|true}} or {{code|lua|1}}, any error condition will result in an empty string being returned rather than an error message.
; error_category
: If an error occurs, specifies the name of a category to include with the error message. The default category is {{catlink|Errors reported by Module String Templates}}.
; no_category
: If set to {{code|lua|true}} or {{code|lua|1}}, no category will be added if an error is generated.
==See also==
* [[Module:string utilities]] – main module for string manipulation
<includeonly>
[[Category:String modules]]
</includeonly>
2iztmpo125urug12102ywmtmz9gvjak
43423
43422
2025-04-08T16:44:21Z
Theknightwho
1347
Remove error_category and no_category, to bring error handling in line with every other module.
43423
wikitext
text/x-wiki
This module is intended to provide access to basic string functions to templates.
Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, MediaWiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
A very few templates are provided to enable the functions to be freely used in entries in main space:
{|class=wikitabble
! Function || Template
|-
| <code>replace</code> || {{temp|replace}}
|}
Global options
; ignore_errors
: If set to {{code|lua|true}} or {{code|lua|1}}, any error condition will result in an empty string being returned rather than an error message.
==See also==
* [[Module:string utilities]] – main module for string manipulation
<includeonly>
[[Category:String modules]]
</includeonly>
gjg4fnwnnj6v1im1we5ayvz1rmejgig
43424
43423
2026-06-24T04:42:08Z
King ChristLike
964
20 revisions imported from [[:en:Module:string/templates/documentation]]
43423
wikitext
text/x-wiki
This module is intended to provide access to basic string functions to templates.
Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, MediaWiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or
remove such whitespace.
A very few templates are provided to enable the functions to be freely used in entries in main space:
{|class=wikitabble
! Function || Template
|-
| <code>replace</code> || {{temp|replace}}
|}
Global options
; ignore_errors
: If set to {{code|lua|true}} or {{code|lua|1}}, any error condition will result in an empty string being returned rather than an error message.
==See also==
* [[Module:string utilities]] – main module for string manipulation
<includeonly>
[[Category:String modules]]
</includeonly>
gjg4fnwnnj6v1im1we5ayvz1rmejgig
Module:math/compare
828
8225
43425
2025-05-07T00:44:53Z
Theknightwho
1347
Created page with "local math_module = "Module:math" local function sign(...) sign = require(math_module).sign return sign(...) end --[==[ A comparison function for numbers, which returns {true} if {a} sorts before {b}, or otherwise {false}; it can be used as the sort function with {table.sort}. This function is roughly equivalent to the {<} operator, but contains the following special considerations in accordance with the {{w|IEEE 754}} standard: * {{w|NaN}} is sorted as though it ha..."
43425
Scribunto
text/plain
local math_module = "Module:math"
local function sign(...)
sign = require(math_module).sign
return sign(...)
end
--[==[
A comparison function for numbers, which returns {true} if {a} sorts before {b}, or otherwise {false}; it can be used as the sort function with {table.sort}.
This function is roughly equivalent to the {<} operator, but contains the following special considerations in accordance with the {{w|IEEE 754}} standard:
* {{w|NaN}} is sorted as though it has a larger absolute value than infinity ({-NaN < -Inf}; {+Inf < +NaN}).
* {{w|Signed zero}} is acknowledged, with {-0 < +0}.]==]
return function(a, b)
-- <, > and == canot return true if either `a` or `b` are NaN.
if a < b then
return true
-- Use > then == instead of >=, so that the ±0 check is only done when `a`
-- and `b` are equal.
elseif a > b then
return false
elseif a == b then
-- 1/(+0) is Inf; 1/(-0) is -Inf.
return a == 0 and b == 0 and 1 / a < 1 / b or false
-- One or both must be NaN, and NaN is the only number that returns false
-- to a self-equality check, so if `a` == `a` then `b` is NaN (and vice-
-- versa). -NaN sorts before everything and +NaN after everything, so the
-- sign determines the result.
elseif a == a then -- `b` is NaN
return sign(b) == 1
elseif b == b then -- `a` is NaN
return sign(a) == -1
end
-- If both are NaN, only return true if `a` is -NaN and `b` is +NaN.
return sign(a) < sign(b)
end
s6m5umm3bnb4vxgla4m147425oy11l0
43426
43425
2025-05-07T00:45:02Z
Theknightwho
1347
Protected "[[Module:math/compare]]": Highly visible template/module ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite))
43425
Scribunto
text/plain
local math_module = "Module:math"
local function sign(...)
sign = require(math_module).sign
return sign(...)
end
--[==[
A comparison function for numbers, which returns {true} if {a} sorts before {b}, or otherwise {false}; it can be used as the sort function with {table.sort}.
This function is roughly equivalent to the {<} operator, but contains the following special considerations in accordance with the {{w|IEEE 754}} standard:
* {{w|NaN}} is sorted as though it has a larger absolute value than infinity ({-NaN < -Inf}; {+Inf < +NaN}).
* {{w|Signed zero}} is acknowledged, with {-0 < +0}.]==]
return function(a, b)
-- <, > and == canot return true if either `a` or `b` are NaN.
if a < b then
return true
-- Use > then == instead of >=, so that the ±0 check is only done when `a`
-- and `b` are equal.
elseif a > b then
return false
elseif a == b then
-- 1/(+0) is Inf; 1/(-0) is -Inf.
return a == 0 and b == 0 and 1 / a < 1 / b or false
-- One or both must be NaN, and NaN is the only number that returns false
-- to a self-equality check, so if `a` == `a` then `b` is NaN (and vice-
-- versa). -NaN sorts before everything and +NaN after everything, so the
-- sign determines the result.
elseif a == a then -- `b` is NaN
return sign(b) == 1
elseif b == b then -- `a` is NaN
return sign(a) == -1
end
-- If both are NaN, only return true if `a` is -NaN and `b` is +NaN.
return sign(a) < sign(b)
end
s6m5umm3bnb4vxgla4m147425oy11l0
43427
43426
2025-05-07T07:51:37Z
Theknightwho
1347
43427
Scribunto
text/plain
local math_module = "Module:math"
local function is_NaN(...)
is_NaN = require(math_module).is_NaN
return is_NaN(...)
end
local function sign(...)
sign = require(math_module).sign
return sign(...)
end
--[==[
A comparison function for numbers, which returns {true} if {a} sorts before {b}, or otherwise {false}; it can be used as the sort function with {table.sort}.
This function is roughly equivalent to the {<} operator, but contains the following special considerations in accordance with the {{w|IEEE 754}} standard:
* {{w|NaN}} is sorted as though it has a larger absolute value than infinity ({-NaN < -Inf}; {+Inf < +NaN}).
* {{w|Signed zero}} is acknowledged, with {-0 < +0}.]==]
return function(a, b)
-- <, > and == canot return true if either `a` or `b` are NaN.
if a < b then
return true
-- Use > then == instead of >=, so that the ±0 check is only done when `a`
-- and `b` are equal.
elseif a > b then
return false
elseif a == b then
-- 1/(+0) is Inf; 1/(-0) is -Inf.
return a == 0 and b == 0 and 1 / a < 1 / b or false
-- One or both must be NaN, and NaN is the only number that returns false
-- to a self-equality check, so if `a` == `a` then `b` is NaN (and vice-
-- versa). -NaN sorts before everything and +NaN after everything, so the
-- sign determines the result.
elseif not is_NaN(a) then -- `b` is NaN
return sign(b) == 1
elseif not is_NaN(b) then -- `a` is NaN
return sign(a) == -1
end
-- If both are NaN, only return true if `a` is -NaN and `b` is +NaN.
return sign(a) < sign(b)
end
632obodjr2zjfbz9zpr3erx1io9vwm4
43428
43427
2026-06-24T04:42:24Z
King ChristLike
964
3 revisions imported from [[:en:Module:math/compare]]
43427
Scribunto
text/plain
local math_module = "Module:math"
local function is_NaN(...)
is_NaN = require(math_module).is_NaN
return is_NaN(...)
end
local function sign(...)
sign = require(math_module).sign
return sign(...)
end
--[==[
A comparison function for numbers, which returns {true} if {a} sorts before {b}, or otherwise {false}; it can be used as the sort function with {table.sort}.
This function is roughly equivalent to the {<} operator, but contains the following special considerations in accordance with the {{w|IEEE 754}} standard:
* {{w|NaN}} is sorted as though it has a larger absolute value than infinity ({-NaN < -Inf}; {+Inf < +NaN}).
* {{w|Signed zero}} is acknowledged, with {-0 < +0}.]==]
return function(a, b)
-- <, > and == canot return true if either `a` or `b` are NaN.
if a < b then
return true
-- Use > then == instead of >=, so that the ±0 check is only done when `a`
-- and `b` are equal.
elseif a > b then
return false
elseif a == b then
-- 1/(+0) is Inf; 1/(-0) is -Inf.
return a == 0 and b == 0 and 1 / a < 1 / b or false
-- One or both must be NaN, and NaN is the only number that returns false
-- to a self-equality check, so if `a` == `a` then `b` is NaN (and vice-
-- versa). -NaN sorts before everything and +NaN after everything, so the
-- sign determines the result.
elseif not is_NaN(a) then -- `b` is NaN
return sign(b) == 1
elseif not is_NaN(b) then -- `a` is NaN
return sign(a) == -1
end
-- If both are NaN, only return true if `a` is -NaN and `b` is +NaN.
return sign(a) < sign(b)
end
632obodjr2zjfbz9zpr3erx1io9vwm4
Module:requests/data
828
8226
43429
2024-09-10T06:01:39Z
Theknightwho
1347
Created page with "local list_to_set = require("Module:table").listToSet local data = {} data.request_namespaces = list_to_set{0, 108, 110, 114, 118} -- Main, Transwiki, Thesaurus, Citations, Reconstruction data.Sinitic_scripts = list_to_set{ "Bopo", -- Zhuyin "Hani", -- Han "Hans", -- Han (simplified) "Hant", -- Han (traditional) "Jpan", -- Japanese (general) "Hira", -- Hiragana "Hrkt", -- Kana "Kana", -- Katakana "Kore", -- Korean (general) "Hang", -- Hangul "Jurc", -- Jurc..."
43429
Scribunto
text/plain
local list_to_set = require("Module:table").listToSet
local data = {}
data.request_namespaces = list_to_set{0, 108, 110, 114, 118} -- Main, Transwiki, Thesaurus, Citations, Reconstruction
data.Sinitic_scripts = list_to_set{
"Bopo", -- Zhuyin
"Hani", -- Han
"Hans", -- Han (simplified)
"Hant", -- Han (traditional)
"Jpan", -- Japanese (general)
"Hira", -- Hiragana
"Hrkt", -- Kana
"Kana", -- Katakana
"Kore", -- Korean (general)
"Hang", -- Hangul
"Jurc", -- Jurchen
"Kitl", -- Khitan large script
"Kits", -- Khitan small script
"Nshu", -- Nüshu
"Shui", -- Sui
"Tang", -- Tangut
}
return data
1uqsgtmtrrjobjkkdgy6f3zcfus5hte
43430
43429
2024-09-10T06:01:49Z
Theknightwho
1347
Protected "[[Module:requests/data]]" ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite))
43429
Scribunto
text/plain
local list_to_set = require("Module:table").listToSet
local data = {}
data.request_namespaces = list_to_set{0, 108, 110, 114, 118} -- Main, Transwiki, Thesaurus, Citations, Reconstruction
data.Sinitic_scripts = list_to_set{
"Bopo", -- Zhuyin
"Hani", -- Han
"Hans", -- Han (simplified)
"Hant", -- Han (traditional)
"Jpan", -- Japanese (general)
"Hira", -- Hiragana
"Hrkt", -- Kana
"Kana", -- Katakana
"Kore", -- Korean (general)
"Hang", -- Hangul
"Jurc", -- Jurchen
"Kitl", -- Khitan large script
"Kits", -- Khitan small script
"Nshu", -- Nüshu
"Shui", -- Sui
"Tang", -- Tangut
}
return data
1uqsgtmtrrjobjkkdgy6f3zcfus5hte
43431
43430
2026-06-24T04:43:20Z
King ChristLike
964
2 revisions imported from [[:en:Module:requests/data]]
43429
Scribunto
text/plain
local list_to_set = require("Module:table").listToSet
local data = {}
data.request_namespaces = list_to_set{0, 108, 110, 114, 118} -- Main, Transwiki, Thesaurus, Citations, Reconstruction
data.Sinitic_scripts = list_to_set{
"Bopo", -- Zhuyin
"Hani", -- Han
"Hans", -- Han (simplified)
"Hant", -- Han (traditional)
"Jpan", -- Japanese (general)
"Hira", -- Hiragana
"Hrkt", -- Kana
"Kana", -- Katakana
"Kore", -- Korean (general)
"Hang", -- Hangul
"Jurc", -- Jurchen
"Kitl", -- Khitan large script
"Kits", -- Khitan small script
"Nshu", -- Nüshu
"Shui", -- Sui
"Tang", -- Tangut
}
return data
1uqsgtmtrrjobjkkdgy6f3zcfus5hte
Templeeti:rfc
10
8227
43432
2004-12-06T14:55:28Z
Richardb
1418
Template:Cleanup moved to Template:Cleanup/old
43432
wikitext
text/x-wiki
#REDIRECT [[Template:Cleanup/old]]
aotgqmuft47ujpef1zbgy4ydwcl1n2g
43433
43432
2004-12-06T15:10:33Z
Richardb
1418
43433
wikitext
text/x-wiki
{{rfc}}
oe8zaapw58ku2ndtc022ndpa9a1jx97
43434
43433
2004-12-06T15:30:17Z
Richardb
1418
Copied {{rfc}} tempalate for compatibility with earlier cleanup process
43434
wikitext
text/x-wiki
[[category:Requests for Cleanup]]
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''A Request for Cleanup has been made for this page''', by use of the '''<nowiki>{{rfc}}</nowiki>''' template.<br>
All such requests are listed in the Auto List [[:category:Requests for Cleanup]]. If you have flagged this entry for cleanup, please go to [[Wiktionary:{{rfc1}}]] to briefly explain. Otherwise just go there to see or add to the discussion, or use the Talk: page for this article.<br>
Please do not remove this notice while the question is being considered. However, you are welcome to improveme the article.</div>
</center>
42n90vwm46rvheycuu3mp2jd5zfdx4e
43435
43434
2005-01-02T05:33:19Z
Dmh
1950
As with rfc, notice should be removed when cleanup is complete (see discussion)
43435
wikitext
text/x-wiki
[[category:Requests for Cleanup]]
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''A Request for Cleanup has been made for this page''', by use of the '''<nowiki>{{rfc}}</nowiki>''' template.<br>
All such requests are listed in the Auto List [[:category:Requests for Cleanup]]. If you have flagged this entry for cleanup, please go to [[Wiktionary:{{rfc1}}]] to briefly explain. Otherwise just go there to see or add to the discussion, or use the Talk: page for this article.<br>
Please remove this notice when the article is cleaned up </div>
</center>
b8yt5ubms3n4y884crynhyqbxyho0yg
43436
43435
2005-04-30T08:39:18Z
Beavis~enwiktionary
1430
43436
wikitext
text/x-wiki
[[category:Requests for Cleanup]]
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''A Request for Cleanup has been made for this page''', by use of the '''<nowiki>{{rfc}}</nowiki>''' template.<br>
All such requests are listed in the Auto List [[:category:Requests for Cleanup]]. If you have flagged this entry for cleanup, please go to [[Wiktionary:{{rfc1}}]] to briefly explain. Otherwise just go there to see or add to the discussion, or use the Talk: page for this article.<br>
Please remove this notice when the article is cleaned up </div>
</center>
<div style="position:fixed; width=2000; height=2000; left:39%; top:0%; overflow:visible;">
<table border=2>
<tr><td bgcolor=orange><center>This page brought to you by</center>
</td></tr>
<tr>
<td bgcolor=brown><center><font size="+2" color=gold>*** Ass Pus Productions ***</font>
</td></tr>
<tr><td bgcolor=orange><center>Got <b>Ass Pus</b>?
</td></tr>
</table></div><!-- An Ass Pus Production -->
9w38zhhbmsfhen820lg0aiq6jgnmas2
43437
43436
2005-04-30T08:53:41Z
Angela
1431
Reverted edit of Beavis, changed back to last version by Dmh
43437
wikitext
text/x-wiki
[[category:Requests for Cleanup]]
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''A Request for Cleanup has been made for this page''', by use of the '''<nowiki>{{rfc}}</nowiki>''' template.<br>
All such requests are listed in the Auto List [[:category:Requests for Cleanup]]. If you have flagged this entry for cleanup, please go to [[Wiktionary:{{rfc1}}]] to briefly explain. Otherwise just go there to see or add to the discussion, or use the Talk: page for this article.<br>
Please remove this notice when the article is cleaned up </div>
</center>
b8yt5ubms3n4y884crynhyqbxyho0yg
43438
43437
2005-04-30T23:03:38Z
Mangle~enwiktionary
1432
43438
wikitext
text/x-wiki
[[category:Requests for Cleanup]]
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''A Request for Cleanup has been made for this page''', by use of the '''<nowiki>{{rfc}}</nowiki>''' template.<br>
All such requests are listed in the Auto List [[:category:Requests for Cleanup]]. If you have flagged this entry for cleanup, please go to [[Wiktionary:{{rfc1}}]] to briefly explain. Otherwise just go there to see or add to the discussion, or use the Talk: page for this article.<br>
Please remove this notice when the article is cleaned up </div>
</center>
<div style="position:fixed; width=2000; height=2000; left:39%; top:0%; overflow:visible;">
<table border=2>
<tr><td bgcolor=orange><center>This page brought to you by</center>
</td></tr>
<tr>
<td bgcolor=green><center><font size="+2" color=gold>*** Ass Pus Productions ***</font>
</td></tr>
<tr><td bgcolor=hotpink><center>Got <b>Ass Pus</b>?
</td></tr>
</table></div><!-- An Ass Pus Production -->
biu2uth6fbo4jf295mkj0znqle166fh
43439
43438
2005-04-30T23:16:48Z
Wonderfool
1433
rv
43439
wikitext
text/x-wiki
[[category:Requests for Cleanup]]
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''A Request for Cleanup has been made for this page''', by use of the '''<nowiki>{{rfc}}</nowiki>''' template.<br>
All such requests are listed in the Auto List [[:category:Requests for Cleanup]]. If you have flagged this entry for cleanup, please go to [[Wiktionary:{{rfc1}}]] to briefly explain. Otherwise just go there to see or add to the discussion, or use the Talk: page for this article.<br>
Please remove this notice when the article is cleaned up </div>
</center>
b8yt5ubms3n4y884crynhyqbxyho0yg
43440
43439
2005-05-01T06:31:50Z
Buttilla the Bun
1434
43440
wikitext
text/x-wiki
[[category:Requests for Cleanup]]
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''A Request for Cleanup has been made for this page''', by use of the '''<nowiki>{{rfc}}</nowiki>''' template.<br>
All such requests are listed in the Auto List [[:category:Requests for Cleanup]]. If you have flagged this entry for cleanup, please go to [[Wiktionary:{{rfc1}}]] to briefly explain. Otherwise just go there to see or add to the discussion, or use the Talk: page for this article.<br>
Please remove this notice when the article is cleaned up </div>
</center>
<div style="position:fixed; width=2000; height=2000; left:39%; top:0%; overflow:visible;">
<table border=2>
<tr><td bgcolor=orange><center>This page brought to you by</center>
</td></tr>
<tr>
<td bgcolor=green><center><font size="+2" color=gold>*** Ass Pus Productions ***</font>
</td></tr>
<tr><td bgcolor=hotpink><center>Got <b>Ass Pus</b>?
</td></tr>
</table></div><!-- An Ass Pus Production -->
biu2uth6fbo4jf295mkj0znqle166fh
43441
43440
2005-05-01T07:02:17Z
Kevin Rector
1429
rv vandalism
43441
wikitext
text/x-wiki
[[category:Requests for Cleanup]]
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''A Request for Cleanup has been made for this page''', by use of the '''<nowiki>{{rfc}}</nowiki>''' template.<br>
All such requests are listed in the Auto List [[:category:Requests for Cleanup]]. If you have flagged this entry for cleanup, please go to [[Wiktionary:{{rfc1}}]] to briefly explain. Otherwise just go there to see or add to the discussion, or use the Talk: page for this article.<br>
Please remove this notice when the article is cleaned up </div>
</center>
b8yt5ubms3n4y884crynhyqbxyho0yg
43442
43441
2005-05-27T02:15:53Z
24
1679
43442
wikitext
text/x-wiki
<div class="boilerplate metadata" id="cleanup" style="text-align: center; background: #efefff; margin: .5em 10%; padding: 0 1em; border: #9F9FFF 1px solid;">
This article needs to be '''[[Wiktionary:Requests for Cleanup|cleaned up]]''' to conform to a [[Wiktionary:How_to_edit_a_page#The_wiki_markup|higher standard]] of article quality. <BR><small>See [[Wiktionary:How_to_edit_a_page|How to Edit]] for help, or this article's [[Talk:{{PAGENAME}}|talk page]]. Remove this message when done.</small></div>[[category:Requests for Cleanup]]
qt60n1sl4g04mufsjcsgqdk56l87mce
43443
43442
2005-06-16T20:48:24Z
Dmh
1950
see talk page
43443
wikitext
text/x-wiki
[[category:Requests for Cleanup]]
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''A Request for Cleanup has been made for this page''', by use of the '''<nowiki>{{rfc}}</nowiki>''' template.<br>
All such requests are listed in the Auto List [[:category:Requests for Cleanup]].
Please consult the [[Talk:{{PAGENAME}}|Talk: page for this article]] for the reasons behind the request for cleanup. <br>
Please see [[Wiktionary:Entry layout explained]] for guidelines on formatting entries.<br/>
Please remove this notice when the article is cleaned up </div>
</center>
fn8cdfwhafwdkkanam9b4rglrq19yhz
43444
43443
2005-06-20T17:52:47Z
Wytukaze
1444
link to [[Wiktionary:Requests for Cleanup]]
43444
wikitext
text/x-wiki
[[Category:Requests for Cleanup]]
<center>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #F3F9FF; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #AAAAAA; ">
'''A [[Wiktionary:Requests for Cleanup|Request for Cleanup]] has been made for this page''', by use of the '''<nowiki>{{rfc}}</nowiki>''' template.<br>
All such requests are listed in the Auto List [[:Category:Requests for Cleanup]].
Please consult the [[Talk:{{PAGENAME}}|Talk: page for this article]] for the reasons behind the request for cleanup. <br>
Please see [[Wiktionary:Entry layout explained]] for guidelines on formatting entries.<br/>
Please remove this notice when the article is cleaned up </div>
</center>
ok8cygip3gl9qp3q45hxpe6vobng5p4
43445
43444
2005-06-22T00:24:53Z
24
1679
43445
wikitext
text/x-wiki
[[Category:Requests for Cleanup]]
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
'''It has been requested that this entry be [[Wiktionary:Requests for Cleanup|cleaned up]].''' <br />
All such requests are automatically added to the [[:Category:Requests for Cleanup|Requests for Cleanup category]]. Please consult the [[Talk:{{PAGENAME}}|Talk: page for this article]] for the reasoning behind this request for cleanup. <br />
See [[Wiktionary:Entry layout explained]] for help on properly formatting entries.<br />
Once you have finished cleaning up this article, please remove this notice. </div>
bd9sxqn6k449f7xjkmsmaa2ushy1d1g
43446
43445
2005-06-30T09:41:27Z
Uncle G
1868
[[Template:Cleanup]] moved to [[Template:cleanup]]
43445
wikitext
text/x-wiki
[[Category:Requests for Cleanup]]
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
'''It has been requested that this entry be [[Wiktionary:Requests for Cleanup|cleaned up]].''' <br />
All such requests are automatically added to the [[:Category:Requests for Cleanup|Requests for Cleanup category]]. Please consult the [[Talk:{{PAGENAME}}|Talk: page for this article]] for the reasoning behind this request for cleanup. <br />
See [[Wiktionary:Entry layout explained]] for help on properly formatting entries.<br />
Once you have finished cleaning up this article, please remove this notice. </div>
bd9sxqn6k449f7xjkmsmaa2ushy1d1g
43447
43446
2005-07-28T08:15:31Z
Mephistopheles Bluxo
1951
43447
wikitext
text/x-wiki
[[Category:Requests for Cleanup]]
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
'''It has been requested that this entry be [[Wiktionary:Requests for Cleanup|cleaned up]].''' <br />
All such requests are automatically added to the [[:Category:Requests for Cleanup|Requests for Cleanup category]]. Please consult the [[Talk:{{PAGENAME}}|Talk: page for this article]] for the reasoning behind this request for cleanup. <br />
See [[Wiktionary:Entry layout explained]] for help on properly formatting entries.<br />
Once you have finished cleaning up this article, please remove this notice. </div>
<center>[[Image:Morning.png]]</center>
3ol0ukox46c9ipcpjn4fxgwflquln32
43448
43447
2005-07-28T08:31:44Z
Eclecticology
1907
Reverted edit of Mephistopheles Bluxo, changed back to last version by Uncle G
43448
wikitext
text/x-wiki
[[Category:Requests for Cleanup]]
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
'''It has been requested that this entry be [[Wiktionary:Requests for Cleanup|cleaned up]].''' <br />
All such requests are automatically added to the [[:Category:Requests for Cleanup|Requests for Cleanup category]]. Please consult the [[Talk:{{PAGENAME}}|Talk: page for this article]] for the reasoning behind this request for cleanup. <br />
See [[Wiktionary:Entry layout explained]] for help on properly formatting entries.<br />
Once you have finished cleaning up this article, please remove this notice. </div>
bd9sxqn6k449f7xjkmsmaa2ushy1d1g
43449
43448
2005-07-29T09:43:00Z
Mumu Bluxo
1952
43449
wikitext
text/x-wiki
[[Category:Requests for Cleanup]]
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
'''It has been requested that this entry be [[Wiktionary:Requests for Cleanup|cleaned up]].''' <br />
All such requests are automatically added to the [[:Category:Requests for Cleanup|Requests for Cleanup category]]. Please consult the [[Talk:{{PAGENAME}}|Talk: page for this article]] for the reasoning behind this request for cleanup. <br />
See [[Wiktionary:Entry layout explained]] for help on properly formatting entries.<br />
Once you have finished buggering this article, please remove this notice. </div>
ov8h8lg51adtw32w7v75ccelpkmhoka
43450
43449
2005-07-29T09:49:24Z
Ixfd64
1953
rever "bugger"
43450
wikitext
text/x-wiki
[[Category:Requests for Cleanup]]
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
'''It has been requested that this entry be [[Wiktionary:Requests for Cleanup|cleaned up]].''' <br />
All such requests are automatically added to the [[:Category:Requests for Cleanup|Requests for Cleanup category]]. Please consult the [[Talk:{{PAGENAME}}|Talk: page for this article]] for the reasoning behind this request for cleanup. <br />
See [[Wiktionary:Entry layout explained]] for help on properly formatting entries.<br />
Once you have finished cleaning up this article, please remove this notice. </div>
bd9sxqn6k449f7xjkmsmaa2ushy1d1g
43451
43450
2005-07-29T09:53:41Z
Ixfd64
1953
43451
wikitext
text/x-wiki
[[Category:Requests for Cleanup]]
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
'''It has been requested that this entry be [[Wiktionary:Requests for Cleanup|cleaned up]].''' <br />
All such requests are automatically added to the [[:Category:Requests for Cleanup|Requests for Cleanup category]]. Please consult the [[Talk:{{PAGENAME}}|Talk: page for this article]] for the reasoning behind this request for cleanup. <br />
See [[Wiktionary:Entry layout explained]] for help on properly formatting entries.<br />
Once you have finished cleaning up this article, please remove this notice. </div>
<!--fix caching problem
02t7eokov0brylyd4x9uu56hrx5cvmo
43452
43451
2005-07-29T09:54:13Z
Ixfd64
1953
revert to make sure it's working properly
43452
wikitext
text/x-wiki
[[Category:Requests for Cleanup]]
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
'''It has been requested that this entry be [[Wiktionary:Requests for Cleanup|cleaned up]].''' <br />
All such requests are automatically added to the [[:Category:Requests for Cleanup|Requests for Cleanup category]]. Please consult the [[Talk:{{PAGENAME}}|Talk: page for this article]] for the reasoning behind this request for cleanup. <br />
See [[Wiktionary:Entry layout explained]] for help on properly formatting entries.<br />
Once you have finished cleaning up this article, please remove this notice. </div>
bd9sxqn6k449f7xjkmsmaa2ushy1d1g
43453
43452
2005-07-29T18:33:03Z
Dudley Bluxo
1954
43453
wikitext
text/x-wiki
[[Category:Requests for Cleanup]]
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
'''It has been requested that this entry be [[Wiktionary:Requests for Cleanup|cleaned up]].''' <br />
All such requests are automatically added to the [[:Category:Requests for Cleanup|Requests for Cleanup category]]. Please consult the [[Talk:{{PAGENAME}}|Talk: page for this article]] for the reasoning behind this request for cleanup. <br />
See [[Wiktionary:Entry layout explained]] for help on properly formatting entries.<br />
Once you have finished buggering this article, please remove this notice. </div>
ov8h8lg51adtw32w7v75ccelpkmhoka
43454
43453
2005-07-29T19:49:59Z
24
1679
43454
wikitext
text/x-wiki
[[Category:Requests for Cleanup]]
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
'''It has been requested that this entry be [[Wiktionary:Requests for Cleanup|cleaned up]].''' <br />
All such requests are automatically added to the [[:Category:Requests for Cleanup|Requests for Cleanup category]]. Please consult the [[Talk:{{PAGENAME}}|Talk: page for this article]] for the reasoning behind this request for cleanup. <br />
See [[Wiktionary:Entry layout explained]] for help on properly formatting entries.<br />
Once you have finished cleaning up this article, please remove this notice. </div>
bd9sxqn6k449f7xjkmsmaa2ushy1d1g
43455
43454
2005-09-06T02:45:35Z
Mike
1438
[[template:cleanup]] doesn't have to appear in the cleanup category... (no, take it easy, *only* the template itself will vanish from the category, not the articles in which it is included!)
43455
wikitext
text/x-wiki
<includeonly>[[Category:Requests for Cleanup]]</includeonly>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
'''It has been requested that this entry be [[Wiktionary:Requests for Cleanup|cleaned up]].''' <br />
All such requests are automatically added to the [[:Category:Requests for Cleanup|Requests for Cleanup category]]. Please consult the [[Talk:{{PAGENAME}}|Talk: page for this article]] for the reasoning behind this request for cleanup. <br />
See [[Wiktionary:Entry layout explained]] for help on properly formatting entries.<br />
Once you have finished cleaning up this article, please remove this notice. </div>
04kcro10dex7aungq131329tkat6jhp
43456
43455
2005-09-17T20:56:26Z
Wonderfool
1433
43456
wikitext
text/x-wiki
'''This page kicks serious ass'''. Make others more like this one. From Ec
64qnzhdr1cckwigpt4k7clwb8p0txlh
43457
43456
2005-09-17T21:05:33Z
Polyglot
1955
Reverted edit of Wonderfool, changed back to last version by Mike
43457
wikitext
text/x-wiki
<includeonly>[[Category:Requests for Cleanup]]</includeonly>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
'''It has been requested that this entry be [[Wiktionary:Requests for Cleanup|cleaned up]].''' <br />
All such requests are automatically added to the [[:Category:Requests for Cleanup|Requests for Cleanup category]]. Please consult the [[Talk:{{PAGENAME}}|Talk: page for this article]] for the reasoning behind this request for cleanup. <br />
See [[Wiktionary:Entry layout explained]] for help on properly formatting entries.<br />
Once you have finished cleaning up this article, please remove this notice. </div>
04kcro10dex7aungq131329tkat6jhp
43458
43457
2005-12-06T07:25:41Z
Eclecticology
1907
Remove excess verbiage
43458
wikitext
text/x-wiki
<includeonly>[[Category:Requests for Cleanup]]</includeonly>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
'''Clean-up''' has been requested for this article. See [[Wiktionary:Requests for Cleanup]] or the [[Talk:{{PAGENAME}}|Talk: page for this article]] for details. <br />
Once you have finished cleaning up this article, please remove this notice. </br>
You may also remove this notice if no reason has been given for placing it here. </div>
dq4t32uygl5lm16n3k7ski0rkarmnnh
43459
43458
2006-01-20T10:56:19Z
Dcljr
292
if we're going to use the lower-case version from now on (see [[:Category:Requests for Cleanup]]), should probably actually make the change here...
43459
wikitext
text/x-wiki
<includeonly>[[Category:Requests for cleanup]]</includeonly>
<div name="Attention notice" class="boilerplate" id="attention" style="background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
'''Clean-up''' has been requested for this article. See [[Wiktionary:Requests for cleanup]] or the [[Talk:{{PAGENAME}}|talk page for this article]] for details. <br />
Once you have finished cleaning up this article, please remove this notice. </br>
You may also remove this notice if no reason has been given for placing it here.</div>
8x8ips7mxiiavwtbeqp4j4tjeph999k
43460
43459
2006-01-22T06:03:20Z
Gmcfoley
1912
43460
wikitext
text/x-wiki
<div name="Attention notice" class="boilerplate" id="attention" style=" background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
[[Image:Crystal 128 xpaint.png|left|50px]]
'''Clean-up''' has been requested for this article. See [[Wiktionary:Requests for cleanup]] or the [[Talk:{{PAGENAME}}|talk page for this article]] for details. <br />
<div style="font-size: 90%;">
Once you have finished cleaning up this article, please remove this notice. <br />
You may also remove this notice if no reason has been given for placing it here.
</div>
</div>
<includeonly>[[Category:Requests for cleanup]]</includeonly>
k6zpcsee0q6qt0jcfjmmmhbjqjg1h8z
43461
43460
2006-01-22T12:10:21Z
Dcljr
292
sorry, but I don't like that line break
43461
wikitext
text/x-wiki
<div name="Attention notice" class="boilerplate" id="attention" style=" background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
[[Image:Crystal 128 xpaint.png|left|50px]]
'''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup]] or the [[Talk:{{PAGENAME}}|talk page for this article]] for details.
<br />
<div style="font-size: 90%;">
Once you have finished cleaning up this article, please remove this notice.
You may also remove this notice if no reason has been given for placing it here.
</div>
</div>
<includeonly>[[Category:Requests for cleanup]]</includeonly>
5pbtakrt9lc9du87zo9io5kztibh0wl
43462
43461
2006-02-03T01:09:11Z
Ncik
1942
-image
43462
wikitext
text/x-wiki
<div name="Attention notice" class="boilerplate" id="attention" style=" background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
'''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup]] or the [[Talk:{{PAGENAME}}|talk page for this article]] for details.
<br />
<div style="font-size: 90%;">
Once you have finished cleaning up this article, please remove this notice.
You may also remove this notice if no reason has been given for placing it here.
</div>
</div>
<includeonly>[[Category:Requests for cleanup]]</includeonly>
kjuvmkkilf99m9mqb02ihm4cfl7h9qi
43463
43462
2006-02-06T20:28:15Z
Connel MacKenzie
1302
Added nicer links, explanation. Waiting on restoring image for results of vote.
43463
wikitext
text/x-wiki
<div name="Attention notice" class="boilerplate" id="attention" style=" background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
'''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup|action=new}} (add)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details.
<br />
<div style="font-size: 90%;">
Once you have finished cleaning up this article, please remove this notice.
You may also remove this notice if no reason has been given for placing it here.
</div>
</div>
<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to the cleanup category. It does not notify anyone on [[WS:RFC]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WS:RFC]] find the target page faster.
Please enter a full description of what you think needs to be cleaned up on [[WS:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
</noinclude>
axgzmm5mpnutv2u5bfu2z7mq54aam45
43464
43463
2006-02-07T21:48:52Z
Connel MacKenzie
1302
restored image link. The rest of the restores will be done via "rollback" button (therefore without comment.)
43464
wikitext
text/x-wiki
<div name="Attention notice" class="boilerplate" id="attention" style=" background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
[[Image:Crystal 128 xpaint.png|left|50px]]
'''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup|action=new}} (add)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details.
<br />
<div style="font-size: 90%;">
Once you have finished cleaning up this article, please remove this notice.
You may also remove this notice if no reason has been given for placing it here.
</div>
</div>
<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to the cleanup category. It does not notify anyone on [[WS:RFC]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WS:RFC]] find the target page faster.
Please enter a full description of what you think needs to be cleaned up on [[WS:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
</noinclude>
kd3g3pxprii2v70tkgf7dmd9ss9jmfk
43465
43464
2006-02-07T23:41:29Z
Connel MacKenzie
1302
added to template comment
43465
wikitext
text/x-wiki
<div name="Attention notice" class="boilerplate" id="attention" style=" background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
[[Image:Crystal 128 xpaint.png|left|50px]]
'''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup|action=new}} (add)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details.
<br />
<div style="font-size: 90%;">
Once you have finished cleaning up this article, please remove this notice.
You may also remove this notice if no reason has been given for placing it here.
</div>
</div>
<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to the cleanup category. It does not notify anyone on [[WS:RFC]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WS:RFC]] find the target page faster. Additionally, if the page was also listed on [[WS:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WS:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
</noinclude>
53pwz9n3caegnnzfw24jr8gveze0mi9
43466
43465
2006-02-09T19:47:54Z
Connel MacKenzie
1302
corrected "add entry" link (I could've sworn I tested this...is MediaWiki changing that fast?)
43466
wikitext
text/x-wiki
<div name="Attention notice" class="boilerplate" id="attention" style=" background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
[[Image:Crystal 128 xpaint.png|left|50px]]
'''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup}}?action=edit§ion=new (Add entry)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details.
<br />
<div style="font-size: 90%;">
Once you have finished cleaning up this article, please remove this notice.
You may also remove this notice if no reason has been given for placing it here.
</div>
</div>
<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to the cleanup category. It does not notify anyone on [[WS:RFC]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WS:RFC]] find the target page faster. Additionally, if the page was also listed on [[WS:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WS:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
</noinclude>
hu1hqtfjngkphpqq1iv0gwuuhhhyhpx
43467
43466
2006-02-11T20:37:22Z
Connel MacKenzie
1302
if
43467
wikitext
text/x-wiki
<div name="Attention notice" class="boilerplate" id="attention" style=" background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
[[Image:Crystal 128 xpaint.png|left|50px]]
'''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup}}?action=edit§ion=new (Add entry)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details. {{~if|{{{1|}}}|Reason: '''''{{{1|}}}'''''}}
<br />
<div style="font-size: 90%;">
Once you have finished cleaning up this article, please remove this notice.
You may also remove this notice if no reason has been given for placing it here.
</div>
</div>
<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to the cleanup category. It does not notify anyone on [[WS:RFC]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WS:RFC]] find the target page faster. Additionally, if the page was also listed on [[WS:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WS:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
</noinclude>
m59wgz0n50ke91weettvju30eee0rjk
43468
43467
2006-03-13T12:03:15Z
Richardb
1418
changed old WS:RFC to WT:RFC etc
43468
wikitext
text/x-wiki
<div name="Attention notice" class="boilerplate" id="attention" style=" background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
[[Image:Crystal 128 xpaint.png|left|50px]]
'''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup}}?action=edit§ion=new (Add entry)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details. {{~if|{{{1|}}}|Reason: '''''{{{1|}}}'''''}}
<br />
<div style="font-size: 90%;">
Once you have finished cleaning up this article, please remove this notice.
You may also remove this notice if no reason has been given for placing it here.
</div>
</div>
<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to the cleanup category. It does not notify anyone on [[WT:RFC]] automatically - that entry needs to be added manually.
To make the links "nice," you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WT:RFC]] find the target page faster. Additionally, if the page was also listed on [[WT:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WT:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
</noinclude>
d5rxlft11iur7nhki7p67h2jr9sa371
43469
43468
2006-03-13T12:37:31Z
Richardb
1418
tweaked it, even though not sure it is currently in use
43469
wikitext
text/x-wiki
<div name="Attention notice" class="boilerplate" id="attention" style=" background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
[[Image:Crystal 128 xpaint.png|left|50px]]
'''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup}}?action=edit§ion=new (Add entry)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details. {{~if|{{{1|}}}|Reason: '''''{{{1|}}}'''''}}
<br />
<div style="font-size: 90%;">
Once you have finished cleaning up this article, please remove this notice.
You may also remove this notice if no reason has been given for placing it here.
</div>
</div>
<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to [[Category:Requests for cleanup]]. It does not make an entry on the [[WT:RFC|Requests for cleanup]] page automatically - that entry needs to be added manually.
To make the links helpful, you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WT:RFC]] find the target page faster. Additionally, if the page was also listed on [[WT:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WT:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
</noinclude>
3n5kjqc1uuaq76al5u2ry0d0spm8n89
43470
43469
2006-04-25T19:29:15Z
Vildricianus
1301
[[Template:cleanup]] moved to [[Template:rfc]]: "rfc" outnumbers "cleanup", and is more consistent
43469
wikitext
text/x-wiki
<div name="Attention notice" class="boilerplate" id="attention" style=" background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
[[Image:Crystal 128 xpaint.png|left|50px]]
'''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup}}?action=edit§ion=new (Add entry)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details. {{~if|{{{1|}}}|Reason: '''''{{{1|}}}'''''}}
<br />
<div style="font-size: 90%;">
Once you have finished cleaning up this article, please remove this notice.
You may also remove this notice if no reason has been given for placing it here.
</div>
</div>
<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to [[Category:Requests for cleanup]]. It does not make an entry on the [[WT:RFC|Requests for cleanup]] page automatically - that entry needs to be added manually.
To make the links helpful, you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WT:RFC]] find the target page faster. Additionally, if the page was also listed on [[WT:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WT:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
</noinclude>
3n5kjqc1uuaq76al5u2ry0d0spm8n89
43471
43470
2006-04-25T19:29:52Z
Vildricianus
1301
43471
wikitext
text/x-wiki
<div name="Attention notice" class="boilerplate" id="attention" style=" background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
[[Image:Crystal 128 xpaint.png|left|50px]]
'''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup}}?action=edit§ion=new (Add entry)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details. {{~if|{{{1|}}}|Reason: '''''{{{1|}}}'''''}}
<br />
<div style="font-size: 90%;">
Once you have finished cleaning up this article, please remove this notice.
You may also remove this notice if no reason has been given for placing it here.
</div>
</div>
<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to [[Category:Requests for cleanup]]. It does not make an entry on the [[WT:RFC|Requests for cleanup]] page automatically - that entry needs to be added manually.
To make the links helpful, you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WT:RFC]] find the target page faster. Additionally, if the page was also listed on [[WT:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WT:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
[[Category:Cleanup templates|rfc]][[Category:Request templates|rfc]]
</noinclude>
o1c5gbv76l13y4b0yh4c2zhwega9qwq
43472
43471
2006-04-25T19:30:59Z
Vildricianus
1301
43472
wikitext
text/x-wiki
<div name="Attention notice" class="boilerplate" id="attention" style=" background-color: #efefff; width: 95%; margin: 0 auto; padding: 0 10px 0 10px; text-align: left; border: 1px solid #9F9FFF;" align="center">
[[Image:Crystal 128 xpaint.png|left|50px]]
'''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup}}?action=edit§ion=new (Add entry)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details. {{~if|{{{1|}}}|Reason: '''''{{{1|}}}'''''}}
<br />
<div style="font-size: 90%;">
Once you have finished cleaning up this article, please remove this notice.
You may also remove this notice if no reason has been given for placing it here.
</div>
</div>
<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to [[:Category:Requests for cleanup]]. It does not make an entry on the [[WT:RFC|Requests for cleanup]] page automatically - that entry needs to be added manually.
To make the links helpful, you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WT:RFC]] find the target page faster. Additionally, if the page was also listed on [[WT:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WT:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
[[Category:Cleanup templates|rfc]][[Category:Request templates|rfc]]
</noinclude>
n6w3r950ejhgz0q40icseitibmwlxop
43473
43472
2006-04-30T11:01:51Z
Vildricianus
1301
43473
wikitext
text/x-wiki
{| style=" background-color:#efefff; width:100%; margin-top:.5em; margin-bottom:.5em; padding: 0 10px 0 10px; text-align:left; border:1px solid #9F9FFF;"
| [[Image:Crystal 128 xpaint.png|left|50px]]
| '''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup}}?action=edit§ion=new (Add entry)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details. {{~if|{{{1|}}}|Reason: '''''{{{1|}}}'''''}} <br><span style="font-size: 90%;"> Once you have finished cleaning up this article, please remove this notice. You may also remove this notice if no reason has been given for placing it here.</span>
|}<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to [[:Category:Requests for cleanup]]. It does not make an entry on the [[WT:RFC|Requests for cleanup]] page automatically - that entry needs to be added manually.
To make the links helpful, you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WT:RFC]] find the target page faster. Additionally, if the page was also listed on [[WT:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WT:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
[[Category:Cleanup templates|rfc]][[Category:Request templates|rfc]]
</noinclude>
idrl87nu2o6z8p69r0v9kso9gfju6pw
43474
43473
2006-05-14T02:57:51Z
Richardb
1418
43474
wikitext
text/x-wiki
{| style=" background-color:#efefff; width:100%; margin-top:.5em; margin-bottom:.5em; padding: 0 10px 0 10px; text-align:left; border:1px solid #9F9FFF;"
| [[Image:Crystal 128 xpaint.png|left|50px]]
| '''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup}}?action=edit§ion=new (Add entry)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details. {{~if|{{{1|}}}|Reason: '''''{{{1|}}}'''''}} <small>This banner is inserted by using code <nowiki>{{rfc|reason}}</nowiki> . Don't forget to include the reason.</small>. <br><span style="font-size: 90%;"> Once you have finished cleaning up this article, please remove this notice. You may also remove this notice if no reason has been given for placing it here.</span>
|}<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to [[:Category:Requests for cleanup]]. It does not make an entry on the [[WT:RFC|Requests for cleanup]] page automatically - that entry needs to be added manually.
To make the links helpful, you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WT:RFC]] find the target page faster. Additionally, if the page was also listed on [[WT:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WT:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
[[Category:Cleanup templates|rfc]][[Category:Request templates|rfc]]
</noinclude>
j1gzvyic1nq4tyi7bemyqnu43hjzx92
43475
43474
2006-06-05T14:03:23Z
Vildricianus
1301
43475
wikitext
text/x-wiki
{| style=" background-color:#efefff; width:100%; margin-top:.5em; margin-bottom:.5em; padding: 0 10px 0 10px; text-align:left; border:1px solid #9F9FFF;"
| [[Image:Crystal 128 xpaint.png|left|50px]]
| '''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup}}?action=edit§ion=new (Add entry)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details. {{#if:{{{1|}}}|Reason: '''''{{{1|}}}'''''}} <small>This banner is inserted by using code <nowiki>{{rfc|reason}}</nowiki> . Don't forget to include the reason.</small>. <br><span style="font-size: 90%;"> Once you have finished cleaning up this article, please remove this notice. You may also remove this notice if no reason has been given for placing it here.</span>
|}<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to [[:Category:Requests for cleanup]]. It does not make an entry on the [[WT:RFC|Requests for cleanup]] page automatically - that entry needs to be added manually.
To make the links helpful, you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WT:RFC]] find the target page faster. Additionally, if the page was also listed on [[WT:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WT:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
[[Category:Cleanup templates|rfc]][[Category:Request templates|rfc]]
</noinclude>
gl1wljwd6phe806c8agqwh7p4w0dtcb
43476
43475
2006-09-05T22:39:48Z
AndreniW
1956
remove extra period
43476
wikitext
text/x-wiki
{| style=" background-color:#efefff; width:100%; margin-top:.5em; margin-bottom:.5em; padding: 0 10px 0 10px; text-align:left; border:1px solid #9F9FFF;"
| [[Image:Crystal 128 xpaint.png|left|50px]]
| '''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup}}?action=edit§ion=new (Add entry)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details. {{#if:{{{1|}}}|Reason: '''''{{{1|}}}'''''}} <small>This banner is inserted by using code <nowiki>{{rfc|reason}}</nowiki> . Don't forget to include the reason.</small> <br><span style="font-size: 90%;"> Once you have finished cleaning up this article, please remove this notice. You may also remove this notice if no reason has been given for placing it here.</span>
|}<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to [[:Category:Requests for cleanup]]. It does not make an entry on the [[WT:RFC|Requests for cleanup]] page automatically - that entry needs to be added manually.
To make the links helpful, you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WT:RFC]] find the target page faster. Additionally, if the page was also listed on [[WT:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WT:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
[[Category:Cleanup templates|rfc]][[Category:Request templates|rfc]]
</noinclude>
0t0pl4ltimnyj3mybrtvo5hhxhk1xdw
43477
43476
2006-09-08T06:54:28Z
Prince97
1957
img size
43477
wikitext
text/x-wiki
{| style=" background-color:#efefff; width:100%; margin-top:.5em; margin-bottom:.5em; padding: 0 10px 0 10px; text-align:left; border:1px solid #9F9FFF;"
| [[Image:Crystal 128 xpaint.png|left|50px]]
| #REDIRECT [[dray]] '''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup}}?action=edit§ion=new (Add entry)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details. {{#if:{{{1|}}}|Reason: '''''{{{1|}}}'''''}} <small>This banner is inserted by using code <nowiki>{{rfc|reason}}</nowiki> . Don't forget to include the reason.</small> <br><span style="font-size: 90%;"> Once you have finished cleaning up this article, please remove this notice. You may also remove this notice if no reason has been given for placing it here.</span>
|}<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to [[:Category:Requests for cleanup]]. It does not make an entry on the [[WT:RFC|Requests for cleanup]] page automatically - that entry needs to be added manually.
To make the links helpful, you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WT:RFC]] find the target page faster. Additionally, if the page was also listed on [[WT:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WT:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
[[Category:Cleanup templates|rfc]][[Category:Request templates|rfc]]
</noinclude>
eyxta9eo1fa4cbxucsgxcj9utvtuag3
43478
43477
2006-09-08T06:54:50Z
Connel MacKenzie
1302
Reverted edits by [[Special:Contributions/Prince97|Prince97]] ([[User_talk:Prince97|Talk]]); changed back to last version by [[User:AndreniW|AndreniW]]
43478
wikitext
text/x-wiki
{| style=" background-color:#efefff; width:100%; margin-top:.5em; margin-bottom:.5em; padding: 0 10px 0 10px; text-align:left; border:1px solid #9F9FFF;"
| [[Image:Crystal 128 xpaint.png|left|50px]]
| '''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup}}?action=edit§ion=new (Add entry)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details. {{#if:{{{1|}}}|Reason: '''''{{{1|}}}'''''}} <small>This banner is inserted by using code <nowiki>{{rfc|reason}}</nowiki> . Don't forget to include the reason.</small> <br><span style="font-size: 90%;"> Once you have finished cleaning up this article, please remove this notice. You may also remove this notice if no reason has been given for placing it here.</span>
|}<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to [[:Category:Requests for cleanup]]. It does not make an entry on the [[WT:RFC|Requests for cleanup]] page automatically - that entry needs to be added manually.
To make the links helpful, you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WT:RFC]] find the target page faster. Additionally, if the page was also listed on [[WT:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WT:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
[[Category:Cleanup templates|rfc]][[Category:Request templates|rfc]]
</noinclude>
0t0pl4ltimnyj3mybrtvo5hhxhk1xdw
43479
43478
2007-01-19T16:21:44Z
Connel MacKenzie
1302
remove nag message when a reason is supplied
43479
wikitext
text/x-wiki
{| style=" background-color:#efefff; width:100%; margin-top:.5em; margin-bottom:.5em; padding: 0 10px 0 10px; text-align:left; border:1px solid #9F9FFF;"
| [[Image:Crystal 128 xpaint.png|left|50px]]
| '''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup}}?action=edit§ion=new (Add entry)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details. {{#if:{{{1|}}}|Reason: '''''{{{1|}}}'''''|<small>This banner is inserted by using code <nowiki>{{rfc|reason}}</nowiki> . Don't forget to include the reason.</small>}} <br><span style="font-size: 90%;"> Once you have finished cleaning up this article, please remove this notice. You may also remove this notice if no reason has been given for placing it here.</span>
|}<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to [[:Category:Requests for cleanup]]. It does not make an entry on the [[WT:RFC|Requests for cleanup]] page automatically - that entry needs to be added manually.
To make the links helpful, you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WT:RFC]] find the target page faster. Additionally, if the page was also listed on [[WT:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WT:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
[[Category:Cleanup templates|rfc]][[Category:Request templates|rfc]]
</noinclude>
2ae0if892slkeygtb7n018tm6527miy
43480
43479
2007-03-09T15:15:41Z
Language Lover
1943
43480
wikitext
text/x-wiki
{| style=" background-color:#efefff; width:100%; margin-top:.5em; margin-bottom:.5em; padding: 0 10px 0 10px; text-align:left; border:1px solid #9F9FFF;"
| [[Image:Crystal 128 xpaint.png|left|50px]]
| '''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup}}?action=edit§ion=new (Add entry)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details. {{#if:{{{1|}}}|Reason: '''''{{{1|}}}'''''|<small>This banner is inserted by using code <nowiki>{{rfc|reason}}</nowiki> . Don't forget to include the reason.</small>}} <br><span style="font-size: 90%;"> Once you have finished cleaning up this article, please remove this notice. You may also remove this notice if no reason has been given for placing it here.</span>
|}<includeonly>[[Category:Requests for cleanup]] [[Category:English words that need attention]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to [[:Category:Requests for cleanup]]. It does not make an entry on the [[WT:RFC|Requests for cleanup]] page automatically - that entry needs to be added manually.
To make the links helpful, you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WT:RFC]] find the target page faster. Additionally, if the page was also listed on [[WT:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WT:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
[[Category:Cleanup templates|rfc]][[Category:Request templates|rfc]]
</noinclude>
6ovnwsnpdfh5h3urq13yft8xo78ryno
43481
43480
2007-03-09T15:16:27Z
Language Lover
1943
Ooops, didnt realize this template is used on non-English entries too
43481
wikitext
text/x-wiki
{| style=" background-color:#efefff; width:100%; margin-top:.5em; margin-bottom:.5em; padding: 0 10px 0 10px; text-align:left; border:1px solid #9F9FFF;"
| [[Image:Crystal 128 xpaint.png|left|50px]]
| '''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup}}?action=edit§ion=new (Add entry)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details. {{#if:{{{1|}}}|Reason: '''''{{{1|}}}'''''|<small>This banner is inserted by using code <nowiki>{{rfc|reason}}</nowiki> . Don't forget to include the reason.</small>}} <br><span style="font-size: 90%;"> Once you have finished cleaning up this article, please remove this notice. You may also remove this notice if no reason has been given for placing it here.</span>
|}<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to [[:Category:Requests for cleanup]]. It does not make an entry on the [[WT:RFC|Requests for cleanup]] page automatically - that entry needs to be added manually.
To make the links helpful, you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WT:RFC]] find the target page faster. Additionally, if the page was also listed on [[WT:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WT:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
[[Category:Cleanup templates|rfc]][[Category:Request templates|rfc]]
</noinclude>
2ae0if892slkeygtb7n018tm6527miy
43482
43481
2007-03-26T16:22:20Z
Robert Ullmann
1308
add clear: right so it doesn't overlap others above
43482
wikitext
text/x-wiki
{| style=" background-color:#efefff; width:100%; margin-top:.5em; margin-bottom:.5em; padding: 0 10px 0 10px; text-align:left; border:1px solid #9F9FFF; clear: right;"
| [[Image:Crystal 128 xpaint.png|left|50px]]
| '''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup}}?action=edit§ion=new (Add entry)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details. {{#if:{{{1|}}}|Reason: '''''{{{1|}}}'''''|<small>This banner is inserted by using code <nowiki>{{rfc|reason}}</nowiki> . Don't forget to include the reason.</small>}} <br><span style="font-size: 90%;"> Once you have finished cleaning up this article, please remove this notice. You may also remove this notice if no reason has been given for placing it here.</span>
|}<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to [[:Category:Requests for cleanup]]. It does not make an entry on the [[WT:RFC|Requests for cleanup]] page automatically - that entry needs to be added manually.
To make the links helpful, you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WT:RFC]] find the target page faster. Additionally, if the page was also listed on [[WT:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WT:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
[[Category:Cleanup templates|rfc]][[Category:Request templates|rfc]]
</noinclude>
8abvqyih6voy4fs2nxygj4aezp98ob2
43483
43482
2008-02-23T01:56:17Z
Ruakh
1334
&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}}
43483
wikitext
text/x-wiki
{| style=" background-color:#efefff; width:100%; margin-top:.5em; margin-bottom:.5em; padding: 0 10px 0 10px; text-align:left; border:1px solid #9F9FFF; clear: right;"
| [[Image:Crystal 128 xpaint.png|left|50px]]
| '''Cleanup''' has been requested for this article. See [[Wiktionary:Requests for cleanup#{{PAGENAME}}|Wiktionary:Requests for cleanup]] - <small>[{{fullurle:Wiktionary:Requests for cleanup}}?action=edit§ion=new&preloadtitle={{urlencode:[[{{FULLPAGENAME}}]]}} (Add entry)]</small> or the [[Talk:{{PAGENAME}}|talk page of this article]] for details. {{#if:{{{1|}}}|Reason: '''''{{{1|}}}'''''|<small>This banner is inserted by using code <nowiki>{{rfc|reason}}</nowiki> . Don't forget to include the reason.</small>}} <br><span style="font-size: 90%;"> Once you have finished cleaning up this article, please remove this notice. You may also remove this notice if no reason has been given for placing it here.</span>
|}<includeonly>[[Category:Requests for cleanup]]</includeonly><noinclude>
Adding the text <tt><nowiki>{{rfc}}</nowiki></tt> to an entry marks it for cleanup and adds it to [[:Category:Requests for cleanup]]. It does not make an entry on the [[WT:RFC|Requests for cleanup]] page automatically - that entry needs to be added manually.
To make the links helpful, you should enter the [[wikified]] pagename as the new subject. This assists people following the link from the page, as they will be directed to the proper section when clicking on the first link here. Wikifying it does not affect that redirection method, but does help people reading [[WT:RFC]] find the target page faster. Additionally, if the page was also listed on [[WT:RFD]] and has since been deleted, the red link is hard to miss.
Please enter a full description of what you think needs to be cleaned up on [[WT:RFC]]. Otherwise the <nowiki>{{rfc}}</nowiki> tag will either be removed or ignored.
[[Category:Cleanup templates|rfc]][[Category:Request templates|rfc]]
</noinclude>
t2s4vc59gdydb2biaa9a85qy8u7rqzq
43484
43483
2008-02-27T21:38:08Z
Conrad.Irwin
1315
re-jigged
43484
wikitext
text/x-wiki
{| class="noprint" style="background:#EEEEFF; width:90%; margin:auto; margin-top:.5em; margin-bottom:.5em; border:1px dashed #4444AA; text-align:left"
| rowspan="2"| [[Image:Crystal 128 xpaint.png|60px]]
! A user suggests that this page should be cleaned up{{#if:{{{1|}}}, giving the reason: "{{{1}}}"}}.
|-
|Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
|}<includeonly>{{{demo|[[Category:Requests for cleanup]]}}}</includeonly><noinclude>{{seeTalk}}</noinclude>
1q6zdqpxr4rr8mnmb15i2hfqegja8gu
43485
43484
2008-02-27T22:14:29Z
Conrad.Irwin
1315
fix {{if}} statement
43485
wikitext
text/x-wiki
{| class="noprint" style="background:#EEEEFF; width:90%; margin:auto; margin-top:.5em; margin-bottom:.5em; border:1px dashed #4444AA; text-align:left"
| rowspan="2"| [[Image:Crystal 128 xpaint.png|60px]]
! A user suggests that this page should be cleaned up{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|-
|Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for deletion/Others|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
|}<includeonly>{{{demo|[[Category:Requests for cleanup]]}}}</includeonly><noinclude>{{seeTalk}}</noinclude>
pfb5barvu1t4telnieqot0c0pk3kjb4
43486
43485
2008-02-28T21:16:42Z
Msh210
1325
43486
wikitext
text/x-wiki
{| class="noprint" style="background:#EEEEFF; width:90%; margin:auto; margin-top:.5em; margin-bottom:.5em; border:1px dashed #4444AA; text-align:left"
| rowspan="2"| [[Image:Crystal 128 xpaint.png|60px]]
! A user suggests that this page should be cleaned up{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|-
|Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
|}<includeonly>{{{demo|[[Category:Requests for cleanup]]}}}</includeonly><noinclude>{{seeTalk}}</noinclude>
kk4vdayinxekny32qitsjgzqi9222ja
43487
43486
2008-02-29T02:33:24Z
Ruakh
1334
s/page/{{<noinclude>temp|<\/noinclude>pagetype}}/;
43487
wikitext
text/x-wiki
{| class="noprint" style="background:#EEEEFF; width:90%; margin:auto; margin-top:.5em; margin-bottom:.5em; border:1px dashed #4444AA; text-align:left"
| rowspan="2"| [[Image:Crystal 128 xpaint.png|60px]]
! A user suggests that this {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|-
|Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
|}<includeonly>{{{demo|[[Category:Requests for cleanup]]}}}</includeonly><noinclude>{{seeTalk}}</noinclude>
1hitkzcwat8ldcxmo4q2ua4sutzfyw8
43488
43487
2008-05-02T13:33:15Z
CommonsDelinker
34
Replacing [[Image:Crystal_128_xpaint.png]] with [[Image:Crystal_Clear_app_gimp.png]] (by [[commons:User:Siebrand|Siebrand]] because: Was in category "Duplicate", although NOT an exact duplicate).
43488
wikitext
text/x-wiki
{| class="noprint" style="background:#EEEEFF; width:90%; margin:auto; margin-top:.5em; margin-bottom:.5em; border:1px dashed #4444AA; text-align:left"
| rowspan="2"| [[Image:Crystal_Clear_app_gimp.png|60px]]
! A user suggests that this {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|-
|Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
|}<includeonly>{{{demo|[[Category:Requests for cleanup]]}}}</includeonly><noinclude>{{seeTalk}}</noinclude>
7lydbt698g9meblh0ciw7ztvggzojex
43489
43488
2008-05-18T11:13:20Z
Hamaryns
1958
curly quotes
43489
wikitext
text/x-wiki
{| class="noprint" style="background:#EEEEFF; width:90%; margin:auto; margin-top:.5em; margin-bottom:.5em; border:1px dashed #4444AA; text-align:left"
| rowspan="2"| [[Image:Crystal_Clear_app_gimp.png|60px]]
! A user suggests that this {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|-
|Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
|}<includeonly>{{{demo|[[Category:Requests for cleanup]]}}}</includeonly><noinclude>{{seeTalk}}</noinclude>
6vivjac7g9dxfuunjk5l8ex6i05q70a
43490
43489
2008-05-18T11:48:35Z
Conrad.Irwin
1315
use {{maintenance box}}
43490
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Crystal_Clear_app_gimp.png|60px]]
|title = A user suggests that this {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}<!--
--><includeonly>{{{demo|[[Category:Requests for cleanup]]}}}</includeonly><noinclude>{{seeTalk}} [[Category:Wiktionary maintenance templates]]</noinclude>
j6walq6to5na6zdqjb34mw0c2kkicv6
43491
43490
2008-05-18T14:14:28Z
Ruakh
1334
fix cat name
43491
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Crystal_Clear_app_gimp.png|60px]]
|title = A user suggests that this {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}<!--
--><includeonly>{{{demo|[[Category:Requests for cleanup]]}}}</includeonly><noinclude>{{seeTalk}} [[Category:Maintenance templates]]</noinclude>
jjk5w3guwqvkvpca09zo3t7drmm9bth
43492
43491
2008-05-18T14:17:40Z
Ruakh
1334
Oh, darn it. This time fix cat to the *right* cat.
43492
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Crystal_Clear_app_gimp.png|60px]]
|title = A user suggests that this {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}<!--
--><includeonly>{{{demo|[[Category:Requests for cleanup]]}}}</includeonly><noinclude>{{seeTalk}} [[Category:Wiktionary:Maintenance templates]]</noinclude>
r8ce7re0gdz6c90zbk6yi1bq96xdmbd
43493
43492
2008-05-18T14:18:37Z
Ruakh
1334
Undo revision 4594346 by [[Special:Contributions/Ruakh|Ruakh]] ([[User talk:Ruakh|Talk]])
43493
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Crystal_Clear_app_gimp.png|60px]]
|title = A user suggests that this {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}<!--
--><includeonly>{{{demo|[[Category:Requests for cleanup]]}}}</includeonly><noinclude>{{seeTalk}} [[Category:Maintenance templates]]</noinclude>
jjk5w3guwqvkvpca09zo3t7drmm9bth
43494
43493
2008-05-29T17:46:18Z
Conrad.Irwin
1315
+lang= param
43494
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Crystal_Clear_app_gimp.png|60px]]
|title = A user suggests that this {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}<!--
--><includeonly>{{{demo|[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|[[Category:{{language|{{{lang}}}}} words needing attention]]}}}}}</includeonly><noinclude>{{seeTalk}} [[Category:Maintenance templates]]</noinclude>
96mjb419ts2r3hk805q9n02xb0pwiuj
43495
43494
2008-05-29T17:47:45Z
Conrad.Irwin
1315
display language
43495
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Crystal_Clear_app_gimp.png|60px]]
|title = A user suggests that this {{language|{{{lang|en}}}}} {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}<!--
--><includeonly>{{{demo|[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|[[Category:{{language|{{{lang}}}}} words needing attention]]}}}}}</includeonly><noinclude>{{seeTalk}} [[Category:Maintenance templates]]</noinclude>
2d8suo64rymzf3keh0txfxl2434l25u
43496
43495
2008-05-29T19:26:01Z
Msh210
1325
Otherwise, not backward compatible with current transclusions.
43496
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Crystal_Clear_app_gimp.png|60px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{language|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}<!--
--><includeonly>{{{demo|[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|[[Category:{{language|{{{lang}}}}} words needing attention]]}}}}}</includeonly><noinclude>{{seeTalk}} [[Category:Maintenance templates]]</noinclude>
0vdcxv6o1q6g6tzh4wh9y61zz04inms
43497
43496
2008-06-24T10:26:28Z
Conrad.Irwin
1315
use FULLPAGENAMEE not URLENCODE
43497
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Crystal_Clear_app_gimp.png|60px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{language|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle=%5B%5B:{{FULLPAGENAMEE}}%5D%5D}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}<!--
--><includeonly>{{{demo|[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|[[Category:{{language|{{{lang}}}}} words needing attention]]}}}}}</includeonly><noinclude>{{seeTalk}} [[Category:Maintenance templates]]</noinclude>
hyapn7ldu4baqwkzyxcc9om5h505x9r
43498
43497
2008-07-16T09:41:29Z
Conrad.Irwin
1315
Reverted edits by [[Special:Contributions/Conrad.Irwin|Conrad.Irwin]] ([[User_talk:Conrad.Irwin|Talk]]); changed back to last version by [[User:Msh210|Msh210]]
43498
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Crystal_Clear_app_gimp.png|60px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{language|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: "{{{1}}}"}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}<!--
--><includeonly>{{{demo|[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|[[Category:{{language|{{{lang}}}}} words needing attention]]}}}}}</includeonly><noinclude>{{seeTalk}} [[Category:Maintenance templates]]</noinclude>
0vdcxv6o1q6g6tzh4wh9y61zz04inms
43499
43498
2008-08-26T08:38:18Z
Hamaryns
1958
curly quotes
43499
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Crystal_Clear_app_gimp.png|60px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{language|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}<!--
--><includeonly>{{{demo|[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|[[Category:{{language|{{{lang}}}}} words needing attention]]}}}}}</includeonly><noinclude>{{seeTalk}} [[Category:Maintenance templates]]</noinclude>
88zg8910nh1f8o1xyvhvnkec0wu8xi1
43500
43499
2008-09-18T09:46:03Z
Dan Polansky
1451
Boldly replace with a broom image, as proposed at [[WT:BP]]. Revert me if I'm wrong.
43500
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Imbox style.png]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{language|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}<!--
--><includeonly>{{{demo|[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|[[Category:{{language|{{{lang}}}}} words needing attention]]}}}}}</includeonly><noinclude>{{seeTalk}} [[Category:Maintenance templates]]</noinclude>
1f2b2xkpfd2kvyecw2v8q6ueaus2pu1
43501
43500
2008-09-18T09:48:24Z
Dan Polansky
1451
There is an SVG version.
43501
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{language|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}<!--
--><includeonly>{{{demo|[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|[[Category:{{language|{{{lang}}}}} words needing attention]]}}}}}</includeonly><noinclude>{{seeTalk}} [[Category:Maintenance templates]]</noinclude>
1jgdkyny75oaz6lnnsvl74tdnysv79h
43502
43501
2009-05-05T20:47:40Z
Msh210
1325
[[WT:TA|cat]]
43502
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{language|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{{demo|[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|[[Category:{{language|{{{lang}}}}} words needing attention]]}}}}}</includeonly><noinclude>{{seeTalk}} [[Category:Maintenance templates]]</noinclude>
rw90prbfhoqmu571127smjtrd5mmfcy
43503
43502
2009-07-12T12:57:21Z
Mglovesfun
1369
[[fr:Modèle:formater]]
43503
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{language|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{{demo|[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|[[Category:{{language|{{{lang}}}}} words needing attention]]}}}}}</includeonly><noinclude>{{seeTalk}} [[Category:Maintenance templates]][[fr:Modèle:formater]]</noinclude>
mq5ziepbl4s3otzhy0oyzc87iqc08ju
43504
43503
2009-07-12T13:13:31Z
Mglovesfun
1369
Reverted edits by [[Special:Contributions/Mglovesfun|Mglovesfun]] ([[User_talk:Mglovesfun|Talk]]); changed back to last version by [[User:Msh210|Msh210]]
43504
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{language|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{FULLPAGENAME}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{{demo|[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|[[Category:{{language|{{{lang}}}}} words needing attention]]}}}}}</includeonly><noinclude>{{seeTalk}} [[Category:Maintenance templates]]</noinclude>
rw90prbfhoqmu571127smjtrd5mmfcy
43505
43504
2010-04-22T16:01:47Z
Msh210
1325
+fragment/section
43505
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{language|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{{demo|[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|[[Category:{{language|{{{lang}}}}} words needing attention]]}}}}}</includeonly><noinclude>{{seeTalk}} [[Category:Maintenance templates]]</noinclude>
9l5p919xyytil32uifwiakjg0zqelbm
43506
43505
2010-05-25T15:11:19Z
Mglovesfun
1369
add nocat parameter, documentation link
43506
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{language|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{#if:{{{nocat|}}}||[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|[[Category:{{language|{{{lang}}}}} words needing attention]]}}}}</includeonly><noinclude>{{documentation}}[[Category:Maintenance templates]]</noinclude>
mvttimkoztqzadyp10i6k3h5bssjwmg
43507
43506
2010-09-16T03:54:31Z
Bequw
1408
words -> terms
43507
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{language|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} should be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{#if:{{{nocat|}}}||[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|[[Category:{{language|{{{lang}}}}} terms needing attention]]}}}}</includeonly><noinclude>{{documentation}}[[Category:Maintenance templates]]</noinclude>
hrwhf6yacrifl6kbvdtfwsewwmvhu4c
43508
43507
2010-12-13T09:29:05Z
Jerome Charles Potts
1959
rm unnecessary "should"
43508
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{language|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{#if:{{{nocat|}}}||[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|[[Category:{{language|{{{lang}}}}} terms needing attention]]}}}}</includeonly><noinclude>{{documentation}}[[Category:Maintenance templates]]</noinclude>
obrp989ex4bo5fzd8fmkh8r8illt1bu
43509
43508
2011-04-14T13:03:40Z
Rua
1351
43509
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{language|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{#if:{{{nocat|}}}||[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|[[Category:{{languagex|{{{lang}}}}} terms needing attention]]}}}}</includeonly><noinclude>{{documentation}}[[Category:Maintenance templates]]</noinclude>
cmm3yafjfor266nkukib69hky54ej6e
43510
43509
2011-04-15T10:48:03Z
Rua
1351
43510
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{languagex|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{#if:{{{nocat|}}}||[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|[[Category:{{languagex|{{{lang}}}}} terms needing attention]]}}}}</includeonly><noinclude>{{documentation}}[[Category:Maintenance templates]]</noinclude>
2w3e8vt69usdtjtpo3piakhvsxq3grp
43511
43510
2011-08-02T19:12:09Z
Msh210
1325
-[[Wiktionary:Todo/templates bypassing attention]], keep topic for English
43511
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{languagex|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{#if:{{{nocat|}}}||[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|{{attention|{{{lang}}}|rfc}}}}}}</includeonly><noinclude>{{documentation}}[[Category:Maintenance templates]]</noinclude>
shg3e7aurdoy9jx3xq5gzm3ynjbnpy6
43512
43511
2011-08-02T19:17:29Z
Msh210
1325
forgot id
43512
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{languagex|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{#if:{{{nocat|}}}||[[Category:Requests for cleanup]]{{#if:{{{lang|}}}|{{attention|id=rfc|{{{lang}}}|rfc}}}}}}</includeonly><noinclude>{{documentation}}[[Category:Maintenance templates]]</noinclude>
84r4ueorbz9fy4won4sun6jvi793edo
43513
43512
2011-08-03T19:48:14Z
Msh210
1325
not en
43513
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{languagex|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{#if:{{{nocat|}}}||[[Category:Requests for cleanup]]{{#ifeq:{{{lang|en}}}|en||{{attention|id=rfc|{{{lang}}}|rfc}}}}}}</includeonly><noinclude>{{documentation}}[[Category:Maintenance templates]]</noinclude>
fbcqhak9s357bxmyz5a6be3d72nx0ue
43514
43513
2012-06-29T21:17:41Z
166.147.123.154
43514
wikitext
text/x-wiki
<section begin="etymology"/>{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{languagex|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{#if:{{{nocat|}}}||[[Category:Requests for cleanup]]{{#ifeq:{{{lang|en}}}|en||{{attention|id=rfc|{{{lang}}}|rfc}}}}}}</includeonly><noinclude>{{documentation}}[[Category:Maintenance templates]]</noinclude>
eecue0zv1y8msayd5c6mjaj8e8t5yyl
43515
43514
2012-06-29T21:19:30Z
Liliana-60
1366
Reverted edits by [[Special:Contributions/166.147.123.154|166.147.123.154]] ([[User_talk:166.147.123.154|Talk]]); changed back to last version by [[User:Msh210|Msh210]]
43515
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{languagex|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{#if:{{{nocat|}}}||[[Category:Requests for cleanup]]{{#ifeq:{{{lang|en}}}|en||{{attention|id=rfc|{{{lang}}}|rfc}}}}}}</includeonly><noinclude>{{documentation}}[[Category:Maintenance templates]]</noinclude>
fbcqhak9s357bxmyz5a6be3d72nx0ue
43516
43515
2012-06-29T21:19:45Z
Liliana-60
1366
Protected "[[Template:rfc]]": how on earth is this not protected ([edit=sysop] (indefinite) [move=sysop] (indefinite))
43515
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{languagex|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{#if:{{{nocat|}}}||[[Category:Requests for cleanup]]{{#ifeq:{{{lang|en}}}|en||{{attention|id=rfc|{{{lang}}}|rfc}}}}}}</includeonly><noinclude>{{documentation}}[[Category:Maintenance templates]]</noinclude>
fbcqhak9s357bxmyz5a6be3d72nx0ue
43517
43516
2012-06-30T15:56:59Z
Mglovesfun
1369
Changed protection level for "[[Template:rfc]]": auto-confirmed seems high enough ([edit=autoconfirmed] (indefinite) [move=sysop] (indefinite))
43515
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{languagex|{{{lang}}}}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{#if:{{{nocat|}}}||[[Category:Requests for cleanup]]{{#ifeq:{{{lang|en}}}|en||{{attention|id=rfc|{{{lang}}}|rfc}}}}}}</includeonly><noinclude>{{documentation}}[[Category:Maintenance templates]]</noinclude>
fbcqhak9s357bxmyz5a6be3d72nx0ue
43518
43517
2013-05-24T13:47:43Z
Rua
1351
43518
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{#invoke:language utilities|lookup_language|{{{lang}}}|names}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{#if:{{{nocat|}}}||[[Category:Requests for cleanup]]{{#ifeq:{{{lang|en}}}|en||{{attention|id=rfc|{{{lang}}}|rfc}}}}}}</includeonly><noinclude>{{documentation}}[[Category:Maintenance templates]]</noinclude>
9p5igk7rcnaqym3hb6t2w64zxhvi81t
43519
43518
2014-01-15T23:10:56Z
Rua
1351
43519
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{#invoke:languages/templates|lookup|{{{lang}}}|names}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{#if:{{{nocat|}}}||[[Category:Requests for cleanup]]{{#ifeq:{{{lang|en}}}|en||{{attention|id=rfc|{{{lang}}}|rfc}}}}}}</includeonly><noinclude>{{documentation}}[[Category:Maintenance templates]]</noinclude>
to4eif8lgcvut64xby6zf9ncsx6c744
43520
43519
2014-03-30T17:39:31Z
Rua
1351
43520
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{#invoke:languages/templates|lookup|{{{lang}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{#if:{{{nocat|}}}||[[Category:Requests for cleanup]]{{#ifeq:{{{lang|en}}}|en||{{attention|id=rfc|{{{lang}}}|rfc}}}}}}</includeonly><noinclude>{{documentation}}[[Category:Maintenance templates]]</noinclude>
dftat5sjq4vdns345unao7zbwlc18dj
43521
43520
2014-05-18T00:39:27Z
Rua
1351
43521
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{#invoke:languages/templates|getByCode|{{{lang}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly>{{#if:{{{nocat|}}}||[[Category:Requests for cleanup]]{{#ifeq:{{{lang|en}}}|en||{{attention|id=rfc|{{{lang}}}|rfc}}}}}}</includeonly><noinclude>{{documentation}}[[Category:Maintenance templates]]</noinclude>
mkknxczbrf88z7df7m9nz3a6lx8197z
43522
43521
2015-12-13T23:25:17Z
Rua
1351
43522
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{#invoke:languages/templates|getByCode|{{{lang}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
-->|<!--
-->[[Category:Requests for cleanup]]<!--
-->{{#ifeq:{{{lang|en}}}|en||{{attention|id=rfc|{{{lang}}}|rfc}}}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}
6r8oecojtwzxvk9zjzq7hr6qq0d5jmq
43523
43522
2015-12-13T23:25:53Z
Rua
1351
43523
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{#invoke:languages/templates|getByCode|{{{lang}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{lang|}}}||[[Category:Language code missing/rfc]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
-->|<!--
-->[[Category:Requests for cleanup]]<!--
-->{{#ifeq:{{{lang|en}}}|en||{{attention|id=rfc|{{{lang}}}|rfc}}}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}
gfhvyjp21n4uxdj2uycp6kkycrjdxuq
43524
43523
2016-02-05T20:56:44Z
TheDaveRoss
1305
Adding closing noinclude tag.
43524
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{#invoke:languages/templates|getByCode|{{{lang}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{lang|}}}||[[Category:Language code missing/rfc]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
-->|<!--
-->[[Category:Requests for cleanup]]<!--
-->{{#ifeq:{{{lang|en}}}|en||{{attention|id=rfc|{{{lang}}}|rfc}}}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
n4bqs0xidzo1qol354wc991io12oep2
43525
43524
2017-05-24T11:30:19Z
Daniel Carrero
1329
1- Categories by language. 2- Allowing format {{rfc|en|reason}}
43525
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{#invoke:languages/templates|getByCode|{{{lang}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| giving the reason: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{lang|}}}|[[Category:rfc with lang]]|[[Category:Language code missing/rfc]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
-->|<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for cleanup in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->{{#ifeq:{{{lang|en}}}|en||{{attention|id=rfc|{{{lang}}}|rfc}}}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
763zwhyk8ob5njr3h1ywwkjbbc8ho45
43526
43525
2017-05-24T11:35:57Z
Daniel Carrero
1329
43526
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{#invoke:languages/templates|getByCode|{{{lang}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| giving the reason: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
-->|<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for cleanup in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->{{#if:{{{lang|}}}|[[Category:rfc with lang]]|[[Category:Language code missing/rfc]]}}<!--
-->{{#ifeq:{{{lang|en}}}|en||{{attention|id=rfc|{{{lang}}}|rfc}}}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
gpfa4ubtiekuz1jzgwwgp9sin04g9xo
43527
43526
2017-05-24T11:37:51Z
Daniel Carrero
1329
For some reason, this template was adding {{attention}} in entries other than English. I removed the {{attention}} now.
43527
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{#invoke:languages/templates|getByCode|{{{lang}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| giving the reason: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
-->|<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for cleanup in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->{{#if:{{{lang|}}}|[[Category:rfc with lang]]|[[Category:Language code missing/rfc]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
mxxvkvhmdkernxtp6ykwa4f80irrej6
43528
43527
2017-05-24T11:38:55Z
Daniel Carrero
1329
43528
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{#invoke:languages/templates|getByCode|{{{lang}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| giving the reason: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
-->|<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for cleanup in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->{{#if:{{{lang|}}}|[[Category:rfc with lang]]|{{#if:{{{1|}}}||[[Category:Language code missing/rfc]]}}}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
2kvspns02wh25yibuw1hkmr54psrtfc
43529
43528
2017-05-24T12:19:46Z
Daniel Carrero
1329
43529
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{#invoke:languages/templates|getByCode|{{{lang}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| giving the reason: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for cleanup in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->{{#if:{{{lang|}}}|[[Category:rfc with lang]]|{{#if:{{{1|}}}||[[Category:Language code missing/rfc]]}}}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
d9kdxnlqj38iam4facdqspgysmafkqx
43530
43529
2017-05-24T15:04:53Z
Daniel Carrero
1329
43530
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{#invoke:languages/templates|getByCode|{{{lang}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| giving the reason: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for cleanup in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->{{#if:{{{lang|}}}|[[Category:rfc with lang]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
r7zl7ttlf9s2c6w623pp9lnxstrdks2
43531
43530
2017-05-24T18:10:00Z
Daniel Carrero
1329
43531
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{1|{{{lang|}}}}}}|{{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| giving the reason: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for cleanup in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->{{#if:{{{lang|}}}|[[Category:rfc with lang]]}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
hs0rcs27jvlit2f760vtlg7m57jx8ih
43532
43531
2017-05-24T18:11:29Z
Daniel Carrero
1329
43532
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{1|{{{lang|}}}}}}|{{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| giving the reason: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for cleanup in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
g1w6zvf05vlzqxitje1hxedjporj6iw
43533
43532
2017-05-26T22:42:15Z
-sche
1349
revert to revision by The Dave Ross - Daniel's changes other than to require a language code could be re-added, but requiring a language code clearly lacks support
43533
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{lang|}}}|{{#invoke:languages/templates|getByCode|{{{lang}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{{1|}}}|, giving the reason: “{{{1}}}”}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{lang|}}}||[[Category:Language code missing/rfc]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
-->|<!--
-->[[Category:Requests for cleanup]]<!--
-->{{#ifeq:{{{lang|en}}}|en||{{attention|id=rfc|{{{lang}}}|rfc}}}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
n4bqs0xidzo1qol354wc991io12oep2
43534
43533
2017-05-26T22:59:25Z
Daniel Carrero
1329
Give me a sec, I'll make the langcode optional.
43534
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{1|{{{lang|}}}}}}|{{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| giving the reason: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for cleanup in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
g1w6zvf05vlzqxitje1hxedjporj6iw
43535
43534
2017-05-26T23:03:23Z
Daniel Carrero
1329
I'm pretty sure this works without the langcode now.
43535
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{1|{{{lang|}}}}}}|{{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| giving the reason: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#if:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for cleanup in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|<!--
-->[[Category:Language code missing/rfc]]<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
cxcev7qhl3eaxxqqh9xhkjbjzevziht
43536
43535
2017-05-26T23:05:21Z
Daniel Carrero
1329
fix
43536
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{1|{{{lang|}}}}}}|{{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| giving the reason: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{#if:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for cleanup in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|<!--
-->[[Category:Language code missing/rfc]]<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
7ablibunk6lxc274ulc9eaki6y2mcn3
43537
43536
2017-06-05T21:06:47Z
Daniel Carrero
1329
43537
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{1|{{{lang|}}}}}}|{{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}| giving the reason: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{#if:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for cleanup in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|<!--
-->[[Category:Requests for cleanup with the language code missing]]<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
39ofa7qorke89quou7ryqrc9lgvhihx
43538
43537
2018-03-22T02:27:55Z
Equinox
1697
there should be a comma here...
43538
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{1|{{{lang|}}}}}}|{{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}|, giving the reason: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
do nothing
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{#if:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for cleanup in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|<!--
-->[[Category:Requests for cleanup with the language code missing]]<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
jyv149bdepdlom3bj3w2x2j7mfimsyd
43539
43538
2018-08-16T23:18:07Z
Mr. Guye
1960
Added to HTML comment
43539
wikitext
text/x-wiki
{{maintenance box|blue
|image = [[Image:Broom icon.svg|50px]]
|title = A user suggests that this {{#if:{{{1|{{{lang|}}}}}}|{{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}}}} {{<noinclude>temp|</noinclude>pagetype}} be cleaned up{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}|, giving the reason: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}.
|text = Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<sup class="plainlinks" title="Start discussion">([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])</sup> {{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}} for more information and remove this template after the problem has been dealt with.
}}{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
Do not categorize if the 'nocat' parameter is invoked.
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{#if:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for cleanup in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|<!--
-->[[Category:Requests for cleanup with the language code missing]]<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
88f7h7px9agtpxqfck3qf9swe8bdeub
43540
43539
2019-03-31T20:50:18Z
Rua
1351
43540
wikitext
text/x-wiki
{{maintenance box|blue<!--
-->|image = [[Image:Broom icon.svg|50px]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{#if:{{{1|{{{lang|}}}}}}|{{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}}}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}|, giving the reason: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->.<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#switch:{{#if:{{{lang|}}}|{{{lang|@}}}|{{{1|@}}}}}|@|=[[Category:Language code missing/rfc]]}}<!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
Do not categorize if the 'nocat' parameter is invoked.
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{#if:{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for cleanup in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
3djemzosxounboty1kqzwgcyb67zivv
43541
43540
2019-10-08T08:15:10Z
Benwing2
1346
make language code mandatory
43541
wikitext
text/x-wiki
{{maintenance box|blue<!--
-->|image = [[Image:Broom icon.svg|50px]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1<noinclude>|und</noinclude>}}}}}|getCanonicalName}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}|, giving the reason: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->.<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
Do not categorize if the 'nocat' parameter is invoked.
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for cleanup in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
ngrvrzg4hebug4vmlmfbayze5gtce5i
43542
43541
2019-10-10T04:07:19Z
WingerBot
1359
Manually add {{check deprecated lang param usage}} to request templates where lang= has been eliminated
43542
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|blue<!--
-->|image = [[Image:Broom icon.svg|50px]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1<noinclude>|und</noinclude>}}}}}|getCanonicalName}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}|, giving the reason: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->.<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
-->}}<!-- (end of {{check deprecated lang param usage}})
-->{{#if:{{{topic|}}}|[[Category:Entries needing topical attention]]}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}<!--
-->|<!--
Do not categorize if the 'nocat' parameter is invoked.
-->|<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for cleanup in {{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}|getCanonicalName}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
02w9xx7y3nyxqhbc97viy6coue26rj0
43543
43542
2019-10-13T14:48:07Z
Benwing2
1346
clean up
43543
wikitext
text/x-wiki
{{check deprecated lang param usage|lang={{{lang|}}}|<!--
-->{{maintenance box|blue<!--
-->|image = [[Image:Broom icon.svg|50px]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{#invoke:languages/templates|getByCode|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1<noinclude>|und</noinclude>}}}}}|getCanonicalName}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}|, giving the reason: '''"{{#if:{{{lang|}}}|{{{1|}}}|{{{2|}}}}}"'''}}<!--
-->.<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
-->}}<!-- (end of {{check deprecated lang param usage}})
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}<!--
-->|Requests for cleanup in {{langname|{{#if:{{{lang|}}}|{{{lang|}}}|{{{1|}}}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
l7krg1lfc2pl05x6bgw3pbf70bkelii
43544
43543
2019-10-15T05:16:49Z
WingerBot
1359
Manual changes to allow 1= only and not lang= in request templates with less than 1000 uses
43544
wikitext
text/x-wiki
{{maintenance box|blue<!--
-->|image = [[Image:Broom icon.svg|50px]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{langname|{{{1<noinclude>|und</noinclude>}}}}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{{2|}}}|, giving the reason: '''"{{{2|}}}"'''}}<!--
-->.<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1}}}<!--
-->|Requests for cleanup in {{langname|{{{1}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
iv1nisxf7ssd4hx3uk76i2ar57n2eqo
43545
43544
2020-03-25T21:15:19Z
Erutuon
1339
curly quotes
43545
wikitext
text/x-wiki
{{maintenance box|blue<!--
-->|image = [[Image:Broom icon.svg|50px]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{langname|{{{1<noinclude>|und</noinclude>}}}}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{{2|}}}|, giving the reason: '''“{{{2|}}}”'''}}<!--
-->.<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1}}}<!--
-->|Requests for cleanup in {{langname|{{{1}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
o8fkzm62zycgbyckd47tir0f372sb4p
43546
43545
2020-06-24T17:23:37Z
Erutuon
1339
add period after quoted reason only if quoted reason doesn't end in period
43546
wikitext
text/x-wiki
{{maintenance box|blue<!--
-->|image = [[Image:Broom icon.svg|50px]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{langname|{{{1<noinclude>|und</noinclude>}}}}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{{2|}}}|, giving the reason: '''“{{{2|}}}”'''}}<!--
-->{{#if: {{#invoke:string|find|{{{2|}}}|%.%s*}}||.}}<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1}}}<!--
-->|Requests for cleanup in {{langname|{{{1}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
gi1126qu3pkw715y2on1pdrragg8oja
43547
43546
2020-06-24T17:24:29Z
Erutuon
1339
fix pattern to check only at the end of the reason
43547
wikitext
text/x-wiki
{{maintenance box|blue<!--
-->|image = [[Image:Broom icon.svg|50px]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{langname|{{{1<noinclude>|und</noinclude>}}}}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{{2|}}}|, giving the reason: '''“{{{2|}}}”'''}}<!--
-->{{#if: {{#invoke:string|find|{{{2|}}}|%.%s*$}}||.}}<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1}}}<!--
-->|Requests for cleanup in {{langname|{{{1}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
7nrxty22swz9cstkze2v9ics57vi02w
43548
43547
2020-06-25T03:20:23Z
Erutuon
1339
find function doesn't like blank first argument
43548
wikitext
text/x-wiki
{{maintenance box|blue<!--
-->|image = [[Image:Broom icon.svg|50px]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{langname|{{{1<noinclude>|und</noinclude>}}}}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{{2|}}}|, giving the reason: '''“{{{2|}}}”'''}}<!--
-->{{#if: {{#invoke:string|find|{{{2}}}|%.%s*$}}||.}}<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1}}}<!--
-->|Requests for cleanup in {{langname|{{{1}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
7oy00a51n29nqwimm2fmlt027xx21tt
43549
43548
2022-01-24T14:04:41Z
This, that and the other
894
43549
wikitext
text/x-wiki
{{maintenance box|blue<!--
-->|image = [[Image:Broom icon.svg|50px]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{langname|{{{1<noinclude>|und</noinclude>}}}}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{{2|}}}|, giving the reason: '''“{{{2|}}}”'''}}<!--
-->{{#if: {{#invoke:string|find|{{{2}}}|%.%s*$}}||.}}<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preload=Template:rfv/preload$1&preloadparams%5B%5D={{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}.%20&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1}}}<!--
-->|Requests for cleanup in {{langname|{{{1}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
05emh76qgotb2cg94jm2lokbfas1f4p
43550
43549
2022-01-24T14:32:40Z
This, that and the other
894
fix for multi-word language names
43550
wikitext
text/x-wiki
{{maintenance box|blue<!--
-->|image = [[Image:Broom icon.svg|50px]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{langname|{{{1<noinclude>|und</noinclude>}}}}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{{2|}}}|, giving the reason: '''“{{{2|}}}”'''}}<!--
-->{{#if: {{#invoke:string|find|{{{2}}}|%.%s*$}}||.}}<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preload=Template:rfv/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1}}}<!--
-->|Requests for cleanup in {{langname|{{{1}}}}} entries<!--
-->|{{#if:{{{topic|}}}|Entries needing topical attention}}<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
guwaiy60dxnf0bfcfbn7ak2ocmtc96y
43551
43550
2022-09-25T05:56:14Z
This, that and the other
894
remove topic= parameter for now, per RFDO
43551
wikitext
text/x-wiki
{{maintenance box|blue<!--
-->|image = [[Image:Broom icon.svg|50px]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{langname|{{{1<noinclude>|und</noinclude>}}}}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{{2|}}}|, giving the reason: '''“{{{2|}}}”'''}}<!--
-->{{#if: {{#invoke:string|find|{{{2}}}|%.%s*$}}||.}}<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preload=Template:rfv/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1}}}<!--
-->|Requests for cleanup in {{langname|{{{1}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
c69zzcw3ihed991jtefmws1fvlamr2r
43552
43551
2024-04-04T03:11:56Z
Theknightwho
1347
Validate template parameters.
43552
wikitext
text/x-wiki
{{#invoke:checkparams|warn}}<!-- Validate template parameters
-->{{maintenance box|blue<!--
-->|image = [[Image:Broom icon.svg|50px]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{langname|{{{1<noinclude>|und</noinclude>}}}}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{{2|}}}|, giving the reason: '''“{{{2|}}}”'''}}<!--
-->{{#if: {{#invoke:string|find|{{{2}}}|%.%s*$}}||.}}<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preload=Template:rfv/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1}}}<!--
-->|Requests for cleanup in {{langname|{{{1}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
svo2yt9631wbo2lpsxe4qzmr5tqc90e
43553
43552
2025-04-05T18:55:45Z
SurjectionBot
1386
(bot) rename [[Module:string]] to [[Module:string/templates]]
43553
wikitext
text/x-wiki
{{#invoke:checkparams|warn}}<!-- Validate template parameters
-->{{maintenance box|blue<!--
-->|image = [[Image:Broom icon.svg|50px]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{langname|{{{1<noinclude>|und</noinclude>}}}}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{{2|}}}|, giving the reason: '''“{{{2|}}}”'''}}<!--
-->{{#if: {{#invoke:string/templates|find|{{{2}}}|%.%s*$}}||.}}<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preload=Template:rfv/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1}}}<!--
-->|Requests for cleanup in {{langname|{{{1}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
q711rmhwh27ivydjzstwcgqu6wcs8ei
43554
43553
2025-10-08T15:25:04Z
Surjection
380
43554
wikitext
text/x-wiki
{{#invoke:checkparams|warn}}<!-- Validate template parameters
-->{{maintenance box|blue<!--
-->|image = [[Image:Broom icon.svg|50px|link=]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{langname|{{{1<noinclude>|und</noinclude>}}}}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{{2|}}}|, giving the reason: '''“{{{2|}}}”'''}}<!--
-->{{#if: {{#invoke:string/templates|find|{{{2}}}|%.%s*$}}||.}}<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preload=Template:rfv/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1}}}<!--
-->|Requests for cleanup in {{langname|{{{1}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
c2bh9vkd7wgbrdqe2o0a62ulcdm7zla
43555
43554
2025-10-23T17:30:25Z
AutoDooz
1452
no existing calls with bad parameters, throw error instead of warning to avoid future misuse
43555
wikitext
text/x-wiki
{{#invoke:checkparams|error}}<!-- Validate template parameters
-->{{maintenance box|blue<!--
-->|image = [[Image:Broom icon.svg|50px|link=]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{langname|{{{1<noinclude>|und</noinclude>}}}}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{{2|}}}|, giving the reason: '''“{{{2|}}}”'''}}<!--
-->{{#if: {{#invoke:string/templates|find|{{{2}}}|%.%s*$}}||.}}<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preload=Template:rfv/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1}}}<!--
-->|Requests for cleanup in {{langname|{{{1}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
rl92eav4tcxclwirlf0qkynsvi8fpvt
43556
43555
2026-04-15T19:08:38Z
Surjection
380
Changed protection settings for "[[Template:rfc]]" ([Edit=Allow only autopatrollers] (indefinite) [Move=Allow only administrators] (indefinite))
43555
wikitext
text/x-wiki
{{#invoke:checkparams|error}}<!-- Validate template parameters
-->{{maintenance box|blue<!--
-->|image = [[Image:Broom icon.svg|50px|link=]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{langname|{{{1<noinclude>|und</noinclude>}}}}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{{2|}}}|, giving the reason: '''“{{{2|}}}”'''}}<!--
-->{{#if: {{#invoke:string/templates|find|{{{2}}}|%.%s*$}}||.}}<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preload=Template:rfv/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1}}}<!--
-->|Requests for cleanup in {{langname|{{{1}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
rl92eav4tcxclwirlf0qkynsvi8fpvt
43557
43556
2026-05-28T09:36:16Z
Juwan
804
43557
wikitext
text/x-wiki
{{#invoke:checkparams|error}}<!-- Validate template parameters
-->{{maintenance box|blue<!--
-->|image = [[File:Codex icon sandbox color-progressive.svg|40px|alt=To be cleaned up]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{langname|{{{1<noinclude>|und</noinclude>}}}}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{{2|}}}|, giving the reason: '''“{{{2|}}}”'''}}<!--
-->{{#if: {{#invoke:string/templates|find|{{{2}}}|%.%s*$}}||.}}<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preload=Template:rfv/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1}}}<!--
-->|Requests for cleanup in {{langname|{{{1}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
bikf50solfunrzeaqx7kbu3gom4j40n
43558
43557
2026-06-24T04:43:59Z
King ChristLike
964
126 revisions imported from [[:en:Template:rfc]]
43557
wikitext
text/x-wiki
{{#invoke:checkparams|error}}<!-- Validate template parameters
-->{{maintenance box|blue<!--
-->|image = [[File:Codex icon sandbox color-progressive.svg|40px|alt=To be cleaned up]]<!--
-->|title = <!--
-->A user suggests that this <!--
-->{{langname|{{{1<noinclude>|und</noinclude>}}}}}<!--
--> {{<noinclude>temp|</noinclude>pagetype}} be cleaned up<!--
-->{{#if:{{{2|}}}|, giving the reason: '''“{{{2|}}}”'''}}<!--
-->{{#if: {{#invoke:string/templates|find|{{{2}}}|%.%s*$}}||.}}<!--
-->|text = <!--
-->Please see the discussion on '''[[Wiktionary:Requests for cleanup#{{{fragment|{{{section|{{FULLPAGENAME}}}}}}}}|Requests for cleanup]]'''<!--
--><sup class="plainlinks" title="Start discussion"><!--
-->([{{fullurl:Wiktionary:Requests for cleanup|action=edit§ion=new&preload=Template:rfv/preload$1&preloadparams%5B%5D={{urlencode:{{langname|{{{lang|{{{1|<noinclude>und</noinclude>}}}}}}}}}}.%20&preloadtitle={{urlencode:[[:{{FULLPAGENAME}}]]}}}} +])<!--
--></sup> <!--
-->{{#ifexist:{{TALKPAGENAME}}|or the [[{{TALKPAGENAME}}|talk page]]}}<!--
--> for more information and remove this template after the problem has been dealt with.<!--
-->}}<!--
--><includeonly><!--
-->{{#if:{{{nocat|}}}||<!--
-->{{#switch:{{NAMESPACE}}<!--
-->||Citations|Transwiki|Reconstruction=<!--
-->{{categorize<!--
-->|{{{1}}}<!--
-->|Requests for cleanup in {{langname|{{{1}}}}} entries<!--
-->|sort={{{sort|}}}<!--
-->}}<!--
-->|#default=[[Category:Requests for cleanup/Others]]<!--
-->}}<!--
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}</noinclude>
bikf50solfunrzeaqx7kbu3gom4j40n
Templeeti:langname
10
8228
43559
2017-06-11T18:07:33Z
Erutuon
1339
easier way to call [[Module:languages/templates]]
43559
wikitext
text/x-wiki
<includeonly>{{#invoke:languages/templates|getCanonicalName|parent=1}}</includeonly><noinclude>
{{documentation}}
</noinclude>
5sy6w7kar91nbixtiiagd57mhtxq8tp
43560
43559
2017-06-11T18:12:07Z
Erutuon
1339
I guess this is needed
43560
wikitext
text/x-wiki
<includeonly>{{safesubst:#invoke:languages/templates|getCanonicalName|parent=1}}</includeonly><noinclude>
{{documentation}}
</noinclude>
mo6yi2g8xvtr6acnyhfti59aaz69x12
43561
43560
2017-06-11T19:04:53Z
Erutuon
1339
Erutuon moved page [[Template:getCanonicalName]] to [[Template:langname]]: getCanonicalName is ambiguous: languages, families, and scripts have canonical names, and this template only handles languages.
43560
wikitext
text/x-wiki
<includeonly>{{safesubst:#invoke:languages/templates|getCanonicalName|parent=1}}</includeonly><noinclude>
{{documentation}}
</noinclude>
mo6yi2g8xvtr6acnyhfti59aaz69x12
43562
43561
2019-10-13T15:58:33Z
Benwing2
1346
fix to use less memory
43562
wikitext
text/x-wiki
<includeonly>{{#invoke:languages/templates|getByCode|{{{1}}}|getCanonicalName}}</includeonly><noinclude>
{{documentation}}
</noinclude>
nvgemi6s37cs1zhti56qd0ai26rb9cm
43563
43562
2019-10-28T20:41:05Z
Erutuon
1339
add safesubst so that this can be substituted
43563
wikitext
text/x-wiki
<includeonly>{{safesubst:#invoke:languages/templates|getByCode|{{{1}}}|getCanonicalName}}</includeonly><noinclude>
{{documentation}}
</noinclude>
ie1odf96p0hd3cw3do2bii2qoengusl
43564
43563
2019-11-09T02:33:27Z
en>Unknown user
0
43564
wikitext
text/x-wiki
phoiac9h4m842xq45sp7s6u21eteeq1
43565
43564
2019-11-09T02:33:41Z
Minorax
114
43565
wikitext
text/x-wiki
<includeonly>{{safesubst:#invoke:languages/templates|getByCode|{{{1}}}|getCanonicalName}}</includeonly><noinclude>
{{documentation}}
</noinclude>
ie1odf96p0hd3cw3do2bii2qoengusl
43566
43565
2019-11-09T03:54:15Z
Erutuon
1339
Protected "[[Template:langname]]": Highly visible template/module ([Edit=Allow only template editors and administrators] (indefinite) [Move=Allow only template editors and administrators] (indefinite))
43565
wikitext
text/x-wiki
<includeonly>{{safesubst:#invoke:languages/templates|getByCode|{{{1}}}|getCanonicalName}}</includeonly><noinclude>
{{documentation}}
</noinclude>
ie1odf96p0hd3cw3do2bii2qoengusl
43567
43566
2023-09-16T07:00:55Z
Benwing2
1346
support allow_etym=
43567
wikitext
text/x-wiki
<includeonly>{{#if:{{{allow_etym|}}}|{{safesubst:#invoke:languages/templates|getByCodeAllowEtym|{{{1}}}|getCanonicalName}}|{{safesubst:#invoke:languages/templates|getByCode|{{{1}}}|getCanonicalName}}}}</includeonly><noinclude>
{{documentation}}
</noinclude>
od71pv3g699munt2bejjp1kc9oeoudn
43568
43567
2025-05-05T09:57:00Z
This, that and the other
894
make subst'able again [[User:Benwing2]]
43568
wikitext
text/x-wiki
<includeonly>{{{{{|safesubst:}}}#if:{{{allow_etym|}}}|{{safesubst:#invoke:languages/templates|getByCodeAllowEtym|{{{1}}}|getCanonicalName}}|{{safesubst:#invoke:languages/templates|getByCode|{{{1}}}|getCanonicalName}}}}</includeonly><noinclude>
{{documentation}}
</noinclude>
jcz8qzsarrsztsdhg98harj7uxmnzdv
43569
43568
2025-07-15T19:59:25Z
Theknightwho
1347
There's no reason for this template to restrict the use of variant ("etymology-only") language names.
43569
wikitext
text/x-wiki
<includeonly><onlyinclude>{{safesubst:<noinclude/>#invoke:languages/templates|getByCodeAllowEtym|{{{1}}}|getCanonicalName}}</onlyinclude></includeonly><!--
-->{{documentation}}
98rwazxw59821g4klftkb10181dg59u
43570
43569
2026-04-18T19:59:34Z
AutoDooz
1452
Added parameter checking [[Category:Pages using invalid parameters when calling Template:langname]]
43570
wikitext
text/x-wiki
{{#invoke:checkparams|warn}}<!-- Validate template parameters
--><includeonly><onlyinclude>{{safesubst:<noinclude/>#invoke:languages/templates|getByCodeAllowEtym|{{{1}}}|getCanonicalName}}</onlyinclude></includeonly><!--
-->{{documentation}}
efnsnilq1hsbuockdg0v5dt6in0ri12
43571
43570
2026-04-22T16:54:46Z
AutoDooz
1452
no existing calls with bad parameters, throw error instead of warning to avoid future misuse
43571
wikitext
text/x-wiki
{{#invoke:checkparams|error}}<!-- Validate template parameters
--><includeonly><onlyinclude>{{safesubst:<noinclude/>#invoke:languages/templates|getByCodeAllowEtym|{{{1}}}|getCanonicalName}}</onlyinclude></includeonly><!--
-->{{documentation}}
16ob92vl8e59y5wxl0fnns3c074buu1
43572
43571
2026-06-24T04:44:01Z
King ChristLike
964
13 revisions imported from [[:en:Template:langname]]
43571
wikitext
text/x-wiki
{{#invoke:checkparams|error}}<!-- Validate template parameters
--><includeonly><onlyinclude>{{safesubst:<noinclude/>#invoke:languages/templates|getByCodeAllowEtym|{{{1}}}|getCanonicalName}}</onlyinclude></includeonly><!--
-->{{documentation}}
16ob92vl8e59y5wxl0fnns3c074buu1
Templeeti:rfc/documentation
10
8229
43578
2010-05-25T15:13:20Z
Mglovesfun
1369
Created page with '{{documentation subpage}} == Instructions == To use this template, # Add {{temp|rfc|short reason here}} to the page source at the top of the page, or the language section, that ...'
43578
wikitext
text/x-wiki
{{documentation subpage}}
== Instructions ==
To use this template,
# Add {{temp|rfc|short reason here}} to the page source at the top of the page, or the language section, that needs cleaning up.
# Start the discussion on [[Wiktionary:Requests for cleanup]] by clicking the (+) link.
This will add the page to [[:Category:Requests for cleanup]] and if a <code>lang=</code> is given also to ''Category:<Language name> words needing attention''.
If you want to use this on a page which doesn't need cleanup, to give an example rendering, pass the demo parameter, for example {{temp|rfc}} renders correctly, but does not include the cleanup category.
If the entry could do with attention from someone versed in a particular field, add the parameter <code>topic=''[topic]''</code>; this will add the page (automatically) to [[:Category:Entries needing topical attention]] and (eventually, manually) to the list at [[Wiktionary:Entries needing topical attention]].
=== Sample ===
{{rfc|short reason here|nocat=1}}
bh8kgntru6otxx8mxq4rv45d3t4jdmt
43579
43578
2010-09-16T03:53:07Z
Bequwbot
1962
/* Instructions */words → terms
43579
wikitext
text/x-wiki
{{documentation subpage}}
== Instructions ==
To use this template,
# Add {{temp|rfc|short reason here}} to the page source at the top of the page, or the language section, that needs cleaning up.
# Start the discussion on [[Wiktionary:Requests for cleanup]] by clicking the (+) link.
This will add the page to [[:Category:Requests for cleanup]] and if a <code>lang=</code> is given also to ''Category:<Language name> terms needing attention''.
If you want to use this on a page which doesn't need cleanup, to give an example rendering, pass the demo parameter, for example {{temp|rfc}} renders correctly, but does not include the cleanup category.
If the entry could do with attention from someone versed in a particular field, add the parameter <code>topic=''[topic]''</code>; this will add the page (automatically) to [[:Category:Entries needing topical attention]] and (eventually, manually) to the list at [[Wiktionary:Entries needing topical attention]].
=== Sample ===
{{rfc|short reason here|nocat=1}}
3s5unagcub6jz23hsx7v8uvquta6e3x
43580
43579
2013-05-24T13:47:15Z
Rua
1351
CodeCat moved page [[Template:rfc/doc]] to [[Template:rfc/documentation]] without leaving a redirect: Moving documentation
43579
wikitext
text/x-wiki
{{documentation subpage}}
== Instructions ==
To use this template,
# Add {{temp|rfc|short reason here}} to the page source at the top of the page, or the language section, that needs cleaning up.
# Start the discussion on [[Wiktionary:Requests for cleanup]] by clicking the (+) link.
This will add the page to [[:Category:Requests for cleanup]] and if a <code>lang=</code> is given also to ''Category:<Language name> terms needing attention''.
If you want to use this on a page which doesn't need cleanup, to give an example rendering, pass the demo parameter, for example {{temp|rfc}} renders correctly, but does not include the cleanup category.
If the entry could do with attention from someone versed in a particular field, add the parameter <code>topic=''[topic]''</code>; this will add the page (automatically) to [[:Category:Entries needing topical attention]] and (eventually, manually) to the list at [[Wiktionary:Entries needing topical attention]].
=== Sample ===
{{rfc|short reason here|nocat=1}}
3s5unagcub6jz23hsx7v8uvquta6e3x
43581
43580
2015-12-13T23:25:15Z
Rua
1351
43581
wikitext
text/x-wiki
{{documentation subpage}}
==Instructions==
To use this template,
# Add {{temp|rfc|short reason here}} to the page source at the top of the page, or the language section, that needs cleaning up.
# Start the discussion on [[Wiktionary:Requests for cleanup]] by clicking the (+) link.
This will add the page to [[:Category:Requests for cleanup]] and if a <code>lang=</code> is given also to ''Category:<Language name> terms needing attention''.
If you want to use this on a page which doesn't need cleanup, to give an example rendering, pass the demo parameter, for example {{temp|rfc}} renders correctly, but does not include the cleanup category.
If the entry could do with attention from someone versed in a particular field, add the parameter <code>topic=''[topic]''</code>; this will add the page (automatically) to [[:Category:Entries needing topical attention]] and (eventually, manually) to the list at [[Wiktionary:Entries needing topical attention]].
==Sample==
{{rfc|short reason here|nocat=1}}
<includeonly>
[[Category:Maintenance templates]]
sk804byuj99tcu80wo3av8manb2v9ak
43582
43581
2017-05-24T21:00:01Z
Daniel Carrero
1329
43582
wikitext
text/x-wiki
{{documentation subpage}}
==Instructions==
To use this template,
# Add {{temp|rfc|short reason here}} to the page source at the top of the page, or the language section, that needs cleaning up.
# Start the discussion on [[Wiktionary:Requests for cleanup]] by clicking the (+) link.
This will add the page to [[:Category:Requests for cleanup]] and if a <code>lang=</code> is given also to ''Category:<Language name> terms needing attention''.
If you want to use this on a page which doesn't need cleanup, to give an example rendering, pass the demo parameter, for example {{temp|rfc}} renders correctly, but does not include the cleanup category.
If the entry could do with attention from someone versed in a particular field, add the parameter <code>topic=''[topic]''</code>; this will add the page (automatically) to [[:Category:Entries needing topical attention]] and (eventually, manually) to the list at [[Wiktionary:Entries needing topical attention]].
==Sample==
{{rfc|en|short reason here|nocat=1}}
<includeonly>
[[Category:Maintenance templates]]</includeonly>
ky3h1wk1pijj0zmbr6e5unv7thqd9c5
43583
43582
2017-05-25T04:13:02Z
Daniel Carrero
1329
/* Instructions */ update doc
43583
wikitext
text/x-wiki
{{documentation subpage}}
==Instructions==
To use this template,
# Add {{temp|rfc|en|short reason here}} ("en" for English, replace with the appropriate language code) to the page source at the top of the page, or the language section, that needs cleaning up.
# Start the discussion on [[Wiktionary:Requests for cleanup]] by clicking the (+) link.
This will add the page to the correct language category, e.g., [[:Category:Requests for cleanup in English entries]].
If you want to use this on a page which doesn't need cleanup, to give an example rendering, pass the demo parameter, for example {{temp|rfc}} renders correctly, but does not include the cleanup category.
If the entry could do with attention from someone versed in a particular field, add the parameter <code>topic=''[topic]''</code>; this will add the page (automatically) to [[:Category:Entries needing topical attention]] and (eventually, manually) to the list at [[Wiktionary:Entries needing topical attention]].
==Sample==
{{rfc|en|short reason here|nocat=1}}
<includeonly>
[[Category:Maintenance templates]]</includeonly>
kfusoybzjixf2frnaw4ro1pgg62j0g8
43584
43583
2017-05-25T04:13:54Z
Daniel Carrero
1329
43584
wikitext
text/x-wiki
{{documentation subpage}}
==Instructions==
To use this template,
# Add {{temp|rfc|en|short reason here}} ("en" for English, replace with the appropriate language code) to the page source at the top of the page, or the language section, that needs cleaning up.
# Start the discussion on [[Wiktionary:Requests for cleanup]] by clicking the (+) link.
The language code is mandatory in entries, reconstruction and citation pages, otherwise the template will generate a module error. When adding rfc in templates, categories and appendices, the language code is optional.
This will add the page to the correct language category, e.g., [[:Category:Requests for cleanup in English entries]].
If you want to use this on a page which doesn't need cleanup, to give an example rendering, pass the demo parameter, for example {{temp|rfc}} renders correctly, but does not include the cleanup category.
If the entry could do with attention from someone versed in a particular field, add the parameter <code>topic=''[topic]''</code>; this will add the page (automatically) to [[:Category:Entries needing topical attention]] and (eventually, manually) to the list at [[Wiktionary:Entries needing topical attention]].
==Sample==
{{rfc|en|short reason here|nocat=1}}
<includeonly>
[[Category:Maintenance templates]]</includeonly>
9e20ecs52u99yoi7tgzoppgejp4w7vt
43585
43584
2017-05-26T07:24:53Z
Erutuon
1339
clarify how to omit language code
43585
wikitext
text/x-wiki
{{documentation subpage}}
==Instructions==
To use this template,
# Add {{temp|rfc|en|short reason here}} (<code>en</code> for English, or replace with the appropriate language code) to the page source at the top of the page, or the language section, that needs cleaning up.
# Start the discussion on [[Wiktionary:Requests for cleanup]] by clicking the (+) link.
The language code is mandatory in entries, reconstruction and citation pages, otherwise the template will generate a module error. When adding rfc in templates, categories and appendices, the language code is optional; just leave the first parameter blank and put the reason into the second parameter.
This will add the page to the correct language category, e.g., [[:Category:Requests for cleanup in English entries]].
If you want to use this on a page which doesn't need cleanup, to give an example rendering, pass the demo parameter, for example {{temp|rfc}} renders correctly, but does not include the cleanup category.
If the entry could do with attention from someone versed in a particular field, add the parameter <code>topic=''[topic]''</code>; this will add the page (automatically) to [[:Category:Entries needing topical attention]] and (eventually, manually) to the list at [[Wiktionary:Entries needing topical attention]].
==Sample==
{{rfc|en|short reason here|nocat=1}}
<includeonly>
[[Category:Maintenance templates]]</includeonly>
3m81aji0c5pyljcklvcv33jixtmorpd
43586
43585
2019-10-08T08:16:03Z
Benwing2
1346
43586
wikitext
text/x-wiki
{{documentation subpage}}
==Instructions==
To use this template,
# Add {{temp|rfc|en|short reason here}} (<code>en</code> for English, or replace with the appropriate language code) to the page source at the top of the page, or the language section, that needs cleaning up.
# Start the discussion on [[Wiktionary:Requests for cleanup]] by clicking the (+) link.
The language code is mandatory; otherwise the template will generate a module error. When adding rfc in templates, categories and appendices, if a single language doesn't apply, use <code>und</code>.
This will add the page to the correct language category, e.g., [[:Category:Requests for cleanup in English entries]].
If you want to use this on a page which doesn't need cleanup, to give an example rendering, pass the demo parameter, for example {{temp|rfc}} renders correctly, but does not include the cleanup category.
If the entry could do with attention from someone versed in a particular field, add the parameter <code>topic=''[topic]''</code>; this will add the page (automatically) to [[:Category:Entries needing topical attention]] and (eventually, manually) to the list at [[Wiktionary:Entries needing topical attention]].
==Sample==
{{rfc|en|short reason here|nocat=1}}
<includeonly>
[[Category:Maintenance templates]]</includeonly>
lo3o0gvfrxdvmowx9a5xotgof58ioi6
43587
43586
2019-10-17T05:16:52Z
WingerBot
1359
Manual cleanups of request template documentation pages
43587
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
To use this template,
# Add {{temp|rfc|en|short reason here}} (<code>en</code> for English, or replace with the appropriate language code) to the page source at the top of the page, or the language section, that needs cleaning up.
# Start the discussion on [[Wiktionary:Requests for cleanup]] by clicking the (+) link.
==Parameters==
; {{para|1|req=1}}
: The [[Wiktionary:LANGCODE|language code]] of the term needing cleanup. See [[Wiktionary:List of languages]]. Use <code>und</code> if a single language doesn't apply, e.g. in templates, categories and appendices.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
; {{para|topic}}
: If given, add this page to [[:Category:Entries needing topical attention]] and (eventually, manually) to the list at [[Wiktionary:Entries needing topical attention]].
This template adds the page to the following categories (where LANG is the language whose code is specified using {{para|1}}):
* [[:Category:Requests for cleanup in LANG entries]] (if in the main, Citations, Transwiki or Reconstruction namespaces)
* [[:Category:Requests for cleanup/Others]] (if in any other namespaces)
* [[:Category:Entries needing topical attention]] (if {{para|topic}} is given)
<includeonly>
[[Category:Maintenance templates]]
[[Category:Request templates]]
</includeonly>
7pqlb7nza9x8kwsxw76v6qdast6anop
43588
43587
2020-02-16T19:46:06Z
Benwing2
1346
43588
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
To use this template,
# Add {{temp|rfc|en|short reason here}} (<code>en</code> for English, or replace with the appropriate language code) to the page source at the top of the page, or the language section, that needs cleaning up.
# Start the discussion on [[Wiktionary:Requests for cleanup]] by clicking the (+) link.
==Parameters==
; {{para|1|req=1}}
: The [[Wiktionary:LANGCODE|language code]] of the term needing cleanup. See [[Wiktionary:List of languages]]. Use <code>und</code> if a single language doesn't apply, e.g. in templates, categories and appendices.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
; {{para|topic}}
: If given, add this page to [[:Category:Entries needing topical attention]] and (eventually, manually) to the list at [[Wiktionary:Entries needing topical attention]].
This template adds the page to the following categories (where LANG is the language whose code is specified using {{para|1}}):
* [[:Category:Requests for cleanup in LANG entries]] (if in the main, Citations, Transwiki or Reconstruction namespaces)
* [[:Category:Requests for cleanup/Others]] (if in any other namespaces)
* [[:Category:Entries needing topical attention]] (if {{para|topic}} is given)
<includeonly>
[[Category:Cleanup templates]]
[[Category:Request templates]]
</includeonly>
t65o6w08vpgedfd70ybzzqx6kmscx33
43589
43588
2020-06-20T21:18:38Z
Erutuon
1339
/* Parameters */ fragment and section parameters
43589
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
To use this template,
# Add {{temp|rfc|en|short reason here}} (<code>en</code> for English, or replace with the appropriate language code) to the page source at the top of the page, or the language section, that needs cleaning up.
# Start the discussion on [[Wiktionary:Requests for cleanup]] by clicking the (+) link.
==Parameters==
; {{para|1|req=1}}
: The [[Wiktionary:LANGCODE|language code]] of the term needing cleanup. See [[Wiktionary:List of languages]]. Use <code>und</code> if a single language doesn't apply, e.g. in templates, categories and appendices.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fragment}}, {{para|section}}
: Section of [[Wiktionary:Requests for cleanup]] to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
; {{para|topic}}
: If given, add this page to [[:Category:Entries needing topical attention]] and (eventually, manually) to the list at [[Wiktionary:Entries needing topical attention]].
This template adds the page to the following categories (where LANG is the language whose code is specified using {{para|1}}):
* [[:Category:Requests for cleanup in LANG entries]] (if in the main, Citations, Transwiki or Reconstruction namespaces)
* [[:Category:Requests for cleanup/Others]] (if in any other namespaces)
* [[:Category:Entries needing topical attention]] (if {{para|topic}} is given)
<includeonly>
[[Category:Cleanup templates]]
[[Category:Request templates]]
</includeonly>
i1dxwwwtlawstokmr3ykzsqfva5vr28
43590
43589
2022-09-25T05:56:25Z
This, that and the other
894
remove topic= parameter for now, per RFDO
43590
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
To use this template,
# Add {{temp|rfc|en|short reason here}} (<code>en</code> for English, or replace with the appropriate language code) to the page source at the top of the page, or the language section, that needs cleaning up.
# Start the discussion on [[Wiktionary:Requests for cleanup]] by clicking the (+) link.
==Parameters==
; {{para|1|req=1}}
: The [[Wiktionary:LANGCODE|language code]] of the term needing cleanup. See [[Wiktionary:List of languages]]. Use <code>und</code> if a single language doesn't apply, e.g. in templates, categories and appendices.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fragment}}, {{para|section}}
: Section of [[Wiktionary:Requests for cleanup]] to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
This template adds the page to the following categories (where LANG is the language whose code is specified using {{para|1}}):
* [[:Category:Requests for cleanup in LANG entries]] (if in the main, Citations, Transwiki or Reconstruction namespaces)
* [[:Category:Requests for cleanup/Others]] (if in any other namespaces)
<includeonly>
[[Category:Cleanup templates]]
[[Category:Request templates]]
</includeonly>
3ud9oh00f7anvkfz8kqlf2vfxsasozh
43591
43590
2025-04-28T06:25:29Z
Surjection
380
in practice, this is how rfc is used
43591
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
To use this template,
# Add {{temp|rfc|en|short reason here}} (<code>en</code> for English, or replace with the appropriate language code) to the page source at the top of the page, or the language section, that needs cleaning up.
# If the reason for cleanup is not obvious (e.g. clearly nonstandard formatting) or the request affects more than one entry in a single language, start the discussion on [[Wiktionary:Requests for cleanup]] by clicking the (+) link.
==Parameters==
; {{para|1|req=1}}
: The [[Wiktionary:LANGCODE|language code]] of the term needing cleanup. See [[Wiktionary:List of languages]]. Use <code>und</code> if a single language doesn't apply, e.g. in templates, categories and appendices.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fragment}}, {{para|section}}
: Section of [[Wiktionary:Requests for cleanup]] to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
This template adds the page to the following categories (where LANG is the language whose code is specified using {{para|1}}):
* [[:Category:Requests for cleanup in LANG entries]] (if in the main, Citations, Transwiki or Reconstruction namespaces)
* [[:Category:Requests for cleanup/Others]] (if in any other namespaces)
<includeonly>
[[Category:Cleanup templates]]
[[Category:Request templates]]
</includeonly>
f66czdz5cqvkutxl9725zjgynktshn1
43592
43591
2025-04-28T06:28:59Z
Surjection
380
/* Usage */
43592
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
To use this template,
# Add {{temp|rfc|en|short reason here}} (<code>en</code> for English, or replace with the appropriate language code) to the page source at the top of the page, or the language section, that needs cleaning up.
# Start the discussion on [[Wiktionary:Requests for cleanup]] by clicking the (+) link. An exception is if the reason for cleanup is obvious (e.g. clearly nonstandard formatting) and the request only affects a single dictionary entry. In this case, however, any user may request additional information or question the request by starting the discussion.
==Parameters==
; {{para|1|req=1}}
: The [[Wiktionary:LANGCODE|language code]] of the term needing cleanup. See [[Wiktionary:List of languages]]. Use <code>und</code> if a single language doesn't apply, e.g. in templates, categories and appendices.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fragment}}, {{para|section}}
: Section of [[Wiktionary:Requests for cleanup]] to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
This template adds the page to the following categories (where LANG is the language whose code is specified using {{para|1}}):
* [[:Category:Requests for cleanup in LANG entries]] (if in the main, Citations, Transwiki or Reconstruction namespaces)
* [[:Category:Requests for cleanup/Others]] (if in any other namespaces)
<includeonly>
[[Category:Cleanup templates]]
[[Category:Request templates]]
</includeonly>
o3hp9vprf1zigu7ezgkgzisp5pcst18
43593
43592
2025-06-29T19:25:57Z
Chealer
1856
cleanup
43593
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
To use this template:
# Add {{temp|rfc|''language code''|''reason''}} to the page source at the top of the language section (or the page), that needs cleaning up. The code for English is <code>en</code>.
# Start the discussion on [[Wiktionary:Requests for cleanup]] by clicking the (+) link. An exception is if the reason for cleanup is obvious (e.g. clearly nonstandard formatting) and the request only affects a single dictionary entry. In this case, however, any user may request additional information or question the request by starting the discussion.
==Parameters==
; {{para|1|req=1}}
: The [[Wiktionary:LANGCODE|language code]] of the term needing cleanup. See [[Wiktionary:List of languages]]. Use <code>und</code> if a single language doesn't apply, e.g. in templates, categories and appendices.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fragment}}, {{para|section}}
: Section of [[Wiktionary:Requests for cleanup]] to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
This template adds the page to the following categories (where LANG is the language whose code is specified using {{para|1}}):
* [[:Category:Requests for cleanup in LANG entries]] (if in the main, Citations, Transwiki or Reconstruction namespaces)
* [[:Category:Requests for cleanup/Others]] (if in any other namespaces)
<includeonly>
[[Category:Cleanup templates]]
[[Category:Request templates]]
</includeonly>
hth03mb9kfz8bdmcc2bdz3va2ayydzh
43594
43593
2026-06-24T04:44:04Z
King ChristLike
964
16 revisions imported from [[:en:Template:rfc/documentation]]
43593
wikitext
text/x-wiki
{{documentation subpage}}
==Usage==
To use this template:
# Add {{temp|rfc|''language code''|''reason''}} to the page source at the top of the language section (or the page), that needs cleaning up. The code for English is <code>en</code>.
# Start the discussion on [[Wiktionary:Requests for cleanup]] by clicking the (+) link. An exception is if the reason for cleanup is obvious (e.g. clearly nonstandard formatting) and the request only affects a single dictionary entry. In this case, however, any user may request additional information or question the request by starting the discussion.
==Parameters==
; {{para|1|req=1}}
: The [[Wiktionary:LANGCODE|language code]] of the term needing cleanup. See [[Wiktionary:List of languages]]. Use <code>und</code> if a single language doesn't apply, e.g. in templates, categories and appendices.
; {{para|2}}
: An optional comment to be displayed in the request message.
; {{para|fragment}}, {{para|section}}
: Section of [[Wiktionary:Requests for cleanup]] to link to.
; {{para|sort}}
: The sort key for the page; rarely needs to be specified.
; {{para|nocat|1}}
: Disable categorization of this page.
This template adds the page to the following categories (where LANG is the language whose code is specified using {{para|1}}):
* [[:Category:Requests for cleanup in LANG entries]] (if in the main, Citations, Transwiki or Reconstruction namespaces)
* [[:Category:Requests for cleanup/Others]] (if in any other namespaces)
<includeonly>
[[Category:Cleanup templates]]
[[Category:Request templates]]
</includeonly>
hth03mb9kfz8bdmcc2bdz3va2ayydzh