Wiksiyonaryo
tlwiktionary
https://tl.wiktionary.org/wiki/Wiksiyonaryo:Unang_Pahina
MediaWiki 1.46.0-wmf.23
case-sensitive
Midya
Natatangi
Usapan
Tagagamit
Usapang tagagamit
Wiksiyonaryo
Usapang Wiksiyonaryo
Talaksan
Usapang talaksan
MediaWiki
Usapang MediaWiki
Padron
Usapang padron
Tulong
Usapang tulong
Kategorya
Usapang kategorya
TimedText
TimedText talk
Module
Module talk
Event
Event talk
Padron:Han simplified forms
10
5390
176063
17140
2026-04-09T05:32:51Z
Yivan000
4078
Inilipat ni Yivan000 ang pahinang [[Padron:Hani-forms]] sa [[Padron:Han simplified forms]] nang walang iniwang redirect
17140
wikitext
text/x-wiki
{| class="floatright" style="background-color:#ffffff;" border="1" cellpadding="5" cellspacing="0"
|- valign="center"
| style="background-color:#dfefff;" |
'''[[Payak na panitik ng wikang Tsino|Payak]]'''
|<font size=5>{{Hans|{{{1}}}}}</font>
|- valign="center"
| style="background-color:#dfefff;" |
'''[[Tradisyonal na panitik ng wikang Tsino|Tradisyonal]]'''
|<font size=5>{{Hant|{{{2}}}}}</font>
|}<noinclude>
[[Category:Chinese templates]]</noinclude>
qn1ci3oiuws1quexbw1raxdowmf24ul
176064
176063
2026-04-09T05:33:14Z
Yivan000
4078
enwikt parity
176064
wikitext
text/x-wiki
{{inflection-table-top|title=-|class=floatright very-narrow}}
! {{w|Traditional Chinese|Traditional}}
| style="font-size: 200%; line-height: 1;" | {{l-self|mul|{{{1|<noinclude>樂</noinclude>}}}|sc=Hant|tr=-}}
|-
! {{w|Shinjitai}}{{#if:{{{ex|}}}|<br/>({{w|Extended shinjitai|extended}})}}
| style="font-size: 200%; line-height: 1;" | {{l-self|ja|{{{2|<noinclude>楽</noinclude>}}}|sc=Jpan|tr=-}}
|-
! {{w|Simplified Chinese|Simplified}}
| style="font-size: 200%; line-height: 1;" | {{l-self|zh|{{{3|<noinclude>乐</noinclude>}}}|sc=Hans|tr=-}}
{{inflection-table-bottom}}<!--
--><includeonly><!--
-->{{#if: {{{ex|}}}<!-- CATEGORIZATION
-->|<!-- Do not categorize as the shinjitai is extended shinjitai
-->|<!--
-->[[Category:CJKV characters simplified differently in Japan and China<!--
-->|{{{1}}}{{#switch:{{PAGENAME}} |{{{1}}}=0 |{{{2}}}=1|{{{3}}}=2}}<!-- (sortkey)
-->]]<!--
-->}}<!--
-->{{#switch:{{PAGENAME}}<!-- CHECK FOR DUPLICATE INPUT
-->|#default=<!--
-->{{#ifeq:{{{1}}}|{{{2}}}|{{error|Traditional {{{1}}} is the same as shinjitai {{{2}}}}}}}<!--
-->{{#ifeq:{{{1}}}|{{{3}}}|{{error|Traditional {{{1}}} is the same as simplified {{{3}}}}}}}<!--
-->{{#ifeq:{{{2}}}|{{{3}}}|{{error|Shinjitai {{{2}}} is the same as simplified {{{3}}}}}}}<!--
-->|蟬|蝉|莖|茎|徑|径|殘|残|淺|浅|踐|践|禪|禅|簞|箪|蔣|蒋|賭|遙|遥|漢|難|将=<!-- Due to Han unification, these simplified forms share codepoints.
-->}}<!--
--></includeonly><!--
--><noinclude>{{documentation}}
[[Category:Orthographic and regional variant templates]]</noinclude>
906fu9uj64k0rmzxg0w5kwkqffitoxv
flughaveno
0
8082
175999
124712
2026-04-08T19:07:53Z
Balamax
860
175999
wikitext
text/x-wiki
=={{=eo=}}==
{{wp|lang=eo}}
===Etimolohiya===
Mula sa {{compound|eo|flugi|haveno}}.
===Pagbigkas===
{{eo-pr|a=LL-Q143 (epo)-Lepticed7-flughaveno.wav}}
===Pangngalan===
{{eo-head}}
# [[paliparan]]
====Katawagang kaugnay====
* {{l|eo|flughavena}}
[[kategorya:Mga pangngalang Esperanto]]
fz4dybiqehepcrybw1krswx9626ensv
176001
175999
2026-04-09T01:31:15Z
Yivan000
4078
176001
wikitext
text/x-wiki
=={{=eo=}}==
{{wp|lang=eo}}
===Etimolohiya===
Mula sa {{compound|eo|flugi|haveno}}.
===Pagbigkas===
{{eo-pr|a=LL-Q143 (epo)-Lepticed7-flughaveno.wav}}
===Pangngalan===
{{eo-head}}
# [[paliparan]]
====Katawagang kaugnay====
* {{l|eo|flughavena}}
4td6e761m7rf5ajbdaiiumst1rub4o2
riet
0
15567
176002
175998
2026-04-09T01:35:43Z
Yivan000
4078
176002
wikitext
text/x-wiki
=={{=af=}}==
===Etimolohiya===
Mula sa {{inh|af|nl|riet}}, mula {{inh|af|dum|riet}}, mula {{inh|af|odt|riet}}, {{m|odt|ried}}, {{m|odt|*riod}}, mu;a {{inh|af|gmw-pro|*hreud|t=tambo}}.
===Pagbigkas===
* {{IPA|af|/rit/}}
===Pangngalan===
{{af-noun|riete|rietjie}}
# [[tambo]]
=={{=nl=}}==
===Etimolohiya===
Mula sa {{inh|nl|dum|riet}}, mula {{inh|nl|odt|riet}}, {{m|odt|ried}}, {{m|odt|*riod}}, mula {{inh|nl|gmw-pro|*hreud|t=tambo}}.
===Pagbigkas===
* {{IPA|nl|/rit/}}
* {{audio|nl|Nl-riet.ogg}}
* {{hyphenation|nl|riet}}
* {{rhymes|nl|it|s=1}}
* {{homophones|nl|Ried}}
===Pangngalan===
{{nl-noun|n|-en|+}}
# [[tambo]]
=={{=vo=}}==
===Pangngalan===
{{vo-noun}}
# [[galang-galangan]]
====Paukulan====
{{vo-decl-noun}}
===Basahin pa===
* {{R:vo:Vödabuk}}
ql46g39xfoc908yvxmc5jw5eb21j6sr
tomat
0
18413
176069
175985
2026-04-09T05:58:29Z
Yivan000
4078
176069
wikitext
text/x-wiki
=={{=ca=}}==
===Pandiwari===
{{ca-pp}}
# {{past participle of|ca|tomar}}
=={{=sv=}}==
{{wp|sv:}}
[[File:Tomato_je.jpg|thumb|tomater]]
[[File:Sliced Tomatoes.jpg|thumb|{{l|sv|skivad}} '''tomat''' [hiniwang '''kamatis'''] / '''tomat'''{{l|sv|skivor}} [hiwang '''kamatis'''] ]]
[[File:Tomato (half fruit with slices).jpg|thumb|tre '''tomat'''{{l|sv|klyftor}} [tatlong sinsel ng '''tomato'''] ]]
===Etimolohiya===
Mula sa {{bor|sv|da|tomat}}, mula {{der|sv|es|tomate}}.
===Pagbigkas===
* {{audio|sv|LL-Q9027 (swe)-Moonhouse-tomat.wav}}
===Pangngalan===
{{sv-noun|c}}
# [[kamatis]]
====Paukulan====
{{sv-infl-noun-c-er}}
===Sanggunian===
* {{R:svenska.se|so}}
* {{R:svenska.se|saol}}
* {{R:svenska.se|saob}}
=={{=vo=}}==
===Pangngalan===
{{vo-noun}}
# [[kamatis]]
====Paukulan====
{{vo-decl-noun}}
===Basahin pa===
* {{R:vo:Vödabuk}}
7dsqgvsi2928l7ffh58nmv51dkml5ds
संस्कृति
0
18952
176055
148096
2026-04-09T05:16:53Z
Yivan000
4078
176055
wikitext
text/x-wiki
{{also|संस्कृतं|संस्कृत}}
=={{=hi=}}==
{{wp|hi:}}
===Etimolohiya===
{{lbor|hi|sa|संस्कृति}}.
===Pagbigkas===
* {{hi-IPA}}
===Pangngalan===
{{hi-noun|f|ur=سنسکرتی}}
# [[kultura]]
====Paukulan====
{{hi-ndecl|<F>}}
===Pangngalang pantangi===
{{hi-proper noun|f}}
# {{given name|hi|female|xlit=Sanskriti|from=Sanskrit}}
====Paukulan====
{{hi-ndecl|<F.sg>}}
===Sanggunian===
* {{R:hi:McGregor}}
* {{R:hi:Collins}}
* {{R:hi:Bahri}}
* {{R:hi:Caturvedi}}
=={{=ne=}}==
===Etimolohiya===
{{lbor|ne|sa|संस्कृति}}.
===Pagbigkas===
* {{ne-IPA|संस्कृति|सँस्कृति}}
===Pangngalan===
{{ne-noun}}
# [[kultura]]
=={{=sa=}}==
===Panghaliling katitikan===
{{sa-alt}}
===Etimolohiya===
{{com+|sa|सं-|t1=[[tayo-tayo]]|स्कृ|t2=[[gumawa]]|-ति}}.
===Pagbigkas===
{{sa-IPA|a=3}}
===Pangngalan===
{{sa-noun|tr=saṃskṛití|g=f}}
# [[kultura]]
====Paukulan====
{{sa-decl-noun-f|saṃskṛití}}
p0hb9oomo0v574birdncy2izn4cud38
maniera
0
20369
176035
150217
2026-04-09T04:09:41Z
Yivan000
4078
176035
wikitext
text/x-wiki
{{also|manièra|manieră}}
=={{=fr=}}==
===Pandiwa===
{{head|fr|verb form}}
# {{inflection of|fr|manier||3|s|simple|futr}}
===Anagrama===
* {{l|fr|animera}}, {{l|fr|ramenai}}, {{l|fr|réanima}}, {{l|fr|remania}}
=={{=ro=}}==
===Pangngalan===
{{head|ro|noun form}}
# {{noun form of|ro|manieră||def|nom//acc|s}}
=={{=es=}}==
===Pandiwa===
{{head|es|verb form}}
# {{es-verb form of|manir<no_pres_stressed>}}
25s1mua8s56cinpbpwd5v0ikhyzdz24
Module:character info
828
31129
176016
167319
2026-04-09T03:21:51Z
Yivan000
4078
176016
Scribunto
text/plain
local m_str_utils = require("Module:string utilities")
local cp = m_str_utils.codepoint
local decode_entities = m_str_utils.decode_entities
local encode_entities = m_str_utils.encode_entities
local floor = math.floor
local gcodepoint = m_str_utils.gcodepoint
local toNFD = mw.ustring.toNFD
local u = m_str_utils.char
local ulen = m_str_utils.len
local m_unicode = require("Module:Unicode data")
local char_to_script = require("Module:scripts").charToScript
local export = {}
local dingbat_scripts = {
["Zsym"] = true;
["Zmth"] = true;
["Zyyy"] = true;
}
local function page_exists(title)
local ok, title_obj = pcall(mw.title.new, title)
if ok and title_obj then
local ok, exists = pcall(function() return title_obj.exists end)
return ok and exists
else
return false
end
end
function export.exotic_symbol_warning(frame)
local title = mw.title.getCurrentTitle()
if title.exists then
return ""
end
if ulen(title.fullText) ~= 1 then
return ""
end
local codepoint = cp(title.fullText)
local script_code = char_to_script(codepoint)
if dingbat_scripts[script_code] then
return frame:expandTemplate { title = "editnotice-exotic symbols" }
end
return ""
end
local function get_codepoint(codepoint, param_name)
codepoint = tonumber(codepoint) or decode_entities(codepoint)
if type(codepoint) == "string" and ulen(codepoint) == 1 then
codepoint = cp(codepoint)
elseif type(codepoint) ~= "number" then
error("Unrecognised string given for the " .. param_name .. " parameter")
end
return codepoint
end
function export._show(args, parent_title)
local codepoint = args.codepoint
local title = mw.title.getCurrentTitle()
local pagename = args.pagename or mw.loadData("Module:headword/data").pagename
local namespace = mw.title.getCurrentTitle().nsText
if codepoint then
codepoint = get_codepoint(codepoint, "codepoint")
else
if not args.pagename and title.fullText == parent_title then
codepoint = 0xfffd
elseif ulen(pagename) == 1 then
codepoint = cp(pagename)
else
error("Page title is not a single Unicode character")
end
end
local image, image_emoji
if args.image == "-" then
image = nil
image_emoji = nil
else
image = args.image or m_unicode.lookup_image(codepoint)
image_emoji = args.image_emoji or m_unicode.lookup_image_emoji(codepoint)
end
local table_markup = {}
table.insert(table_markup,
'{| class="wikitable floatright character-info" style="width:25em;"\n')
if image or image_emoji then
local category = "[[Category:Character boxes with images|*" .. string.format("%010d", codepoint) .. "]]"
if image and not image:match("\127") then -- <hiero> tags generate these; pass them through
if image:match("^%[?%[?[Ff]ile:") or image:match("^%[?%[?[Ii]mage:") then
image = image:gsub("^%[%[", ""):gsub("^[Ff]ile:", ""):gsub("^[Ii]mage:", ""):gsub("|.*", ""):gsub("]]", "")
end
image = "[[File:" .. image .. "|120x140px|class=skin-invert-image]]"
if namespace == "" then
image = image .. category
end
end
if image_emoji then
if image then
table.insert(table_markup,
'|-\n! Text style !! Emoji style\n')
end
if image_emoji:match("^%[?%[?[Ff]ile:") or image_emoji:match("^%[?%[?[Ii]mage:") then
image_emoji = image_emoji:gsub("^%[%[", ""):gsub("^[Ff]ile:", ""):gsub("^[Ii]mage:", ""):gsub("|.*", ""):gsub("]]", "")
end
image_emoji = "[[File:" .. image_emoji .. "|120x140px]]"
if namespace == "" and not image then
image_emoji = image_emoji .. category
end
if image then
table.insert(table_markup,
('|-\n| style="text-align: center; width: 50%s;" | %s || style="text-align: center; width: 50%s;" | %s\n'):format(
'%', image, '%', image_emoji
)
)
else
table.insert(table_markup,
('|-\n| colspan="2" style="text-align: center;" | %s\n'):format(
image_emoji
)
)
end
else
table.insert(table_markup,
('|-\n| colspan="2" style="text-align: center;" | %s<br/>%s\n'):format(
image, args.caption or ""
)
)
end
end
local show_different_styles_if_no_emoji_image = false
-- https://en.wikipedia.org/wiki/List_of_emojis
-- Basic Latin (see https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block)#Variants)
if codepoint == 35 or codepoint == 42 or (codepoint > 47 and codepoint < 58)
-- Latin-1 Supplement
or codepoint == 169 or codepoint == 174
-- General Punctuation
or codepoint == 8252 or codepoint == 8265
-- Letterlike Symbols
or codepoint == 8482 or codepoint == 8505
-- Arrows
or (codepoint > 8595 and codepoint < 8602) or codepoint == 8617 or codepoint == 8618
-- Miscellaneous Technical
or codepoint == 8986 or codepoint == 8987 or codepoint == 9000 or codepoint == 9167 or (codepoint > 9192 and codepoint < 9204) or (codepoint > 9207 and codepoint < 9211)
-- Enclosed Alphanumerics
or codepoint == 9410
-- Geometric Shapes
or codepoint == 9642 or codepoint == 9643 or codepoint == 9654 or codepoint == 9664 or (codepoint > 9722 and codepoint < 9727)
-- Miscellaneous Symbols
or (codepoint > 9727 and codepoint < 9733) or codepoint == 9742 or codepoint == 9745 or codepoint == 9748 or codepoint == 9749 or codepoint == 9752 or codepoint == 9757 or codepoint == 9760 or codepoint == 9762 or codepoint == 9763 or codepoint == 9766 or codepoint == 9770 or codepoint == 9774 or codepoint == 9775 or (codepoint > 9783 and codepoint < 9787) or codepoint == 9792 or codepoint == 9794 or (codepoint > 9799 and codepoint < 9812) or codepoint == 9823 or codepoint == 9824 or codepoint == 9827 or codepoint == 9829 or codepoint == 9830 or codepoint == 9832 or codepoint == 9851 or codepoint == 9854 or codepoint == 9855 or (codepoint > 9873 and codepoint < 9880) or codepoint == 9881 or codepoint == 9883 or codepoint == 9884 or codepoint == 9888 or codepoint == 9889 or codepoint == 9895 or codepoint == 9898 or codepoint == 9899 or codepoint == 9904 or codepoint == 9905 or codepoint == 9917 or codepoint == 9918 or codepoint == 9924 or codepoint == 9925 or codepoint == 9928 or codepoint == 9934 or codepoint == 9935 or codepoint == 9937 or codepoint == 9939 or codepoint == 9940 or codepoint == 9961 or codepoint == 9962 or (codepoint > 9967 and codepoint < 9974) or (codepoint > 9974 and codepoint < 9979) or codepoint == 9981
-- Dingbats
or codepoint == 9986 or codepoint == 9989 or (codepoint > 9991 and codepoint < 9998) or codepoint == 9999 or codepoint == 10002 or codepoint == 10004 or codepoint == 10006 or codepoint == 10013 or codepoint == 10017 or codepoint == 10024 or codepoint == 10035 or codepoint == 10036 or codepoint == 10052 or codepoint == 10055 or codepoint == 10060 or codepoint == 10062 or (codepoint > 10066 and codepoint < 10070) or codepoint == 10071 or codepoint == 10083 or codepoint == 10084 or (codepoint > 10132 and codepoint < 10136) or codepoint == 10145 or codepoint == 10160 or codepoint == 10175
-- Supplemental Arrows-B
or codepoint == 10548 or codepoint == 10549
-- Miscellaneous Symbols and Arrows
or (codepoint > 11012 and codepoint < 11016) or codepoint == 11035 or codepoint == 11036 or codepoint == 11088 or codepoint == 11093
-- CJK Symbols and Punctuation
or codepoint == 12336 or codepoint == 12349
-- Enclosed CJK Letters and Months
or codepoint == 12951 or codepoint == 12953
-- Mahjong Tiles
or codepoint == 126980
-- Playing Cards
or codepoint == 127183
-- Enclosed Alphanumeric Supplement
or codepoint == 127344 or codepoint == 127345 or codepoint == 127358 or codepoint == 127359 or codepoint == 127374 or (codepoint > 127376 and codepoint < 127387)
-- Enclosed Ideographic Supplement
or codepoint == 127489 or codepoint == 127490 or codepoint == 127514 or codepoint == 127535 or (codepoint > 127537 and codepoint < 127547) or codepoint == 127568 or codepoint == 127569
-- Miscellaneous Symbols and Pictographs
or (codepoint > 127743 and codepoint < 127778) or (codepoint > 127779 and codepoint < 127892) or codepoint == 127894 or codepoint == 127895 or (codepoint > 127896 and codepoint < 127900) or (codepoint > 127901 and codepoint < 127985) or (codepoint > 127986 and codepoint < 127990) or (codepoint > 127990 and codepoint < 128254) or (codepoint > 128254 and codepoint < 128318) or (codepoint > 128328 and codepoint < 128335) or (codepoint > 128335 and codepoint < 128360) or codepoint == 128367 or codepoint == 128368 or (codepoint > 128370 and codepoint < 128379) or codepoint == 128391 or (codepoint > 128393 and codepoint < 128398) or codepoint == 128400 or codepoint == 128405 or codepoint == 128406 or codepoint == 128420 or codepoint == 128421 or codepoint == 128424 or codepoint == 128433 or codepoint == 128434 or codepoint == 128444 or (codepoint > 128449 and codepoint < 128453) or (codepoint > 128464 and codepoint < 128468) or (codepoint > 128475 and codepoint < 128479) or codepoint == 128481 or codepoint == 128483 or codepoint == 128488 or codepoint == 128495 or codepoint == 128499 or (codepoint > 128505 and codepoint < 128512)
-- Emoticons
or (codepoint > 128511 and codepoint < 128592)
-- Transport and Map Symbols
or (codepoint > 128639 and codepoint < 128710) or (codepoint > 128714 and codepoint < 128723) or (codepoint > 128724 and codepoint < 128732) or (codepoint > 128731 and codepoint < 128742) or codepoint == 128745 or codepoint == 128747 or codepoint == 128748 or codepoint == 128752 or (codepoint > 128754 and codepoint < 128765)
-- Geometric Shapes Extended
or (codepoint > 128991 and codepoint < 129004) or codepoint == 129008
-- Supplemental Symbols and Pictographs
or (codepoint > 129291 and codepoint < 129339) or (codepoint > 129339 and codepoint < 129350) or (codepoint > 129350 and codepoint < 129536)
-- Symbols and Pictographs Extended-A
or (codepoint > 129647 and codepoint < 129661) or (codepoint > 129663 and codepoint < 129673) or (codepoint > 129679 and codepoint < 129726) or (codepoint > 129726 and codepoint < 129734) or (codepoint > 129741 and codepoint < 129756) or (codepoint > 129759 and codepoint < 129769) or (codepoint > 129775 and codepoint < 129785)
then
show_different_styles_if_no_emoji_image = true
end
if show_different_styles_if_no_emoji_image and not (image and image_emoji) then
table.insert(table_markup,
'|-\n! Text style !! Emoji style\n')
end
if show_different_styles_if_no_emoji_image or image_emoji or m_unicode.lookup_image_emoji(codepoint) then
table.insert(table_markup,
('|- style="font-size: 250%; text-align: center; background: rgba(0,0,0,0.1);"\n| style="padding: 0;" | ' .. u(codepoint) .. '︎ || style="padding: 0;" | ' .. u(codepoint) .. '️\n|- style="font-size: 80%;"\n| colspan="2" | Text style is [[variation selector|forced with]] ⟨&#xFE0E;⟩ and emoji style with ⟨&#xFE0F;⟩.\n')
)
end
if args.caption and (image_emoji or (not image and not image_emoji)) then
table.insert(table_markup,
('|-\n| colspan="2" style="text-align: center;" | %s\n'):format(
args.caption
)
)
end
local sc = args.sc or require("Module:scripts").getByCode(char_to_script(codepoint))
local NAMESPACE, cat_name = title.namespace
if not args.nocat and ((NAMESPACE == 0) or (NAMESPACE == 100)) then -- main and Appendix
cat_name = sc:getCategoryName() .. " na karakter" --TLCHANGE " characters"
end
local block_name = encode_entities(args.block or m_unicode.lookup_block(codepoint))
local aliases
if args.aliases == "-" then
aliases = nil
else
aliases = mw.loadData("Module:Unicode data/aliases")[codepoint]
end
local function parse_aliases(aliases)
local result = {}
if aliases then
local classif = {}
for i, alias in ipairs(aliases) do
if not classif[alias[1]] then
classif[alias[1]] = {}
end
table.insert(classif[alias[1]], encode_entities(alias[2]))
end
if classif.correction then
for i, name in ipairs(classif.correction) do
local category = "[[Category:Character boxes with corrected names]]"
if namespace == "" then
table.insert(result,
("[[Category:Character boxes with corrected names]]Corrected: %s"):format(
name
)
)
else
table.insert(result,
("Corrected: %s"):format(
name
)
)
end
end
end
if classif.alternate then
for i, name in ipairs(classif.alternate) do
local category = "[[Category:Character boxes with alternative names]]"
if namespace == "" then
table.insert(result,
("[[Category:Character boxes with alternative names]]Alternative: %s"):format(
name
)
)
else
table.insert(result,
("Alternative: %s"):format(
name
)
)
end
end
end
if classif.abbreviation then
local category = "[[Category:Character boxes with abbreviations]]"
if namespace == "" then
table.insert(result,
("[[Category:Character boxes with abbreviations]]Abbreviation: %s"):format(
table.concat(classif.abbreviation, ", ")
)
)
else
table.insert(result,
("Abbreviation: %s"):format(
table.concat(classif.abbreviation, ", ")
)
)
end
end
local parsed_result = table.concat(result, ", ")
return "<div>(" .. parsed_result .. ")</div>"
end
return ""
end
local li, vi, ti = nil, nil, nil
if block_name == "Hangul Syllables" then
local index = codepoint - 0xAC00
li, vi, ti = floor(index / 588), floor((index % 588) / 28), index % 28
end
local initial_to_letter = { [0] =
0x3131, 0x3132, 0x3134, 0x3137, 0x3138, 0x3139, 0x3141, 0x3142,
0x3143, 0x3145, 0x3146, 0x3147, 0x3148, 0x3149, 0x314A, 0x314B,
0x314C, 0x314D, 0x314E,
}
local vowel_to_letter = { [0] =
0x314F, 0x3150, 0x3151, 0x3152, 0x3153, 0x3154, 0x3155, 0x3156,
0x3157, 0x3158, 0x3159, 0x315A, 0x315B, 0x315C, 0x315D, 0x315E,
0x315F, 0x3160, 0x3161, 0x3162, 0x3163,
}
local final_to_letter = {
0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137, 0x3139,
0x313A, 0x313B, 0x313C, 0x313D, 0x313E, 0x313F, 0x3140, 0x3141,
0x3142, 0x3144, 0x3145, 0x3146, 0x3147, 0x3148, 0x314A, 0x314B,
0x314C, 0x314D, 0x314E,
}
local function parse_composition()
local result = nil
if block_name == "Hangul Syllables" then
result = ((ti ~= 0) and
'<big class="Kore" lang="">[[&#%u;]] + [[&#%u;]] + [[&#%u;]]</big>' or
'<big class="Kore" lang="">[[&#%u;]] + [[&#%u;]]</big>'):format(
initial_to_letter[li],
vowel_to_letter[vi],
final_to_letter[ti]
)
else
local nfd = toNFD(u(codepoint))
if ulen(nfd) ~= 1 then
local compo = {}
for nfdcp in gcodepoint(nfd) do
local dotted_circle = (m_unicode.is_combining(nfdcp) and "◌" or "")
local link_target = m_unicode.get_entry_title(nfdcp)
if not link_target or not page_exists(link_target) then
link_target = nil
end
local script = char_to_script(nfdcp)
local character_text =
link_target and ('[[%s|<span class="%s">%s&#%u;</span> [U+%04X]]]')
:format(link_target, script, dotted_circle, nfdcp, nfdcp)
or ('<span class="%s">%s&#%u;</span> [U+%04X]')
:format(script, dotted_circle, nfdcp, nfdcp)
table.insert(compo, '<span class="character-sample-secondary">' .. character_text .. "</span> ")
end
result = table.concat(compo, " + ")
end
end
if result then
return "Composition", result, "[[Category:Character boxes with compositions]]"
end
return nil
end
-- [[ Egyptian Hieroglyphs
local function parse_gardiner()
if args.gardiner then
local result = (
"[http://vincent.euverte.free.fr/Rosette/Rosette_410.php?Hiero=%s&Lang=E %s]\n"):format(
args.gardiner, args.gardiner
)
return "Gardiner number", result, "[[Category:Character boxes with additional information for Egyptian Hieroglyphs]]"
end
return nil
end
local function parse_mdc()
if args.mdc then
return "Manuel de Codage", args.mdc, "[[Category:Character boxes with additional information for Egyptian Hieroglyphs]]"
end
return nil
end
local function parse_egpz()
if args.egpz then
return "EGPZ 1.0", args.egpz, "[[Category:Character boxes with additional information for Egyptian Hieroglyphs]]"
end
return nil
end
-- ]]
local function middle_part()
local rows = {}
local function insert_row(row_title, row_contents, row_category)
if row_contents then
table.insert(rows,
('<tr><td style="text-align: left">%s:</td><td>%s%s</td></tr>'):format(row_title, row_contents, row_category))
end
end
insert_row(parse_composition())
insert_row(parse_gardiner())
insert_row(parse_egpz())
insert_row(parse_mdc())
if rows[1] then
return ('<table style="margin: 0 auto;">%s</table>')
:format(table.concat(rows, ""))
end
return ""
end
local function present_codepoint(codepoint, np, script, combining, name, printable, title)
local display
local link_target
if combining == nil then
combining = m_unicode.is_combining(codepoint)
end
if printable == nil then
printable = m_unicode.is_printable(codepoint)
end
local char = u(codepoint)
if title == "self" or page_exists(char) then
link_target = char
elseif title ~= "-" then
link_target = m_unicode.get_entry_title(codepoint)
end
if printable then
display = ('<span class="character-sample-secondary %s">%s&#x%04X;</span>'):format(
script and script:getCode() or char_to_script(codepoint),
combining and "◌" or "", codepoint
)
end
local arrow_and_maybe_char
if np then
arrow_and_maybe_char = (display or "") .. " →"
else
arrow_and_maybe_char = "← " .. (display or "")
end
local text = ('<span title="%s">%s<br><small>[U+%04X]</small></span>')
:format(encode_entities(name or m_unicode.lookup_name(codepoint)),
arrow_and_maybe_char, codepoint)
if link_target then
return ("[[" .. link_target .. "|" .. text .. "]]")
else
return text
end
end
local function get_next(codepoint, step)
-- Skip past noncharacters and reserved characters (Cn), private-use
-- characters (Co), surrogates (Cs), and control characters (Cc), all
-- of which have a label beginning in "<" rather than a proper name.
if step < 0 and 0 < codepoint or step > 0 and codepoint < 0x10FFFF then
repeat
codepoint = codepoint + step
until m_unicode.lookup_name(codepoint):sub(1, 1) ~= "<"
or not (0 < codepoint and codepoint < 0x10FFFF)
end
return codepoint
end
local previous_codepoint =
args.previous_codepoint and get_codepoint(args.previous_codepoint, "previous_codepoint")
or get_next(codepoint, -1)
local next_codepoint =
args.next_codepoint and get_codepoint(args.next_codepoint, "next_codepoint")
or get_next(codepoint, 1)
local combining = args.combining
if combining == nil then
combining = m_unicode.is_combining(codepoint)
end
table.insert(table_markup,
'|-\n| style="width: 70px;" colspan="2" | ' ..
"<table>" ..
"<tr>" ..
"<td>" ..
('<span class="character-sample-primary %s">%s&#%u;</span>')
:format(sc:getCode(), combining and "◌" or "", codepoint) ..
"</td>" ..
"<td>" ..
(" [https://util.unicode.org/UnicodeJsps/character.jsp?a=%.4X U+%.4X]"):format(codepoint, codepoint) ..
", [[w:Talaan ng mga XML at HTML character entity reference|&#" .. codepoint .. ";]]\n" .. --TLCHANGE Use TL Wikipedia article name List of XML and HTML character entity references
'<div class="character-sample-name">' ..
encode_entities(args.name or m_unicode.lookup_name(codepoint)) ..
"</div>" ..
parse_aliases(aliases) ..
"</td>" ..
"</tr>" ..
"</table>"
)
table.insert(table_markup,
middle_part()
)
local previous_unassigned_first = previous_codepoint + 1
local previous_unassigned_last = codepoint - 1
local next_unassigned_first = codepoint + 1
local next_unassigned_last = next_codepoint - 1
local left_unassigned_text
local right_unassigned_text
if previous_codepoint == 0 then
previous_unassigned_first = 0
end
if previous_unassigned_first <= previous_unassigned_last or next_unassigned_first <= next_unassigned_last then
if previous_unassigned_first < previous_unassigned_last then
left_unassigned_text = ("[unassigned: U+%.4X–U+%.4X]"):format(previous_unassigned_first, previous_unassigned_last)
elseif previous_unassigned_first == previous_unassigned_last then
left_unassigned_text = ("[unassigned: U+%.4X]"):format(previous_unassigned_first)
end
if next_unassigned_first < next_unassigned_last then
right_unassigned_text = ("[unassigned: U+%.4X–U+%.4X]"):format(next_unassigned_first, next_unassigned_last)
elseif next_unassigned_first == next_unassigned_last then
right_unassigned_text = ("[unassigned: U+%.4X]"):format(next_unassigned_first)
end
end
local unassignedsRow =
mw.html.create("table"):css("width", "100%"):css("font-size", "80%"):css("white-space", "nowrap")
:tag("tr")
:tag("td"):css("width", "50%"):css("text-align", "left"):wikitext(left_unassigned_text or ""):done()
:tag("td"):css("width", "50%"):css("text-align", "right"):wikitext(right_unassigned_text or ""):done()
:allDone()
table.insert(table_markup, tostring(unassignedsRow) .."\n")
local previous_codepoint_text = ""
local next_codepoint_text = ("%s\n")
:format(present_codepoint(next_codepoint, true,
args.next_codepoint_sc, args.next_codepoint_combining,
args.next_codepoint_name, args.next_codepoint_printable,
args.next_codepoint_title))
if previous_codepoint > 0 then
previous_codepoint_text = ("%s\n")
:format(present_codepoint(previous_codepoint, false,
args.previous_codepoint_sc, args.previous_codepoint_combining,
args.previous_codepoint_name, args.previous_codepoint_printable,
args.previous_codepoint_title))
end
local block_name_text = ("[[Apendise:Yunikowd/%s|%s]]") --TLCHANGE "[[Appendix:Unicode/%s|%s]]"
:format(block_name, block_name)
if namespace == "" then
block_name_text = block_name_text .. ("[[Category:%s na bloke|*%010d]]\n") --TLCHANGE "[[Category:%s block|*%010d]]\n"
:format(block_name, codepoint)
else
block_name_text = block_name_text .. "\n"
end
local lastRow =
mw.html.create("table"):css("width", "100%"):css("text-align", "center")
:tag("tr")
:tag("td"):css("width", "20%"):wikitext(previous_codepoint_text):done()
-- :tag("td"):css("width", "15%")
-- :tag("span"):wikitext(left_unassigned_text and "'''...'''" or ""):attr("title", left_unassigned_text or ""):done():done()
:tag("td"):css("width", "60%"):css("font-size", "110%"):css("font-weight", "bold"):wikitext(block_name_text)
-- :tag("td"):css("width", "15%")
-- :tag("span"):wikitext(right_unassigned_text and "'''...'''" or ""):attr("title", right_unassigned_text or ""):done():done()
:tag("td"):css("width", "20%"):wikitext(next_codepoint_text):done()
:allDone()
table.insert(table_markup, tostring(lastRow) .."\n")
table.insert(table_markup, "|}")
if cat_name and namespace == "" then
table.insert(table_markup, "[[Category:" .. cat_name .. "| " .. u(codepoint) .. "]]")
end
table.insert(table_markup, require("Module:TemplateStyles")("Template:character info/style.css"))
return table.concat(table_markup)
end
function export.show(frame)
local params = {
[1] = {alias_of = "codepoint"},
["codepoint"] = {},
["previous_codepoint"] = {},
["next_codepoint"] = {},
["name"] = {},
["previous_codepoint_name"] = {},
["next_codepoint_name"] = {},
["combining"] = {type = "boolean"},
["previous_codepoint_combining"] = {type = "boolean"},
["next_codepoint_combining"] = {type = "boolean"},
["printable"] = {type = "boolean"},
["previous_codepoint_printable"] = {type = "boolean"},
["next_codepoint_printable"] = {type = "boolean"},
["previous_codepoint_title"] = {},
["next_codepoint_title"] = {},
["sc"] = {type = "script"},
["next_codepoint_sc"] = {type = "script"},
["previous_codepoint_sc"] = {type = "script"},
["caption"] = {},
["aliases"] = {},
["image"] = {},
["block"] = {},
["gardiner"] = {},
["mdc"] = {},
["egpz"] = {},
["nocat"] = {type = "boolean"},
["pagename"] = {}, -- for testing etc.
}
local parent_frame = frame:getParent()
local args = require("Module:parameters").process(parent_frame.args, params)
return export._show(args, parent_frame:getTitle())
end
return export
2zd4uiav1rqg1g1mwtwq0hst3qilf6q
176028
176016
2026-04-09T03:42:49Z
Yivan000
4078
176028
Scribunto
text/plain
local m_str_utils = require("Module:string utilities")
local cp = m_str_utils.codepoint
local decode_entities = m_str_utils.decode_entities
local encode_entities = m_str_utils.encode_entities
local floor = math.floor
local gcodepoint = m_str_utils.gcodepoint
local toNFD = mw.ustring.toNFD
local u = m_str_utils.char
local ulen = m_str_utils.len
local m_unicode = require("Module:Unicode data")
local char_to_script = require("Module:scripts").charToScript
local export = {}
local dingbat_scripts = {
["Zsym"] = true;
["Zmth"] = true;
["Zyyy"] = true;
}
local function page_exists(title)
local ok, title_obj = pcall(mw.title.new, title)
if ok and title_obj then
local ok, exists = pcall(function() return title_obj.exists end)
return ok and exists
else
return false
end
end
function export.exotic_symbol_warning(frame)
local title = mw.title.getCurrentTitle()
if title.exists then
return ""
end
if ulen(title.fullText) ~= 1 then
return ""
end
local codepoint = cp(title.fullText)
local script_code = char_to_script(codepoint)
if dingbat_scripts[script_code] then
return frame:expandTemplate { title = "editnotice-exotic symbols" }
end
return ""
end
local function get_codepoint(codepoint, param_name)
codepoint = tonumber(codepoint) or decode_entities(codepoint)
if type(codepoint) == "string" and ulen(codepoint) == 1 then
codepoint = cp(codepoint)
elseif type(codepoint) ~= "number" then
error("Unrecognised string given for the " .. param_name .. " parameter")
end
return codepoint
end
function export._show(args, parent_title)
local codepoint = args.codepoint
local title = mw.title.getCurrentTitle()
local pagename = args.pagename or mw.loadData("Module:headword/data").pagename
local namespace = mw.title.getCurrentTitle().nsText
if codepoint then
codepoint = get_codepoint(codepoint, "codepoint")
else
if not args.pagename and title.fullText == parent_title then
codepoint = 0xfffd
elseif ulen(pagename) == 1 then
codepoint = cp(pagename)
else
error("Page title is not a single Unicode character")
end
end
local image, image_emoji
if args.image == "-" then
image = nil
image_emoji = nil
else
image = args.image or m_unicode.lookup_image(codepoint)
image_emoji = args.image_emoji or m_unicode.lookup_image_emoji(codepoint)
end
local table_markup = {}
table.insert(table_markup,
'{| class="wikitable floatright character-info" style="width:25em;"\n')
if image or image_emoji then
local category = "[[Category:Character boxes with images|*" .. string.format("%010d", codepoint) .. "]]"
if image and not image:match("\127") then -- <hiero> tags generate these; pass them through
if image:match("^%[?%[?[Ff]ile:") or image:match("^%[?%[?[Ii]mage:") then
image = image:gsub("^%[%[", ""):gsub("^[Ff]ile:", ""):gsub("^[Ii]mage:", ""):gsub("|.*", ""):gsub("]]", "")
end
image = "[[File:" .. image .. "|120x140px|class=skin-invert-image]]"
if namespace == "" then
image = image .. category
end
end
if image_emoji then
if image then
table.insert(table_markup,
'|-\n! Text style !! Emoji style\n')
end
if image_emoji:match("^%[?%[?[Ff]ile:") or image_emoji:match("^%[?%[?[Ii]mage:") then
image_emoji = image_emoji:gsub("^%[%[", ""):gsub("^[Ff]ile:", ""):gsub("^[Ii]mage:", ""):gsub("|.*", ""):gsub("]]", "")
end
image_emoji = "[[File:" .. image_emoji .. "|120x140px]]"
if namespace == "" and not image then
image_emoji = image_emoji .. category
end
if image then
table.insert(table_markup,
('|-\n| style="text-align: center; width: 50%s;" | %s || style="text-align: center; width: 50%s;" | %s\n'):format(
'%', image, '%', image_emoji
)
)
else
table.insert(table_markup,
('|-\n| colspan="2" style="text-align: center;" | %s\n'):format(
image_emoji
)
)
end
else
table.insert(table_markup,
('|-\n| colspan="2" style="text-align: center;" | %s<br/>%s\n'):format(
image, args.caption or ""
)
)
end
end
local show_different_styles_if_no_emoji_image = false
-- https://en.wikipedia.org/wiki/List_of_emojis
-- Basic Latin (see https://en.wikipedia.org/wiki/Basic_Latin_(Unicode_block)#Variants)
if codepoint == 35 or codepoint == 42 or (codepoint > 47 and codepoint < 58)
-- Latin-1 Supplement
or codepoint == 169 or codepoint == 174
-- General Punctuation
or codepoint == 8252 or codepoint == 8265
-- Letterlike Symbols
or codepoint == 8482 or codepoint == 8505
-- Arrows
or (codepoint > 8595 and codepoint < 8602) or codepoint == 8617 or codepoint == 8618
-- Miscellaneous Technical
or codepoint == 8986 or codepoint == 8987 or codepoint == 9000 or codepoint == 9167 or (codepoint > 9192 and codepoint < 9204) or (codepoint > 9207 and codepoint < 9211)
-- Enclosed Alphanumerics
or codepoint == 9410
-- Geometric Shapes
or codepoint == 9642 or codepoint == 9643 or codepoint == 9654 or codepoint == 9664 or (codepoint > 9722 and codepoint < 9727)
-- Miscellaneous Symbols
or (codepoint > 9727 and codepoint < 9733) or codepoint == 9742 or codepoint == 9745 or codepoint == 9748 or codepoint == 9749 or codepoint == 9752 or codepoint == 9757 or codepoint == 9760 or codepoint == 9762 or codepoint == 9763 or codepoint == 9766 or codepoint == 9770 or codepoint == 9774 or codepoint == 9775 or (codepoint > 9783 and codepoint < 9787) or codepoint == 9792 or codepoint == 9794 or (codepoint > 9799 and codepoint < 9812) or codepoint == 9823 or codepoint == 9824 or codepoint == 9827 or codepoint == 9829 or codepoint == 9830 or codepoint == 9832 or codepoint == 9851 or codepoint == 9854 or codepoint == 9855 or (codepoint > 9873 and codepoint < 9880) or codepoint == 9881 or codepoint == 9883 or codepoint == 9884 or codepoint == 9888 or codepoint == 9889 or codepoint == 9895 or codepoint == 9898 or codepoint == 9899 or codepoint == 9904 or codepoint == 9905 or codepoint == 9917 or codepoint == 9918 or codepoint == 9924 or codepoint == 9925 or codepoint == 9928 or codepoint == 9934 or codepoint == 9935 or codepoint == 9937 or codepoint == 9939 or codepoint == 9940 or codepoint == 9961 or codepoint == 9962 or (codepoint > 9967 and codepoint < 9974) or (codepoint > 9974 and codepoint < 9979) or codepoint == 9981
-- Dingbats
or codepoint == 9986 or codepoint == 9989 or (codepoint > 9991 and codepoint < 9998) or codepoint == 9999 or codepoint == 10002 or codepoint == 10004 or codepoint == 10006 or codepoint == 10013 or codepoint == 10017 or codepoint == 10024 or codepoint == 10035 or codepoint == 10036 or codepoint == 10052 or codepoint == 10055 or codepoint == 10060 or codepoint == 10062 or (codepoint > 10066 and codepoint < 10070) or codepoint == 10071 or codepoint == 10083 or codepoint == 10084 or (codepoint > 10132 and codepoint < 10136) or codepoint == 10145 or codepoint == 10160 or codepoint == 10175
-- Supplemental Arrows-B
or codepoint == 10548 or codepoint == 10549
-- Miscellaneous Symbols and Arrows
or (codepoint > 11012 and codepoint < 11016) or codepoint == 11035 or codepoint == 11036 or codepoint == 11088 or codepoint == 11093
-- CJK Symbols and Punctuation
or codepoint == 12336 or codepoint == 12349
-- Enclosed CJK Letters and Months
or codepoint == 12951 or codepoint == 12953
-- Mahjong Tiles
or codepoint == 126980
-- Playing Cards
or codepoint == 127183
-- Enclosed Alphanumeric Supplement
or codepoint == 127344 or codepoint == 127345 or codepoint == 127358 or codepoint == 127359 or codepoint == 127374 or (codepoint > 127376 and codepoint < 127387)
-- Enclosed Ideographic Supplement
or codepoint == 127489 or codepoint == 127490 or codepoint == 127514 or codepoint == 127535 or (codepoint > 127537 and codepoint < 127547) or codepoint == 127568 or codepoint == 127569
-- Miscellaneous Symbols and Pictographs
or (codepoint > 127743 and codepoint < 127778) or (codepoint > 127779 and codepoint < 127892) or codepoint == 127894 or codepoint == 127895 or (codepoint > 127896 and codepoint < 127900) or (codepoint > 127901 and codepoint < 127985) or (codepoint > 127986 and codepoint < 127990) or (codepoint > 127990 and codepoint < 128254) or (codepoint > 128254 and codepoint < 128318) or (codepoint > 128328 and codepoint < 128335) or (codepoint > 128335 and codepoint < 128360) or codepoint == 128367 or codepoint == 128368 or (codepoint > 128370 and codepoint < 128379) or codepoint == 128391 or (codepoint > 128393 and codepoint < 128398) or codepoint == 128400 or codepoint == 128405 or codepoint == 128406 or codepoint == 128420 or codepoint == 128421 or codepoint == 128424 or codepoint == 128433 or codepoint == 128434 or codepoint == 128444 or (codepoint > 128449 and codepoint < 128453) or (codepoint > 128464 and codepoint < 128468) or (codepoint > 128475 and codepoint < 128479) or codepoint == 128481 or codepoint == 128483 or codepoint == 128488 or codepoint == 128495 or codepoint == 128499 or (codepoint > 128505 and codepoint < 128512)
-- Emoticons
or (codepoint > 128511 and codepoint < 128592)
-- Transport and Map Symbols
or (codepoint > 128639 and codepoint < 128710) or (codepoint > 128714 and codepoint < 128723) or (codepoint > 128724 and codepoint < 128732) or (codepoint > 128731 and codepoint < 128742) or codepoint == 128745 or codepoint == 128747 or codepoint == 128748 or codepoint == 128752 or (codepoint > 128754 and codepoint < 128765)
-- Geometric Shapes Extended
or (codepoint > 128991 and codepoint < 129004) or codepoint == 129008
-- Supplemental Symbols and Pictographs
or (codepoint > 129291 and codepoint < 129339) or (codepoint > 129339 and codepoint < 129350) or (codepoint > 129350 and codepoint < 129536)
-- Symbols and Pictographs Extended-A
or (codepoint > 129647 and codepoint < 129661) or (codepoint > 129663 and codepoint < 129673) or (codepoint > 129679 and codepoint < 129726) or (codepoint > 129726 and codepoint < 129734) or (codepoint > 129741 and codepoint < 129756) or (codepoint > 129759 and codepoint < 129769) or (codepoint > 129775 and codepoint < 129785)
then
show_different_styles_if_no_emoji_image = true
end
if show_different_styles_if_no_emoji_image and not (image and image_emoji) then
table.insert(table_markup,
'|-\n! Text style !! Emoji style\n')
end
if show_different_styles_if_no_emoji_image or image_emoji or m_unicode.lookup_image_emoji(codepoint) then
table.insert(table_markup,
('|- style="font-size: 250%; text-align: center; background: rgba(0,0,0,0.1);"\n| style="padding: 0;" | ' .. u(codepoint) .. '︎ || style="padding: 0;" | ' .. u(codepoint) .. '️\n|- style="font-size: 80%;"\n| colspan="2" | Text style is [[variation selector|forced with]] ⟨&#xFE0E;⟩ and emoji style with ⟨&#xFE0F;⟩.\n')
)
end
if args.caption and (image_emoji or (not image and not image_emoji)) then
table.insert(table_markup,
('|-\n| colspan="2" style="text-align: center;" | %s\n'):format(
args.caption
)
)
end
local sc = args.sc or require("Module:scripts").getByCode(char_to_script(codepoint))
local NAMESPACE, cat_name = title.namespace
if not args.nocat and ((NAMESPACE == 0) or (NAMESPACE == 100)) then -- main and Appendix
cat_name = sc:getCategoryName() .. " na karakter" --TLCHANGE " characters"
end
local block_name = encode_entities(args.block or m_unicode.lookup_block(codepoint))
local aliases
if args.aliases == "-" then
aliases = nil
else
aliases = mw.loadData("Module:Unicode data/aliases")[codepoint]
end
local function parse_aliases(aliases)
local result = {}
if aliases then
local classif = {}
for i, alias in ipairs(aliases) do
if not classif[alias[1]] then
classif[alias[1]] = {}
end
table.insert(classif[alias[1]], encode_entities(alias[2]))
end
if classif.correction then
for i, name in ipairs(classif.correction) do
local category = "[[Category:Character boxes with corrected names]]"
if namespace == "" then
table.insert(result,
("[[Category:Character boxes with corrected names]]Corrected: %s"):format(
name
)
)
else
table.insert(result,
("Corrected: %s"):format(
name
)
)
end
end
end
if classif.alternate then
for i, name in ipairs(classif.alternate) do
local category = "[[Category:Character boxes with alternative names]]"
if namespace == "" then
table.insert(result,
("[[Category:Character boxes with alternative names]]Alternative: %s"):format(
name
)
)
else
table.insert(result,
("Alternative: %s"):format(
name
)
)
end
end
end
if classif.abbreviation then
local category = "[[Category:Character boxes with abbreviations]]"
if namespace == "" then
table.insert(result,
("[[Category:Character boxes with abbreviations]]Abbreviation: %s"):format(
table.concat(classif.abbreviation, ", ")
)
)
else
table.insert(result,
("Abbreviation: %s"):format(
table.concat(classif.abbreviation, ", ")
)
)
end
end
local parsed_result = table.concat(result, ", ")
return "<div>(" .. parsed_result .. ")</div>"
end
return ""
end
local li, vi, ti = nil, nil, nil
if block_name == "Hangul Syllables" then
local index = codepoint - 0xAC00
li, vi, ti = floor(index / 588), floor((index % 588) / 28), index % 28
end
local initial_to_letter = { [0] =
0x3131, 0x3132, 0x3134, 0x3137, 0x3138, 0x3139, 0x3141, 0x3142,
0x3143, 0x3145, 0x3146, 0x3147, 0x3148, 0x3149, 0x314A, 0x314B,
0x314C, 0x314D, 0x314E,
}
local vowel_to_letter = { [0] =
0x314F, 0x3150, 0x3151, 0x3152, 0x3153, 0x3154, 0x3155, 0x3156,
0x3157, 0x3158, 0x3159, 0x315A, 0x315B, 0x315C, 0x315D, 0x315E,
0x315F, 0x3160, 0x3161, 0x3162, 0x3163,
}
local final_to_letter = {
0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137, 0x3139,
0x313A, 0x313B, 0x313C, 0x313D, 0x313E, 0x313F, 0x3140, 0x3141,
0x3142, 0x3144, 0x3145, 0x3146, 0x3147, 0x3148, 0x314A, 0x314B,
0x314C, 0x314D, 0x314E,
}
local function parse_composition()
local result = nil
if block_name == "Hangul Syllables" then
result = ((ti ~= 0) and
'<big class="Kore" lang="">[[&#%u;]] + [[&#%u;]] + [[&#%u;]]</big>' or
'<big class="Kore" lang="">[[&#%u;]] + [[&#%u;]]</big>'):format(
initial_to_letter[li],
vowel_to_letter[vi],
final_to_letter[ti]
)
else
local nfd = toNFD(u(codepoint))
if ulen(nfd) ~= 1 then
local compo = {}
for nfdcp in gcodepoint(nfd) do
local dotted_circle = (m_unicode.is_combining(nfdcp) and "◌" or "")
local link_target = m_unicode.get_entry_title(nfdcp)
if not link_target or not page_exists(link_target) then
link_target = nil
end
local script = char_to_script(nfdcp)
local character_text =
link_target and ('[[%s|<span class="%s">%s&#%u;</span> [U+%04X]]]')
:format(link_target, script, dotted_circle, nfdcp, nfdcp)
or ('<span class="%s">%s&#%u;</span> [U+%04X]')
:format(script, dotted_circle, nfdcp, nfdcp)
table.insert(compo, '<span class="character-sample-secondary">' .. character_text .. "</span> ")
end
result = table.concat(compo, " + ")
end
end
if result then
return "Composition", result, "[[Category:Character boxes with compositions]]"
end
return nil
end
-- [[ Egyptian Hieroglyphs
local function parse_gardiner()
if args.gardiner then
local result = (
"[http://vincent.euverte.free.fr/Rosette/Rosette_410.php?Hiero=%s&Lang=E %s]\n"):format(
args.gardiner, args.gardiner
)
return "Gardiner number", result, "[[Category:Character boxes with additional information for Egyptian Hieroglyphs]]"
end
return nil
end
local function parse_mdc()
if args.mdc then
return "Manuel de Codage", args.mdc, "[[Category:Character boxes with additional information for Egyptian Hieroglyphs]]"
end
return nil
end
local function parse_egpz()
if args.egpz then
return "EGPZ 1.0", args.egpz, "[[Category:Character boxes with additional information for Egyptian Hieroglyphs]]"
end
return nil
end
-- ]]
local function middle_part()
local rows = {}
local function insert_row(row_title, row_contents, row_category)
if row_contents then
table.insert(rows,
('<tr><td style="text-align: left">%s:</td><td>%s%s</td></tr>'):format(row_title, row_contents, row_category))
end
end
insert_row(parse_composition())
insert_row(parse_gardiner())
insert_row(parse_egpz())
insert_row(parse_mdc())
if rows[1] then
return ('<table style="margin: 0 auto;">%s</table>')
:format(table.concat(rows, ""))
end
return ""
end
local function present_codepoint(codepoint, np, script, combining, name, printable, title)
local display
local link_target
if combining == nil then
combining = m_unicode.is_combining(codepoint)
end
if printable == nil then
printable = m_unicode.is_printable(codepoint)
end
local char = u(codepoint)
if title == "self" or page_exists(char) then
link_target = char
elseif title ~= "-" then
link_target = m_unicode.get_entry_title(codepoint)
end
if printable then
display = ('<span class="character-sample-secondary %s">%s&#x%04X;</span>'):format(
script and script:getCode() or char_to_script(codepoint),
combining and "◌" or "", codepoint
)
end
local arrow_and_maybe_char
if np then
arrow_and_maybe_char = (display or "") .. " →"
else
arrow_and_maybe_char = "← " .. (display or "")
end
local text = ('<span title="%s">%s<br><small>[U+%04X]</small></span>')
:format(encode_entities(name or m_unicode.lookup_name(codepoint)),
arrow_and_maybe_char, codepoint)
if link_target then
return ("[[" .. link_target .. "|" .. text .. "]]")
else
return text
end
end
local function get_next(codepoint, step)
-- Skip past noncharacters and reserved characters (Cn), private-use
-- characters (Co), surrogates (Cs), and control characters (Cc), all
-- of which have a label beginning in "<" rather than a proper name.
if step < 0 and 0 < codepoint or step > 0 and codepoint < 0x10FFFF then
repeat
codepoint = codepoint + step
until m_unicode.lookup_name(codepoint):sub(1, 1) ~= "<"
or not (0 < codepoint and codepoint < 0x10FFFF)
end
return codepoint
end
local previous_codepoint =
args.previous_codepoint and get_codepoint(args.previous_codepoint, "previous_codepoint")
or get_next(codepoint, -1)
local next_codepoint =
args.next_codepoint and get_codepoint(args.next_codepoint, "next_codepoint")
or get_next(codepoint, 1)
local combining = args.combining
if combining == nil then
combining = m_unicode.is_combining(codepoint)
end
table.insert(table_markup,
'|-\n| style="width: 70px;" colspan="2" | ' ..
"<table>" ..
"<tr>" ..
"<td>" ..
('<span class="character-sample-primary %s">%s&#%u;</span>')
:format(sc:getCode(), combining and "◌" or "", codepoint) ..
"</td>" ..
"<td>" ..
(" [https://util.unicode.org/UnicodeJsps/character.jsp?a=%.4X U+%.4X]"):format(codepoint, codepoint) ..
", [[w:Talaan ng mga XML at HTML character entity reference|&#" .. codepoint .. ";]]\n" .. --TLCHANGE Use TL Wikipedia article name List of XML and HTML character entity references
'<div class="character-sample-name">' ..
encode_entities(args.name or m_unicode.lookup_name(codepoint)) ..
"</div>" ..
parse_aliases(aliases) ..
"</td>" ..
"</tr>" ..
"</table>"
)
table.insert(table_markup,
middle_part()
)
local previous_unassigned_first = previous_codepoint + 1
local previous_unassigned_last = codepoint - 1
local next_unassigned_first = codepoint + 1
local next_unassigned_last = next_codepoint - 1
local left_unassigned_text
local right_unassigned_text
if previous_codepoint == 0 then
previous_unassigned_first = 0
end
if previous_unassigned_first <= previous_unassigned_last or next_unassigned_first <= next_unassigned_last then
if previous_unassigned_first < previous_unassigned_last then
left_unassigned_text = ("[unassigned: U+%.4X–U+%.4X]"):format(previous_unassigned_first, previous_unassigned_last)
elseif previous_unassigned_first == previous_unassigned_last then
left_unassigned_text = ("[unassigned: U+%.4X]"):format(previous_unassigned_first)
end
if next_unassigned_first < next_unassigned_last then
right_unassigned_text = ("[unassigned: U+%.4X–U+%.4X]"):format(next_unassigned_first, next_unassigned_last)
elseif next_unassigned_first == next_unassigned_last then
right_unassigned_text = ("[unassigned: U+%.4X]"):format(next_unassigned_first)
end
end
local unassignedsRow =
mw.html.create("table"):css("width", "100%"):css("font-size", "80%"):css("white-space", "nowrap")
:tag("tr")
:tag("td"):css("width", "50%"):css("text-align", "left"):wikitext(left_unassigned_text or ""):done()
:tag("td"):css("width", "50%"):css("text-align", "right"):wikitext(right_unassigned_text or ""):done()
:allDone()
table.insert(table_markup, tostring(unassignedsRow) .."\n")
local previous_codepoint_text = ""
local next_codepoint_text = ("%s\n")
:format(present_codepoint(next_codepoint, true,
args.next_codepoint_sc, args.next_codepoint_combining,
args.next_codepoint_name, args.next_codepoint_printable,
args.next_codepoint_title))
if previous_codepoint > 0 then
previous_codepoint_text = ("%s\n")
:format(present_codepoint(previous_codepoint, false,
args.previous_codepoint_sc, args.previous_codepoint_combining,
args.previous_codepoint_name, args.previous_codepoint_printable,
args.previous_codepoint_title))
end
local block_name_text = ("[[Apendise:Yunikowd/%s|%s]]") --TLCHANGE "[[Appendix:Unicode/%s|%s]]"
:format(block_name, block_name)
if namespace == "" then
block_name_text = block_name_text .. ("[[Category:Blokeng %s|*%010d]]\n") --TLCHANGE "[[Category:%s block|*%010d]]\n"
:format(block_name, codepoint)
else
block_name_text = block_name_text .. "\n"
end
local lastRow =
mw.html.create("table"):css("width", "100%"):css("text-align", "center")
:tag("tr")
:tag("td"):css("width", "20%"):wikitext(previous_codepoint_text):done()
-- :tag("td"):css("width", "15%")
-- :tag("span"):wikitext(left_unassigned_text and "'''...'''" or ""):attr("title", left_unassigned_text or ""):done():done()
:tag("td"):css("width", "60%"):css("font-size", "110%"):css("font-weight", "bold"):wikitext(block_name_text)
-- :tag("td"):css("width", "15%")
-- :tag("span"):wikitext(right_unassigned_text and "'''...'''" or ""):attr("title", right_unassigned_text or ""):done():done()
:tag("td"):css("width", "20%"):wikitext(next_codepoint_text):done()
:allDone()
table.insert(table_markup, tostring(lastRow) .."\n")
table.insert(table_markup, "|}")
if cat_name and namespace == "" then
table.insert(table_markup, "[[Category:" .. cat_name .. "| " .. u(codepoint) .. "]]")
end
table.insert(table_markup, require("Module:TemplateStyles")("Template:character info/style.css"))
return table.concat(table_markup)
end
function export.show(frame)
local params = {
[1] = {alias_of = "codepoint"},
["codepoint"] = {},
["previous_codepoint"] = {},
["next_codepoint"] = {},
["name"] = {},
["previous_codepoint_name"] = {},
["next_codepoint_name"] = {},
["combining"] = {type = "boolean"},
["previous_codepoint_combining"] = {type = "boolean"},
["next_codepoint_combining"] = {type = "boolean"},
["printable"] = {type = "boolean"},
["previous_codepoint_printable"] = {type = "boolean"},
["next_codepoint_printable"] = {type = "boolean"},
["previous_codepoint_title"] = {},
["next_codepoint_title"] = {},
["sc"] = {type = "script"},
["next_codepoint_sc"] = {type = "script"},
["previous_codepoint_sc"] = {type = "script"},
["caption"] = {},
["aliases"] = {},
["image"] = {},
["block"] = {},
["gardiner"] = {},
["mdc"] = {},
["egpz"] = {},
["nocat"] = {type = "boolean"},
["pagename"] = {}, -- for testing etc.
}
local parent_frame = frame:getParent()
local args = require("Module:parameters").process(parent_frame.args, params)
return export._show(args, parent_frame:getTitle())
end
return export
dzla8ntl9qx5cous1dlmttcsmkd6xiv
Padron:deprecated lang param usage
10
32326
176025
161963
2026-04-09T03:38:33Z
Hiyuune
5522
Inilipat ni Hiyuune ang pahinang [[Padron:check deprecated lang param usage]] sa [[Padron:deprecated lang param usage]]
161963
wikitext
text/x-wiki
{{deprecated code|active={{#if:{{{lang|}}}|yes|no}}|text=deprecated use of {{para|lang}} parameter|tooltip=Ginagamit ng template call na ito ang hindi na ginagamit na parameter na 'lang'. Gamitin ang '1' sa halip.|{{{1}}}}}<!--
--><noinclude>{{dokumentasyon ng padron}}</noinclude>
9uv7x9nckz5yb62epxzzq8t6lrsyyvq
Module:languages/data/3/t
828
32631
176054
175943
2026-04-09T05:14:40Z
Yivan000
4078
176054
Scribunto
text/plain
local m_langdata = require("Module:languages/data")
-- Loaded on demand, as it may not be needed (depending on the data).
local function u(...)
u = require("Module:string utilities").char
return u(...)
end
local c = m_langdata.chars
local p = m_langdata.puaChars
local s = m_langdata.shared
local m = {}
m["taa"] = {
"Lower Tanana",
28565,
"ath-nor",
"Latn",
}
m["tab"] = {
"Tabasaran",
34079,
"cau-esm",
"Cyrl, Latn, Arab",
translit = {
Cyrl = "tab-translit",
},
override_translit = true,
display_text = {
Cyrl = s["cau-Cyrl-displaytext"]
},
strip_diacritics = {
Cyrl = s["cau-Cyrl-stripdiacritics"],
Latn = s["cau-Latn-stripdiacritics"],
},
sort_key = {
Cyrl = "tab-sortkey",
}
}
m["tac"] = {
"Tarahumara Mababang Lupain", --TLCHANGE
15616384,
"azc-trc",
"Latn",
english_name = "Lowland Tarahumara", --TLCHANGE
spanish_name = "Tarahumara de las tierras bajas", --TLCHANGE
}
m["tad"] = {
"Tause",
2356440,
"paa-wlp",
"Latn",
}
m["tae"] = {
"Tariana",
732726,
"awd-nwk",
"Latn",
}
m["taf"] = {
"Tapirapé",
7684673,
"tup-gua",
"Latn",
}
m["tag"] = {
"Tagoi",
36537,
"nic-ras",
"Latn",
}
m["taj"] = {
"Eastern Tamang",
12953177,
"sit-tam",
"sit-tam-Tibt, Deva",
-- sit-tam-Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]]
-- NOTE: Formerly there was no sort_key or translit specified; I assume that's a mistake.
}
m["tak"] = {
"Tala",
3914494,
"cdc-wst",
"Latn",
}
m["tal"] = {
"Tal",
3440387,
"cdc-wst",
"Latn",
}
m["tan"] = {
"Tangale",
529921,
"cdc-wst",
"Latn",
}
m["tao"] = {
"Yami",
715760,
"phi",
"Latn",
}
m["tap"] = {
"Taabwa",
7673650,
"bnt-sbi",
"Latn",
}
m["tar"] = {
"Tarahumara Sentral", --TLCHANGE
20090009,
"azc-trc",
"Latn",
sort_key = {remove_diacritics = c.acute .. "ꞌ"},
english_name = "Central Tarahumara", --TLCHANGE
spanish_name = "Tarahumara central", --TLCHANGE
}
m["tas"] = {
"Tây Bồi",
2233794,
"crp",
"Latn",
ancestors = "fr",
sort_key = s["roa-oil-sortkey"],
}
m["tau"] = {
"Upper Tanana",
28281,
"ath-nor",
"Latn",
}
m["tav"] = {
"Tatuyo",
2524007,
"sai-tuc",
"Latn",
}
m["taw"] = {
"Tai",
7675861,
"ngf-kak",
"Latn",
}
m["tax"] = {
"Tamki",
3449082,
"cdc-est",
"Latn",
}
m["tay"] = {
"Atayal",
715766,
"map-ata",
"Latn",
}
m["taz"] = {
"Tocho",
36680,
"alv-tal",
"Latn",
}
m["tba"] = {
"Aikanã",
3409307,
"qfa-iso",
"Latn",
}
-- Tapeba [tbb] is spurious
m["tbc"] = {
"Takia",
3514336,
"poz-oce",
"Latn",
}
m["tbd"] = {
"Kaki Ae",
6349417,
"qfa-iso", -- isolate in Glottolog and Pawley and Hammarström (2018); tentatively in Eleman family by Ross (2005)
-- (and Usher?), but they don't address counterarguments of Clifton 1997
"Latn",
}
m["tbe"] = {
"Tanimbili",
3515188,
"poz-tem",
"Latn",
}
m["tbf"] = {
"Mandara",
3285424,
"poz-ocw",
"Latn",
}
m["tbg"] = {
"Hilagang Tairora", --TLCHANGE
20210398,
"ngf-tai",
"Latn",
english_name = "North Tairora", --TLCHANGE
}
m["tbh"] = {
"Thurawal",
3537135,
"aus-yuk",
"Latn",
}
m["tbi"] = {
"Gaam",
35338,
"sdv-eje",
"Latn",
}
m["tbj"] = {
"Tiang",
3528020,
"poz-ocw",
"Latn",
}
m["tbk"] = {
"Tinagbanwa", --TLCHANGE
3915487,
"phi-kal",
"Tagb, Latn",
is_official_kwf_name = "https://kwfwikaatkultura.ph/ortograpiyang-tinagbanwa/", --TLCHANGE
english_name = "Calamian Tagbanwa", --TLCHANGE
}
m["tbl"] = {
"Tiboli", --TLCHANGE
7690594,
"phi",
"Latn",
is_official_kwf_name = "https://kwfwikaatkultura.ph/tiboli-2/", --TLCHANGE
english_name = "Tboli", --TLCHANGE
}
m["tbm"] = {
"Tagbu",
7675188,
"nic-ser",
}
m["tbn"] = {
"Barro Negro Tunebo",
12953943,
"cba",
}
m["tbo"] = {
"Tawala",
7689206,
"poz-ocw",
"Latn",
}
m["tbp"] = {
"Taworta",
7689337,
"paa-elp",
"Latn",
}
m["tbr"] = {
"Tumtum",
3407029,
"qfa-kad",
}
m["tbs"] = {
"Tanguat",
7683166,
"paa-ata",
"Latn",
}
m["tbt"] = {
"Kitembo",
13123561,
"bnt-shh",
"Latn",
}
m["tbu"] = {
"Tubar",
56730,
"azc-trc",
"Latn",
}
m["tbv"] = {
-- considered a dialect of Kulungtfu-Yuanggeng-Tobo [kgf] by Glottolog
"Tobo",
7811712,
"ngf-kto",
"Latn",
}
m["tbw"] = {
"Tagbanwa Aborlan", --TLCHANGE
3915475,
"phi",
"Latn",
is_official_kwf_name = "https://kwfwikaatkultura.ph/tagbanwa-2/", --TLCHANGE
english_name = "Tagbanwa", --TLCHANGE
}
m["tbx"] = {
"Kapin",
6366665,
"poz-ocw",
"Latn",
}
m["tby"] = {
"Tabaru",
11732670,
"paa-gto",
"Latn",
}
m["tbz"] = {
"Ditammari",
35186,
"nic-eov",
}
m["tca"] = {
"Ticuna",
1815205,
"sai-tyu",
"Latn",
}
m["tcb"] = {
"Tanacross",
28268,
"ath-nor",
"Latn",
}
m["tcc"] = {
"Datooga",
35327,
"sdv-nis",
"Latn",
}
m["tcd"] = {
"Tafi",
36545,
"alv-ktg",
}
m["tce"] = {
"Katimugang Tuttsone", --TLCHANGE
31091048,
"ath-nor",
"Latn",
english_name = "Southern Tutchone", --TLCHANGE
}
m["tcf"] = {
"Malinaltepec Tlapanec",
25559732,
"omq",
"Latn",
}
m["tcg"] = {
"Tamagario",
7680531,
"paa-kay",
"Latn",
}
m["tch"] = {
"Turks and Caicos Creole English",
7855478,
"crp",
"Latn",
ancestors = "en",
}
m["tci"] = {
"Wára",
20825638,
"paa-wko",
"Latn",
}
m["tck"] = {
"Tchitchege",
36595,
"bnt-tek",
}
m["tcl"] = {
"Taman (Myanmar)",
15616518,
"sit-jnp",
"Latn",
}
m["tcm"] = {
"Tanahmerah",
3514927,
"qfa-dis", -- Papuan; isolate per Glottolog and Palmer (2018), considered an independent branch of TNG by Usher
-- (2020); seems based only on some pronoun correspondences
"Latn",
}
m["tco"] = {
"Taungyo",
12953186,
"tbq-brm",
ancestors = "obr",
}
m["tcp"] = {
"Tawr Chin",
7689338,
"tbq-kuk",
}
m["tcq"] = {
"Kaiy",
6348709,
"paa-clp",
"Latn",
}
m["tcs"] = {
"Torres Strait Creole",
36648,
"crp",
"Latn",
ancestors = "en",
}
m["tct"] = {
"T'en",
3442330,
"qfa-kms",
}
m["tcu"] = {
"Timog-silanganang Tarahumara", --TLCHANGE
36807,
"azc-trc",
"Latn",
english_name = "Southeastern Tarahumara", --TLCHANGE
spanish_name = "Tarahumara del sureste", --TLCHANGE
}
m["tcw"] = {
"Tecpatlán Totonac",
7692795,
"nai-ttn",
"Latn",
}
m["tcx"] = {
"Toda",
34042,
"dra-tkt",
"Taml",
--translit = {Taml = "Taml-translit"},
}
m["tcy"] = {
"Tulu",
34251,
"dra-tlk",
"Tutg, Mlym, Knda", -- Mlym is nearer than Knda but both lack ɛ/ɛː.
translit = {
Tutg = "tcy-Tutg-translit",
},
-- Knda translit in [[Module:scripts/data]]
-- Mlym translit in [[Module:scripts/data]]
}
m["tcz"] = {
"Thado Chin",
6583558,
"tbq-kuk",
}
m["tda"] = {
"Tagdal",
36570,
"son",
}
m["tdb"] = {
"Panchpargania",
21946879,
"inc-bih",
"Deva, as-Beng, Orya, Chis",
}
m["tdc"] = {
"Emberá-Tadó",
3052041,
"sai-chc",
"Latn",
}
m["tdd"] = {
"Tai Nüa",
36556,
"tai-swe",
"Tale",
translit = "Tale-translit",
strip_diacritics = {remove_diacritics = c.ZWNJ .. c.ZWJ},
}
m["tde"] = {
"Tiranige Diga Dogon",
5313387,
"nic-dgw",
}
m["tdf"] = {
"Talieng",
37525108,
"mkh-ban",
}
m["tdg"] = {
"Western Tamang",
12953178,
"sit-tam",
"sit-tam-Tibt, Deva",
-- sit-tam-Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]]
-- NOTE: Formerly there was no sort_key or translit specified; I assume that's a mistake.
}
m["tdh"] = {
"Thulung",
56553,
"sit-kiw",
}
m["tdi"] = {
"Tomadino",
7818197,
"poz-btk",
"Latn",
}
m["tdj"] = {
"Tajio",
7676870,
"poz",
"Latn",
}
m["tdk"] = {
"Tambas",
3440392,
"cdc-wst",
}
m["tdl"] = {
"Sur",
3914453,
"nic-tar",
}
m["tdm"] = {
"Taruma",
5559094,
}
m["tdn"] = {
"Tondano",
3531514,
"phi",
"Latn",
}
m["tdo"] = {
"Teme",
3913994,
"alv-mye",
}
m["tdq"] = {
"Tita",
3914899,
"nic-bco",
}
m["tdr"] = {
"Todrah",
7812881,
"mkh",
}
m["tds"] = {
"Doutai",
5302331,
"paa-clp",
"Latn",
}
m["tdt"] = {
"Tetun Dili",
12643484,
"poz-tim",
"Latn",
}
m["tdu"] = {
"Tempasuk Dusun",
3529155,
"poz-san",
}
m["tdv"] = {
"Toro",
3438367,
"nic-alu",
"Latn",
}
m["tdy"] = {
"Tadyawan Mangyan", --TLCHANGE
7674700,
"phi",
"Latn",
is_official_kwf_name = "https://kwfwikaatkultura.ph/tadyawan-mangyan-2/", --TLCHANGE
english_name = "Tadyawan", --TLCHANGE
}
m["tea"] = {
"Temiar",
3914693,
"mkh-asl",
"Latn",
}
m["teb"] = {
"Tetete",
7706087,
"sai-tuc",
"Latn",
}
m["tec"] = {
"Terik",
3518379,
"sdv-nma",
}
m["ted"] = {
"Tepo Krumen",
11152243,
"kro-grb",
}
m["tee"] = {
"Huehuetla Tepehua",
56455,
"nai-ttn",
"Latn",
}
m["tef"] = {
"Teressa",
3518362,
"aav-nic",
}
m["teg"] = {
"Teke-Tege",
36478,
"bnt-tek",
}
m["teh"] = {
"Tehuelche",
33930,
"sai-cho",
"Latn",
}
m["tei"] = {
"Torricelli",
3450788,
"paa-kom",
"Latn",
}
m["tek"] = {
"Ibali Teke",
2802914,
"bnt-tek",
}
m["tem"] = {
"Temne",
36613,
"alv-mel",
"Latn",
}
m["ten"] = {
"Tama (Colombia)",
3832969,
"sai-tuc",
"Latn",
}
m["teo"] = {
"Ateso",
29474,
"sdv-ttu",
"Latn",
}
m["tep"] = {
"Tepecano",
3915525,
"azc-pim",
"Latn",
}
m["teq"] = {
"Temein",
7698064,
"sdv",
}
m["ter"] = {
"Tereno",
3314742,
"awd",
"Latn",
}
m["tes"] = {
"Tengger",
12473479,
"poz",
"Latn, Java",
}
m["tet"] = {
"Tetum",
34125,
"poz-tim",
"Latn",
}
m["teu"] = {
"Soo",
3437607,
"ssa-klk",
}
m["tev"] = {
"Teor",
12953198,
"poz-cma",
}
m["tew"] = {
"Tewa",
56492,
"nai-kta",
"Latn",
}
m["tex"] = {
"Tennet",
56346,
"sdv",
}
m["tey"] = {
"Tulishi",
12911106,
"qfa-kad",
"Latn",
}
m["tez"] = {
"Tetserret",
7706841,
"ber",
"Latn",
}
m["tfi"] = {
"Tofin Gbe",
3530330,
"alv-pph",
}
m["tfn"] = {
"Dena'ina",
27785,
"ath-nor",
"Latn",
}
m["tfo"] = {
"Tefaro",
7694618,
"paa-egb",
"Latn",
}
m["tfr"] = {
"Teribe",
36533,
"cba",
"Latn",
}
m["tft"] = {
"Ternate",
3518492,
"paa-tti",
"Latn, Arab",
}
m["tga"] = {
"Sagalla",
12953082,
"bnt-cht",
}
m["tgb"] = {
"Tobilung",
12953913,
"poz-san",
"Latn",
}
m["tgc"] = {
"Tigak",
3528276,
"poz-ocw",
"Latn",
}
m["tgd"] = {
"Ciwogai",
3438799,
"cdc-wst",
"Latn",
}
m["tge"] = {
"Eastern Gorkha Tamang",
12953175,
"sit-tam",
"sit-tam-Tibt, Deva",
-- sit-tam-Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]]
-- NOTE: Formerly there was no sort_key or translit specified; I assume that's a mistake.
}
m["tgf"] = {
"Chali",
3695197,
"sit-ebo",
"Tibt, Latn",
override_translit = true,
-- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]]
}
m["tgh"] = {
"Tobagonian Creole English",
7811541,
"crp",
ancestors = "en",
}
m["tgi"] = {
"Lawunuia",
3219937,
"poz-ocw",
}
m["tgn"] = {
"Tandaganon",
63311769,
"phi",
"Latn",
}
m["tgo"] = {
"Sudest",
7675351,
"poz-ocw",
}
m["tgp"] = {
"Tangoa",
2410276,
"poz-vnn",
"Latn",
}
m["tgq"] = {
"Tring",
7842360,
"poz-swa",
}
m["tgr"] = {
"Tareng",
25559541,
"mkh",
}
m["tgs"] = {
"Nume",
3346290,
"poz-vnn",
"Latn",
}
m["tgt"] = {
"Tagbanwa Sentral", --TLCHANGE
3915515,
"phi",
"Tagb",
is_official_kwf_name = "https://kwfwikaatkultura.ph/tagbanwa-2/", --TLCHANGE
english_name = "Central Tagbanwa", --TLCHANGE
}
m["tgu"] = {
"Tanggu",
7682930,
"paa-ata",
"Latn",
}
m["tgv"] = {
"Tingui-Boto",
7808195,
"sai-mje",
"Latn",
}
m["tgw"] = {
"Tagwana",
36514,
"alv-tdj",
}
m["tgx"] = {
"Tagish",
28064,
"ath-nor",
"Latn",
}
m["tgy"] = {
"Togoyo",
36825,
"nic-ser",
}
m["thc"] = {
"Tai Hang Tong",
7675753,
"tai-nor",
}
m["thd"] = {
"Kuuk Thaayorre",
6448718,
"aus-pmn",
"Latn",
}
m["the"] = {
"Chitwania Tharu",
22083804,
"inc-tha",
"Deva",
}
m["thf"] = {
"Thangmi",
7710314,
"sit-new",
}
m["thh"] = {
"Kahilagaang Tarahumara", --TLCHANGE
15616395,
"azc-trc",
"Latn",
english_name = "Northern Tarahumara", --TLCHANGE
spanish_name = "Tarahumara septentrional", --TLCHANGE
}
m["thi"] = {
"Tai Long",
25559562,
"tai-swe",
}
m["thk"] = {
"Tharaka",
15407179,
"bnt-kka",
}
m["thl"] = {
"Dangaura Tharu",
22083815,
"inc-tha",
"Deva",
}
m["thm"] = {
"Thavung",
34780,
"mkh-vie",
"Thai", --Laoo is feasible but no evidence yet.
sort_key = "Thai-sortkey",
}
m["thn"] = {
"Thachanadan",
7708880,
"dra-mal",
}
m["thp"] = {
"Thompson",
1755054,
"sal",
"Latn, Dupl",
}
m["thq"] = {
"Kochila Tharu",
22083826,
"inc-tha",
}
m["thr"] = {
"Rana Tharu",
12953920,
"inc-tha",
"Deva",
}
m["ths"] = {
"Thakali",
7709348,
"sit-tam",
}
m["tht"] = {
"Tahltan",
30125,
"ath-nor",
"Latn",
}
m["thu"] = {
"Thuri",
7799291,
"sdv-lon",
}
m["thy"] = {
"Tha",
3915849,
"alv-bwj",
}
m["tic"] = {
"Tira",
36677,
"alv-hei",
}
m["tif"] = {
"Tifal",
11732691,
"ngf-mok",
"Latn",
}
m["tig"] = {
"Tigre",
34129,
"sem-eth",
"Ethi",
translit = "Ethi-translit",
}
m["tih"] = {
"Timugon Murut",
7807680,
"poz-san",
"Latn",
}
m["tii"] = {
"Tiene",
36469,
"bnt-tek",
}
m["tij"] = {
"Tilung",
7803037,
"sit-kiw",
}
m["tik"] = {
"Tikar",
36483,
"nic-bdn",
"Latn",
}
m["til"] = {
"Tillamook",
2109432,
"sal",
"Latn",
}
m["tim"] = {
"Timbe",
7804599,
"ngf-kab",
"Latn",
}
m["tin"] = {
"Tindi",
36860,
"cau-and",
"Cyrl",
display_text = s["cau-Cyrl-displaytext"],
strip_diacritics = s["cau-Cyrl-stripdiacritics"],
}
m["tio"] = {
"Teop",
3518239,
"poz-ocw",
"Latn",
}
m["tip"] = {
"Trimuris",
7842270,
"paa-kwe",
"Latn",
}
m["tiq"] = {
"Tiéfo",
3914874,
"alv-sav",
}
m["tis"] = {
"Itnëg Masadiit", --TLCHANGE
18748769,
"phi",
is_official_kwf_name = "https://kwfwikaatkultura.ph/itneg/", --TLCHANGE
english_name = "Masadiit Itneg", --TLCHANGE
}
m["tit"] = {
"Tinigua",
3029805,
}
m["tiu"] = {
"Adasen",
11214797,
"phi",
}
m["tiv"] = {
"Tiv",
34131,
"nic-tvc",
"Latn",
}
m["tiw"] = {
"Tiwi",
1656014,
"qfa-iso",
"Latn",
}
m["tix"] = {
"Southern Tiwa",
7570552,
"nai-kta",
"Latn",
}
m["tiy"] = {
"Tëduray", --TLCHANGE
7809425,
"phi",
"Latn",
is_official_kwf_name = "https://kwfwikaatkultura.ph/teduray-2/", --TLCHANGE
english_name = "Tiruray", --TLCHANGE
}
m["tiz"] = {
"Tai Hongjin",
3915716,
"tai-swe",
}
m["tja"] = {
"Tajuasohn",
3915326,
"kro-wkr",
}
m["tjg"] = {
"Tunjung",
3542117,
"poz",
"Latn",
}
m["tji"] = {
"Kahilagaang Tujya", --TLCHANGE
12953229,
"sit-tja",
"Latn",
english_name = "Northern Tujia", --TLCHANGE
spanish_name = "Tujia septentrional", --TLCHANGE
}
m["tjl"] = {
"Tai Laing",
7675773,
"tai-swe",
"Mymr",
}
m["tjm"] = {
"Timucua",
638300,
"qfa-iso",
"Latn",
}
m["tjn"] = {
"Tonjon",
3913372,
"dmn-jje",
}
m["tjs"] = {
"Katimugang Tujya", --TLCHANGE
12633994,
"sit-tja",
"Latn",
english_name = "Southern Tujia", --TLCHANGE
spanish_name = "Tujia meridional", --TLCHANGE
}
m["tju"] = {
"Tjurruru",
3913834,
"aus-nga",
"Latn",
}
m["tjw"] = {
"Chaap Wuurong",
5285187,
"aus-pam",
"Latn",
}
m["tka"] = {
"Truká",
7847648,
}
m["tkb"] = {
"Buksa",
20983638,
"inc-eas",
"Deva",
}
m["tkd"] = {
"Tukudede",
36863,
"poz-tim",
"Latn",
}
m["tke"] = {
"Takwane",
11030092,
"bnt-mak",
"Latn",
ancestors = "vmw",
}
m["tkf"] = {
"Tukumanféd",
42330115,
"tup-gua",
"Latn",
}
m["tkl"] = {
"Tokelawano", --TLCHANGE
34097,
"poz-pnp",
"Latn",
english_name = "Tokelauan", --TLCHANGE
spanish_name = "Tokelauano", --TLCHANGE
}
m["tkm"] = {
"Takelma",
56710,
}
m["tkn"] = {
"Tokunoshima",
3530484,
"jpx-nry",
"Jpan",
translit = s["jpx-translit"],
display_text = s["jpx-displaytext"],
strip_diacritics = s["jpx-stripdiacritics"],
sort_key = s["jpx-sortkey"],
}
m["tkp"] = {
"Tikopia",
36682,
"poz-pnp",
"Latn",
}
m["tkq"] = {
"Tee",
3075144,
"nic-ogo",
"Latn",
}
m["tkr"] = {
"Tsakhur",
36853,
"cau-wsm",
"Cyrl, Latn, Arab",
translit = "tkr-translit",
override_translit = true,
display_text = {
Cyrl = s["cau-Cyrl-displaytext"]
},
strip_diacritics = {
Cyrl = s["cau-Cyrl-stripdiacritics"],
Latn = s["cau-Latn-stripdiacritics"],
},
}
m["tks"] = {
"Ramandi",
25261947,
"xme-ttc",
"Arab",
ancestors = "xme-ttc-sou",
}
m["tkt"] = {
"Kathoriya Tharu",
22083822,
"inc-tha",
}
m["tku"] = {
"Upper Necaxa Totonac",
56343,
"nai-ttn",
"Latn",
}
m["tkv"] = {
"Mur Pano",
16939373,
"poz-ocw",
"Latn",
}
m["tkw"] = {
"Teanu",
3516731,
"poz-tem",
"Latn",
}
m["tkx"] = {
"Tangko",
7682993,
"ngf-tna",
"Latn",
}
m["tkz"] = {
"Takua",
7678544,
"mkh",
}
m["tla"] = {
"Southwestern Tepehuan",
3518245,
"azc-pim",
"Latn",
}
m["tlb"] = {
"Tobelo",
1142333,
"paa-gto",
"Latn",
}
m["tlc"] = {
"Misantla Totonac",
56460,
"nai-ttn",
"Latn",
}
m["tld"] = {
"Talaud",
7678964,
"phi",
"Latn",
}
m["tlf"] = {
"Telefol",
7696150,
"ngf-mok",
"Latn",
}
m["tlg"] = {
"Tofanma",
4461493,
"paa-nto",
"Latn",
}
m["tlh"] = {
"Klingon",
10134,
"art",
"Latn",
type = "appendix-constructed",
}
m["tli"] = {
"Tlingit",
27792,
"xnd",
"Latn, Cyrl",
}
m["tlj"] = {
"Talinga-Bwisi",
7679530,
"bnt-haj",
}
m["tlk"] = {
"Taloki",
3514563,
"poz-btk",
}
m["tll"] = {
"Tetela",
2613465,
"bnt-tet",
}
m["tlm"] = {
"Tolomako",
3130514,
"poz-vnn",
"Latn",
}
m["tln"] = {
"Talondo'",
7680293,
"poz-ssw",
}
m["tlo"] = {
"Talodi",
36525,
"alv-tal",
}
m["tlp"] = {
"Filomena Mata-Coahuitlán Totonac",
5449202,
"nai-ttn",
"Latn",
}
m["tlq"] = {
"Tai Loi",
7675784,
"mkh-pal",
}
m["tlr"] = {
"Talise",
3514510,
"poz-sls",
"Latn",
}
m["tls"] = {
"Tambotalo",
7681065,
"poz-vnn",
"Latn",
}
m["tlt"] = {
"Teluti",
12953194,
"poz-cma",
}
m["tlu"] = {
"Tulehu",
7852006,
"poz-cma",
}
m["tlv"] = {
"Taliabu",
3514498,
"poz-cma",
"Latn",
}
m["tlx"] = {
"Khehek",
3196124,
"poz-aay",
}
m["tly"] = {
"Talysh",
34318,
"xme-ttc",
"Latn, Cyrl, fa-Arab",
}
m["tma"] = {
"Tama (Chad)",
57001,
"sdv-tmn",
}
m["tmb"] = {
"Avava",
2157461,
"poz-vnc",
"Latn",
}
m["tmc"] = {
"Tumak",
3121045,
"cdc-est",
}
m["tmd"] = {
"Haruai",
12632146,
"paa-pia",
"Latn",
}
m["tme"] = {
"Tremembé",
5246937,
}
m["tmf"] = {
"Toba-Maskoy",
3033544,
"sai-mas",
"Latn",
}
m["tmg"] = {
"Ternateño",
7232597,
}
m["tmh"] = {
"Tuareg",
34065,
"ber",
"Latn, Tfng, Arab",
strip_diacritics = {
Latn = {remove_diacritics = c.grave .. c.acute .. c.circ},
},
}
m["tmi"] = {
"Tutuba",
7857052,
"poz-vnn",
"Latn",
}
m["tmj"] = {
"Samarokena",
7408865,
"paa-saa",
"Latn",
}
m["tml"] = {
"Tamnim Citak",
12643315,
"ngf-asm",
"Latn",
}
m["tmm"] = {
"Tai Thanh",
7675842,
"tai-swe",
}
m["tmn"] = {
"Taman (Indonesia)",
7680671,
"poz",
"Latn",
}
m["tmo"] = {
"Temoq",
7698205,
"mkh-asl",
}
m["tmq"] = {
"Tumleo",
7852641,
"poz-ocw",
}
m["tms"] = {
"Tima",
36684,
"nic-ktl",
}
m["tmt"] = {
"Tasmate",
7687571,
"poz-vnn",
"Latn",
}
m["tmu"] = {
"Iau",
56867,
"paa-lpl",
"Latn",
}
m["tmv"] = {
"Motembo",
11013108,
"bnt-bun",
}
m["tmy"] = {
"Tami",
3514812,
"poz-oce",
}
m["tmz"] = {
"Tamanaku",
3441435,
"sai-ven",
"Latn",
}
m["tna"] = {
"Tacana",
3182551,
"sai-tac",
"Latn",
}
m["tnb"] = {
"Western Tunebo",
3181238,
"cba",
}
m["tnc"] = {
"Tanimuca-Retuarã",
36535,
"sai-tuc",
"Latn",
}
m["tnd"] = {
"Angosturas Tunebo",
25559604,
"cba",
}
m["tne"] = {
"Tinoc Kallahan",
3192219,
}
m["tng"] = {
"Tobanga",
3440501,
"cdc-est",
}
m["tnh"] = {
"Maiani",
6735243,
"ngf-kau",
"Latn",
}
m["tni"] = {
"Tandia",
7682454,
"poz-hce",
"Latn",
}
m["tnk"] = {
"Kwamera",
3200806,
"poz-vns",
"Latn",
}
m["tnl"] = {
"Lenakel",
3229429,
"poz-vns",
"Latn",
}
m["tnm"] = {
"Tabla",
7673105,
"paa-sen",
"Latn",
}
m["tnn"] = {
"North Tanna",
957945,
"poz-vns",
"Latn",
}
m["tno"] = {
"Toromono",
510544,
"sai-tac",
"Latn",
}
m["tnp"] = {
"Whitesands",
3063761,
"poz-vns",
"Latn",
}
m["tnq"] = {
"Taíno",
5232952,
"awd-taa",
"Latn",
}
m["tnr"] = {
"Bedik",
35096,
"alv-ten",
"Latn",
}
m["tns"] = {
"Tenis",
7699870,
"poz-stm",
"Latn",
}
m["tnt"] = {
"Tontemboan",
3531666,
"phi",
"Latn",
}
m["tnu"] = {
"Tay Khang",
6362363,
"tai",
}
m["tnv"] = {
"Tanchangya",
7682361,
"inc-bas",
"Cakm",
ancestors = "inc-obn",
}
m["tnw"] = {
"Tonsawang",
3531660,
"phi",
"Latn",
}
m["tnx"] = {
"Tanema",
2106984,
"poz-tem",
"Latn",
}
m["tny"] = {
"Tongwe",
7821200,
"bnt",
}
m["tnz"] = {
"Ten'edn",
3073453,
"mkh-asl",
"Latn",
}
m["tob"] = {
"Toba",
3113756,
"sai-guc",
"Latn",
}
m["toc"] = {
"Coyutla Totonac",
15615591,
"nai-ttn",
"Latn",
}
m["tod"] = {
"Toma",
11055484,
"dmn-msw",
"Latn, Loma"
}
m["tof"] = {
"Gizrra",
5565941,
"paa-etf",
"Latn",
}
m["tog"] = {
"Tonga (Malawi)",
3847648,
"bnt-nys",
"Latn",
}
m["toh"] = {
"Tonga (Mozambique)",
7820988,
"bnt-bso",
}
m["toi"] = {
"Tonga (Zambia)",
34101,
"bnt-bot",
"Latn",
}
m["toj"] = {
"Tojolabal",
36762,
"myn",
"Latn",
}
m["tok"] = {
"Toki Pona",
36846,
"art",
"Latn",
type = "appendix-constructed",
}
m["tol"] = {
"Tolowa",
20827,
"ath-pco",
"Latn",
}
m["tom"] = {
"Tombulu",
3531199,
"phi",
"Latn",
}
m["too"] = {
"Xicotepec de Juárez Totonac",
8044353,
"nai-ttn",
"Latn",
}
m["top"] = {
"Papantla Totonac",
56329,
"nai-ttn",
"Latn",
}
m["toq"] = {
"Toposa",
3033588,
"sdv-ttu",
}
m["tor"] = {
"Togbo-Vara Banda",
11002922,
"bad-cnt",
}
m["tos"] = {
"Highland Totonac",
13154149,
"nai-ttn",
"Latn",
}
m["tou"] = {
"Tho",
22694631,
"mkh-vie",
"Latn",
}
m["tov"] = {
"Upper Taromi",
12953183,
"xme-ttc",
ancestors = "xme-ttc-cen",
}
m["tow"] = {
"Hemez", --TLCHANGE
3912876,
"nai-kta",
"Latn",
english_name = "Jemez", --TLCHANGE
spanish_name = "Jémez", --TLCHANGE
}
m["tox"] = {
"Tobian",
34022,
"poz-mic",
}
m["toy"] = {
"Topoiyo",
7824977,
"poz-kal",
}
m["toz"] = {
"To",
7811216,
"alv-mbm",
}
m["tpa"] = {
"Taupota",
7688832,
"poz-ocw",
}
m["tpc"] = {
"Mêphā Azoyu", --TLCHANGE
25559730,
"omq",
"Latn",
english_name = "Azoyú Me'phaa", --TLCHANGE
spanish_name = "Tlapaneco de Azoyú", --TLCHANGE
}
m["tpe"] = {
"Tippera",
16115423,
"tbq-bdg",
}
m["tpf"] = {
"Tarpia",
12953185,
"poz-ocw",
"Latn",
}
m["tpg"] = {
"Kula",
6442714,
"paa-alp",
"Latn",
}
m["tpi"] = {
"Tok Pisin",
34159,
"crp",
"Latn",
ancestors = "en",
}
m["tpj"] = {
"Tapieté",
3121063,
"gn",
"Latn",
}
m["tpk"] = {
"Tupinikin",
33924,
"tup-gua",
}
m["tpl"] = {
"Mêphā Tlakwapa", --TLCHANGE
16115511,
"omq",
english_name = "Tlacoapa Me'phaa", --TLCHANGE
spanish_name = "Tlapaneco de Tlacoapa", --TLCHANGE
}
m["tpm"] = {
"Tampulma",
36590,
"nic-gnw",
}
m["tpn"] = {
"Tupinambá",
31528147,
"tup-gua",
"Latn",
}
m["tpo"] = {
"Tai Pao",
7675795,
"tai-nor",
}
m["tpp"] = {
"Pisaflores Tepehua",
56349,
"nai-ttn",
}
m["tpq"] = {
"Tukpa",
12953230,
"sit-las",
}
m["tpr"] = {
"Tuparí",
3542217,
"tup",
"Latn",
}
m["tpt"] = {
"Tlachichilco Tepehua",
56330,
"nai-ttn",
}
m["tpu"] = {
"Tampuan",
3514882,
"mkh-ban",
"Khmr",
}
m["tpv"] = {
"Tanapag",
3397371,
"poz-mic",
}
m["tpw"] = {
"Old Tupi",
56944,
"tup-gua",
"Latn",
}
m["tpx"] = {
"Mêphā Akatepek", --TLCHANGE
31157882,
"omq",
"Latn",
english_name = "Acatepec Me'phaa", --TLCHANGE
spanish_name = "Tlapaneco de Acatepec", --TLCHANGE
}
m["tpy"] = {
"Trumai",
12294279,
"qfa-iso",
}
m["tpz"] = {
"Tinputz",
3529205,
"poz-ocw",
}
m["tqb"] = {
"Tembé",
10322157,
"tup-gua",
"Latn",
}
m["tql"] = {
"Lehali",
3229119,
"poz-vnn",
"Latn",
}
m["tqm"] = {
"Turumsa",
7856508,
"paa-dtu",
"Latn",
}
m["tqn"] = {
"Tenino",
15699255,
"nai-shp",
"Latn",
ancestors = "nai-spt",
}
m["tqo"] = {
"Toaripi",
7811403,
"paa-eel",
"Latn",
}
m["tqp"] = {
"Tomoip",
3531388,
"poz-ocw",
}
m["tqq"] = {
"Tunni",
3514343,
"cus-som",
}
m["tqr"] = {
"Torona",
36679,
"alv-tal",
}
m["tqt"] = {
"Western Totonac",
7116691,
"nai-ttn",
"Latn",
}
m["tqu"] = {
"Touo",
56750,
}
m["tqw"] = {
"Tonkawa",
2454881,
"qfa-iso",
"Latn",
}
m["tra"] = {
"Tirahi",
3812406,
"inc-koh",
}
m["trb"] = {
"Terebu",
7701797,
"poz-ocw",
}
m["trc"] = {
"Copala Triqui",
12953935,
"omq-tri",
"Latn",
}
m["trd"] = {
"Turi",
7854914,
"mun",
}
m["tre"] = {
"East Tarangan",
18609750,
"poz",
}
m["trf"] = {
"Trinidadian Creole English",
7842493,
"crp",
"Latn",
ancestors = "en",
}
m["trg"] = {
"Lishán Didán",
56473,
"sem-nna",
}
m["trh"] = {
"Turaka",
12953237,
"ngf-dag",
"Latn",
}
m["tri"] = {
"Trió",
56885,
"sai-tar",
"Latn",
}
m["trj"] = {
"Toram",
3441225,
"cdc-est",
}
m["trl"] = {
"Traveller Scottish",
3915671,
"qfa-mix",
"Latn",
ancestors = "rom, sco",
}
m["trm"] = {
"Tregami",
34081,
"nur-sou",
}
m["trn"] = {
"Trinitario",
3539279,
"awd",
}
m["tro"] = {
"Tarao",
3515603,
"tbq-kuk",
"Latn",
}
m["trp"] = {
"Kokborok",
35947,
"tbq-bdg",
"Beng, Latn" -- WP lists 2 more
}
m["trq"] = {
"San Martín Itunyoso Triqui",
12953934,
"omq-tri",
"Latn",
}
m["trr"] = {
"Taushiro",
1957508,
nil,
"Latn",
}
m["trs"] = {
"Chicahuaxtla Triqui",
3539587,
"omq-tri",
"Latn",
}
m["trt"] = {
"Tunggare",
615071,
"paa-egb",
"Latn",
}
m["tru"] = {
"Turoyo",
34040,
"sem-cna",
"Syrc, Latn",
translit = {
Syrc = "tru-translit",
},
strip_diacritics = {
Syrc = "Syrc-stripdiacritics",
},
}
m["trv"] = {
"Taroko",
716686,
"map-ata",
"Latn",
}
m["trw"] = {
"Torwali",
2665246,
"inc-koh",
"ur-Arab",
}
m["trx"] = {
"Tringgus",
7842365,
"day",
}
m["try"] = {
"Turung",
7856514,
"tai-swe",
"as-Beng",
}
m["trz"] = {
"Torá",
7827518,
"sai-cpc",
}
m["tsa"] = {
"Tsaangi",
36675,
"bnt-nze",
}
m["tsb"] = {
"Tsamai",
2371358,
"cus-eas",
}
m["tsc"] = {
"Tswa",
2085051,
"bnt-tsr",
}
m["tsd"] = {
"Tsakonyo", --TLCHANGE
220607,
"grk",
"Grek",
ancestors = "grc-dor",
translit = "el-translit",
-- Grek display_text, strip_diacritics, sort_key in [[Module:scripts/data]]
english_name = "Tsakonian", --TLCHANGE
spanish_name = "Tsakonio", --TLCHANGE
}
m["tse"] = {
"Tunisian Sign Language",
7853191,
"sgn",
}
m["tsg"] = {
"Bahasa Sūg", --TLCHANGE
34142,
"phi",
"Latn, Arab",
is_official_kwf_name = "https://kwfwikaatkultura.ph/bahasa-sug/", --TLCHANGE KWF does not recognize the "ū" though
english_name = "Tausug", --TLCHANGE
}
m["tsh"] = {
"Tsuvan",
3502326,
"cdc-cbm",
}
m["tsi"] = {
"Tsimshian",
20085721,
"nai-tsi",
"Latn",
}
m["tsj"] = {
"Tshangla",
36840,
"sit-tsk",
"Tibt, Latn, Deva",
override_translit = true,
-- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]]
}
m["tsl"] = {
"Ts'ün-Lao",
3446675,
"tai",
}
m["tsm"] = {
"Turkish Sign Language",
36885,
"sgn",
}
m["tsp"] = {
"Northern Toussian",
11155635,
"alv-sav",
}
m["tsq"] = {
"Thai Sign Language",
7709156,
"sgn",
"Sgnw",
}
m["tsr"] = {
"Akei",
2828964,
"poz-vnn",
"Latn",
}
m["tss"] = {
"Taiwan Sign Language",
34019,
"sgn-jsl",
}
m["tsu"] = {
"Tsou",
716681,
"map",
"Latn",
}
m["tsv"] = {
"Tsogo",
36674,
"bnt-tso",
}
m["tsw"] = {
"Tsishingini",
13123571,
"nic-kam",
}
m["tsx"] = {
"Mubami",
6930815,
"paa-wig",
"Latn",
}
m["tsy"] = {
"Tebul Sign Language",
7692090,
"sgn",
}
m["tta"] = {
"Tutelo",
2311602,
"sio-ohv",
"Latn",
}
m["ttb"] = {
"Gaa",
3438361,
"nic-dak",
"Latn",
}
m["ttc"] = {
"Tektiteko",
36686,
"myn",
"Latn",
}
m["ttd"] = {
"Tauade",
7688634,
"qfa-dis", -- Papuan; isolate per Glottolog; Glottolog says "A Goilalan family uniting Kunimaipan, Tauade and Fuyug
-- is often posited based on the lexicostatistical figures reported in Tom E. Dutton 1975: 631-632" but
-- goes on to say the data "is clearly insufficient, as the lexical links so far proposed are few and
-- show irregular one-consonant correspondences".
"Latn",
}
m["tte"] = {
"Bwanabwana",
5003667,
"poz-ocw",
"Latn",
}
m["ttf"] = {
"Tuotomb",
7853459,
"nic-mbw",
"Latn",
}
m["ttg"] = {
"Tutong",
3507990,
"poz-swa",
"Latn",
}
m["tth"] = {
"Upper Ta'oih",
3512660,
"mkh-kat",
}
m["tti"] = {
"Tobati",
7811556,
"poz-ocw",
"Latn",
}
m["ttj"] = {
"Tooro",
7824218,
"bnt-nyg",
"Latn",
}
m["ttk"] = {
"Totoro",
3532756,
"sai-bar",
"Latn",
}
m["ttl"] = {
"Totela",
10962316,
"bnt-bot",
"Latn",
}
m["ttm"] = {
"Northern Tutchone",
20822,
"ath-nor",
"Latn",
}
m["ttn"] = {
"Towei",
7829606,
"paa-wpw",
"Latn",
}
m["tto"] = {
"Lower Ta'oih",
25559539,
"mkh-kat",
}
m["ttp"] = {
"Tombelala",
6799663,
"poz-kal",
}
m["ttr"] = {
"Tera",
56267,
"cdc-cbm",
}
m["tts"] = {
"Isan",
33417,
"tai-swe",
"Thai",
sort_key = "Thai-sortkey",
}
m["ttt"] = {
"Tat",
56489,
"ira-swi",
"Cyrl, Latn, Armn, fa-Arab",
-- Armn translit in [[Module:scripts/data]] (NOTE: formerly not present, probably an accidental omission)
ancestors = "fa",
}
m["ttu"] = {
"Torau",
3532208,
"poz-ocw",
}
m["ttv"] = {
"Titan",
3445811,
"poz-aay",
"Latn",
}
m["ttw"] = {
"Long Wat",
7856961,
"poz-swa",
}
m["tty"] = {
"Sikaritai",
7513600,
"paa-clp",
"Latn",
}
m["ttz"] = {
"Tsum",
12953223,
"sit-kyk",
}
m["tua"] = {
"Wiarumus",
7998045,
"paa-mmu",
"Latn",
}
m["tub"] = {
"Tübatulabal",
56704,
"azc",
"Latn",
}
m["tuc"] = {
"Mutu",
3331003,
"poz-ocw",
"Latn",
}
m["tud"] = {
"Tuxá",
7857217,
}
m["tue"] = {
"Tuyuca",
2520538,
"sai-tuc",
"Latn",
}
m["tuf"] = {
"Central Tunebo",
12953942,
"cba",
"Latn",
}
m["tug"] = {
"Tunia",
863721,
"alv-bua",
}
m["tuh"] = {
"Taulil",
3516141,
}
m["tui"] = {
"Tupuri",
36646,
"alv-mbm",
"Latn",
}
m["tuj"] = {
"Tugutil",
12953228,
"paa-gto",
"Latn",
}
m["tul"] = {
"Tula",
3914907,
"alv-wjk",
}
m["tum"] = {
"Tumbuka",
34138,
"bnt-nys",
"Latn",
}
m["tun"] = {
"Tunica",
56619,
"qfa-iso",
"Latn",
}
m["tuo"] = {
"Tucano",
3541834,
"sai-tuc",
"Latn",
}
m["tuq"] = {
"Tedaga",
36639,
"ssa-sah",
"Latn",
}
m["tus"] = {
"Tuscarora",
36944,
"iro-nor",
"Latn",
}
m["tuu"] = {
"Tututni",
20627,
"ath-pco",
"Latn",
}
m["tuv"] = {
"Turkana",
36958,
"sdv-ttu",
"Latn",
}
m["tux"] = {
"Tuxináwa",
7857204,
"sai-pan",
"Latn",
}
m["tuy"] = {
"Tugen",
3541935,
"sdv-nma",
}
m["tuz"] = {
"Turka",
36643,
"nic-gur",
"Latn",
}
m["tva"] = {
"Vaghua",
3553248,
"poz-ocw",
"Latn",
}
m["tvd"] = {
"Tsuvadi",
3914936,
"nic-kam",
}
m["tve"] = {
"Te'un",
7690709,
"poz-cet",
"Latn",
}
m["tvk"] = {
"Southeast Ambrym",
252411,
"poz-vnc",
"Latn",
}
m["tvl"] = {
"Tuvalwano", --TLCHANGE
34055,
"poz-pnp",
"Latn",
english_name = "Tuvaluan", --TLCHANGE
spanish_name = "Tuvaluano", --TLCHANGE
}
m["tvm"] = {
"Tela-Masbuar",
7695666,
"poz-tim",
}
m["tvn"] = {
"Tavoyan",
7689158,
"tbq-brm",
"Mymr",
ancestors = "obr",
}
m["tvo"] = {
"Tidore",
3528199,
"paa-tti",
"Latn, Arab",
}
m["tvs"] = {
"Taveta",
15632387,
"bnt-par",
"Latn",
}
m["tvt"] = {
"Tutsa Naga",
7856987,
"sit-tno",
}
m["tvu"] = {
"Tunen",
36632,
"nic-mbw",
}
m["tvw"] = {
"Sedoa",
7445362,
"poz-kal",
}
m["tvx"] = {
"Taivoan",
1975271,
"map",
"Latn",
}
m["tvy"] = {
"Timor Pidgin",
4904029,
"crp",
ancestors = "pt",
}
m["twa"] = {
"Twana",
7857412,
"sal",
"Latn",
}
m["twb"] = {
"Western Tawbuid",
12953912,
"phi",
}
m["twc"] = {
"Teshenawa",
3436597,
"phi",
}
m["twe"] = {
"Teiwa",
3519302,
"paa-alp",
"Latn",
}
m["twf"] = {
"Taos",
7684320,
"nai-kta",
"Latn",
}
m["twg"] = {
"Tereweng",
12953200,
"paa-alp",
"Latn",
}
m["twh"] = {
"Tai Dón",
7675751,
"tai-swe",
"Tavt",
--translit = "Tavt-translit",
sort_key = {
from = {"[꪿ꫀ꫁ꫂ]", "([ꪵꪶꪹꪻꪼ])([ꪀ-ꪯ])"},
to = {"", "%2%1"}
},
}
m["twm"] = {
"Tawang Monpa",
36586,
"sit-ebo",
"Tibt",
override_translit = true,
-- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]]
}
m["twn"] = {
"Twendi",
7857682,
"nic-mmb",
}
m["two"] = {
"Tswapong",
3446241,
"bnt-sts",
}
m["twp"] = {
"Ere",
3056045,
"poz-aay",
"Latn",
}
m["twq"] = {
"Tasawaq",
36564,
"son",
}
m["twr"] = {
"Timog-kanluraning Tarahumara", --TLCHANGE
12953909,
"azc-trc",
"Latn",
english_name = "Southwestern Tarahumara", --TLCHANGE
spanish_name = "Tarahumara del suroeste", --TLCHANGE
}
m["twt"] = {
"Turiwára",
3542307,
"tup-gua",
"Latn",
}
m["twu"] = {
"Termanu",
7702572,
"poz-tim",
"Latn",
}
m["tww"] = {
"Tuwari",
7857159,
"paa-wal",
"Latn",
}
m["twy"] = {
"Tawoyan",
3513542,
"poz-bre",
"Latn",
}
m["txa"] = {
"Tombonuo",
7818692,
"poz-san",
"Latn",
}
m["txb"] = {
"Tocharian B",
3199353,
"ine-toc",
"Latn",
standard_chars = "AaÄäĀāCcEeIiKkLlMmṂṃNnṄṅÑñOoPpRrSsŚśṢṣTtUuWwYy" .. c.punc,
}
m["txc"] = {
"Tsetsaut",
20829,
"ath-nor",
"Latn",
}
m["txe"] = {
"Totoli",
7828387,
"poz-tot",
"Latn",
}
m["txg"] = {
"Tangut",
2727930,
"ero",
"Tang",
-- Tang translit in [[Module:scripts/data]]
}
m["txh"] = {
"Thracian",
36793,
"ine",
"Latn, Polyt",
-- Polyt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]]
}
m["txi"] = {
"Ikpeng",
9344891,
"sai-pek",
"Latn",
}
m["txj"] = {
"Tarjumo",
24906088,
"ssa-sah",
"Latn, Arab",
}
m["txm"] = {
"Tomini",
7818911,
"poz",
"Latn",
}
m["txn"] = {
"Kanlurang Tarangan", --TLCHANGE
3515594,
"poz",
"Latn",
english_name = "West Tarangan", --TLCHANGE
}
m["txo"] = {
"Toto",
36709,
"sit-dhi",
"Beng, Toto"
}
m["txq"] = {
"Tii",
7801784,
"poz-tim",
}
m["txr"] = {
"Tartessian",
36795,
"qfa-unc", -- extinct, no consensus on classification
}
m["txs"] = {
"Tonsea",
3531659,
"phi",
"Latn",
}
m["txt"] = {
"Citak",
3447279,
"ngf-asm",
"Latn",
}
m["txu"] = {
"Kayapó",
3101212,
"sai-nje",
"Latn",
}
m["txx"] = {
"Tatana",
18643518,
"poz-san",
"Latn",
}
m["tya"] = {
"Tauya",
7688978,
"ngf-rai",
"Latn",
}
m["tye"] = {
"Kyenga",
3913304,
"dmn-bbu",
"Latn",
}
m["tyh"] = {
"O'du",
3347428,
"mkh",
}
m["tyi"] = {
"Teke-Tsaayi",
33123613,
"bnt-nze",
}
m["tyj"] = {
"Tai Do",
7675746,
"tai-nor", -- Chamberlain (1991), but Pittayaporn (2009) suggests tai-swe
"Latn, Tayo", -- Vietnam
}
m["tyl"] = {
"Thu Lao",
12953921,
"tai-cen",
}
m["tyn"] = {
"Kombai",
6428241,
"ngf-nde",
"Latn",
}
m["typ"] = {
"Kuku-Thaypan",
3915693,
"aus-pmn",
"Latn",
}
m["tyr"] = {
"Tai Daeng",
3915207,
"tai-swe",
"Tavt",
}
m["tys"] = {
"Sapa",
3446668,
"tai-sap",
"Latn",
}
m["tyt"] = {
"Tày Tac",
7862029,
"tai-swe",
}
m["tyu"] = {
"Kua",
3832933,
"khi-kal",
}
m["tyv"] = {
"Tuvan",
34119,
"trk-ssb",
"Cyrl",
translit = "tyv-translit",
override_translit = true,
sort_key = "tyv-sortkey",
}
m["tyx"] = {
"Teke-Tyee",
36634,
"bnt-nze",
"Latn",
}
m["tyz"] = {
"Tày", -- This does not mean its family "Tai" languages.
2511476,
"tai-tay",
"Latn, Hani",
sort_key = {
Hani = "Hani-sortkey"
},
}
m["tza"] = {
"Tanzanian Sign Language",
7684177,
"sgn",
}
m["tzh"] = {
"Tzeltal",
36808,
"myn",
"Latn",
}
m["tzj"] = {
"Tz'utujil",
36941,
"myn",
"Latn",
}
m["tzl"] = {
"Talossan",
1063911,
"art",
"Latn",
type = "appendix-constructed",
sort_key = "tzl-sortkey",
}
m["tzm"] = {
"Central Atlas Tamazight",
49741,
"ber",
"Tfng, Arab, Latn",
translit = {
Tfng = "Tfng-translit",
},
}
m["tzn"] = {
"Tugun",
12953225,
"poz-tim",
"Latn",
}
m["tzo"] = {
"Tzotzil",
36809,
"myn",
"Latn",
}
m["tzx"] = {
"Tabriak",
56872,
"paa-lse",
"Latn",
}
return require("Module:languages").finalizeData(m, "language")
3ees33drpwo3vagrw0cfy3r701q7rxx
Module:languages/data/3/o
828
32649
176004
175592
2026-04-09T02:28:50Z
Yivan000
4078
176004
Scribunto
text/plain
local m_langdata = require("Module:languages/data")
-- Loaded on demand, as it may not be needed (depending on the data).
local function u(...)
u = require("Module:string utilities").char
return u(...)
end
local c = m_langdata.chars
local p = m_langdata.puaChars
local s = m_langdata.shared
local m = {}
m["oaa"] = {
"Orok",
33928,
"tuw-nan",
"Cyrl, Latn",
translit = "oaa-translit",
}
m["oac"] = {
"Oroch",
33650,
"tuw-udg",
"Latn, Cyrl",
}
m["oak"] = {
"Noakhali",
107548681,
"inc-bas",
"Beng",
}
m["oav"] = {
"Old Avar",
65455879,
"cau-ava",
"Geor",
-- Geor translit in [[Module:scripts/data]] (NOTE: formerly not present, probably an accidental omission)
}
m["obi"] = {
"Obispeño",
1288385,
"nai-chu",
"Latn",
}
m["obk"] = {
"Finontok Bayyo", --TLCHANGE most spoken in Barangay Bayyo as per SIL; no KWF record yetF
63308144,
"phi",
"Latn",
english_name = "Southern Bontoc", --TLCHANGE
}
m["obl"] = {
"Oblo",
36309,
}
m["obm"] = {
"Moabite",
36385,
"sem-can",
-- Phnx translit in [[Module:scripts/data]]
}
m["obo"] = {
"Mënuvu Ubo", --TLCHANGE "Obo Manobo",
12953699,
"mno",
"Latn",
is_official_kwf_name = "https://kwfwikaatkultura.ph/menuvu-ubo/", --TLCHANGE
english_name = "Obo Manobo", --TLCHANGE
}
m["obr"] = {
"Old Burmese",
17006600,
"tbq-brm",
"Mymr, Latn", --and also Pallava
}
m["obt"] = {
"Old Breton",
3558112,
"cel-brs",
"Latn",
}
m["obu"] = {
"Obulom",
3813403,
"nic-cde",
"Latn",
}
m["oca"] = {
"Ocaina",
3182577,
"sai-wit",
"Latn",
}
m["och"] = {
"Lumang Tsino", --TLCHANGE
35137,
"zhx",
"Hant",
translit = "zh-translit",
sort_key = "Hani-sortkey",
english_name = "Old Chinese", --TLCHANGE
}
m["oco"] = {
"Old Cornish",
48304520,
"cel-brs",
"Latn",
}
m["ocu"] = {
"Tlahuica",
10751739,
"omq",
"Latn",
}
m["oda"] = {
"Odut",
3915388,
"nic-uce",
"Latn",
ancestors = "mfn",
}
m["odk"] = {
"Od",
7077191,
"inc-wes",
"Arab",
}
m["odt"] = {
"Lumang Nerlandes", --TLCHANGE
443089,
"gmw-frk",
"Latn, Runr",
strip_diacritics = {remove_diacritics = c.circ .. c.macron},
english_name = "Old Dutch", --TLCHANGE
spanish_name = "Neerlandés antiguo", --TLCHANGE
}
m["odu"] = {
"Odual",
3813392,
"nic-cde",
"Latn",
}
m["ofo"] = {
"Ofo",
3349758,
"sio-ohv",
}
m["ofs"] = {
"Lumang Frison", --TLCHANGE
35133,
"gmw-fri",
"Latn",
strip_diacritics = {remove_diacritics = c.circ .. c.macron},
sort_key = {
from = {"æ", "ð", "þ"},
to = {"ae", "t" .. p[1], "t" .. p[2]}
},
english_name = "Old Frisian", --TLCHANGE
spanish_name = "Frisón antiguo", --TLCHANGE
}
m["ofu"] = {
"Efutop",
35297,
"nic-eko",
"Latn",
}
m["ogb"] = {
"Ogbia",
3813400,
"nic-cde",
"Latn",
}
m["ogc"] = {
"Ogbah",
36291,
"alv-igb",
"Latn",
}
m["oge"] = {
"Lumang Heorhiyano", --TLCHANGE
34834,
"ccs-gzn",
"Geor, Geok",
-- Geor, Geok translit in [[Module:scripts/data]]
override_translit = true,
strip_diacritics = {remove_diacritics = c.circ},
english_name = "Old Georgian", --TLCHANGE
spanish_name = "Georgiano antiguo", --TLCHANGE
}
m["ogg"] = {
"Ogbogolo",
3813405,
"nic-cde",
"Latn",
}
m["ogo"] = {
"Khana",
3914409,
"nic-ogo",
"Latn",
}
m["ogu"] = {
"Ogbronuagum",
3914485,
"nic-cde",
"Latn",
}
m["ohu"] = {
"Lumang Unggaro", --TLCHANGE
65455880,
"urj-ugr",
"Latn, Hung",
english_name = "Old Hungarian", --TLCHANGE
spanish_name = "Húngaro antiguo", --TLCHANGE
}
m["oia"] = {
"Oirata",
56738,
"paa-eti",
"Latn",
}
m["oin"] = {
"Inebu One",
12953782,
"paa-trr",
"Latn",
}
m["ojb"] = {
"Northwestern Ojibwa",
7060356,
"alg",
"Latn",
ancestors = "oj",
}
m["ojc"] = {
"Central Ojibwa",
5061548,
"alg",
"Latn",
ancestors = "oj",
}
m["ojg"] = {
"Eastern Ojibwa",
5330342,
"alg",
"Latn",
ancestors = "oj",
}
m["ojp"] = {
"Lumang Hapones", --TLCHANGE
5736700,
"jpx",
"Jpan",
display_text = s["jpx-displaytext"],
strip_diacritics = s["jpx-stripdiacritics"],
sort_key = s["jpx-sortkey"],
english_name = "Old Japanese", --TLCHANGE
spanish_name = "Japonés antiguo", --TLCHANGE
}
m["ojs"] = {
"Severn Ojibwa",
56494,
"alg",
"Latn",
ancestors = "oj",
}
m["ojv"] = {
"Ontong Java",
7095071,
"poz-pnp",
"Latn",
}
m["ojw"] = {
"Western Ojibwa",
3474222,
"alg",
"Latn",
ancestors = "oj",
}
m["oka"] = {
"Okanagan",
2984602,
"sal",
"Latn",
}
m["okb"] = {
"Okobo",
3813398,
"nic-lcr",
"Latn",
}
m["okd"] = {
"Okodia",
36300,
"ijo",
"Latn",
}
m["oke"] = {
"Okpe (Southwestern Edo)",
268924,
"alv-swd",
"Latn",
}
m["okg"] = {
"Kok-Paponk",
55254102,
"aus-pmn",
"Latn",
}
m["okh"] = {
"Koresh-e Rostam",
6432160,
"xme-ttc",
ancestors = "xme-ttc-cen",
}
m["oki"] = {
"Okiek",
56367,
"sdv-kln",
"Latn",
}
m["okj"] = {
"Oko-Juwoi",
3436832,
"qfa-adc",
}
m["okk"] = {
"Kwamtim One",
19830649,
"paa-trr",
"Latn",
}
m["okl"] = {
"Old Kentish Sign Language",
7084319,
"sgn",
}
m["okm"] = {
"Gitnang Koreano", --TLCHANGE
715339,
"qfa-kor",
"Kore, Latn",
ancestors = "oko",
translit = "okm-translit",
sort_key = "okm-sortkey",
-- Kore strip_diacritics in [[Module:scripts/data]]
english_name = "Middle Korean", --TLCHANGE
spanish_name = "Coreano medio", --TLCHANGE
}
m["okn"] = {
"Okinoerabu",
3350036,
"jpx-nry",
"Jpan",
translit = s["jpx-translit"],
display_text = s["jpx-displaytext"],
strip_diacritics = s["jpx-stripdiacritics"],
sort_key = s["jpx-sortkey"],
}
m["oko"] = {
"Lumang Koreano", --TLCHANGE
715364,
"qfa-kor",
"Kore",
-- Kore strip_diacritics in [[Module:scripts/data]]
english_name = "Old Korean", --TLCHANGE
spanish_name = "Coreano antiguo", --TLCHANGE
}
m["okr"] = {
"Kirike",
11006763,
"ijo",
"Latn",
}
m["oks"] = {
"Oko-Eni-Osayen",
36302,
"alv-von",
"Latn",
}
m["oku"] = {
"Oku",
36289,
"nic-rnc",
"Latn",
}
m["okv"] = {
"Orokaiva",
7103752,
"ngf-oro",
"Latn",
}
m["okx"] = {
"Okpe (Northwestern Edo)",
7082547,
"alv-nwd",
"Latn",
}
m["okz"] = {
"Lumang Hemer", --TLCHANGE
9205,
"mkh-kmr",
"Latn, Khmr", --and also Khom, Pallava
english_name = "Old Khmer", --TLCHANGE
spanish_name = "Jemer antiguo", --TLCHANGE
}
m["old"] = {
"Mochi",
12952852,
"bnt-chg",
"Latn",
}
m["ole"] = {
"Olekha",
3695204,
"sit",
"Tibt, Latn",
override_translit = true,
-- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]]
}
m["olm"] = {
"Oloma",
3441166,
"alv-nwd",
"Latn",
}
m["olo"] = {
"Livvi",
36584,
"urj-fin",
"Latn",
}
m["olr"] = {
"Olrat",
3351562,
"poz-vnn",
"Latn",
}
m["olt"] = {
"Lumang Litwano", --TLCHANGE
17417801,
"bat-eas",
"Latn",
strip_diacritics = {remove_diacritics = c.grave .. c.acute .. c.tilde},
english_name = "Old Lithuanian", --TLCHANGE
spanish_name = "Lituano antiguo", --TLCHANGE
}
m["olu"] = {
"Kuvale",
6448765,
"bnt-swb",
"Latn",
}
m["oma"] = {
"Omaha-Ponca",
2917968,
"sio-dhe",
"Latn",
}
m["omb"] = {
"Omba",
2841471,
"poz-vnn",
"Latn",
}
m["omc"] = {
"Mochica",
1951641,
"qfa-iso",
"Latn",
}
m["omg"] = {
"Omagua",
33663,
"tup-gua",
"Latn",
}
m["omi"] = {
"Omi",
56795,
"csu-mma",
}
m["omk"] = {
"Omok",
4334657,
"qfa-yuk",
"Cyrl",
translit = "omk-translit",
}
m["oml"] = {
"Ombo",
7089928,
"bnt-tet",
"Latn",
}
m["omn"] = {
"Minoan",
1669994,
"qfa-unc", -- undeciphered
"Lina",
}
m["omo"] = {
"Utarmbung",
7902577,
"ngf-sad",
"Latn",
}
m["omp"] = {
"Old Manipuri",
105953310,
"sit",
"Mtei",
translit = "Mtei-translit",
}
m["omr"] = {
"Old Marathi",
65455881,
"inc-sou",
"Deva, Modi",
translit = {
Deva = "sa-translit",
Modi = "Modi-translit",
},
}
m["omt"] = {
"Omotik",
36313,
"sdv-nis",
}
m["omu"] = {
"Omurano",
1957612,
}
m["omw"] = {
"South Tairora",
20210553,
"ngf-tai",
"Latn",
}
m["omx"] = {
"Old Mon",
111364697,
"mkh-mnc",
"Mymr, Latn", --and also Pallava
}
m["ona"] = {
"Selk'nam",
2721227,
"sai-cho",
"Latn",
}
m["onb"] = {
"Lingao",
7093790,
"qfa-onb",
"Latn",
}
m["one"] = {
"Oneida",
857858,
"iro-nor",
"Latn",
}
m["ong"] = {
"Olo",
592162,
"paa-wap",
"Latn",
}
m["oni"] = {
"Onin",
7093910,
"poz-cet",
"Latn",
}
m["onj"] = {
"Onjob",
7093968,
"ngf-dag",
"Latn",
}
m["onk"] = {
"Kabore One",
12953783,
"paa-trr",
"Latn",
}
m["onn"] = {
"Onobasulu",
7094437,
"ngf-bos",
"Latn",
}
m["ono"] = {
"Onondaga",
1077450,
"iro-nor",
"Latn",
ancestors = "iro-oon",
}
m["onp"] = {
"Sartang",
7424639,
"sit-khm",
"Latn, Deva",
}
m["onr"] = {
"Northern One",
19830648,
"paa-trr",
"Latn",
}
m["ons"] = {
"Ono",
11732548,
"ngf-ehu",
"Latn",
}
--ont (Ontenu) treated as variety of gaj (Gadsup) per [[Wiktionary:Language_treatment_requests#Merge_Ontenu_into_Gadsup]]
m["onu"] = {
"Unua",
3552042,
"poz-vnc",
"Latn",
}
m["onw"] = {
"Old Nubian",
2268,
"nub",
"Copt",
translit = "Copt-translit",
sort_key = "Copt-sortkey",
}
m["onx"] = {
"Pidgin Onin",
12953788,
"crp",
"Latn",
ancestors = "oni",
}
m["ood"] = {
"O'odham",
2393095,
"azc-pim",
"Latn",
}
m["oog"] = {
"Ong",
12953787,
"mkh-kat",
}
m["oon"] = {
"Önge",
2475551,
"qfa-ong",
"Latn",
}
m["oor"] = {
"Oorlams",
2484337,
}
m["opa"] = {
"Okpamheri",
3913331,
"alv-nwd",
"Latn",
}
m["opk"] = {
"Kopkaka",
6431129,
"ngf-wok",
"Latn",
}
m["opm"] = {
"Oksapmin",
1068097,
"ngf", -- per Glottolog, in an Ok-Oksapmin family, under Awyu-Ok, under Asmat-Awyu-Ok, but we don't have these
"Latn",
}
m["opo"] = {
"Opao",
7095585,
"paa-wel",
"Latn",
}
m["opt"] = {
"Opata",
2304583,
"azc-trc",
"Latn",
}
m["opy"] = {
"Ofayé",
3446691,
"sai-mje",
"Latn",
}
m["ora"] = {
"Oroha",
36298,
"poz-sls",
"Latn",
}
m["ore"] = {
"Orejón",
3355834,
"sai-tuc",
"Latn",
}
m["org"] = {
"Oring",
3915308,
"nic-ucn",
"Latn",
}
m["orh"] = {
"Oroqen",
1367309,
"tuw-ewe",
"Latn",
}
m["oro"] = {
"Orokolo",
7103758,
"paa-wel",
"Latn",
}
m["orr"] = {
"Oruma",
36299,
"ijo",
"Latn",
}
m["ort"] = {
"Adivasi Odia",
12953791,
"inc-eas",
"Orya",
ancestors = "or",
}
m["oru"] = {
"Ormuri",
33740,
"ira-orp",
"fa-Arab",
}
m["orv"] = {
"Old East Slavic",
35228,
"zle",
"Cyrs",
translit = {Cyrs = "Cyrs-translit"},
-- Cyrs strip_diacritics, sort_key in [[Module:scripts/data]]
}
m["orw"] = {
"Oro Win",
3450423,
"sai-cpc",
"Latn",
}
m["orx"] = {
"Oro",
3813396,
"nic-lcr",
"Latn",
}
m["orz"] = {
"Ormu",
7103494,
"poz-ocw",
"Latn",
}
m["osa"] = {
"Osage",
2600085,
"sio-dhe",
"Latn, Osge",
}
m["osc"] = {
"Oscan",
36653,
"itc-sbl",
"Ital, Latn, Polyt",
display_text = {
Latn = s["itc-Latn-displaytext"],
},
strip_diacritics = {
Latn = s["itc-Latn-stripdiacritics"],
},
sort_key = {
Latn = s["itc-Latn-sortkey"],
},
-- Ital translit in [[Module:scripts/data]]
-- Polyt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]]
}
m["osi"] = {
"Osing",
2701322,
"poz",
"Latn",
}
m["osn"] = {
"Lumang Sondanes", --TLCHANGE
56197074,
"poz-msa",
"Latn, Sund, Kawi",
english_name = "Old Sundanese", --TLCHANGE
spanish_name = "Sondanés antiguo", --TLCHANGE
}
m["oso"] = {
"Ososo",
3913398,
"alv-yek",
"Latn",
}
m["osp"] = {
"Lumang Espanyol", --TLCHANGE
1088025,
"roa-cas",
"Latn",
english_name = "Old Spanish", --TLCHANGE
spanish_name = "Español antiguo", --TLCHANGE
}
m["ost"] = {
"Osatu",
36243,
"nic-grs",
"Latn",
}
m["osu"] = {
"Southern One",
12953785,
"paa-trr",
"Latn",
}
m["osx"] = {
"Lumang Sahon", --TLCHANGE
35219,
"gmw-lgm",
"Latn",
strip_diacritics = {remove_diacritics = c.circ .. c.macron},
english_name = "Old Saxon", --TLCHANGE
spanish_name = "Sajón antiguo", --TLCHANGE
}
m["ota"] = {
"Turko Otomano", --TLCHANGE
36730,
"trk-ogz",
"ota-Arab, Armn",
ancestors = "trk-oat",
strip_diacritics = {
["ota-Arab"] = {
remove_diacritics = c.fathatan .. c.dammatan .. c.kasratan .. c.fatha .. c.damma .. c.kasra .. c.shadda .. c.sukun .. c.superalef,
from = {"گ", "ڭ", "ۀ"},
to = {"ك", "ك", "ه"}
},
Armn = {
from = {"՚"},
to = {"’"}
},
},
translit = {Armn = "ota-Armn-translit"},
standard_chars = {
["ota-Arab"] = "آاأبپتثجچحخدذرزژسشصضطظعغفقكلمنوؤهیئةءـ",
c.punc
},
english_name = "Ottoman Turkish", --TLCHANGE
spanish_name = "Turco otomano", --TLCHANGE
}
m["otb"] = {
"Lumang Tibetano", --TLCHANGE
7085214,
"sit-tib",
"Tibt",
override_translit = true,
-- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]]
english_name = "Old Tibetan", --TLCHANGE
spanish_name = "Tibetano antiguo", --TLCHANGE
}
m["otd"] = {
"Ot Danum",
3033781,
"poz-brw",
"Latn",
}
m["ote"] = {
"Mezquital Otomi",
23755711,
"oto-otm",
"Latn",
}
m["oti"] = {
"Oti",
3357881,
}
m["otk"] = {
"Old Turkic",
34988,
"trk-sib",
"Orkh, Sogd",
-- Orkh translit in [[Module:scripts/data]]
}
m["otl"] = {
"Otomi Tilapa", --TLCHANGE
7802050,
"oto-otm",
"Latn",
english_name = "Tilapa Otomi", --TLCHANGE
spanish_name = "Otomí de Tilapa", --TLCHANGE
}
m["otm"] = {
"Eastern Highland Otomi",
13581718,
"oto-otm",
"Latn",
}
m["otn"] = {
"Otomi Tenanggo", --TLCHANGE
25559589,
"oto-otm",
"Latn",
english_name = "Tenango Otomi", --TLCHANGE
spanish_name = "Otomí de Tenango", --TLCHANGE
}
m["otq"] = {
"Otomi Keretaro", --TLCHANGE
23755688,
"oto-otm",
"Latn",
english_name = "Querétaro Otomi", --TLCHANGE
spanish_name = "Otomí de Querétaro", --TLCHANGE
}
m["otr"] = {
"Otoro",
36328,
"alv-hei",
}
m["ots"] = {
"Otomi Estado ng Mehiko", --TLCHANGE
7413841,
"oto-otm",
"Latn",
english_name = "Estado de México Otomi", --TLCHANGE
spanish_name = "Otomí del Estado de México", --TLCHANGE
}
m["ott"] = {
"Otomi Temoaya", --TLCHANGE
7698191,
"oto-otm",
"Latn",
english_name = "Temoaya Otomi", --TLCHANGE
spanish_name = "Otomí de Temoaya", --TLCHANGE
}
m["otu"] = {
"Otuke",
7110049,
"sai-mje",
"Latn",
}
m["otw"] = {
"Ottawa",
133678,
"alg",
"Latn",
ancestors = "oj",
}
m["otx"] = {
"Otomi Tekskatepek", --TLCHANGE pronunciation from https://www.youtube.com/watch?v=8LpCQkm2PWM
25559590,
"oto-otm",
"Latn",
english_name = "Texcatepec Otomi", --TLCHANGE
spanish_name = "Otomí de Texcatepec", --TLCHANGE
}
m["oty"] = {
"Old Tamil",
20987452,
"dra-tam",
"Brah",
-- Brah translit in [[Module:scripts/data]]
}
m["otz"] = {
"Otomi Ikstengko", --TLCHANGE pronunciation from https://www.youtube.com/watch?v=HuHkW3INVWE
6101171,
"oto-otm",
"Latn",
english_name = "Ixtenco Otomi", --TLCHANGE
spanish_name = "Otomí de Ixtenco" --TLCHANGE
}
m["oub"] = {
"Glio-Oubi",
3914977,
"kro-grb",
}
m["oue"] = {
"Oune",
7110521,
"paa-sbo",
"Latn",
}
m["oui"] = {
"Lumang Wigur", --TLCHANGE
428299,
"trk-ssb",
"Ougr, Latn, Hani, Phag, Brah, Mani, Syrc, Orkh, Sogd, Arab, mnc-Mong, Sogo, Tibt",
ancestors = "otk",
translit = {
Ougr = "Ougr-translit",
-- Orkh translit in [[Module:scripts/data]]
-- Mani translit in [[Module:scripts/data]]
-- mnc-Mong translit in [[Module:scripts/data]] (NOTE: Formerly not present; I assume accidentally left out)
-- Brah translit in [[Module:scripts/data]]
},
-- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]]
-- NOTE: Formerly there was only a sort_key for Tibetan. I assume the other three were left out accidentally.
sort_key = {
Hani = "Hani-sortkey",
},
english_name = "Old Uyghur", --TLCHANGE
spanish_name = "Uigur antiguo", --TLCHANGE
}
m["oum"] = {
"Ouma",
7110494,
"poz-ocw",
"Latn",
}
m["ovd"] = {
"Elfdalian",
254950,
"gmq-eas",
"Latn, Runr",
}
m["owi"] = {
"Owiniga",
56454,
"paa-lma",
"Latn",
}
m["owl"] = {
"Old Welsh",
2266723,
"cel-brw",
"Latn",
}
m["oyb"] = {
"Oy",
13593748,
"mkh-ban",
}
m["oyd"] = {
"Oyda",
7116251,
"omv-nom",
}
m["oym"] = {
"Wayampi",
7975842,
"tup-gua",
"Latn",
}
m["oyy"] = {
"Oya'oya",
7116243,
"poz-ocw",
"Latn",
}
m["ozm"] = {
"Koonzime",
35566,
"bnt-ndb",
"Latn",
}
return require("Module:languages").finalizeData(m, "language")
48h7t7puira63gkhy2ewlv6fu0b3ou2
Module:form of/cats
828
33042
176078
165552
2026-04-09T06:19:14Z
Yivan000
4078
enwikt parity
176078
Scribunto
text/plain
local cats = {}
--[=[
-- FIXME: Data structure is highly inefficient, as it involves lots of nested tables.
This contains categorization specs for specific languages and for all languages.
The particular categories listed are listed without the preceding canonical
language name, which will automatically be prepended, and the text "<<p>>"
in a category will be replaced with the user-specified part of speech.
The value of an entry in the cats[] table is a list of specifications to apply
to inflections in a specific language (except that the entry for "und" applies
to all languages). Each specification indicates the conditions under which a
given category is applied. Each specification is processed independently; if
multiple specifications apply, all the resulting categories will be added to
the page. (This is equivalent to wrapping the specifications in a
{"multi", ...} clause; see below.)
A specification is one of:
(1) A string:
Always apply that category.
(2) A list {"has", TAG, SPEC} or {"has", TAG, SPEC, ELSESPEC}:
TAG is an inflection tag, and can either be the full form or any
abbreviation; if that tag is present among the user-supplied tags, SPEC is
applied, otherwise ELSESPEC is applied if present. SPEC and ELSESPEC are
specifications just as at the top level; i.e. they can be strings, nested
conditions, etc.
(2) A list {"hasall", TAGS, SPEC} or {"hasall", TAGS, SPEC, ELSESPEC}:
Similar to {"has", ...} but only activates if all of the tags in TAGS
(a list) are present among the user-supplied tags (in any order, and
other tags may be present, including between the tags in TAGS).
(3) A list {"hasany", TAGS, SPEC} or {"hasany", TAGS, SPEC, ELSESPEC}:
Similar to {"has", ...} but activates if any of the tags in TAGS
(a list) are present among the user-supplied tags.
(4) A list {"tags=", TAGS, SPEC} or {"tags=", TAGS, SPEC, ELSESPEC}:
Similar to {"hasall", ...} but activates only if the
user-supplied tags exactly match the tags in TAGS, including
the order. (But, as above, any tag abbreviation can be given
in TAGS, and will match any equivalent abbreviation or full
form.)
(5) A list {"p=", VALUE, SPEC} or {"p=", VALUE, SPEC, ELSESPEC}:
Similar to {"has", ...} but activates if the value supplied for the p=
or POS= parameters is the specified value (which can be either the full
form or any abbreviation).
(6) A list {"pany", VALUES, SPEC} or {"pany", VALUES, SPEC, ELSESPEC}:
Similar to {"p=", ...} but activates if the value supplied for the p=
or POS= parameters is any of the specified values (which can be either
the full forms or any abbreviation).
(7) A list {"pexists", SPEC} or {"pexists", SPEC, ELSESPEC}:
Activates if any value was specified for the p= or POS= parameters.
(8) A list {"cond", SPEC1, SPEC2, ...}:
If SPEC1 applies, it will be applied; otherwise, if SPEC2 applies, it
will be applied; etc. This stops processing specifications as soon as it
finds one that applies.
(9) A list {"multi", SPEC1, SPEC2, ...}:
If SPEC1 applies, it will be applied; in addition, if SPEC2 applies, it
will also be applied; etc. Unlike {"cond", ...}, this continues
processing specifications even if a previous one has applied.
(10) A list {"not", CONDITION, SPEC} or {"not", CONDITION, SPEC, ELSESPEC}:
If CONDITION does *NOT* apply, SPEC will be applied, otherwise ELSESPEC
will be applied if present. CONDITION is one of:
-- {"has", TAG}
-- {"hasall", TAGS}
-- {"hasany", TAGS}
-- {"tags=", TAGS},
-- {"p=", VALUE}
-- {"pany", VALUES}
-- {"pexists"}
-- {"not", CONDITION}
-- {"and", CONDITION1, CONDITION2}
-- {"or", CONDITION1, CONDITION2}
-- {"call", FUNCTION} where FUNCTION is a string naming a function listed
in cat_functions in [[Module:form of/functions]], which is passed a
single argument (see (10) below) and should return true or false.
That is, conditions are similar to if-else SPECS but without any
specifications given.
(11) A list {"and", CONDITION1, CONDITION2, SPEC} or {"and", CONDITION1, CONDITION2, SPEC, ELSESPEC}:
If CONDITION1 and CONDITION2 both apply, SPEC will be applied, otherwise
ELSESPEC will be applied if present. CONDITION is as above for "not".
(12) A list {"or", CONDITION1, CONDITION2, SPEC} or {"or", CONDITION1, CONDITION2, SPEC, ELSESPEC}:
If either CONDITION1 or CONDITION2 apply, SPEC will be applied, otherwise
ELSESPEC will be applied if present. CONDITION is as above for "not".
(13) A list {"call", FUNCTION}:
FUNCTION is the name of a function listed in cat_functions in
[[Module:form of/functions]], which is passed a single argument, a table
containing the parameters given to the template call, and which should
return a specification (a string naming a category, a list of any of the
formats described above). In the table, the following keys are present:
"lang": the structure describing the language (usually the first
parameter);
"tags": the list of tags (canonicalized to their full forms);
"term": the term to link to (will be missing if no term is given);
"alt": the display form of the term (will be missing if no display form
is given);
"t": the gloss of the term (will be missing if no gloss is given);
In addition, any other parameters specified will be located under a key
corresponding to the parameter name.
As a simple example, consider this:
cats["et"] = {
{"has", "part", "participles"},
}
This says that, for language code "et" (Estonian), if the "part" tag is
present (or if "participle" is present, which is the equivalent full form),
the page will be categorized into [[:Category:Estonian participles]].
Another example:
cats["lt"] = {
{"p=", "part",
{"has", "pron",
"pronominal dalyvis participle forms",
"dalyvis participle forms",
}
}
}
This says that, for language code "lt" (Lithuanian), if the "p=" parameter
was given with the value "part" (or "participle", the equivalent full form),
then if the "pron" tag is present (or the equivalent full form "pronominal"),
categorize into [[:Category:Lithuanian pronominal dalyvis participle forms]],
else categorize into [["Category:Lithuanian dalyvis participle forms]]. Note
that, if p= isn't specified, or has a value other than "part" or
"participle", no categories will be added to the page, because there is no
"else" specification associated with the "p=" specification.
--]=]
-- First, the language-independent categories; be careful here not to
-- overcategorize. In practice we achieve this using tags=; we should
-- probably be smarter. But we don't e.g. want to categorize a page
-- into "present participles" if it has the tags f|s|pres|part, which
-- is a participle form rather than a participle itself.
--
-- We include the categorization here rather than in e.g. {{augmentative of}}
-- because we want the categorization to also apply when e.g. an augmentative
-- is specified using {{inflection of|LANG|...|aug}} rather than
-- {{augmentative of|LANG}}.
--[==[Disable all of these for now as they are somewhat controversial.
cats["und"] = {
{"tags=", {"aug"}, "augmentative <<p=n>>s"},
{"tags=", {"dim"}, "diminutive <<p=n>>s"},
{"or", {"tags=", {"end"}},
{"or", {"tags=", {"end", "form"}}, {"tags=", {"end", "dim"}}},
"endearing <<p=n>>s"},
{"tags=", {"pej"}, "derogatory terms"},
{"tags=", {"comd"}, "comparative <<p=a>>s"},
{"tags=", {"supd"}, "superlative <<p=a>>s"},
{"tags=", {"equd"}, "<<p=a>> equative forms"},
{"tags=", {"caus"}, "causative <<p=v>>s"},
{"tags=", {"freq"}, "frequentative <<p=v>>s"},
{"tags=", {"iter"}, "iterative <<p=v>>s"},
{"tags=", {"refl"}, "reflexive <<p=v>>s"},
{"or", {"tags=", {"impfv"}}, {"tags=", {"impfv", "form"}}, "imperfective <<p=v>>s"},
{"or", {"tags=", {"pfv"}}, {"tags=", {"pfv", "form"}}, "perfective <<p=v>>s"},
{"tags=", {"nomzn"}, "nominalized adjectives"},
{"tags=", {"ger"}, "gerunds"},
{"tags=", {"vnoun"}, "verbal nouns"},
{"tags=", {"pass"}, "<<p=v>> passive forms"},
-- [[User:Rua]] objects to these categories
{"tags=", {"past", "act", "part"}, "past active participles"},
{"tags=", {"past", "pass", "part"}, "past passive participles"},
{"tags=", {"past", "part"}, "past participles"},
{"tags=", {"pres", "act", "part"}, "present active participles"},
{"tags=", {"pres", "pass", "part"}, "present passive participles"},
{"tags=", {"pres", "part"}, "present participles"},
{"tags=", {"perf", "part"}, "perfect participles"},
}]==]
cats["az"] = {
{"hasall", {"subject", "past", "participle"}, "subject past participles"},
{"hasall", {"broken", "plural"}, "broken noun plural forms"},
}
cats["bg"] = {
{"cond",
{"hasall", {"adv", "part"}, "adverbial participles"},
{"has", "part",
-- If this is a lemma participle form, categorize appropriately
-- for the type of participle, otherwise put into
-- "participle forms". We determine a lemma if all of the
-- following apply:
-- (1) either is masculine, or no gender listed; and
-- (2) either is indefinite, or no definiteness listed; and
-- (3) not listed as either subjective or objective form.
{"and",
{"or", {"has", "m"}, {"not", {"hasany", {"f", "n", "p"}}}},
{"and",
{"or", {"has", "indef"}, {"not", {"has", "def"}}},
{"not", {"hasany", {"sbjv", "objv"}}},
},
{"cond",
{"hasall", {"pres", "act"}, "present active participles"},
{"hasall", {"past", "pass"}, "past passive participles"},
{"hasall", {"past", "act", "aor"}, "past active aorist participles"},
{"hasall", {"past", "act", "impf"}, "past active imperfect participles"},
},
-- FIXME: "participle forms" probably not necessary,
-- should be handled by headword
"participle forms"
}
}
},
}
cats["br"] = {
{"p=", "n",
{"has", "p", "noun plural forms"}
},
}
cats["ca"] = {
{"has", "part",
{"cond",
-- FIXME, not clear if we need all of these conditions;
-- may partly be handled by headword
{"hasany", {"f", "p"}, "participle forms"},
{"has", "pres", "present participles"},
{"has", "past", "past participles"},
}
},
}
cats["de"] = {
{"hasall", {"pres", "part"}, "present participles"},
{"hasall", {"past", "part"}, "past participles"},
}
cats["el"] = {
{"has", "dat", "dative forms"},
{"cond",
{"hasall", {"1", "s", "past"}, "verb past tense forms"},
{"has", "nonfinite", "verb nonfinite forms"},
},
}
cats["en"] = {
{"cond",
-- The display of these labels and their categorization is controlled by [[Module:labels/data/lang/en]].
-- This label will categorize into [[:Category:English archaic third-person singular forms]].
{"has", "3-th", {labels = {"archaic third singular"}}},
-- This label will categorize into [[:Category:English second-person singular forms]].
{"hasall", {"2-st", "pres"}, {labels = {"archaic second singular present"}}},
-- This label will categorize into [[:Category:English second-person singular past tense forms]].
{"hasall", {"2-st", "past"}, {labels = {"archaic second singular past"}}},
},
-- Add irregular plural categories. The corresponding code is in [[Module:form of/lang-data/en/functions]].
{"tags=", {"p"}, {"call", "en-irregular-plural-categories"}},
}
cats["enm"] = {
{"not", {"hasany", {"sub", "imp"}},
{"multi",
{"hasall", {"1", "s", "pres"}, "first-person singular forms"},
{"hasall", {"2", "s", "pres"}, "second-person singular forms"},
{"hasall", {"3", "s", "pres"}, "third-person singular forms"},
{"hasall", {"1//3", "s", "past"}, "first/third-person singular past forms"},
{"hasall", {"2", "s", "past"}, "second-person singular past forms"},
{"hasall", {"p", "pres"}, "plural forms"},
},
},
{"hasall", {"p", "pres", "ind"}, "plural forms"},
{"hasall", {"p", "pres", "sub"}, "plural subjunctive forms"},
{"hasall", {"p", "past"}, "plural past forms"},
{"hasall", {"s", "pres", "sub"}, "singular subjunctive forms"},
{"hasall", {"s", "past", "sub"}, "singular past subjunctive forms"},
{"hasall", {"s", "imp"}, "singular imperative forms"},
{"hasall", {"p", "imp"}, "plural imperative forms"},
{"hasall", {"pres", "part"}, "present participles"},
{"hasall", {"past", "part"}, "past participles"},
}
cats["et"] = {
{"has", "part", "participles"},
}
cats["fi"] = {
{"has", "inf",
{"cond",
{"hasall", {"long", "first"}, "long first infinitives"},
{"hasall", {"second", "act"}, "active second infinitives"},
{"hasall", {"second", "pass"}, "passive second infinitives"},
{"hasall", {"third", "act"}, "active third infinitives"},
{"hasall", {"third", "pass"}, "passive third infinitives"},
{"has", "fifth", "fifth infinitives"},
}
},
}
cats["got"] = {
{"hasall", {"pres", "part"}, "present participles"},
{"hasall", {"past", "part"}, "past participles"},
}
cats["hu"] = {
{"hasall", {"past", "part"}, "past participles"},
{"hasall", {"pres", "part"}, "present participles"},
{"hasall", {"fut", "part"}, "future participles"},
{"hasall", {"adv", "part"}, "adverbial participles"},
{"hasall", {"verbal", "part"}, "verbal participles"},
}
cats["ja"] = {
{"p=", "v",
{"multi",
{"has", "past", "past tense verb forms"},
{"has", "conj", "conjunctive verb forms"},
}
},
}
cats["kmr"] = {
{"hasall", {"pres", "part"}, "present participles"},
{"hasall", {"past", "part"}, "past participles"},
}
cats["liv"] = {
{"has", "part",
{"cond",
{"hasall", {"pres", "act"}, "present active participles"},
{"hasall", {"pres", "pass"}, "present passive participles"},
{"hasall", {"past", "act"}, "past active participles"},
{"hasall", {"past", "pass"}, "past passive participles"},
},
},
{"cond",
{"has", "ger", "gerunds"},
{"hasall", {"sup", "abe"}, "supine abessives"},
{"has", "sup", "supines"},
{"has", "deb", "debitives"},
},
}
cats["lt"] = {
{"has", "part",
{"cond",
-- Three types of adverbial participles.
{"has", "budinys", "būdinys participles"},
{"has", "padalyvis", "padalyvis participles"},
{"has", "pusdalyvis", "pusdalyvis participles"},
-- If it's a non-adverbial participle, it's a dalyvis = regular
-- adjectival participle. It's a participle per se if it has
-- no case, number or gender listed.
{"not", {"hasany", {
"nom", "gen", "dat", "acc", "ins", "loc", "voc",
"m", "f", "s", "p"
}}, "dalyvis participles"},
}
},
{"p=", "a",
{"has", "pron",
{"cond",
{"has", "comd", "comparative pronominal adjective forms"},
{"has", "supd", "superlative pronominal adjective forms"},
},
{"cond",
{"has", "comd", "comparative adjective forms"},
{"has", "supd", "superlative adjective forms"},
},
}
},
}
cats["lv"] = {
{"has", "neg", "negative verb forms"},
{"has", "comd", "comparative adjectives"},
{"has", "supd", "superlative adjectives"},
{"has", "part",
{"cond",
{"hasall", {"pres", "act"}, "present active participles"},
{"hasall", {"pres", "pass"}, "present passive participles"},
{"hasall", {"past", "act"}, "past active participles"},
{"hasall", {"past", "pass"}, "past passive participles"},
},
},
}
cats["mk"] = {
{"has", "vnoun",
{"multi", "verbal nouns", "verb forms"},
},
{"has", "part",
{"multi",
"participles",
"verb forms",
{"cond",
{"hasall", {"adj", "part"}, "adjectival participles"},
{"hasall", {"adv", "part"}, "adverbial participles"},
{"hasall", {"perf", "part"}, "perfect participles"},
{"hasall", {"aor", "act", "part"}, "aorist l-participles"},
{"hasall", {"impf", "act", "part"}, "imperfect l-participles"},
},
}
},
{"has", "lptcp",
{"multi",
{"has", "aor", "aorist l-participles"},
{"has", "impf", "imperfect l-participles"},
{"hasall", {"m", "s"}, "participles", "participle forms"},
},
},
{"hasall", {"col", "pl"}, "collective plurals"},
}
cats["nl"] = {
{"tags=", {"pl", "imp"}, {labels = {"plural imperative"}}},
{"has", "sub", {labels = {"subjunctive"}}},
-- Depending on the part of speech, a specific case-form category is added, or if no
-- recognized part of speech is present, the generic case-form category is used. The
-- label "archaic" will also be added, for which see [[Module:labels/data/lang/nl]].
{"hasany", {"acc", "dat", "gen"},
{"multi",
{labels = {"archaic case form"}},
{"cond",
{"p=", "n", "noun case forms"},
{"p=", "a", "adjective case forms"},
-- Only goes to "case forms" umbrella cat if no (/no recognized) POS given
"case forms"
}
}
}
}
cats["pl"] = {
{"has", "short", "short adjective forms"},
}
cats["sa"] = {
{"has", "desid",
{"multi",
"desiderative verbs",
"verbs derived from primitive verbs"
},
},
{"has", "freq",
{"multi",
"frequentative verbs",
"verbs derived from primitive verbs"
},
},
{"has", "root", "root forms"},
}
cats["sv"] = {
{"cond",
-- The display of these labels is controlled by [[Module:labels/data/lang/sv]].
{"hasall", {"past", "sub"}, {labels = {"past subjunctive"}}},
{"hasall", {"pres", "sub"}, {labels = {"present subjunctive"}}},
-- If it just has 'sub' (subjunctive), not labeled as present or past, treat it like the past subjunctive, whose label
-- is "weaker" than the present subjunctive (dated vs. archaic).
{"has", "sub", {labels = {"past subjunctive"}}},
{"hasall", {"1", "p", "pres"}, {labels = {"1st plural present indicative"}}},
{"hasall", {"2", "p", "pres"}, {labels = {"2nd plural present indicative"}}},
{"hasall", {"p", "pres"}, {labels = {"plural present indicative"}}},
{"hasall", {"1", "p", "past"}, {labels = {"1st plural past indicative"}}},
{"hasall", {"2", "p", "past"}, {labels = {"2nd plural past indicative"}}},
{"hasall", {"p", "past"}, {labels = {"plural past indicative"}}},
{"hasall", {"1", "p", "imp"}, {labels = {"1st plural imperative"}}},
{"hasall", {"p", "imp"}, {labels = {"2nd plural imperative"}}},
},
}
cats["uk"] = {
{"has", "part",
{"multi",
"participles",
"verb forms",
{"cond",
{"hasall", {"pres", "act"}, "present active participles"},
{"hasall", {"pres", "pass"}, "present passive participles"},
{"hasall", {"pres", "adv"}, "present adverbial participles"},
{"hasall", {"past", "act"}, "past active participles"},
{"hasall", {"past", "pass"}, "past passive participles"},
{"hasall", {"past", "adv"}, "past adverbial participles"},
},
}
},
}
return cats
cnhxumcr3cajnqtfpficwhzfl7ttnla
176079
176078
2026-04-09T06:23:00Z
Yivan000
4078
176079
Scribunto
text/plain
local cats = {}
--[=[
-- FIXME: Data structure is highly inefficient, as it involves lots of nested tables.
This contains categorization specs for specific languages and for all languages.
The particular categories listed are listed without the preceding canonical
language name, which will automatically be prepended, and the text "<<p>>"
in a category will be replaced with the user-specified part of speech.
The value of an entry in the cats[] table is a list of specifications to apply
to inflections in a specific language (except that the entry for "und" applies
to all languages). Each specification indicates the conditions under which a
given category is applied. Each specification is processed independently; if
multiple specifications apply, all the resulting categories will be added to
the page. (This is equivalent to wrapping the specifications in a
{"multi", ...} clause; see below.)
A specification is one of:
(1) A string:
Always apply that category.
(2) A list {"has", TAG, SPEC} or {"has", TAG, SPEC, ELSESPEC}:
TAG is an inflection tag, and can either be the full form or any
abbreviation; if that tag is present among the user-supplied tags, SPEC is
applied, otherwise ELSESPEC is applied if present. SPEC and ELSESPEC are
specifications just as at the top level; i.e. they can be strings, nested
conditions, etc.
(2) A list {"hasall", TAGS, SPEC} or {"hasall", TAGS, SPEC, ELSESPEC}:
Similar to {"has", ...} but only activates if all of the tags in TAGS
(a list) are present among the user-supplied tags (in any order, and
other tags may be present, including between the tags in TAGS).
(3) A list {"hasany", TAGS, SPEC} or {"hasany", TAGS, SPEC, ELSESPEC}:
Similar to {"has", ...} but activates if any of the tags in TAGS
(a list) are present among the user-supplied tags.
(4) A list {"tags=", TAGS, SPEC} or {"tags=", TAGS, SPEC, ELSESPEC}:
Similar to {"hasall", ...} but activates only if the
user-supplied tags exactly match the tags in TAGS, including
the order. (But, as above, any tag abbreviation can be given
in TAGS, and will match any equivalent abbreviation or full
form.)
(5) A list {"p=", VALUE, SPEC} or {"p=", VALUE, SPEC, ELSESPEC}:
Similar to {"has", ...} but activates if the value supplied for the p=
or POS= parameters is the specified value (which can be either the full
form or any abbreviation).
(6) A list {"pany", VALUES, SPEC} or {"pany", VALUES, SPEC, ELSESPEC}:
Similar to {"p=", ...} but activates if the value supplied for the p=
or POS= parameters is any of the specified values (which can be either
the full forms or any abbreviation).
(7) A list {"pexists", SPEC} or {"pexists", SPEC, ELSESPEC}:
Activates if any value was specified for the p= or POS= parameters.
(8) A list {"cond", SPEC1, SPEC2, ...}:
If SPEC1 applies, it will be applied; otherwise, if SPEC2 applies, it
will be applied; etc. This stops processing specifications as soon as it
finds one that applies.
(9) A list {"multi", SPEC1, SPEC2, ...}:
If SPEC1 applies, it will be applied; in addition, if SPEC2 applies, it
will also be applied; etc. Unlike {"cond", ...}, this continues
processing specifications even if a previous one has applied.
(10) A list {"not", CONDITION, SPEC} or {"not", CONDITION, SPEC, ELSESPEC}:
If CONDITION does *NOT* apply, SPEC will be applied, otherwise ELSESPEC
will be applied if present. CONDITION is one of:
-- {"has", TAG}
-- {"hasall", TAGS}
-- {"hasany", TAGS}
-- {"tags=", TAGS},
-- {"p=", VALUE}
-- {"pany", VALUES}
-- {"pexists"}
-- {"not", CONDITION}
-- {"and", CONDITION1, CONDITION2}
-- {"or", CONDITION1, CONDITION2}
-- {"call", FUNCTION} where FUNCTION is a string naming a function listed
in cat_functions in [[Module:form of/functions]], which is passed a
single argument (see (10) below) and should return true or false.
That is, conditions are similar to if-else SPECS but without any
specifications given.
(11) A list {"and", CONDITION1, CONDITION2, SPEC} or {"and", CONDITION1, CONDITION2, SPEC, ELSESPEC}:
If CONDITION1 and CONDITION2 both apply, SPEC will be applied, otherwise
ELSESPEC will be applied if present. CONDITION is as above for "not".
(12) A list {"or", CONDITION1, CONDITION2, SPEC} or {"or", CONDITION1, CONDITION2, SPEC, ELSESPEC}:
If either CONDITION1 or CONDITION2 apply, SPEC will be applied, otherwise
ELSESPEC will be applied if present. CONDITION is as above for "not".
(13) A list {"call", FUNCTION}:
FUNCTION is the name of a function listed in cat_functions in
[[Module:form of/functions]], which is passed a single argument, a table
containing the parameters given to the template call, and which should
return a specification (a string naming a category, a list of any of the
formats described above). In the table, the following keys are present:
"lang": the structure describing the language (usually the first
parameter);
"tags": the list of tags (canonicalized to their full forms);
"term": the term to link to (will be missing if no term is given);
"alt": the display form of the term (will be missing if no display form
is given);
"t": the gloss of the term (will be missing if no gloss is given);
In addition, any other parameters specified will be located under a key
corresponding to the parameter name.
As a simple example, consider this:
cats["et"] = {
{"has", "part", "participles"},
}
This says that, for language code "et" (Estonian), if the "part" tag is
present (or if "participle" is present, which is the equivalent full form),
the page will be categorized into [[:Category:Estonian participles]].
Another example:
cats["lt"] = {
{"p=", "part",
{"has", "pron",
"pronominal dalyvis participle forms",
"dalyvis participle forms",
}
}
}
This says that, for language code "lt" (Lithuanian), if the "p=" parameter
was given with the value "part" (or "participle", the equivalent full form),
then if the "pron" tag is present (or the equivalent full form "pronominal"),
categorize into [[:Category:Lithuanian pronominal dalyvis participle forms]],
else categorize into [["Category:Lithuanian dalyvis participle forms]]. Note
that, if p= isn't specified, or has a value other than "part" or
"participle", no categories will be added to the page, because there is no
"else" specification associated with the "p=" specification.
--]=]
-- First, the language-independent categories; be careful here not to
-- overcategorize. In practice we achieve this using tags=; we should
-- probably be smarter. But we don't e.g. want to categorize a page
-- into "present participles" if it has the tags f|s|pres|part, which
-- is a participle form rather than a participle itself.
--
-- We include the categorization here rather than in e.g. {{augmentative of}}
-- because we want the categorization to also apply when e.g. an augmentative
-- is specified using {{inflection of|LANG|...|aug}} rather than
-- {{augmentative of|LANG}}.
--[==[Disable all of these for now as they are somewhat controversial.
cats["und"] = {
{"tags=", {"aug"}, "augmentative <<p=n>>s"},
{"tags=", {"dim"}, "diminutive <<p=n>>s"},
{"or", {"tags=", {"end"}},
{"or", {"tags=", {"end", "form"}}, {"tags=", {"end", "dim"}}},
"endearing <<p=n>>s"},
{"tags=", {"pej"}, "derogatory terms"},
{"tags=", {"comd"}, "comparative <<p=a>>s"},
{"tags=", {"supd"}, "superlative <<p=a>>s"},
{"tags=", {"equd"}, "<<p=a>> equative forms"},
{"tags=", {"caus"}, "causative <<p=v>>s"},
{"tags=", {"freq"}, "frequentative <<p=v>>s"},
{"tags=", {"iter"}, "iterative <<p=v>>s"},
{"tags=", {"refl"}, "reflexive <<p=v>>s"},
{"or", {"tags=", {"impfv"}}, {"tags=", {"impfv", "form"}}, "imperfective <<p=v>>s"},
{"or", {"tags=", {"pfv"}}, {"tags=", {"pfv", "form"}}, "perfective <<p=v>>s"},
{"tags=", {"nomzn"}, "nominalized adjectives"},
{"tags=", {"ger"}, "gerunds"},
{"tags=", {"vnoun"}, "verbal nouns"},
{"tags=", {"pass"}, "<<p=v>> passive forms"},
-- [[User:Rua]] objects to these categories
{"tags=", {"past", "act", "part"}, "past active participles"},
{"tags=", {"past", "pass", "part"}, "past passive participles"},
{"tags=", {"past", "part"}, "na pandiwaring pangnagdaan"}, --TLCHANGE "past participles"
{"tags=", {"pres", "act", "part"}, "present active participles"},
{"tags=", {"pres", "pass", "part"}, "present passive participles"},
{"tags=", {"pres", "part"}, "na pandiwaring pangkasalukuyan"}, --TLCHANGE "present participles"
{"tags=", {"perf", "part"}, "perfect participles"},
}]==]
cats["az"] = {
{"hasall", {"subject", "past", "participle"}, "subject past participles"},
{"hasall", {"broken", "plural"}, "broken noun plural forms"},
}
cats["bg"] = {
{"cond",
{"hasall", {"adv", "part"}, "adverbial participles"},
{"has", "part",
-- If this is a lemma participle form, categorize appropriately
-- for the type of participle, otherwise put into
-- "participle forms". We determine a lemma if all of the
-- following apply:
-- (1) either is masculine, or no gender listed; and
-- (2) either is indefinite, or no definiteness listed; and
-- (3) not listed as either subjective or objective form.
{"and",
{"or", {"has", "m"}, {"not", {"hasany", {"f", "n", "p"}}}},
{"and",
{"or", {"has", "indef"}, {"not", {"has", "def"}}},
{"not", {"hasany", {"sbjv", "objv"}}},
},
{"cond",
{"hasall", {"pres", "act"}, "present active participles"},
{"hasall", {"past", "pass"}, "past passive participles"},
{"hasall", {"past", "act", "aor"}, "past active aorist participles"},
{"hasall", {"past", "act", "impf"}, "past active imperfect participles"},
},
-- FIXME: "participle forms" probably not necessary,
-- should be handled by headword
"participle forms"
}
}
},
}
cats["br"] = {
{"p=", "n",
{"has", "p", "noun plural forms"}
},
}
cats["ca"] = {
{"has", "part",
{"cond",
-- FIXME, not clear if we need all of these conditions;
-- may partly be handled by headword
{"hasany", {"f", "p"}, "na anyong pandiwari"}, --TLCHANGE "particle forms"
{"has", "pres", "na pandiwaring pangkasalukuyan"}, --TLCHANGE "present participles"
{"has", "past", "na pandiwaring pangnagdaan"}, --TLCHANGE "past participles"
}
},
}
cats["de"] = {
{"hasall", {"pres", "part"}, "na pandiwaring pangkasalukuyan"}, --TLCHANGE "present participles"
{"hasall", {"past", "part"}, "na pandiwaring pangnagdaan"}, --TLCHANGE "past participles"
}
cats["el"] = {
{"has", "dat", "dative forms"},
{"cond",
{"hasall", {"1", "s", "past"}, "verb past tense forms"},
{"has", "nonfinite", "verb nonfinite forms"},
},
}
cats["en"] = {
{"cond",
-- The display of these labels and their categorization is controlled by [[Module:labels/data/lang/en]].
-- This label will categorize into [[:Category:English archaic third-person singular forms]].
{"has", "3-th", {labels = {"archaic third singular"}}},
-- This label will categorize into [[:Category:English second-person singular forms]].
{"hasall", {"2-st", "pres"}, {labels = {"archaic second singular present"}}},
-- This label will categorize into [[:Category:English second-person singular past tense forms]].
{"hasall", {"2-st", "past"}, {labels = {"archaic second singular past"}}},
},
-- Add irregular plural categories. The corresponding code is in [[Module:form of/lang-data/en/functions]].
{"tags=", {"p"}, {"call", "en-irregular-plural-categories"}},
}
cats["enm"] = {
{"not", {"hasany", {"sub", "imp"}},
{"multi",
{"hasall", {"1", "s", "pres"}, "first-person singular forms"},
{"hasall", {"2", "s", "pres"}, "second-person singular forms"},
{"hasall", {"3", "s", "pres"}, "third-person singular forms"},
{"hasall", {"1//3", "s", "past"}, "first/third-person singular past forms"},
{"hasall", {"2", "s", "past"}, "second-person singular past forms"},
{"hasall", {"p", "pres"}, "plural forms"},
},
},
{"hasall", {"p", "pres", "ind"}, "plural forms"},
{"hasall", {"p", "pres", "sub"}, "plural subjunctive forms"},
{"hasall", {"p", "past"}, "plural past forms"},
{"hasall", {"s", "pres", "sub"}, "singular subjunctive forms"},
{"hasall", {"s", "past", "sub"}, "singular past subjunctive forms"},
{"hasall", {"s", "imp"}, "singular imperative forms"},
{"hasall", {"p", "imp"}, "plural imperative forms"},
{"hasall", {"pres", "part"}, "na pandiwaring pangkasalukuyan"}, --TLCHANGE "present participles"
{"hasall", {"past", "part"}, "na pandiwaring pangnagdaan"}, --TLCHANGE "past participles"
}
cats["et"] = {
{"has", "part", "participles"},
}
cats["fi"] = {
{"has", "inf",
{"cond",
{"hasall", {"long", "first"}, "long first infinitives"},
{"hasall", {"second", "act"}, "active second infinitives"},
{"hasall", {"second", "pass"}, "passive second infinitives"},
{"hasall", {"third", "act"}, "active third infinitives"},
{"hasall", {"third", "pass"}, "passive third infinitives"},
{"has", "fifth", "fifth infinitives"},
}
},
}
cats["got"] = {
{"hasall", {"pres", "part"}, "na pandiwaring pangkasalukuyan"}, --TLCHANGE "present participles"
{"hasall", {"past", "part"}, "na pandiwaring pangnagdaan"}, --TLCHANGE "past participles"
}
cats["hu"] = {
{"hasall", {"past", "part"}, "na pandiwaring pangnagdaan"}, --TLCHANGE "past participles"
{"hasall", {"pres", "part"}, "na pandiwaring pangkasalukuyan"}, --TLCHANGE "present participles"
{"hasall", {"fut", "part"}, "future participles"},
{"hasall", {"adv", "part"}, "adverbial participles"},
{"hasall", {"verbal", "part"}, "verbal participles"},
}
cats["ja"] = {
{"p=", "v",
{"multi",
{"has", "past", "past tense verb forms"},
{"has", "conj", "conjunctive verb forms"},
}
},
}
cats["kmr"] = {
{"hasall", {"pres", "part"}, "na pandiwaring pangkasalukuyan"}, --TLCHANGE "present participles"
{"hasall", {"past", "part"}, "na pandiwaring pangnagdaan"}, --TLCHANGE "past participles"
}
cats["liv"] = {
{"has", "part",
{"cond",
{"hasall", {"pres", "act"}, "present active participles"},
{"hasall", {"pres", "pass"}, "present passive participles"},
{"hasall", {"past", "act"}, "past active participles"},
{"hasall", {"past", "pass"}, "past passive participles"},
},
},
{"cond",
{"has", "ger", "gerunds"},
{"hasall", {"sup", "abe"}, "supine abessives"},
{"has", "sup", "supines"},
{"has", "deb", "debitives"},
},
}
cats["lt"] = {
{"has", "part",
{"cond",
-- Three types of adverbial participles.
{"has", "budinys", "būdinys participles"},
{"has", "padalyvis", "padalyvis participles"},
{"has", "pusdalyvis", "pusdalyvis participles"},
-- If it's a non-adverbial participle, it's a dalyvis = regular
-- adjectival participle. It's a participle per se if it has
-- no case, number or gender listed.
{"not", {"hasany", {
"nom", "gen", "dat", "acc", "ins", "loc", "voc",
"m", "f", "s", "p"
}}, "dalyvis participles"},
}
},
{"p=", "a",
{"has", "pron",
{"cond",
{"has", "comd", "comparative pronominal adjective forms"},
{"has", "supd", "superlative pronominal adjective forms"},
},
{"cond",
{"has", "comd", "comparative adjective forms"},
{"has", "supd", "superlative adjective forms"},
},
}
},
}
cats["lv"] = {
{"has", "neg", "negative verb forms"},
{"has", "comd", "comparative adjectives"},
{"has", "supd", "superlative adjectives"},
{"has", "part",
{"cond",
{"hasall", {"pres", "act"}, "present active participles"},
{"hasall", {"pres", "pass"}, "present passive participles"},
{"hasall", {"past", "act"}, "past active participles"},
{"hasall", {"past", "pass"}, "past passive participles"},
},
},
}
cats["mk"] = {
{"has", "vnoun",
{"multi", "verbal nouns", "verb forms"},
},
{"has", "part",
{"multi",
"participles",
"verb forms",
{"cond",
{"hasall", {"adj", "part"}, "adjectival participles"},
{"hasall", {"adv", "part"}, "adverbial participles"},
{"hasall", {"perf", "part"}, "perfect participles"},
{"hasall", {"aor", "act", "part"}, "aorist l-participles"},
{"hasall", {"impf", "act", "part"}, "imperfect l-participles"},
},
}
},
{"has", "lptcp",
{"multi",
{"has", "aor", "aorist l-participles"},
{"has", "impf", "imperfect l-participles"},
{"hasall", {"m", "s"}, "participles", "na anyong pandiwari"}, --TLCHANGE "particle forms"
},
},
{"hasall", {"col", "pl"}, "collective plurals"},
}
cats["nl"] = {
{"tags=", {"pl", "imp"}, {labels = {"plural imperative"}}},
{"has", "sub", {labels = {"subjunctive"}}},
-- Depending on the part of speech, a specific case-form category is added, or if no
-- recognized part of speech is present, the generic case-form category is used. The
-- label "archaic" will also be added, for which see [[Module:labels/data/lang/nl]].
{"hasany", {"acc", "dat", "gen"},
{"multi",
{labels = {"archaic case form"}},
{"cond",
{"p=", "n", "noun case forms"},
{"p=", "a", "adjective case forms"},
-- Only goes to "case forms" umbrella cat if no (/no recognized) POS given
"case forms"
}
}
}
}
cats["pl"] = {
{"has", "short", "short adjective forms"},
}
cats["sa"] = {
{"has", "desid",
{"multi",
"desiderative verbs",
"verbs derived from primitive verbs"
},
},
{"has", "freq",
{"multi",
"frequentative verbs",
"verbs derived from primitive verbs"
},
},
{"has", "root", "root forms"},
}
cats["sv"] = {
{"cond",
-- The display of these labels is controlled by [[Module:labels/data/lang/sv]].
{"hasall", {"past", "sub"}, {labels = {"past subjunctive"}}},
{"hasall", {"pres", "sub"}, {labels = {"present subjunctive"}}},
-- If it just has 'sub' (subjunctive), not labeled as present or past, treat it like the past subjunctive, whose label
-- is "weaker" than the present subjunctive (dated vs. archaic).
{"has", "sub", {labels = {"past subjunctive"}}},
{"hasall", {"1", "p", "pres"}, {labels = {"1st plural present indicative"}}},
{"hasall", {"2", "p", "pres"}, {labels = {"2nd plural present indicative"}}},
{"hasall", {"p", "pres"}, {labels = {"plural present indicative"}}},
{"hasall", {"1", "p", "past"}, {labels = {"1st plural past indicative"}}},
{"hasall", {"2", "p", "past"}, {labels = {"2nd plural past indicative"}}},
{"hasall", {"p", "past"}, {labels = {"plural past indicative"}}},
{"hasall", {"1", "p", "imp"}, {labels = {"1st plural imperative"}}},
{"hasall", {"p", "imp"}, {labels = {"2nd plural imperative"}}},
},
}
cats["uk"] = {
{"has", "part",
{"multi",
"participles",
"verb forms",
{"cond",
{"hasall", {"pres", "act"}, "present active participles"},
{"hasall", {"pres", "pass"}, "present passive participles"},
{"hasall", {"pres", "adv"}, "present adverbial participles"},
{"hasall", {"past", "act"}, "past active participles"},
{"hasall", {"past", "pass"}, "past passive participles"},
{"hasall", {"past", "adv"}, "past adverbial participles"},
},
}
},
}
return cats
l114ctne9qgfnqccadcjxr47m06ya8y
Module:languages/data/3/d
828
33071
176003
175521
2026-04-09T01:39:17Z
Yivan000
4078
176003
Scribunto
text/plain
local m_langdata = require("Module:languages/data")
-- Loaded on demand, as it may not be needed (depending on the data).
local function u(...)
u = require("Module:string utilities").char
return u(...)
end
local c = m_langdata.chars
local p = m_langdata.puaChars
local s = m_langdata.shared
local m = {}
m["daa"] = {
"Dangaléat",
942591,
"cdc-est",
"Latn",
}
m["dac"] = {
"Dambi",
12629491,
"poz-ocw",
"Latn",
}
m["dad"] = {
"Marik",
6763404,
"poz-ocw",
"Latn",
}
m["dae"] = {
"Duupa",
35263,
"alv-dur",
"Latn",
}
m["dag"] = {
"Dagbani",
32238,
"nic-dag",
"Latn",
}
m["dah"] = {
"Gwahatike",
5623246,
"ngf-war",
"Latn",
}
m["dai"] = {
"Day",
35163,
"alv-mbd",
"Latn",
}
m["daj"] = {
"Dar Fur Daju",
56370,
"sdv-daj",
"Latn",
}
m["dak"] = {
"Dakota",
530384,
"sio-dkt",
"Latn",
}
m["dal"] = {
"Dahalo",
35143,
"cus",
"Latn",
}
m["dam"] = {
"Damakawa",
1158134,
"nic-knn",
"Latn",
}
m["dao"] = {
"Daai Chin",
860029,
"tbq-kuk",
"Latn",
}
m["daq"] = {
"Dandami Maria",
12952805,
"dra-mdy",
"Deva",
}
m["dar"] = {
"Dargwa",
32332,
"cau-drg",
"Cyrl, Latn, Arab",
translit = {Cyrl = "dar-translit"},
override_translit = true,
display_text = {Cyrl = s["cau-Cyrl-displaytext"]},
strip_diacritics = {
Cyrl = s["cau-Cyrl-stripdiacritics"],
Latn = s["cau-Latn-stripdiacritics"],
},
sort_key = {
Cyrl = {
from = {
"къкъ", "хьхь", -- 4 chars
"гъ", "гь", "гӏ", "ё", "къ", "кь", "кӏ", "пп", "пӏ", "сс", "тт", "тӏ", "хх", "хъ", "хь", "хӏ", "цц", "цӏ", "чч", "чӏ" -- 2 chars
},
to = {
"к" .. p[2], "х" .. p[4],
"г" .. p[1], "г" .. p[2], "г" .. p[3], "е" .. p[1], "к" .. p[1], "к" .. p[3], "к" .. p[4], "п" .. p[1], "п" .. p[2], "с" .. p[1], "т" .. p[1], "т" .. p[2], "х" .. p[1], "х" .. p[2], "х" .. p[3], "х" .. p[5], "ц" .. p[1], "ц" .. p[2], "ч" .. p[1], "ч" .. p[2]
}
},
},
}
m["das"] = {
"Daho-Doo",
3915369,
"kro-wee",
"Latn",
}
m["dau"] = {
"Dar Sila Daju",
7514020,
"sdv-daj",
"Latn",
}
m["dav"] = {
"Taita",
2387274,
"bnt-cht",
"Latn",
}
m["daw"] = {
"Davawenyo",
5228174,
"phi",
"Latn",
}
m["dax"] = {
"Dayi",
10467281,
"aus-yol",
"Latn",
}
m["daz"] = {
"Dao",
5221513,
"ngf-pan",
"Latn",
}
m["dba"] = {
"Bangime",
1982696,
"qfa-iso", -- southern Mali
"Latn",
}
m["dbb"] = {
"Deno",
56275,
"cdc-wst",
"Latn",
}
m["dbd"] = {
"Dadiya",
3914436,
"alv-wjk",
"Latn",
}
m["dbe"] = {
"Dabe",
5207451,
"paa-tor",
"Latn",
}
m["dbf"] = {
"Edopi",
12953516,
"paa-lpl",
"Latn",
}
m["dbg"] = {
"Dogul Dom",
3912880,
"nic-npd",
"Latn",
}
m["dbi"] = {
"Doka",
3913293,
"nic-plc",
"Latn",
}
m["dbj"] = {
"Ida'an",
3041552,
"poz-san",
"Latn",
}
m["dbl"] = {
"Dyirbal",
35465,
"aus-dyb",
"Latn",
}
m["dbm"] = {
"Duguri",
7194057,
"nic-jrw",
"Latn",
}
m["dbn"] = {
"Duriankere",
5316627,
"ngf-sbh",
"Latn",
}
m["dbo"] = {
"Dulbu",
5313310,
"nic-jrn",
"Latn",
}
m["dbp"] = {
"Duwai",
56301,
"cdc-wst",
"Latn",
}
m["dbq"] = {
"Daba",
3913342,
"cdc-cbm",
"Latn",
}
m["dbr"] = {
"Dabarre",
3447286,
"cus-som",
}
m["dbt"] = {
"Ben Tey",
4886561,
"nic-nwa",
"Latn",
}
m["dbu"] = {
"Bondum Dom Dogon",
3912758,
"nic-npd",
"Latn",
}
m["dbv"] = {
"Dungu",
5315230,
"nic-kau",
"Latn",
}
m["dbw"] = {
"Bankan Tey Dogon",
4856243,
"nic-nwa",
"Latn",
}
m["dby"] = {
"Dibiyaso",
5272268,
"qfa-dis", -- Papuan; isolate per Glottolog, unclassified per Pawley and Hammarström (2018), sometimes classified with Bosavi languages
"Latn",
}
m["dcc"] = {
"Deccani",
669431,
"inc-hnd",
"ur-Arab",
ancestors = "ur",
}
m["dcr"] = {
"Negerhollands",
1815830,
"crp",
"Latn",
ancestors = "nl",
}
m["dda"] = {
"Dadi Dadi",
50207890,
"aus-pam",
"Latn",
}
m["ddd"] = {
"Dongotono",
56676,
"sdv-lma",
"Latn",
}
m["dde"] = {
"Doondo",
11003401,
"bnt-kng",
"Latn",
}
m["ddg"] = {
"Fataluku",
35353,
"paa-eti",
"Latn",
}
m["ddi"] = {
"Diodio",
3028668,
"poz-ocw",
"Latn",
}
m["ddj"] = {
"Jaru",
3162806,
"aus-pam",
"Latn",
}
m["ddn"] = {
"Dendi",
35164,
"son",
"Latn",
}
m["ddo"] = {
"Tsez",
34033,
"cau-wts",
"Cyrl",
translit = "ddo-translit",
display_text = {Cyrl = s["cau-Cyrl-displaytext"]},
strip_diacritics = {Cyrl = s["cau-Cyrl-stripdiacritics"]},
}
m["ddr"] = {
"Dhudhuroa",
5269842,
"aus-pam",
"Latn",
}
m["dds"] = {
"Donno So Dogon",
1234776,
"nic-dge",
"Latn",
}
m["ddw"] = {
"Dawera-Daweloor",
5242304,
"poz-tim",
"Latn",
}
m["dec"] = {
"Dagik",
35125,
"alv-tal",
"Latn",
}
m["ded"] = {
"Dedua",
5249850,
"ngf-huo",
"Latn",
}
m["dee"] = {
"Dewoin",
3914892,
"kro-wkr",
"Latn",
}
m["def"] = {
"Dezfuli",
4115412,
"ira-swi",
"Arab",
}
m["deg"] = {
"Degema",
35182,
"alv-dlt",
"Latn",
}
m["deh"] = {
"Dehwari",
5704314,
"ira-swi",
"fa-Arab",
ancestors = "fa",
}
m["dei"] = {
"Demisa",
56380,
"paa-egb",
"Latn",
}
-- "dek" is no longer an ISO code; spurious
m["dem"] = {
"Dem",
5254989,
"qfa-dis", -- Papuan; isolate in Glottolog; unclassified in Palmer (2018); grouped with Amung by Usher, ultimately in TNG
"Latn",
}
m["dep"] = {
"Pidgin Delaware",
1183938,
"crp",
"Latn",
ancestors = "unm",
}
-- deq is not included, see [[WT:LT]]
m["der"] = {
"Deori",
56478,
"tbq-bdg",
"Beng, Latn",
}
m["des"] = {
"Desano",
962392,
"sai-tuc",
"Latn",
}
m["dev"] = {
"Domung",
5291378,
"ngf-yup",
"Latn",
}
m["dez"] = {
"Dengese",
2909984,
"bnt-tet",
"Latn",
}
m["dga"] = {
"Southern Dagaare",
35159,
"nic-mre",
"Latn",
}
m["dgb"] = {
"Bunoge",
4985178,
"nic-dgw",
"Latn",
}
m["dgc"] = {
"Agta Dumagat Casiguran", --"Casiguran Dumagat Agta",
5313599,
"phi",
"Latn",
english_name = "Casiguran Dumagat Agta", --TLCHANGE
}
m["dgd"] = {
"Dagaari Dioula",
11153465,
"nic-mre",
"Latn",
}
m["dge"] = {
"Degenan",
5251770,
"ngf-war",
"Latn",
}
m["dgg"] = {
"Doga",
3033726,
"poz-ocw",
"Latn",
}
m["dgh"] = {
"Dghwede",
56293,
"cdc-cbm",
"Latn",
}
m["dgi"] = {
"Northern Dagara",
11004218,
"nic-mre",
"Latn",
}
m["dgk"] = {
"Dagba",
12952357,
"csu-sar",
"Latn",
}
m["dgn"] = {
"Dagoman",
10465931,
"aus-yng",
"Latn",
}
m["dgo"] = {
"Hindi Dogri",
nil,
"him",
"Deva, Arab, Takr",
ancestors = "doi",
}
m["dgr"] = {
"Dogrib",
20979,
"ath-nor",
"Latn",
}
m["dgs"] = {
"Dogoso",
35343,
"nic-gur",
}
m["dgt"] = {
"Ntra'ngith",
6983809,
"aus-pam",
"Latn",
}
-- dgu is not a language; see [[w:Dhekaru]]
m["dgw"] = {
"Daungwurrung",
5228050,
"aus-pam",
"Latn",
}
m["dgx"] = {
"Doghoro",
12952392,
"ngf-bin",
"Latn",
}
m["dgz"] = {
"Daga",
5208442,
"ngf-dag",
"Latn",
}
m["dhg"] = {
"Dhangu",
5268960,
"aus-yol",
"Latn",
}
m["dhd"] = {
"Dhundhari",
633359,
"raj",
"Deva",
translit = "hi-translit",
}
m["dhi"] = {
"Dhimal",
35229,
"sit-dhi",
"Deva",
}
m["dhl"] = {
"Dhalandji",
5268787,
"aus-psw",
"Latn",
}
m["dhm"] = {
"Zemba",
3502283,
"bnt-swb",
"Latn",
ancestors = "hz",
}
m["dhn"] = {
"Dhanki",
5268992,
"inc-bhi",
}
m["dho"] = {
"Dhodia",
5269658,
"inc-bhi",
"Deva",
}
m["dhr"] = {
"Tharrgari",
10470289,
"aus-psw",
"Latn",
}
m["dhs"] = {
"Dhaiso",
11001788,
"bnt-kka",
"Latn",
}
m["dhu"] = {
"Dhurga",
1285318,
"aus-yuk",
"Latn",
}
m["dhv"] = {
"Drehu",
3039319,
"poz-cln",
"Latn",
}
m["dhw"] = {
"Danuwar",
3522797,
"inc-bhi",
"Deva",
}
m["dhx"] = {
"Dhungaloo",
16960599,
"aus-pam",
"Latn",
}
m["dia"] = {
"Dia",
3446591,
"paa-wap",
"Latn",
}
m["dib"] = {
"South Central Dinka",
35154,
"sdv-dnu",
"Latn",
ancestors = "din",
}
m["dic"] = {
"Lakota Dida",
11001730,
"kro-did",
"Latn",
}
m["did"] = {
"Didinga",
56365,
"sdv",
"Latn",
}
m["dif"] = {
"Dieri",
25559563,
"aus-kar",
"Latn",
}
m["dig"] = {
"Digo",
3362072,
"bnt-mij",
"Latn",
}
-- "dih" is split into nai-ipa, nai-kum, nai-tip, see [[WT:LT]]
m["dii"] = {
"Dimbong",
35196,
"bnt-baf",
"Latn",
}
m["dij"] = {
"Dai",
5209056,
"poz-tim",
"Latn",
}
m["dik"] = {
"Southwestern Dinka",
36540,
"sdv-dnu",
"Latn",
ancestors = "din",
}
m["dil"] = {
"Dilling",
35152,
"nub-hil",
"Latn",
}
m["dim"] = {
"Dime",
35311,
"omv-aro",
}
m["din"] = {
"Dinka",
56466,
"sdv-dnu",
"Latn",
}
m["dio"] = {
"Dibo",
3914891,
"alv-ngb",
"Latn",
}
m["dip"] = {
"Northeastern Dinka",
36246,
"sdv-dnu",
"Latn",
ancestors = "din",
}
m["dir"] = {
"Dirim",
11130804,
"nic-dak",
"Latn",
}
m["dis"] = {
"Dimasa",
56664,
"tbq-bdg",
"Latn, Beng",
}
m["diu"] = {
"Gciriku",
3780954,
"bnt-kav",
"Latn",
}
m["diw"] = {
"Northwestern Dinka",
36249,
"sdv-dnu",
"Latn",
ancestors = "din",
}
m["dix"] = {
"Dixon Reef",
5284967,
"poz-vnc",
"Latn",
}
m["diy"] = {
"Diuwe",
5283765,
"ngf-asm",
"Latn",
}
m["diz"] = {
"Ding",
35202,
"bnt-bdz",
"Latn",
}
m["dja"] = {
"Djadjawurrung",
5285190,
"aus-pam",
"Latn",
}
m["djb"] = {
"Djinba",
5285351,
"aus-yol",
"Latn",
}
m["djc"] = {
"Dar Daju Daju",
5209890,
"sdv-daj",
"Latn",
}
m["djd"] = {
"Jaminjung",
6147825,
"aus-mir",
"Latn",
}
m["dje"] = {
"Zarma",
36990,
"son",
"Latn, Arab, Brai",
}
m["djf"] = {
"Djangun",
10474818,
"aus-pmn",
"Latn",
}
m["dji"] = {
"Djinang",
5285350,
"aus-yol",
"Latn",
}
m["djj"] = {
"Ndjébbana",
5285274,
"aus-arn",
"Latn",
}
m["djk"] = {
"Aukan",
2659044,
"crp",
"Latn, Afak",
ancestors = "en",
}
m["djl"] = {
"Djiwarli",
2669569,
"aus-psw",
"Latn",
}
m["djm"] = {
"Jamsay",
3913290,
"nic-pld",
"Latn",
}
m["djn"] = {
"Djauan",
13553748,
"aus-gun",
"Latn",
}
m["djo"] = {
"Jangkang",
12952388,
"day",
}
m["djr"] = {
"Djambarrpuyngu",
3915679,
"aus-yol",
"Latn",
}
m["dju"] = {
"Kapriman",
6367199,
"paa-sep",
"Latn",
}
m["djw"] = {
"Djawi",
3913844,
"aus-nyu",
"Latn",
ancestors = "bcj",
}
m["dka"] = {
"Dakpa",
3695189,
"sit-ebo",
"Tibt",
override_translit = true,
-- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]]
}
m["dkk"] = {
"Dakka",
5209962,
"poz-ssw",
}
m["dkr"] = {
"Kuijau",
13580777,
"poz-bnn",
}
m["dks"] = {
"Southeastern Dinka",
36538,
"sdv-dnu",
"Latn",
ancestors = "din",
}
m["dkx"] = {
"Mazagway",
6798209,
"cdc-cbm",
"Latn",
}
m["dlg"] = {
"Dolgan",
32878,
"trk-nsb",
"Cyrl",
sort_key = {
from = {"ё", "һ", "ӈ", "ө", "ү"},
to = {"е" .. p[1], "к" .. p[1], "н" .. p[1], "о" .. p[1], "у" .. p[1]}
},
}
m["dlk"] = {
"Dahalik",
32260,
"sem-eth",
"Ethi",
translit = "Ethi-translit",
}
m["dlm"] = {
"Dalmatian",
35527,
"roa-dal",
"Latn",
}
m["dln"] = {
"Darlong",
5224029,
"tbq-kuk",
"Latn",
}
m["dma"] = {
"Duma",
35319,
"bnt-nze",
"Latn",
}
m["dmb"] = {
"Mombo Dogon",
6897074,
"nic-dgw",
"Latn",
}
m["dmc"] = {
"Gavak",
5277406,
"ngf-nad",
"Latn",
}
m["dmd"] = {
"Madhi Madhi",
6727353,
"aus-pam",
"Latn",
}
m["dme"] = {
"Dugwor",
56313,
"cdc-cbm",
"Latn",
}
m["dmf"] = {
"Medefaidrin",
1519764,
"art",
"Medf",
type = "appendix-constructed",
}
m["dmg"] = {
"Upper Kinabatangan",
16109975,
"poz-san",
"Latn",
}
m["dmk"] = {
"Domaaki",
32900,
"inc-wes",
"Arab",
}
m["dml"] = {
"Dameli",
32288,
"inc-kun",
}
m["dmm"] = {
"Dama (Nigeria)",
5211865,
"alv-mbm",
"Latn",
}
m["dmo"] = {
"Kemezung",
35562,
"nic-bbe",
"Latn",
}
m["dmr"] = {
"East Damar",
5328200,
"poz-cet",
"Latn",
}
m["dms"] = {
"Dampelas",
5212928,
"poz-tot",
"Latn",
}
m["dmu"] = {
"Dubu",
7692059,
"paa-wpw",
"Latn",
}
m["dmv"] = {
"Dumpas",
12953512,
"poz-san",
"Latn",
}
m["dmw"] = {
"Mudburra",
6931573,
"aus-pam",
"Latn",
}
m["dmx"] = {
"Dema",
3553423,
"bnt-sho",
"Latn",
}
m["dmy"] = {
"Demta",
14466283,
"paa-sen",
"Latn",
}
m["dna"] = {
"Upper Grand Valley Dani",
12952361,
"ngf-gvd",
"Latn",
}
m["dnd"] = {
"Daonda",
5221528,
"paa-war",
"Latn",
}
m["dne"] = {
"Ndendeule",
6983725,
"bnt-mbi",
"Latn",
}
m["dng"] = {
"Dungan",
33050,
"zhx-man",
"Cyrl, Hants, Arab",
generate_forms = "zh-generateforms",
translit = {Cyrl = "dng-translit"},
sort_key = {
Cyrl = {
from = {"ё", "ә", "җ", "ң", "ў", "ү"},
to = {"е" .. p[1], "е" .. p[2], "ж" .. p[1], "н" .. p[1], "у" .. p[1], "у" .. p[2]}
},
Hani = "Hani-sortkey",
},
}
m["dni"] = {
"Lower Grand Valley Dani",
12635807,
"ngf-gvd",
"Latn",
}
m["dnj"] = {
"Dan",
1158971,
"dmn-mda",
"Latn",
}
m["dnk"] = {
"Dengka",
5256954,
"poz-tim",
"Latn",
}
m["dnn"] = {
"Dzuun",
10973260,
"dmn-smg",
"Latn",
}
m["dno"] = {
"Ndrulo",
60785094,
"csu-lnd",
}
m["dnr"] = {
"Danaru",
5214932,
"ngf-pek",
"Latn",
}
m["dnt"] = {
"Mid Grand Valley Dani",
12952359,
"ngf-gvd",
"Latn",
}
m["dnu"] = {
"Danau",
5013745,
"mkh-pal",
"Mymr",
}
m["dnv"] = {
"Danu",
5221251,
"tbq-brm",
"Mymr",
ancestors = "obr",
}
m["dnw"] = {
"Western Dani",
7987774,
"ngf-cda",
"Latn",
}
m["dny"] = {
"Dení",
56562,
"auf",
"Latn",
}
m["doa"] = {
"Dom",
5289770,
"ngf-sim",
"Latn",
}
m["dob"] = {
"Dobu",
952133,
"poz-ocw",
"Latn",
}
m["doc"] = {
"Northern Kam",
17195499,
"qfa-tak",
"Latn",
}
m["doe"] = {
"Doe",
5288055,
"bnt-ruv",
"Latn",
}
m["dof"] = {
"Domu",
5291375,
"paa-mal",
"Latn",
}
m["doh"] = {
"Dong",
3438405,
"nic-dak",
"Latn",
}
m["doi"] = {
"Dogri",
32730,
"him",
"Deva, Takr, fa-Arab, Dogr",
translit = {
Deva = "hi-translit",
Dogr = "Dogr-translit",
},
}
m["dok"] = {
"Dondo",
5295571,
"poz-tot",
"Latn",
}
m["dol"] = {
"Doso",
4167202,
"paa-dtu",
"Latn",
}
m["don"] = {
"Doura",
7829037,
"poz-ocw",
"Latn",
}
m["doo"] = {
"Dongo",
35303,
"nic-mbc",
"Latn",
}
m["dop"] = {
"Lukpa",
3258739,
"nic-gne",
"Latn",
}
m["doq"] = {
"Dominican Sign Language",
5290820,
"sgn",
"Latn", -- when documented
}
m["dor"] = {
"Dori'o",
3037084,
"poz-sls",
"Latn",
}
m["dos"] = {
"Dogosé",
3913314,
"nic-gur",
"Latn",
}
m["dot"] = {
"Dass",
3441293,
"cdc-wst",
"Latn",
}
m["dov"] = {
"Toka-Leya",
11001779,
"bnt-bot",
"Latn",
ancestors = "toi",
}
m["dow"] = {
"Doyayo",
35299,
"alv-dur",
"Latn",
}
m["dox"] = {
"Bussa",
35123,
"cus-eas",
"Latn",
}
m["doy"] = {
"Dompo",
35270,
"alv-gng",
"Latn",
}
m["doz"] = {
"Dorze",
56336,
"omv-nom",
"Latn",
}
m["dpp"] = {
"Papar",
7132487,
"poz-san",
"Latn",
}
m["drb"] = {
"Dair",
12952360,
"nub-hil",
"Latn",
}
m["drc"] = {
"Minderico",
6863806,
"roa-gap",
"Latn",
ancestors = "pt",
}
m["drd"] = {
"Darmiya",
5224058,
"sit-alm",
}
m["drg"] = {
"Rungus",
6897407,
"poz-san",
"Latn",
}
m["dri"] = {
"Lela",
3914004,
"nic-knn",
"Latn",
}
m["drl"] = {
"Baagandji",
5223941,
"aus-pam",
"Latn",
}
m["drn"] = {
"West Damar",
3450459,
"poz-tim",
"Latn",
}
m["dro"] = {
"Daro-Matu Melanau",
5224156,
"poz-bnn",
"Latn",
}
m["drq"] = {
"Dura",
3449842,
"sit-gma",
"Deva",
}
m["drs"] = {
"Gedeo",
56622,
"cus-hec",
"Ethi",
}
m["dru"] = {
"Rukai",
49232,
"map",
"Latn",
ancestors = "dru-pro",
}
m["dry"] = {
"Darai",
46995026,
"inc-bhi",
"Deva",
}
m["dsb"] = {
"Lower Sorbian",
13286,
"wen",
"Latn",
sort_key = s["wen-sortkey"],
standard_chars = "AaBbCcČčĆćDdEeĚěFfGgHhIiJjKkŁłLlMmNnŃńOoÓóPpRrŔŕSsŠšŚśTtUuWwYyZzŽžŹź" .. c.punc,
}
m["dse"] = {
"Dutch Sign Language",
2201099,
"sgn",
"Latn", -- when documented
}
m["dsh"] = {
"Daasanach",
56637,
"cus-eas",
"Latn",
}
m["dsi"] = {
"Disa",
3914455,
"csu-bgr",
"Latn",
}
m["dsl"] = {
"Danish Sign Language",
2605298,
"sgn",
"Latn", -- when documented
}
m["dsn"] = {
"Dusner",
5316948,
"poz-hce",
"Latn",
}
m["dso"] = {
"Desiya",
12629755,
"inc-eas",
"Orya",
ancestors = "or",
}
m["dsq"] = {
"Tadaksahak",
36568,
"son",
"Arab, Latn",
}
m["dta"] = {
"Daur",
32430,
"xgn",
"Latn, Hani, Cyrl, Mong",
ancestors = "xng",
-- Mong translit, display_text and strip_diacritics in [[Module:scripts/data]]
sort_key = {Hani = "Hani-sortkey"},
}
m["dtb"] = {
"Labuk-Kinabatangan Kadazan",
5330240,
"poz-san",
"Latn",
}
m["dtd"] = {
"Ditidaht",
13728042,
"wak",
"Latn",
}
m["dth"] = { -- contrast 'rrt'
"Adithinngithigh",
4683034,
"aus-pmn",
"Latn",
}
m["dti"] = {
"Ana Tinga Dogon",
4750346,
"qfa-dgn",
"Latn",
}
m["dtk"] = {
"Tene Kan Dogon",
11018863,
"nic-pld",
"Latn",
}
m["dtm"] = {
"Tomo Kan Dogon",
11137719,
"nic-pld",
"Latn",
}
m["dto"] = {
"Tommo So",
47012992,
"nic-dge",
"Latn",
}
m["dtp"] = {
"Central Dusun",
5317225,
"poz-san",
"Latn",
}
m["dtr"] = {
"Lotud",
6685078,
"poz-san",
"Latn",
}
m["dts"] = {
"Toro So Dogon",
11003311,
"nic-dge",
"Latn",
}
m["dtt"] = {
"Toro Tegu Dogon",
3913924,
"nic-pld",
"Latn",
}
m["dtu"] = {
"Tebul Ure Dogon",
7692089,
"qfa-dgn",
"Latn",
}
m["dty"] = {
"Doteli",
18415595,
"inc-pah",
"Deva",
translit = "ne-translit",
}
m["dua"] = {
"Duala",
33013,
"bnt-saw",
"Latn",
}
m["dub"] = {
"Dubli",
5310792,
"inc-bhi",
}
m["duc"] = {
"Duna",
5314039,
"qfa-dis", -- Papuan; isolate in Glottolog; tentatively grouped with Bogaya into a Duna-Pogaya [sic] family,
-- ultimately in TNG
"Latn",
}
m["due"] = {
"Agta Dumagat Umiray", --"Umiray Dumaget Agta",
7881585,
"phi",
"Latn",
english_name = "Umiray Dumaget Agta", --TLCHANGE
}
m["duf"] = {
"Dumbea",
6983819,
"poz-cln",
"Latn",
}
m["dug"] = {
"Chiduruma",
35614,
"bnt-mij",
"Latn",
}
m["duh"] = {
"Dungra Bhil",
12953513,
"inc-bhi",
"Deva, Gujr",
}
m["dui"] = {
"Dumun",
5314004,
"ngf-yag",
"Latn",
}
m["duk"] = {
"Uyajitaya",
7904085,
"ngf-nur",
"Latn",
}
m["dul"] = {
"Ayta Kadi", --"Alabat Island Agta",
3399709,
"phi",
"Latn",
is_official_kwf_name = "https://kwfwikaatkultura.ph/ayta-kadi/", --TLCHANGE
english_name = "Alabat Island Agta", --TLCHANGE
}
m["dum"] = {
"Gitnang Nerlandes", --TLCHANGE
178806,
"gmw-frk",
"Latn",
ancestors = "odt",
strip_diacritics = {remove_diacritics = c.circ .. c.macron .. c.diaer},
english_name = "Middle Dutch", --TLCHANGE
spanish_name = "Neerlandés medio", --TLCHANGE
}
m["dun"] = {
"Dusun Deyah",
2784033,
"poz-bre",
"Latn",
}
m["duo"] = {
"Tenap", --"Dupaningan Agta",
5315912,
"phi",
"Latn",
english_name = "Dupaningan Agta", --TLCHANGE
}
m["dup"] = {
"Duano",
3040468,
"poz-mly",
"Latn",
}
m["duq"] = {
"Dusun Malang",
3041711,
"poz-bre",
"Latn",
}
m["dur"] = {
"Dii",
35208,
"alv-dur",
"Latn",
}
m["dus"] = {
"Dumi",
56315,
"sit-kiw",
"Deva",
}
m["duu"] = {
"Drung",
56406,
"sit-nng",
"Latn",
}
m["duv"] = {
"Duvle",
56364,
"paa-lpl",
"Latn",
}
m["duw"] = {
"Dusun Witu",
2381310,
"poz-bre",
"Latn",
}
m["dux"] = {
"Duun",
3914880,
"dmn-smg",
"Latn",
}
m["duy"] = {
"Dicamay Agta",
5272321,
"phi",
"Latn",
}
m["duz"] = {
"Duli",
5313405,
"alv-ada",
"Latn",
}
m["dva"] = {
"Duau",
5310448,
"poz-ocw",
"Latn",
}
m["dwa"] = {
"Diri",
56286,
"cdc-wst",
"Latn",
}
m["dwr"] = {
"Dawro",
12629647,
"omv-nom",
"Ethi, Latn",
}
m["dwu"] = {
"Dhuwal",
3120791,
"aus-yol",
"Latn",
}
m["dww"] = {
"Dawawa",
5242286,
"poz-ocw",
"Latn",
}
m["dwy"] = {
"Dhuwaya",
63348560,
"aus-yol",
"Latn",
}
m["dwz"] = {
"Dewas Rai",
62663667,
"inc-bhi",
}
m["dya"] = {
"Dyan",
35340,
"nic-gur",
"Latn",
}
m["dyb"] = {
"Dyaberdyaber",
5285185,
"aus-nyu",
"Latn",
}
m["dyd"] = {
"Dyugun",
3913785,
"aus-nyu",
"Latn",
}
-- dyg (Villa Viciosa Agta) deleted as extinct and unattested; per Wikipedia: "Villa Viciosa Atta, supposed once spoken
-- in Villaviciosa, Abra, is presumed to be related, but is unattested."
m["dyi"] = {
"Djimini",
35336,
"alv-tdj",
"Latn",
}
m["dym"] = {
"Yanda Dogon",
8048316,
"qfa-dgn",
"Latn",
}
m["dyn"] = {
"Dyangadi",
3913820,
"aus-cww",
"Latn",
}
m["dyo"] = {
"Jola-Fonyi",
3507832,
"alv-jol",
"Latn",
}
m["dyu"] = {
"Dyula",
32706,
"dmn-man",
"Latn",
}
m["dyy"] = {
"Dyaabugay",
2591320,
"aus-yid",
"Latn",
}
m["dza"] = {
"Tunzu",
3915845,
"nic-jer",
"Latn",
}
m["dzg"] = {
"Dazaga",
35244,
"ssa-sah",
"Latn",
}
m["dzl"] = {
"Dzala",
56607,
"sit-ebo",
"Tibt",
override_translit = true,
-- Tibt translit, display_text, strip_diacritics, sort_key in [[Module:scripts/data]]
}
m["dzn"] = {
"Dzando",
5319622,
"bnt-bun",
"Latn",
}
return require("Module:languages").finalizeData(m, "language")
43ov5u34g7zuc1o3lf91qqww2iwly3t
Kategorya:Bahasa Sūg na pangngalan
14
33440
176057
172799
2026-04-09T05:26:25Z
Yivan000
4078
Inilipat ni Yivan000 ang pahinang [[Kategorya:Bahasa Sug na pangngalan]] sa [[Kategorya:Bahasa Sūg na pangngalan]] nang walang iniwang redirect
172799
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kategorya:Bahasa Sūg na pang-uri
14
33441
176058
172803
2026-04-09T05:26:43Z
Yivan000
4078
Inilipat ni Yivan000 ang pahinang [[Kategorya:Bahasa Sug na pang-uri]] sa [[Kategorya:Bahasa Sūg na pang-uri]] nang walang iniwang redirect
172803
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kategorya:Bahasa Sūg na pandiwa
14
33442
176059
172789
2026-04-09T05:26:55Z
Yivan000
4078
Inilipat ni Yivan000 ang pahinang [[Kategorya:Bahasa Sug na pandiwa]] sa [[Kategorya:Bahasa Sūg na pandiwa]] nang walang iniwang redirect
172789
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kategorya:Bahasa Sūg na lema
14
33455
176062
172821
2026-04-09T05:27:52Z
Yivan000
4078
Inilipat ni Yivan000 ang pahinang [[Kategorya:Bahasa Sug na lema]] sa [[Kategorya:Bahasa Sūg na lema]] nang walang iniwang redirect
172821
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kategorya:Wikang Bahasa Sūg
14
33462
176053
175193
2026-04-09T05:09:15Z
Yivan000
4078
Inilipat ni Yivan000 ang pahinang [[Kategorya:Wikang Bahasa Sug]] sa [[Kategorya:Wikang Bahasa Sūg]] nang walang iniwang redirect
175193
wikitext
text/x-wiki
{{auto cat|Sulu|Basilan|Tawi-tawi|Zamboanga del Norte|Zamboanga del Sur|Zamboanga Sibugay|Cotabato|Palawan|Pilipinas|Malasya|Indonesya}}
1hko2bf1rnw2oghiof248amwx8z5elg
Module:category tree/languages
828
34557
176000
174215
2026-04-09T01:19:21Z
Yivan000
4078
176000
Scribunto
text/plain
local new_title = mw.title.new
local ucfirst = require("Module:string utilities").ucfirst
local split = require("Module:string utilities").split
local raw_categories = {}
local raw_handlers = {}
local m_languages = require("Module:languages")
local m_sc_getByCode = require("Module:scripts").getByCode
local m_table = require("Module:table")
local parse_utilities_module = "Module:parse utilities"
local concat = table.concat
local insert = table.insert
local reverse_ipairs = m_table.reverseIpairs
local serial_comma_join = m_table.serialCommaJoin
local size = m_table.size
local sorted_pairs = m_table.sortedPairs
local to_json = require("Module:JSON").toJSON
local Hang = m_sc_getByCode("Hang")
local Hani = m_sc_getByCode("Hani")
local Hira = m_sc_getByCode("Hira")
local Hrkt = m_sc_getByCode("Hrkt")
local Kana = m_sc_getByCode("Kana")
local function track(page)
-- [[Special:WhatLinksHere/Wiktionary:Tracking/category tree/languages/PAGE]]
return require("Module:debug/track")("category tree/languages/" .. page)
end
-- This handles language categories of the form e.g. [[:Category:French language]] and
-- [[:Category:British Sign Language]]; categories like [[:Category:Languages of Indonesia]]; categories like
-- [[:Category:English-based creole or pidgin languages]]; and categories like
-- [[:Category:English-based constructed languages]].
-----------------------------------------------------------------------------
-- --
-- RAW CATEGORIES --
-- --
-----------------------------------------------------------------------------
raw_categories["Lahat ng wika"] = { --TLCHANGE "All languages"
topright = "{{commonscat|Languages}}\n[[File:Languages world map-transparent background.svg|thumb|right|250px|Rough world map of language families]]",
--TLCHANGE
description = "Nilalaman ng kategoryang ito ang mga kategorya ng lahat ng wika sa Wiksiyonaryo.",
additional = "Hindi lahat ng mga maaaring wika sa Wiksiyonaryo ay nandito. Maraming mga iba na hindi " ..
"pa nabibigyan ng atensyon sa mga editor, marahil dahil hindi lahat ng gumagamit ng Wiksiyonaryo ay marunong sa lahat ng wika." ..
"Tignan ang [[Wiksiyonaryo:Listahan ng mga wika]] para sa kumpletong listahan.",
parents = {
"Pangkalahatan", --TLCHANGE "Fundamental",
},
english_name = "All languages" --TLCHANGE
}
raw_categories["Lahat ng patay na wika"] = { --TLCHANGE: "All extinct languages"
--TLCHANGE
description = "Nilalaman ng kategoryang ito ang mga kategorya ng lahat ng mga patay na wika sa Wiksiyonaryo.",
additional = "Do not confuse this category with [[:Category:Extinct languages]], which is an umbrella category for the names of extinct languages in specific other languages (e.g. {{m+|de|Langobardisch}} for the ancient [[Lombardic]] language).",
parents = {
"Lahat ng wika", --TLCHANGE "All languages"
},
english_name = "All extinct languages" --TLCHANGE
}
raw_categories["Wika ayon sa bansa"] = { --TLCHANGE "Languages by country"
topright = "{{commonscat|Languages by continent}}",
description = "Mga kategoryang grinugrupo ang mga wika ayon sa bansa.", --TLCHANGE
additional = "{{{umbrella_meta_msg}}}",
parents = {
{name = "Lahat ng wika", sort = " "}, --TLCHANGE "All languages"
},
english_name = "Languages by country" --TLCHANGE
}
raw_categories["Language isolates"] = {
topright = "{{wikipedia|Language isolate}}\n{{commonscat|Language isolates}}",
description = "Languages with no known relatives.",
parents = {
{name = "Languages by family", sort = "*Isolates"},
{name = "All language families", sort = "Isolates"},
},
}
raw_categories["Languages not sorted into a location category"] = {
description = "Languages which do not specify (in their {{tl|auto cat}} call) the location(s) where they are spoken.",
additional = "This excludes constructed and reconstructed languages; as a result, all languages in this category explicitly specify their location as {{cd|UNKNOWN}}.",
parents = {
{name = "Requests"},
},
hidden = true,
}
-----------------------------------------------------------------------------
-- --
-- RAW HANDLERS --
-- --
-----------------------------------------------------------------------------
-- Given a category (without the "Category:" prefix), look up the page defining the category, find the call to
-- {{auto cat}} (if any), and return a table of its arguments. If the category page doesn't exist or doesn't have
-- an {{auto cat}} invocation, return nil.
--
-- FIXME: Duplicated in [[Module:category tree/lects]].
local function scrape_category_for_auto_cat_args(cat)
local cat_page = mw.title.new("Category:" .. cat)
if cat_page then
local contents = cat_page:getContent()
if contents then
local frame = mw.getCurrentFrame()
for template in require("Module:template parser").find_templates(contents) do
-- The template parser automatically handles redirects and canonicalizes them, so uses of {{autocat}}
-- will also be found.
if template:get_name() == "auto cat" then
return template:get_arguments()
end
end
end
end
return nil
end
local function link_location(location)
local location_no_the = location:match("^the (.*)$")
local bare_location = location_no_the or location
local location_link
local bare_location_parts = split(bare_location, ", ")
for i, part in ipairs(bare_location_parts) do
bare_location_parts[i] = ("[[%s]]"):format(part)
end
location_link = concat(bare_location_parts, ", ")
if location_no_the then
location_link = "the " .. location_link
end
return location_link
end
local function linkbox(lang, setwiki, setwikt, setsister, entryname)
local wiktionarylinks = {}
local canonicalName = lang:getCanonicalName()
local wikimediaLanguages = lang:getWikimediaLanguages()
local wikipediaArticle = setwiki or lang:getWikipediaArticle()
setsister = setsister and ucfirst(setsister) or nil
if setwikt then
track("setwikt")
if setwikt == "-" then
track("setwikt/hyphen")
end
end
if setwikt ~= "-" and wikimediaLanguages and wikimediaLanguages[1] then
for _, wikimedialang in ipairs(wikimediaLanguages) do
local check = new_title(wikimedialang:getCode() .. ":")
if check and check.isExternal then
insert(wiktionarylinks,
(wikimedialang:getCanonicalName() ~= canonicalName and "(''" .. wikimedialang:getCanonicalName() .. "'') " or "") ..
"'''[[:" .. wikimedialang:getCode() .. ":|" .. wikimedialang:getCode() .. ".wiktionary.org]]'''")
end
end
wiktionarylinks = concat(wiktionarylinks, "<br/>")
end
local wikt_plural = wikimediaLanguages[2] and "s" or ""
if #wiktionarylinks == 0 then
wiktionarylinks = "''None.''"
end
if setsister then
track("setsister")
if setsister == "-" then
track("setsister/hyphen")
else
setsister = "Category:" .. setsister
end
else
setsister = lang:getCommonsCategory() or "-"
end
return concat{--TLCHANGE ALL OF THIS
[=[<div class="wikitable" style="float: right; clear: right; margin: 0 0 0.5em 1em; width: 300px; padding: 5px;">
<div style="text-align: center; margin-bottom: 10px; margin-top: 5px">'''Mga kawing ng wikang ]=], canonicalName, [=['''</div>
{| style="font-size: 90%"
|-
| style="vertical-align: top; height: 35px; border-bottom: 1px solid lightgray;" | [[File:Wikipedia-logo.png|35px|none|Wikipedia]]
| style="border-bottom: 1px solid lightgray;" | May artikulo ang '''Tagalog Wikipedia''' sa:
<div style="padding: 5px 10px">]=], (setwiki == "-" and "''None.''" or "'''[[w:" .. wikipediaArticle .. "|" .. wikipediaArticle .. "]]'''"), [=[</div>
|-
| style="vertical-align: top; height: 35px; border-bottom: 1px solid lightgray;" | [[File:Wikimedia-logo.svg|35px|none|Wikimedia Commons]]
| style="border-bottom: 1px solid lightgray;" | May mga kawing ang '''Wikimedia Commons''' patungkol sa ]=], canonicalName, [=[ sa mga karatig-proyekto:
<div style="padding: 5px 10px">]=], (setsister == "-" and "''None.''" or "'''[[commons:" .. setsister .. "|" .. setsister .. "]]'''"), [=[</div>
|-
| style="vertical-align: top; height: 35px; width: 40px; border-bottom: 1px solid lightgray;" | [[File:Wiktionary-logo-v2.svg|35px|none|Wiktionary]]
|style="border-bottom: 1px solid lightgray;" | '''Edisyon ng Wiksiyonaryo''']=], wikt_plural, [=[ na isinulat sa ]=], canonicalName, [=[:
<div style="padding: 5px 10px">]=], wiktionarylinks, [=[</div>
|-
| style="vertical-align: top; height: 35px; border-bottom: 1px solid lightgray;" | [[File:Open book nae 02.svg|35px|none|Entry]]
| style="border-bottom: 1px solid lightgray;" | '''Entrada sa Wiksiyonaryo''' para sa itinagalog na ngalan nito:
<div style="padding: 5px 10px">''']=], require("Module:links").full_link({lang = m_languages.getByCode("tl"), term = entryname or canonicalName}), [=['''</div>
|-
| style="vertical-align: top; height: 35px;" | [[File:Crystal kfind.png|35px|none|Considerations]]
|| '''Mga sanggunian sa Wiksiyonaryo''' para sa mga mag-aambag ng mga entradang ]=], canonicalName, [=[:
<div style="padding: 5px 0">
* '''[[Wiksiyonaryo:]=], canonicalName, [=[ entry guidelines]]'''
* '''[[:Kategorya:]=], canonicalName, [=[ na padrong pansangguni|Padrong pansangguni]] ({{PAGESINCAT:]=], canonicalName, [=[ na padrong pansangguni}})'''
* '''[[Apendise:]=], canonicalName, [=[ bibliography|Bibliography]]'''
|}
</div>]=]
}
end
local function edit_link(title, text)
return '<span class="plainlinks">['
.. tostring(mw.uri.fullUrl(title, { action = "edit" }))
.. ' ' .. text .. ']</span>'
end
-- Should perhaps use wiki syntax.
local function infobox(lang)
local ret = {}
insert(ret, '<table class="wikitable language-category-info"')
local raw_data = lang:getData("extra")
if raw_data then
local replacements = {
[1] = "canonical-name",
[2] = "wikidata-item",
[3] = "family",
[4] = "scripts",
}
local function replacer(letter1, letter2)
return letter1:lower() .. "-" .. letter2:lower()
end
-- For each key in the language data modules, returns a descriptive
-- kebab-case version (containing ASCII lowercase words separated
-- by hyphens).
local function kebab_case(key)
key = replacements[key] or key
key = key:gsub("(%l)(%u)", replacer):gsub("(%l)_(%l)", replacer)
return key
end
local compress = {compress = true}
local function html_attribute_encode(str)
str = to_json(str, compress)
:gsub('"', """)
-- & in attributes is automatically escaped.
-- :gsub("&", "&")
:gsub("<", "<")
:gsub(">", ">")
return str
end
insert(ret, ' data-code="' .. lang:getCode() .. '"')
for k, v in sorted_pairs(raw_data) do
insert(ret, " data-" .. kebab_case(k)
.. '="'
.. html_attribute_encode(v)
.. '"')
end
end
insert(ret, '>\n')
insert(ret, '<tr class="language-category-data">\n<th colspan="2">'
.. edit_link(lang:getDataModuleName(), "<small>I-edit ang datos ng wika</small>") --TLCHANGE
.. "</th>\n</tr>\n")
--TLCHANGE ADD KWF OFFICIAL STATUS INDICATOR insert(ret, "<tr>\n<th>Canonical name</th><td>" .. lang:getCanonicalName() .. "</td>\n</tr>\n")
if (lang:getData().is_official_kwf_name) then
--add link to saved source
insert(ret, "<tr>\n<th>Opisyal na pangalan</th><td><b>" .. lang:getCanonicalName() .. "</b><br/><span style='font-size: 0.7em'>(''ayon sa [[File:Komisyon sa Wikang Filipino (KWF).svg|20px|link=]] [" .. lang:getData().is_official_kwf_name .. " Komisyon sa Wikang Filipino]'')")
else
insert(ret, "<tr>\n<th>Kilalang pangalan</th><td><b>" .. lang:getCanonicalName().. "</b><br/><span style='font-size: 0.7em'>(''walang opisyal na pangalan ang [[File:Komisyon sa Wikang Filipino (KWF).svg|20px|link=]] Komisyon sa Wikang Filipino sa wikang ito'')")
end
--TLCHANGE add originating spanish name, if applicable
local _spanish_name = nil
if(lang:getData().spanish_name) then
insert(ret, "<br/>(mula sa Espanyol na ''" .. lang:getData().spanish_name .. "'', binaybay alinsunod sa KWF Manwal sa Masinop na Pagsulat)")
end
insert(ret, "</span></td>\n</tr>\n")
local otherNames = lang:getOtherNames()
if otherNames then
local names = {}
for _, name in ipairs(otherNames) do
insert(names, "<li>" .. name .. "</li>")
end
if #names > 0 then
insert(ret, "<tr>\n<th>Ibang pangalan</th><td><ul>" .. concat(names, "\n") .. "</ul></td>\n</tr>\n") --TLCHANGE
end
end
local aliases = lang:getAliases()
if aliases then
local names = {}
for _, name in ipairs(aliases) do
insert(names, "<li>" .. name .. "</li>")
end
if #names > 0 then
insert(ret, "<tr>\n<th>Alyas</th><td><ul>" .. concat(names, "\n") .. "</ul></td>\n</tr>\n") --TLCHANGE
end
end
local varieties = lang:getVarieties()
if varieties then
local names = {}
for _, name in ipairs(varieties) do
if type(name) == "string" then
insert(names, "<li>" .. name .. "</li>")
else
assert(type(name) == "table")
local first_var
local subvars = {}
for i, var in ipairs(name) do
if i == 1 then
first_var = var
else
insert(subvars, "<li>" .. var .. "</li>")
end
end
if #subvars > 0 then
insert(names, "<li><dl><dt>" .. first_var .. "</dt>\n<dd><ul>" .. concat(subvars, "\n") .. "</ul></dd></dl></li>")
elseif first_var then
insert(names, "<li>" .. first_var .. "</li>")
end
end
end
if #names > 0 then
insert(ret, "<tr>\n<th>Varayti</th><td><ul>" .. concat(names, "\n") .. "</ul></td>\n</tr>\n")
end
end
--TLCHANGE insert(ret, "<tr>\n<th>[[Wiktionary:Languages|Language code]]</th><td><code>" .. lang:getCode() .. "</code></td>\n</tr>\n")
insert(ret, "<tr>\n<th>[[Wiksiyonaryo:Mga wika|Kodigo ng wika]]</th><td><code>" .. lang:getCode() .. "</code></td>\n</tr>\n")
--TLCHANGE insert(ret, "<tr>\n<th>[[Wiktionary:Families|Language family]]</th>\n")
insert(ret, "<tr>\n<th>[[Wiksiyonaryo:Mga pamilya|Pamilya ng wika]]</th>\n")
local fam = lang:getFamily()
local famCode = fam and fam:getCode()
if not fam then
insert(ret, "<td>unclassified</td>")
elseif famCode == "qfa-iso" then
insert(ret, "<td>[[:Category:Language isolates|language isolate]]</td>")
elseif famCode == "qfa-mix" then
insert(ret, "<td>[[:Category:Mixed languages|mixed language]]</td>")
elseif famCode == "sgn" then
insert(ret, "<td>[[:Category:Sign languages|sign language]]</td>")
elseif famCode == "crp" then
insert(ret, "<td>[[:Category:Creole or pidgin languages|creole or pidgin]]</td>")
elseif famCode == "art" then
insert(ret, "<td>[[:Category:Constructed languages|constructed language]]</td>")
else
insert(ret, "<td>" .. fam:makeCategoryLink() .. "</td>")
end
--TLCHANGE insert(ret, "\n</tr>\n<tr>\n<th>Ancestors</th>\n<td>")
insert(ret, "\n</tr>\n<tr>\n<th>Mga ninuno</th>\n<td>")
local ancestors = lang:getAncestors()
if ancestors[2] then
local ancestorList = {}
for i, anc in ipairs(ancestors) do
ancestorList[i] = "<li>" .. anc:makeCategoryLink() .. "</li>"
end
insert(ret, "<ul>\n" .. concat(ancestorList, "\n") .. "</ul>")
else
local ancestorChain = lang:getAncestorChainOld()
if ancestorChain[1] then
local chain = {}
for _, anc in reverse_ipairs(ancestorChain) do
insert(chain, "<li>" .. anc:makeCategoryLink() .. "</li>")
end
insert(ret, "<ul>\n" .. concat(chain, "\n<ul>\n") .. ("</ul>"):rep(#chain))
else
insert(ret, "unknown")
end
end
insert(ret, "</td>\n</tr>\n")
local scripts = lang:getScripts()
if scripts[1] then
local script_text = {}
local function makeScriptLine(sc)
local code = sc:getCode()
local url = tostring(mw.uri.fullUrl('Special:Search', {
search = 'contentmodel:css insource:"' .. code
.. '" insource:/\\.' .. code .. '/',
ns8 = '1'
}))
return "[[:Category:".. sc:getCategoryName() .. "|" .. sc:getCanonicalName() .. "]]" --TLCHANGE sc:makeCategoryLink()
.. ' (<span class="plainlinks" title="Search for stylesheets referencing this script">[' .. url .. ' <code>' .. code .. '</code>]</span>)'
end
local function add_Hrkt(text)
insert(text, "<li>" .. makeScriptLine(Hrkt))
insert(text, "<ul>")
insert(text, "<li>" .. makeScriptLine(Hira) .. "</li>")
insert(text, "<li>" .. makeScriptLine(Kana) .. "</li>")
insert(text, "</ul>")
insert(text, "</li>")
end
for _, sc in ipairs(scripts) do
local text = {}
local code = sc:getCode()
if code == "Hrkt" then
add_Hrkt(text)
else
insert(text, "<li>" .. makeScriptLine(sc))
if code == "Jpan" then
insert(text, "<ul>")
insert(text, "<li>" .. makeScriptLine(Hani) .. "</li>")
add_Hrkt(text)
insert(text, "</ul>")
elseif code == "Kore" then
insert(text, "<ul>")
insert(text, "<li>" .. makeScriptLine(Hang) .. "</li>")
insert(text, "<li>" .. makeScriptLine(Hani) .. "</li>")
insert(text, "</ul>")
end
insert(text, "</li>")
end
insert(script_text, concat(text, "\n"))
end
--TLCHANGE insert(ret, "<tr>\n<th>[[Wiktionary:Scripts|Scripts]]</th>\n<td><ul>\n" .. concat(script_text, "\n") .. "</ul></td>\n</tr>\n")
insert(ret, "<tr>\n<th>[[Wiksiyonaryo:Mga katitikan|Katitikan]]</th>\n<td><ul>\n" .. concat(script_text, "\n") .. "</ul></td>\n</tr>\n")
else
--TLCHANGE insert(ret, "<tr>\n<th>[[Wiktionary:Scripts|Scripts]]</th>\n<td>not specified</td>\n</tr>\n")
insert(ret, "<tr>\n<th>[[Wiksiyonaryo:Mga katitikan|Katitikan]]</th>\n<td>hindi nakatala</td>\n</tr>\n")
end
local function add_module_info(raw_data, heading)
if raw_data then
local scripts = lang:getScriptCodes()
local module_info, add = {}, false
if type(raw_data) == "string" then
insert(module_info,
("[[Module:%s]]"):format(raw_data))
add = true
else
local raw_data_type = type(raw_data)
if raw_data_type == "table" and size(scripts) == 1 and type(raw_data[scripts[1]]) == "string" then
insert(module_info,
("[[Module:%s]]"):format(raw_data[scripts[1]]))
add = true
elseif raw_data_type == "table" then
insert(module_info, "<ul>")
for script, data in sorted_pairs(raw_data) do
if type(data) == "string" and m_sc_getByCode(script) then
insert(module_info, ("<li><code>%s</code>: [[Module:%s]]</li>"):format(script, data))
end
end
insert(module_info, "</ul>")
add = size(module_info) > 2
end
end
if add then
insert(ret, [=[
<tr>
<th>]=] .. heading .. [=[</th>
<td>]=] .. concat(module_info) .. [=[</td>
</tr>
]=])
end
end
end
add_module_info(raw_data.generate_forms, "Form-generating<br>module")
add_module_info(raw_data.translit, "[[Wiktionary:Transliteration and romanization|Transliteration<br>module]]")
add_module_info(raw_data.display_text, "Display text<br>module")
add_module_info(raw_data.entry_name, "Entry name<br>module")
add_module_info(raw_data.sort_key, "[[sortkey|Sortkey]]<br>module")
local wikidataItem = lang:getWikidataItem()
if lang:getWikidataItem() and mw.wikibase then
local URL = mw.wikibase.getEntityUrl(wikidataItem)
local link
if URL then
link = '[' .. URL .. ' ' .. wikidataItem .. ']'
else
link = '<span class="error">Invalid Wikidata item: <code>' .. wikidataItem .. '</code></span>'
end
insert(ret, "<tr><th>Wikidata</th><td>" .. link .. "</td></tr>")
end
insert(ret, "</table>")
return concat(ret)
end
local function NavFrame(content, title)
return '<div class="NavFrame"><div class="NavHead">'
.. (title or '{{{title}}}') .. '</div>'
.. '<div class="NavContent" style="text-align: left;">'
.. content
.. '</div></div>'
end
local function get_description_topright_additional(lang, locations, extinct, setwiki, setwikt, setsister, entryname)
local nameWithLanguage = lang:getCategoryName("nocap")
if lang:getCode() == "und" then
local description =
"This is the main category of the '''" .. nameWithLanguage .. "''', represented in Wiktionary by the [[Wiktionary:Languages|code]] '''" .. lang:getCode() .. "'''. " ..
"This language contains terms in historical writing, whose meaning has not yet been determined by scholars."
return description, nil, nil
end
local canonicalName = lang:getCanonicalName()
local topright = linkbox(lang, setwiki, setwikt, setsister, entryname)
--TLCHANGE
local description = "Ito ang pangunahing kategorya ng '''" .. nameWithLanguage .. "'''."
local location_links = {}
local prep
local saw_embedded_comma = false
for _, location in ipairs(locations) do
local this_prep
if location == "the world" then
this_prep = "across"
insert(location_links, location)
elseif location ~= "UNKNOWN" then
this_prep = "sa" --TLCHANGE
if location:find(",") then
saw_embedded_comma = true
end
insert(location_links, link_location(location))
end
if this_prep then
if prep and this_prep ~= prep then
error("Can't handle location 'the world' along with another location (clashing prepositions)")
end
prep = this_prep
end
end
local location_desc
if #location_links > 0 then
local location_link_text
if saw_embedded_comma and #location_links >= 3 then
location_link_text = mw.text.listToText(location_links, "; ", "; at ") --TLCHANGE
else
location_link_text = serial_comma_join(location_links)
end
location_desc = ("%s %s %s.\n\n"):format( --TLCHANGE
extinct and "Ito'y isang patay na wikang dating isinasalita" or "Isinasalita ito", prep, location_link_text) --TLCHANGE
elseif extinct then
location_desc = "It is an [[extinct language]].\n\n"
else
location_desc = ""
end
local add = location_desc .. "Impormasyon patungkol sa " .. canonicalName .. ":\n\n" .. infobox(lang)
if lang:hasType("reconstructed") then
add = add .. "\n\n" ..
ucfirst(canonicalName) .. " is a reconstructed language. Its words and roots are not directly attested in any written works, but have been reconstructed through the ''comparative method'', " ..
"which finds regular similarities between languages that cannot be explained by coincidence or word-borrowing, and extrapolates ancient forms from these similarities.\n\n" ..
"According to our [[Wiktionary:Criteria for inclusion|criteria for inclusion]], terms in " .. canonicalName ..
" should '''not''' be present in entries in the main namespace, but may be added to the Reconstruction: namespace."
elseif lang:hasType("appendix-constructed") then
add = add .. "\n\n" ..
ucfirst(canonicalName) .. " is a constructed language that is only in sporadic use. " ..
"According to our [[Wiktionary:Criteria for inclusion|criteria for inclusion]], terms in " .. canonicalName ..
" should '''not''' be present in entries in the main namespace, but may be added to the Appendix: namespace. " ..
"All terms in this language may be available at [[Appendix:" .. ucfirst(canonicalName) .. "]]."
end
local about = new_title("Wiktionary:About " .. canonicalName)
if about.exists then
add = add .. "\n\n" ..
"Please see '''[[Wiktionary:About " .. canonicalName .. "]]''' for information and special considerations for creating " .. nameWithLanguage .. " entries."
end
local ok, tree_of_descendants = pcall(
require("Module:family tree").print_children,
lang:getCode(), {
protolanguage_under_family = true,
must_have_descendants = true
})
if ok then
if tree_of_descendants then
add = add .. NavFrame(
tree_of_descendants,
"Puno ng pamilya") --TLCHANGE "Family tree")
else
add = add .. "\n\n" .. ucfirst(lang:getCanonicalName())
.. " has no descendants or varieties listed in Wiktionary's language data modules."
end
else
mw.log("error while generating tree: " .. tostring(tree_of_descendants))
end
return description, topright, add
end
local function get_parents(lang, locations, extinct)
local canonicalName = lang:getCanonicalName()
local sortkey = {sort_base = canonicalName, lang = "tl"} --TLCHANGE "en"
local ret = {{name = "Lahat ng wika", sort = sortkey}} --TLCHANGE "All languages"
local fam = lang:getFamily()
local famCode = fam and fam:getCode()
-- FIXME: Some of the following categories should be added to this module.
if not fam then
insert(ret, {name = "Category:Unclassified languages", sort = sortkey})
elseif famCode == "qfa-iso" then
insert(ret, {name = "Category:Language isolates", sort = sortkey})
elseif famCode == "qfa-mix" then
insert(ret, {name = "Category:Mixed languages", sort = sortkey})
elseif famCode == "sgn" then
insert(ret, {name = "Category:All sign languages", sort = sortkey})
elseif famCode == "crp" then
insert(ret, {name = "Category:Creole or pidgin languages", sort = sortkey})
for _, anc in ipairs(lang:getAncestors()) do
-- Avoid Haitian Creole being categorised in [[:Category:Haitian Creole-based creole or pidgin languages]], as one of its ancestors is an etymology-only variety of it.
-- Use that ancestor's ancestors instead.
if anc:getFullCode() == lang:getCode() then
for _, anc_extra in ipairs(anc:getAncestors()) do
insert(ret, {name = "Category:" .. ucfirst(anc_extra:getFullName()) .. "-based creole or pidgin languages", sort = sortkey})
end
else
insert(ret, {name = "Category:" .. ucfirst(anc:getFullName()) .. "-based creole or pidgin languages", sort = sortkey})
end
end
elseif famCode == "art" then
if lang:hasType("appendix-constructed") then
insert(ret, {name = "Category:Appendix-only constructed languages", sort = sortkey})
else
insert(ret, {name = "Category:Mga wikang nilikha", sort = sortkey}) --TLCHANGE "Category:Constructed languages" "Artificial languages" is a different category
end
for _, anc in ipairs(lang:getAncestors()) do
if anc:getFullCode() == lang:getCode() then
for _, anc_extra in ipairs(anc:getAncestors()) do
insert(ret, {name = "Category:" .. ucfirst(anc_extra:getFullName()) .. "-based constructed languages", sort = sortkey})
end
else
insert(ret, {name = "Category:" .. ucfirst(anc:getFullName()) .. "-based constructed languages", sort = sortkey})
end
end
else
insert(ret, {name = "Category:" .. fam:getCategoryName(), sort = sortkey})
if lang:hasType("reconstructed") then
insert(ret, {
name = "Category:Reconstructed languages",
sort = {sort_base = canonicalName:gsub("^Proto%-", ""), lang = "en"}
})
end
end
local function add_sc_cat(sc)
insert(ret, {name = "Category:" .. sc:getCategoryName() .. " na wika", sort = sortkey}) --TLCHANGE for scripts, example "Katitikang Latino na wika" sc:getCategoryName() .. " languages"
end
local function add_Hrkt()
add_sc_cat(Hrkt)
add_sc_cat(Hira)
add_sc_cat(Kana)
end
for _, sc in ipairs(lang:getScripts()) do
if sc:getCode() == "Hrkt" then
add_Hrkt()
else
add_sc_cat(sc)
if sc:getCode() == "Jpan" then
add_sc_cat(Hani)
add_Hrkt()
elseif sc:getCode() == "Kore" then
add_sc_cat(Hang)
add_sc_cat(Hani)
end
end
end
if lang:hasTranslit() then
insert(ret, {name = "Category:Languages with automatic transliteration", sort = sortkey})
end
local function insert_location_language_cat(location)
local cat = "Mga wika ng " .. location --TLCHANGE "Languages of " .. location
insert(ret, {name = "Category:" .. cat, sort = sortkey})
local auto_cat_args = scrape_category_for_auto_cat_args(cat)
local location_parent = auto_cat_args and auto_cat_args.parent
if location_parent then
local split_parents = require(parse_utilities_module).split_on_comma(location_parent)
for _, parent in ipairs(split_parents) do
parent = parent:match("^(.-):.*$") or parent
insert_location_language_cat(parent)
end
end
end
local saw_location = false
for _, location in ipairs(locations) do
if location ~= "UNKNOWN" then
saw_location = true
insert_location_language_cat(location)
end
end
if extinct then
insert(ret, {name = "Category:All extinct languages", sort = sortkey})
end
if not saw_location and not (lang:hasType("reconstructed") or (fam and fam:getCode() == "art")) then
-- Constructed and reconstructed languages don't need a location specified and often won't have one,
-- so don't put them in this maintenance category.
insert(ret, {name = "Category:Languages not sorted into a location category", sort = sortkey})
end
return ret
end
local function get_children()
local ret = {}
-- FIXME: We should work on the children mechanism so it isn't necessary to manually specify these.
-- TLCHANGE: for _, label in ipairs({"appendices", "entry maintenance", "lemmas", "names", "phrases", "rhymes", "symbols", "templates", "terms by etymology", "terms by usage"}) do
for _, label in ipairs({"na apendise", "na entradang pinapanatili", "na lema", "na pangalan", "na parirala", "na katugma", "na simbolo", "na padron", "na salita ayon sa etimolohiya", "na salita ayon sa paggamit"}) do
insert(ret, {name = label, is_label = true})
end
insert(ret, {name = "na salitang hinango mula sa {{{langname}}}", is_label = true, lang = false}) --TLCHANGE "terms derived from {{{langname}}}"
insert(ret, {name = "{{{langcode}}}:Lahat ng paksa", sort = "all topics"}) --TLCHANGE All topics
insert(ret, {name = "Varayti ng {{{langname}}}"}) --TLCHANGE
insert(ret, {name = "Requests concerning {{{langname}}}"})
insert(ret, {name = "Rhymes:{{{langname}}}", description = "Lists of {{{langname}}} words by their rhymes."})
insert(ret, {name = "User {{{langcode}}}", description = "Wiktionary users categorized by fluency levels in {{{langdisp}}}."})
return ret
end
-- Handle language categories of the form e.g. [[:Category:French language]] and
-- [[:Category:British Sign Language]].
insert(raw_handlers, function(data)
local category = data.category
-- TLCHANGE: if not (category:match("[Ll]anguage$") or category:match("[Ll]ect$")) then
if not (category:match("^[Ww]ika") or category:match("[Ll]ect$")) then
return nil
end
local lang = m_languages.getByCanonicalName(category)
if not lang then
local langname = category:match("^Wikang (.*)") --TLCHANGE
if langname then
lang = m_languages.getByCanonicalName(langname)
end
if not lang then
return nil
end
end
local args = require("Module:parameters").process(data.args, {
[1] = {list = true},
["setwiki"] = true,
["setwikt"] = true,
["setsister"] = true,
["entryname"] = true,
["extinct"] = {type = "boolean"},
})
-- If called from inside, don't require any arguments, as they can't be known
-- in general and aren't needed just to generate the first parent (used for
-- breadcrumbs).
if #args[1] == 0 and not data.called_from_inside then
-- At least one location must be specified unless the language is constructed (e.g. Esperanto) or reconstructed (e.g. Proto-Indo-European).
local fam = lang:getFamily()
if not (lang:hasType("reconstructed") or (fam and fam:getCode() == "art")) then
error("At least one location (param 1=) must be specified for language '" .. lang:getCanonicalName() .. "' (code '" .. lang:getCode() .. "'). " ..
"Use the value UNKNOWN if the language's location is truly unknown.")
end
end
local description, topright, additional = "", "", ""
-- If called from inside the category tree system, it's called when generating
-- parents or children, and we don't need to generate the description or additional
-- text (which is very expensive in terms of memory because it calls [[Module:family tree]],
-- which calls [[Module:languages/data/all]]).
if not data.called_from_inside then
description, topright, additional = get_description_topright_additional(
lang, args[1], args.extinct, args.setwiki, args.setwikt, args.setsister, args.entryname
)
end
return {
canonical_name = lang:getCategoryName(),
description = description,
lang = lang:getCode(),
topright = topright,
additional = additional,
breadcrumb = lang:getCanonicalName(),
parents = get_parents(lang, args[1], args.extinct),
extra_children = get_children(lang),
umbrella = false,
can_be_empty = true,
english_name = " language" --TLCHANGE
}, true
end)
-- Handle categories such as [[:Category:Languages of Indonesia]].
insert(raw_handlers, function(data)
local location = data.category:match("^Mga wika ng (.*)$") --TLCHANGE "^Languages of (.*)$"
if location then
local args = require("Module:parameters").process(data.args, {
["flagfile"] = true,
["commonscat"] = true,
["wp"] = true,
["basename"] = true,
["parent"] = true,
["locationcat"] = true,
["locationlink"] = true,
})
local topright
local basename = args.basename or location:gsub(", .*", "")
if args.flagfile ~= "-" then
local flagfile_arg = args.flagfile or ("Flag of %s.svg"):format(basename)
local files = require(parse_utilities_module).split_on_comma(flagfile_arg)
local topright_parts = {}
for _, file in ipairs(files) do
local flagfile = "File:" .. file
local flagfile_page = new_title(flagfile)
if flagfile_page and flagfile_page.file.exists then
insert(topright_parts, ("[[%s|right|100px|border]]"):format(flagfile))
elseif args.flagfile then
error(("Explicit flagfile '%s' doesn't exist"):format(flagfile))
end
end
topright = concat(topright_parts)
end
if args.wp then
local wp = require("Module:yesno")(args.wp, "+")
if wp == "+" or wp == true then
wp = data.category
end
if wp then
local wp_topright = ("{{wikipedia|%s}}"):format(wp)
if topright then
topright = topright .. wp_topright
else
topright = wp_topright
end
end
end
if args.commonscat then
local commonscat = require("Module:yesno")(args.commonscat, "+")
if commonscat == "+" or commonscat == true then
commonscat = data.category
end
if commonscat then
local commons_topright = ("{{commonscat|%s}}"):format(commonscat)
if topright then
topright = topright .. commons_topright
else
topright = commons_topright
end
end
end
local bare_location = location:match("^the (.*)$") or location
local location_link = args.locationlink or link_location(location)
local bare_basename = basename:match("^the (.*)$") or basename
local parents = {}
if args.parent then
local explicit_parents = require(parse_utilities_module).split_on_comma(args.parent)
for i, parent in ipairs(explicit_parents) do
local actual_parent, sort_key = parent:match("^(.-):(.*)$")
if actual_parent then
parent = actual_parent
sort_key = sort_key:gsub("%+", bare_location)
else
sort_key = " " .. bare_location
end
insert(parents, {name = "Mga wika ng " .. parent, sort = sort_key}) --TLCHANGE
end
else
insert(parents, {name = "Wika ayon sa bansa", sort = {sort_base = bare_location, lang = "en"}}) --TLCHANGE
end
if args.locationcat then
local explicit_location_cats = require(parse_utilities_module).split_on_comma(args.locationcat)
for i, locationcat in ipairs(explicit_location_cats) do
insert(parents, {name = "Category:" .. locationcat, sort = " Languages"})
end
else
local location_cat = ("Category:%s"):format(bare_location)
local location_page = new_title(location_cat)
if location_page and location_page.exists then
insert(parents, {name = location_cat, sort = "Languages"})
end
end
local description = ("Mga kategorya sa mga wika ng %s (pati ang mga sublect)."):format(location_link) --TLCHANGE "Categories for languages of %s (including sublects)."
return {
topright = topright,
description = description,
parents = parents,
breadcrumb = bare_basename,
additional = "{{{umbrella_msg}}}",
english_name = "Languages of " .. basename --TLCHANGE
}, true
end
end)
-- Handle categories such as [[:Category:English-based creole or pidgin languages]].
insert(raw_handlers, function(data)
local langname = data.category:match("(.*)%-based creole or pidgin languages$")
if langname then
local lang = m_languages.getByCanonicalName(langname)
if lang then
return {
lang = lang:getCode(),
description = "Languages which developed as a [[creole]] or [[pidgin]] from " .. lang:makeCategoryLink() .. ".",
parents = {{name = "Creole or pidgin languages", sort = {sort_base = "*" .. langname, lang = "en"}}},
breadcrumb = lang:getCanonicalName() .. "-based",
}
end
end
end)
-- Handle categories such as [[:Category:English-based constructed languages]].
insert(raw_handlers, function(data)
local langname = data.category:match("(.*)%-based constructed languages$")
if langname then
local lang = m_languages.getByCanonicalName(langname)
if lang then
return {
lang = lang:getCode(),
description = "Constructed languages which are based on " .. lang:makeCategoryLink() .. ".",
parents = {{name = "Constructed languages", sort = {sort_base = "*" .. langname, lang = "en"}}},
breadcrumb = lang:getCanonicalName() .. "-based",
}
end
end
end)
return {RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers}
tewk4kw1bz6rt1uljzkjmppvqyfkdy9
Module:category tree/scripts
828
34568
176018
174873
2026-04-09T03:25:29Z
Yivan000
4078
176018
Scribunto
text/plain
local raw_categories = {}
local raw_handlers = {}
-- A list of Unicode blocks to which the characters of the script or scripts belong is created by this module
-- and displayed in script category pages.
local blocks_submodule = "Module:category tree/scripts/blocks"
local en_utilities_module = "Module:en-utilities"
local scripts_module = "Module:scripts"
local string_utilities_module = "Module:string utilities"
local m_str_utils = require(string_utilities_module)
local add_indefinite_article = require(en_utilities_module).add_indefinite_article
local get_script_by_category_name = require(scripts_module).getByCategoryName
local pattern_escape = m_str_utils.pattern_escape
-----------------------------------------------------------------------------
-- --
-- SCRIPT LABELS --
-- --
-----------------------------------------------------------------------------
--[=[
The following values are recognized for each script label:
'description'
A plain English description for the label. Special template substitutions are recognized; see below.
'umbrella_parents'
A table listing one or more parent categories of the umbrella category 'LABELS by script' for this label.
The format is as for regular raw categories (see [[Module:category tree/data/documentation]]).
'umbrella_breadcrumb'
The breadcrumb to use in the umbrella category 'LABELS by script'. Defaults to "by script".
'catfix'
Same as the 'catfix' parameter for regular raw categories (see [[Module:category tree/data/documentation]]).
This specifies a language code to use to ensure that pages in the category are displayed in the right font and linked
appropriately. If this is set, the 'catfix_sc' parameter will effectively be set with the script code in question.
Special template-like parameters can be used inside the 'description' field (as well as in the 'root_description', 'root_topright' and
'root_additional' variable values initialized below). These are replaced by the equivalent text.
{{{code}}}: Script code.
{{{codes}}}: A comma-separated list of all the alias codes for this script. This applies especially to Arabic, which has
multiple aliases (e.g. 'tt-Arab', 'ur-Arab', 'ku-Arab', etc.).
{{{codesplural}}}: The value "s" if {{{codes}}} lists more than one code, otherwise an empty string.
{{{scname}}}: The name of the script that the category belongs to.
{{{sccat}}}: The name of the script's main category, which adds "script" to the capitalized regular name.
{{{scdisp}}}: The display form of the script, which adds "script" to the regular name.
{{{scprosename}}}: Same as {{{scdisp}}} for Morse code and flag semaphore, otherwise adds "the" before {{{scdisp}}}.
{{{Wikipedia}}}: The Wikipedia article for the script (if it is present in the language's data file), or else {{{sccat}}}.
]=]
local script_labels = {}
script_labels["na karakter"] = { --TLCHANGE "characters"
description = "All characters from {{{scprosename}}}, and their possible variations, such as versions with diacritics and combinations recognized as single characters in any language.",
umbrella_parents = {"Pangkalahatan"}, --TLCHANGE "Fundamental"
umbrella_breadcrumb = "karakter ayon sa katitikan", --TLCHANGE "Characters by script"
catfix = "mul",
english_name = "characters", --TLCHANGE
}
script_labels["na apendise"] = { --TLCHANGE
description = "Appendices about {{{scprosename}}}.",
umbrella_parents = {"Category:Appendices"},
english_name = "appendices", --TLCHANGE
}
script_labels["na wika"] = { --TLCHANGE "languages"
description = "Languages that use {{{scprosename}}}.",
umbrella_parents = {{ name = "Lahat ng wika", sort = " "}}, --TLCHANGE "All languages"
english_name = "languages", --TLCHANGE
}
script_labels["na padron"] = { --TLCHANGE "templates"
description = "Templates with predefined contents for {{{scprosename}}}.",
umbrella_parents = {"Mga padron"}, --TLCHANGE {"Templates"},
english_name = "templates", --TLCHANGE
}
script_labels["na modyul"] = { --TLCHANGE
description = "Modules that implement functionality for {{{scprosename}}}.",
umbrella_parents = {"Modules"},
english_name = "modules", --TLCHANGE
}
script_labels["na modyul na pandatos"] = { --TLCHANGE
description = "Modules that contain data related to {{{scprosename}}}.",
umbrella_parents = {"Data modules"},
english_name = "data modules", --TLCHANGE
}
-----------------------------------------------------------------------------
-- --
-- RAW CATEGORIES --
-- --
-----------------------------------------------------------------------------
raw_categories["Lahat ng katitikan"] = { --TLCHANGE "All scripts"
description = "This category contains the categories for every script (writing system) on Wiktionary.",
additional = "See [[Wiktionary:List of scripts]] for a full list.",
parents = {"Pangkalahatan"}, --TLCHANGE
english_name = "All scripts" --TLCHANGE
}
-- Types of writing systems listed in [[Module:writing systems/data]].
raw_categories["Katitikan ayon sa uri"] = { --TLCHANGE "Scripts by type"
description = "Scripts classified by how they represent words.",
parents = {{ name = "Lahat ng katitikan", sort = " " }}, --TLCHANGE
breadcrumb = "ayon sa uri", --TLCHANGE
english_name = "Scripts by type" --TLCHANGE
}
raw_categories["Mga abjad"] = { --TLCHANGE
description = "Scripts whose basic symbols represent consonants. Some of these are impure abjads, which have letters for some vowels.",
parents = {"Katitikan ayon sa uri"}, --TLCHANGE
english_name = "Abjads" --TLCHANGE
}
raw_categories["Mga abugida"] = { --TLCHANGE
description = "Scripts whose symbols represent consonant and vowel combinations. Symbols representing the same consonant combined with different vowels are for the most part similar in form.",
parents = {"Katitikan ayon sa uri"}, --TLCHANGE
english_name = "Abugidas" --TLCHANGE
}
raw_categories["Mga alpabetikong sistema ng pagsulat"] = { --TLCHANGE
description = "Scripts whose symbols represent individual speech sounds.",
parents = {"Katitikan ayon sa uri"}, --TLCHANGE
english_name = "Alphabetic writing systems" --TLCHANGE
}
raw_categories["Mga logograpiyang sistema ng pagsulat"] = { --TLCHANGE
description = "Scripts whose symbols represent individual words.",
parents = {"Katitikan ayon sa uri"}, --TLCHANGE
english_name = "Logographic writing systems" --TLCHANGE
}
raw_categories["Mga piktograpiyang sistema ng pagsulat"] = { --TLCHANGE
description = "Scripts whose symbols represent individual words by using symbols that resemble the physical objects to which those words refer.",
parents = {"Katitikan ayon sa uri"}, --TLCHANGE
english_name = "Pictographic writing systems" --TLCHANGE
}
raw_categories["Semisyllabaries"] = {
description = "Scripts which are a combination of an alphabet and a syllbary.",
parents = {"Katitikan ayon sa uri"}, --TLCHANGE
}
raw_categories["Mga talapantigan"] = { --TLCHANGE
description = "Scripts whose symbols represent consonant and vowel combinations. Symbols representing the same consonant combined with different vowels are for the most part different in form.",
parents = {"Katitikan ayon sa uri"}, --TLCHANGE
english_name = "Syllabaries" --TLCHANGE
}
for script_label, obj in pairs(script_labels) do
raw_categories[mw.getContentLanguage():ucfirst(m_str_utils.gsub(script_label, "na ", "")) .. " ayon sa katitikan"] = { --TLCHANGE
description = "Categories with " .. script_label .. " of various specific scripts.",
breadcrumb = obj.umbrella_breadcrumb or "ayon sa katitikan", --TLCHANGE
parents = obj.umbrella_parents,
}
end
-----------------------------------------------------------------------------
-- --
-- RAW HANDLERS --
-- --
-----------------------------------------------------------------------------
-- Intro text for "root" categories such as [[Category:Arabic script]]. Template substitutions are as described above.
local root_topright = [=[<div style="clear: right; border: solid #aaa 1px; margin: 1 1 1 1; background: #f9f9f9; width: 250px; padding: 5px; text-align: left; float: right">
<div style="text-align: center; margin-bottom: 10px; margin-top: 5px">'''{{{scdisp}}}'''</div>
{| style="font-size: 90%; background: #f9f9f9"
| style="vertical-align: middle; height: 35px;" | [[File:Wikipedia-logo.png|35px|none|Wikipedia]] || ''Wikipedia article about {{{scprosename}}}''
|-
| colspan="2" style="padding-left: 50px; border-bottom: 1px solid lightgray;" | '''[[w:{{{Wikipedia}}}|{{{Wikipedia}}}]]'''
|-
| style="vertical-align: middle; height: 35px;" | [[File:Crystal kfind.png|35px|none|Considerations]] || {{{scdisp}}} considerations
|-
| colspan="2" style="padding-left: 50px; border-bottom: 1px solid lightgray;" | '''[[Wiktionary:About {{{scdisp}}}]]'''
|-
| style="vertical-align: middle; height: 35px;" | [[File:Book notice.png|35px|none|Information]] || {{{scdisp}}} information
|-
| colspan="2" style="padding-left: 50px; border-bottom: 1px solid lightgray;" | '''[[Appendix:{{{sccat}}}]]'''
|-
| style="vertical-align: Middle; height: 35px;" | [[File:Abc box.svg|35px|none|Code]] || {{{scdisp}}} code
|-
| colspan="2" style="padding-left: 50px; border-bottom: 1px solid lightgray;" | '''{{{code}}}'''
|}
</div>]=]
-- Short description for "root" categories such as [[Category:Arabic script]]. Template substitutions are as described above.
local root_description = "This is the main category of '''{{{scprosename}}}'''."
-- Additional description text for "root" categories such as [[Category:Arabic script]]. Template substitutions are as described above.
local root_additional = [=[Information about {{{scprosename}}} may be available at [[Appendix:{{{sccat}}}]].
In various places at Wiktionary, {{{scprosename}}} is represented by the [[Wiktionary:Scripts|code{{{codesplural}}}]] {{{codes}}}.]=]
-- Replace template notation {{{}}} with variables.
local function substitute_template_refs(text, sc)
local displayForm = sc:getDisplayForm()
local scname = sc:getCanonicalName()
local codes = {}
for code, data in pairs(mw.loadData("Module:scripts/data")) do
if data[1] == scname then
table.insert(codes, "'''" .. code .. "'''")
end
end
if codes[2] then
table.sort(
codes,
-- Four-letter codes have length 10, because they are bolded: '''Latn'''.
function(code1, code2)
if #code1 == 10 then
if #code2 == 10 then
return code1 < code2
else
return true
end
else
if #code2 == 10 then
return false -- four-letter codes before other codes
else
return code1 < code2
end
end
end)
end
local content = {
code = sc:getCode(),
codesplural = codes[2] and "s" or "",
codes = table.concat(codes, ", "),
scname = scname,
sccat = sc:getCategoryName(),
scdisp = displayForm,
scprosename = (displayForm:find("code") or displayForm:find("semaphore")) and displayForm or "the " .. displayForm,
Wikipedia = sc:getWikipediaArticle(),
}
text = string.gsub(
text,
"{{{([^}]+)}}}",
function (parameter)
return content[parameter] or error("No value for script category parameter '" .. parameter .. "'.")
end)
return text
end
local function get_root_additional(additional, sc)
local ret = { additional }
local systems = sc:getSystems()
for _, system in ipairs(systems) do
table.insert(ret, "\n\nThe {{{scname}}} script is ")
table.insert(ret, add_indefinite_article(system:getDisplayForm("singular")))
table.insert(ret, ".")
end
local blocks = require(blocks_submodule).print_blocks_by_canonical_name(sc:getCanonicalName())
if blocks then
table.insert(ret, "\n")
table.insert(ret, blocks)
end
return substitute_template_refs(table.concat(ret), sc)
end
-- Handler for 'SCRIPT script' e.g. [[Category:Arabic script]] as well as [[Category:Morse code]] and
-- [[Category:Flag semaphore]].
table.insert(raw_handlers, function(data)
local sc = get_script_by_category_name(data.category)
if not sc then
return nil
end
-- Compute parents.
local parents = {}
local systems = sc:getSystems()
for _, system in ipairs(systems) do
table.insert(parents, system:getCategoryName())
end
table.insert(parents, "Lahat ng katitikan") --TLCHANGE "All scripts"
-- Compute (extra) children.
local children = {}
for script_label in pairs(script_labels) do
table.insert(children, data.category .. " " .. script_label)
end
return {
canonical_name = mw.getContentLanguage():ucfirst(sc:getCategoryName()), --TLCHANGE add ucfirst() to detect uppercase first letter ("Katitikang ...")
topright = substitute_template_refs(root_topright, sc),
description = substitute_template_refs(root_description, sc),
additional = get_root_additional(root_additional, sc),
parents = parents,
breadcrumb = sc:getCanonicalName(),
extra_children = children,
can_be_empty = true,
english_name = (sc:getData().english_name or sc:getCanonicalName()) .. " script" --TLCHANGE
}
end)
-- Handler for 'SCRIPT script LABELS' e.g. [[Category:Arabic script templates]] as well as [[Category:Morse code LABELS]] and
-- [[Category:Flag semaphore LABELS]].
table.insert(raw_handlers, function(data)
local sc, scname, label
for lab in pairs(script_labels) do
scname, label = data.category:match("^([Kk]atitikang .+) (" .. pattern_escape(lab) .. ")$")
sc = get_script_by_category_name(scname)
if sc then
break
end
end
if not sc then
return nil
end
local label_obj = script_labels[label]
-- Compute parents.
local parents = {
{name = scname, sort = label},
-- umbrella category
mw.getContentLanguage():ucfirst(m_str_utils.gsub(label, "na ", "")) .. " ayon sa katitikan", --TLCHANGE remove the "na"
}
return {
canonical_name = mw.getContentLanguage():ucfirst(sc:getCategoryName()) .. " " .. label, --TLCHANGE add ucfirst() to detect uppercase first letter ("Katitikang ...")
description = substitute_template_refs(label_obj.description, sc),
parents = parents,
breadcrumb = label,
catfix = label_obj.catfix,
catfix_sc = label_obj.catfix and sc:getCode(),
english_name = (sc:getData().english_name or sc:getCanonicalName()) .. " script " .. label_obj.english_name --TLCHANGE add this
}
end)
return {RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers}
itl4k5cugye4y15mp1uhsax2w82h4lz
176022
176018
2026-04-09T03:31:34Z
Yivan000
4078
176022
Scribunto
text/plain
local raw_categories = {}
local raw_handlers = {}
-- A list of Unicode blocks to which the characters of the script or scripts belong is created by this module
-- and displayed in script category pages.
local blocks_submodule = "Module:category tree/scripts/blocks"
local en_utilities_module = "Module:en-utilities"
local scripts_module = "Module:scripts"
local string_utilities_module = "Module:string utilities"
local m_str_utils = require(string_utilities_module)
local add_indefinite_article = require(en_utilities_module).add_indefinite_article
local get_script_by_category_name = require(scripts_module).getByCategoryName
local pattern_escape = m_str_utils.pattern_escape
-----------------------------------------------------------------------------
-- --
-- SCRIPT LABELS --
-- --
-----------------------------------------------------------------------------
--[=[
The following values are recognized for each script label:
'description'
A plain English description for the label. Special template substitutions are recognized; see below.
'umbrella_parents'
A table listing one or more parent categories of the umbrella category 'LABELS by script' for this label.
The format is as for regular raw categories (see [[Module:category tree/data/documentation]]).
'umbrella_breadcrumb'
The breadcrumb to use in the umbrella category 'LABELS by script'. Defaults to "by script".
'catfix'
Same as the 'catfix' parameter for regular raw categories (see [[Module:category tree/data/documentation]]).
This specifies a language code to use to ensure that pages in the category are displayed in the right font and linked
appropriately. If this is set, the 'catfix_sc' parameter will effectively be set with the script code in question.
Special template-like parameters can be used inside the 'description' field (as well as in the 'root_description', 'root_topright' and
'root_additional' variable values initialized below). These are replaced by the equivalent text.
{{{code}}}: Script code.
{{{codes}}}: A comma-separated list of all the alias codes for this script. This applies especially to Arabic, which has
multiple aliases (e.g. 'tt-Arab', 'ur-Arab', 'ku-Arab', etc.).
{{{codesplural}}}: The value "s" if {{{codes}}} lists more than one code, otherwise an empty string.
{{{scname}}}: The name of the script that the category belongs to.
{{{sccat}}}: The name of the script's main category, which adds "script" to the capitalized regular name.
{{{scdisp}}}: The display form of the script, which adds "script" to the regular name.
{{{scprosename}}}: Same as {{{scdisp}}} for Morse code and flag semaphore, otherwise adds "the" before {{{scdisp}}}.
{{{Wikipedia}}}: The Wikipedia article for the script (if it is present in the language's data file), or else {{{sccat}}}.
]=]
local script_labels = {}
script_labels["na karakter"] = { --TLCHANGE "characters"
description = "All characters from {{{scprosename}}}, and their possible variations, such as versions with diacritics and combinations recognized as single characters in any language.",
umbrella_parents = {"Pangkalahatan"}, --TLCHANGE "Fundamental"
umbrella_breadcrumb = "karakter ayon sa katitikan", --TLCHANGE "Characters by script"
catfix = "mul",
english_name = "characters", --TLCHANGE
}
script_labels["na apendise"] = { --TLCHANGE
description = "Appendices about {{{scprosename}}}.",
umbrella_parents = {"Category:Appendices"},
english_name = "appendices", --TLCHANGE
}
script_labels["na wika"] = { --TLCHANGE "languages"
description = "Languages that use {{{scprosename}}}.",
umbrella_parents = {{ name = "Lahat ng wika", sort = " "}}, --TLCHANGE "All languages"
english_name = "languages", --TLCHANGE
}
script_labels["na padron"] = { --TLCHANGE "templates"
description = "Templates with predefined contents for {{{scprosename}}}.",
umbrella_parents = {"Mga padron"}, --TLCHANGE {"Templates"},
english_name = "templates", --TLCHANGE
}
script_labels["na modyul"] = { --TLCHANGE
description = "Modules that implement functionality for {{{scprosename}}}.",
umbrella_parents = {"Modules"},
english_name = "modules", --TLCHANGE
}
script_labels["na modyul na pandatos"] = { --TLCHANGE
description = "Modules that contain data related to {{{scprosename}}}.",
umbrella_parents = {"Data modules"},
english_name = "data modules", --TLCHANGE
}
-----------------------------------------------------------------------------
-- --
-- RAW CATEGORIES --
-- --
-----------------------------------------------------------------------------
raw_categories["Lahat ng katitikan"] = { --TLCHANGE "All scripts"
description = "This category contains the categories for every script (writing system) on Wiktionary.",
additional = "See [[Wiktionary:List of scripts]] for a full list.",
parents = {"Pangkalahatan"}, --TLCHANGE
english_name = "All scripts", --TLCHANGE
}
-- Types of writing systems listed in [[Module:writing systems/data]].
raw_categories["Katitikan ayon sa uri"] = { --TLCHANGE "Scripts by type"
description = "Scripts classified by how they represent words.",
parents = {{ name = "Lahat ng katitikan", sort = " " }}, --TLCHANGE
breadcrumb = "ayon sa uri", --TLCHANGE
english_name = "Scripts by type", --TLCHANGE
}
raw_categories["Mga abjad"] = { --TLCHANGE
description = "Scripts whose basic symbols represent consonants. Some of these are impure abjads, which have letters for some vowels.",
parents = {"Katitikan ayon sa uri"}, --TLCHANGE
english_name = "Abjads", --TLCHANGE
}
raw_categories["Mga abugida"] = { --TLCHANGE
description = "Scripts whose symbols represent consonant and vowel combinations. Symbols representing the same consonant combined with different vowels are for the most part similar in form.",
parents = {"Katitikan ayon sa uri"}, --TLCHANGE
english_name = "Abugidas", --TLCHANGE
}
raw_categories["Mga alpabetikong sistema ng pagsulat"] = { --TLCHANGE
description = "Scripts whose symbols represent individual speech sounds.",
parents = {"Katitikan ayon sa uri"}, --TLCHANGE
english_name = "Alphabetic writing systems", --TLCHANGE
}
raw_categories["Mga logograpiyang sistema ng pagsulat"] = { --TLCHANGE
description = "Scripts whose symbols represent individual words.",
parents = {"Katitikan ayon sa uri"}, --TLCHANGE
english_name = "Logographic writing systems", --TLCHANGE
}
raw_categories["Mga piktograpiyang sistema ng pagsulat"] = { --TLCHANGE
description = "Scripts whose symbols represent individual words by using symbols that resemble the physical objects to which those words refer.",
parents = {"Katitikan ayon sa uri"}, --TLCHANGE
english_name = "Pictographic writing systems", --TLCHANGE
}
raw_categories["Semisyllabaries"] = {
description = "Scripts which are a combination of an alphabet and a syllbary.",
parents = {"Katitikan ayon sa uri"}, --TLCHANGE
}
raw_categories["Mga talapantigan"] = { --TLCHANGE
description = "Scripts whose symbols represent consonant and vowel combinations. Symbols representing the same consonant combined with different vowels are for the most part different in form.",
parents = {"Katitikan ayon sa uri"}, --TLCHANGE
english_name = "Syllabaries", --TLCHANGE
}
for script_label, obj in pairs(script_labels) do
raw_categories[mw.getContentLanguage():ucfirst(m_str_utils.gsub(script_label, "na ", "")) .. " ayon sa katitikan"] = { --TLCHANGE
description = "Categories with " .. script_label .. " of various specific scripts.",
breadcrumb = obj.umbrella_breadcrumb or "ayon sa katitikan", --TLCHANGE
parents = obj.umbrella_parents,
english_name = mw.getContentLanguage():ucfirst(obj.english_name) .. " by script", --TLCHANGE
}
end
-----------------------------------------------------------------------------
-- --
-- RAW HANDLERS --
-- --
-----------------------------------------------------------------------------
-- Intro text for "root" categories such as [[Category:Arabic script]]. Template substitutions are as described above.
local root_topright = [=[<div style="clear: right; border: solid #aaa 1px; margin: 1 1 1 1; background: #f9f9f9; width: 250px; padding: 5px; text-align: left; float: right">
<div style="text-align: center; margin-bottom: 10px; margin-top: 5px">'''{{{scdisp}}}'''</div>
{| style="font-size: 90%; background: #f9f9f9"
| style="vertical-align: middle; height: 35px;" | [[File:Wikipedia-logo.png|35px|none|Wikipedia]] || ''Wikipedia article about {{{scprosename}}}''
|-
| colspan="2" style="padding-left: 50px; border-bottom: 1px solid lightgray;" | '''[[w:{{{Wikipedia}}}|{{{Wikipedia}}}]]'''
|-
| style="vertical-align: middle; height: 35px;" | [[File:Crystal kfind.png|35px|none|Considerations]] || {{{scdisp}}} considerations
|-
| colspan="2" style="padding-left: 50px; border-bottom: 1px solid lightgray;" | '''[[Wiktionary:About {{{scdisp}}}]]'''
|-
| style="vertical-align: middle; height: 35px;" | [[File:Book notice.png|35px|none|Information]] || {{{scdisp}}} information
|-
| colspan="2" style="padding-left: 50px; border-bottom: 1px solid lightgray;" | '''[[Appendix:{{{sccat}}}]]'''
|-
| style="vertical-align: Middle; height: 35px;" | [[File:Abc box.svg|35px|none|Code]] || {{{scdisp}}} code
|-
| colspan="2" style="padding-left: 50px; border-bottom: 1px solid lightgray;" | '''{{{code}}}'''
|}
</div>]=]
-- Short description for "root" categories such as [[Category:Arabic script]]. Template substitutions are as described above.
local root_description = "This is the main category of '''{{{scprosename}}}'''."
-- Additional description text for "root" categories such as [[Category:Arabic script]]. Template substitutions are as described above.
local root_additional = [=[Information about {{{scprosename}}} may be available at [[Appendix:{{{sccat}}}]].
In various places at Wiktionary, {{{scprosename}}} is represented by the [[Wiktionary:Scripts|code{{{codesplural}}}]] {{{codes}}}.]=]
-- Replace template notation {{{}}} with variables.
local function substitute_template_refs(text, sc)
local displayForm = sc:getDisplayForm()
local scname = sc:getCanonicalName()
local codes = {}
for code, data in pairs(mw.loadData("Module:scripts/data")) do
if data[1] == scname then
table.insert(codes, "'''" .. code .. "'''")
end
end
if codes[2] then
table.sort(
codes,
-- Four-letter codes have length 10, because they are bolded: '''Latn'''.
function(code1, code2)
if #code1 == 10 then
if #code2 == 10 then
return code1 < code2
else
return true
end
else
if #code2 == 10 then
return false -- four-letter codes before other codes
else
return code1 < code2
end
end
end)
end
local content = {
code = sc:getCode(),
codesplural = codes[2] and "s" or "",
codes = table.concat(codes, ", "),
scname = scname,
sccat = sc:getCategoryName(),
scdisp = displayForm,
scprosename = (displayForm:find("code") or displayForm:find("semaphore")) and displayForm or "the " .. displayForm,
Wikipedia = sc:getWikipediaArticle(),
}
text = string.gsub(
text,
"{{{([^}]+)}}}",
function (parameter)
return content[parameter] or error("No value for script category parameter '" .. parameter .. "'.")
end)
return text
end
local function get_root_additional(additional, sc)
local ret = { additional }
local systems = sc:getSystems()
for _, system in ipairs(systems) do
table.insert(ret, "\n\nThe {{{scname}}} script is ")
table.insert(ret, add_indefinite_article(system:getDisplayForm("singular")))
table.insert(ret, ".")
end
local blocks = require(blocks_submodule).print_blocks_by_canonical_name(sc:getCanonicalName())
if blocks then
table.insert(ret, "\n")
table.insert(ret, blocks)
end
return substitute_template_refs(table.concat(ret), sc)
end
-- Handler for 'SCRIPT script' e.g. [[Category:Arabic script]] as well as [[Category:Morse code]] and
-- [[Category:Flag semaphore]].
table.insert(raw_handlers, function(data)
local sc = get_script_by_category_name(data.category)
if not sc then
return nil
end
-- Compute parents.
local parents = {}
local systems = sc:getSystems()
for _, system in ipairs(systems) do
table.insert(parents, system:getCategoryName())
end
table.insert(parents, "Lahat ng katitikan") --TLCHANGE "All scripts"
-- Compute (extra) children.
local children = {}
for script_label in pairs(script_labels) do
table.insert(children, data.category .. " " .. script_label)
end
return {
canonical_name = mw.getContentLanguage():ucfirst(sc:getCategoryName()), --TLCHANGE add ucfirst() to detect uppercase first letter ("Katitikang ...")
topright = substitute_template_refs(root_topright, sc),
description = substitute_template_refs(root_description, sc),
additional = get_root_additional(root_additional, sc),
parents = parents,
breadcrumb = sc:getCanonicalName(),
extra_children = children,
can_be_empty = true,
english_name = (sc:getData().english_name or sc:getCanonicalName()) .. " script" --TLCHANGE
}
end)
-- Handler for 'SCRIPT script LABELS' e.g. [[Category:Arabic script templates]] as well as [[Category:Morse code LABELS]] and
-- [[Category:Flag semaphore LABELS]].
table.insert(raw_handlers, function(data)
local sc, scname, label
for lab in pairs(script_labels) do
scname, label = data.category:match("^([Kk]atitikang .+) (" .. pattern_escape(lab) .. ")$")
sc = get_script_by_category_name(scname)
if sc then
break
end
end
if not sc then
return nil
end
local label_obj = script_labels[label]
-- Compute parents.
local parents = {
{name = scname, sort = label},
-- umbrella category
mw.getContentLanguage():ucfirst(m_str_utils.gsub(label, "na ", "")) .. " ayon sa katitikan", --TLCHANGE remove the "na"
}
return {
canonical_name = mw.getContentLanguage():ucfirst(sc:getCategoryName()) .. " " .. label, --TLCHANGE add ucfirst() to detect uppercase first letter ("Katitikang ...")
description = substitute_template_refs(label_obj.description, sc),
parents = parents,
breadcrumb = label,
catfix = label_obj.catfix,
catfix_sc = label_obj.catfix and sc:getCode(),
english_name = (sc:getData().english_name or sc:getCanonicalName()) .. " script " .. label_obj.english_name --TLCHANGE add this
}
end)
return {RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers}
rwzbsb6wjnatv8eb3kevb0gu5sijsm7
Module:category tree/unicode
828
34575
176023
171100
2026-04-09T03:35:25Z
Yivan000
4078
176023
Scribunto
text/plain
local raw_categories = {}
local raw_handlers = {}
-----------------------------------------------------------------------------
-- --
-- RAW CATEGORIES --
-- --
-----------------------------------------------------------------------------
raw_categories["Bloke ng Yunikowd"] = { --TLCHANGE
topright = "{{shortcut|CAT:UC}}",
description = "Categories with blocks of particular Unicode characters.",
parents = {
"Pangkalahatan", --TLCHANGE "Fundamental",
"Category:Apendise", --TLCHANGE "Category:Appendices",
},
english_name = "Unicode blocks", --TLCHANGE
}
raw_categories["Unicode blocks by number of entries"] = {
description = "Categories that group blocks of Unicode characters by the number of characters in those blocks.",
parents = {
{name = "Bloke ng Yunikowd", sort = " "}, --TLCHANGE "Unicode blocks"
},
}
for _, block in ipairs({
{num = "0", desc = "no other", sort = "*000"},
{num = "1–10", desc = "1 to 10", sort = "*001"},
{num = "11–50", desc = "11 to 50", sort = "*011"},
{num = "51–100", desc = "51 to 100", sort = "*051"},
{num = "101+", desc = "at least 101", sort = "*101"},
}) do
raw_categories["Unicode blocks with " .. block.num .. " entries"] = {
description = "Unicode block categories containing 1 appendix + " .. block.desc .. " entries.",
parents = {{name = "Unicode blocks by number of entries", sort = block.sort}},
breadcrumb = block.num,
}
end
-----------------------------------------------------------------------------
-- --
-- RAW HANDLERS --
-- --
-----------------------------------------------------------------------------
table.insert(raw_handlers, function(data)
local block = data.category:match("^(.*) na bloke") --TLCHANGE "^(.*) block"
if block then
local pages_in_category = mw.site.stats.pagesInCategory(mw.title.getCurrentTitle().text, "pages")
local entry_bucket
-- At least 1 page is the appendix for the current Unicode block.
if pages_in_category == 1 then
entry_bucket = "0"
elseif pages_in_category <= 11 then
entry_bucket = "1–10"
elseif pages_in_category <= 51 then
entry_bucket = "11–50"
elseif pages_in_category <= 101 then
entry_bucket = "51–100"
else
entry_bucket = "101+"
end
return {
description = "Entries for characters in the '''[[Appendix:Unicode/" .. block .. "|" .. block .. "]]''' block, " ..
"as categorized by the character boxes.",
additional = "Some entries may define characters from multiple Unicode codepoints at once, so the page title " ..
"could be an entry that is not from this block.",
breadcrumb = block,
parents = {
"Bloke ng Yunikowd", --TLCHANGE "Unicode blocks",
"Unicode blocks with " .. entry_bucket .. " entries",
},
english_name = block .. " block", --TLCHANGE
}
end
end)
return {RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers}
8zezvxtyb50hmnz709ew9zbdky63pf9
176027
176023
2026-04-09T03:42:01Z
Yivan000
4078
176027
Scribunto
text/plain
local raw_categories = {}
local raw_handlers = {}
-----------------------------------------------------------------------------
-- --
-- RAW CATEGORIES --
-- --
-----------------------------------------------------------------------------
raw_categories["Bloke ng Yunikowd"] = { --TLCHANGE
topright = "{{shortcut|CAT:UC}}",
description = "Categories with blocks of particular Unicode characters.",
parents = {
"Pangkalahatan", --TLCHANGE "Fundamental",
"Category:Apendise", --TLCHANGE "Category:Appendices",
},
english_name = "Unicode blocks", --TLCHANGE
}
raw_categories["Unicode blocks by number of entries"] = {
description = "Categories that group blocks of Unicode characters by the number of characters in those blocks.",
parents = {
{name = "Bloke ng Yunikowd", sort = " "}, --TLCHANGE "Unicode blocks"
},
}
for _, block in ipairs({
{num = "0", desc = "no other", sort = "*000"},
{num = "1–10", desc = "1 to 10", sort = "*001"},
{num = "11–50", desc = "11 to 50", sort = "*011"},
{num = "51–100", desc = "51 to 100", sort = "*051"},
{num = "101+", desc = "at least 101", sort = "*101"},
}) do
raw_categories["Unicode blocks with " .. block.num .. " entries"] = {
description = "Unicode block categories containing 1 appendix + " .. block.desc .. " entries.",
parents = {{name = "Unicode blocks by number of entries", sort = block.sort}},
breadcrumb = block.num,
}
end
-----------------------------------------------------------------------------
-- --
-- RAW HANDLERS --
-- --
-----------------------------------------------------------------------------
table.insert(raw_handlers, function(data)
local block = data.category:match("^Blokeng (.*)") --TLCHANGE "^(.*) block"
if block then
local pages_in_category = mw.site.stats.pagesInCategory(mw.title.getCurrentTitle().text, "pages")
local entry_bucket
-- At least 1 page is the appendix for the current Unicode block.
if pages_in_category == 1 then
entry_bucket = "0"
elseif pages_in_category <= 11 then
entry_bucket = "1–10"
elseif pages_in_category <= 51 then
entry_bucket = "11–50"
elseif pages_in_category <= 101 then
entry_bucket = "51–100"
else
entry_bucket = "101+"
end
return {
description = "Entries for characters in the '''[[Appendix:Unicode/" .. block .. "|" .. block .. "]]''' block, " ..
"as categorized by the character boxes.",
additional = "Some entries may define characters from multiple Unicode codepoints at once, so the page title " ..
"could be an entry that is not from this block.",
breadcrumb = block,
parents = {
"Bloke ng Yunikowd", --TLCHANGE "Unicode blocks",
"Unicode blocks with " .. entry_bucket .. " entries",
},
english_name = block .. " block", --TLCHANGE
}
end
end)
return {RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers}
mgyap1bbhx710h2rr316hhsjua4aohv
176031
176027
2026-04-09T03:46:57Z
Yivan000
4078
176031
Scribunto
text/plain
local raw_categories = {}
local raw_handlers = {}
-----------------------------------------------------------------------------
-- --
-- RAW CATEGORIES --
-- --
-----------------------------------------------------------------------------
raw_categories["Bloke ng Yunikowd"] = { --TLCHANGE
topright = "{{shortcut|CAT:UC}}",
description = "Categories with blocks of particular Unicode characters.",
parents = {
"Pangkalahatan", --TLCHANGE "Fundamental",
"Category:Apendise", --TLCHANGE "Category:Appendices",
},
english_name = "Unicode blocks", --TLCHANGE
}
raw_categories["Unicode blocks by number of entries"] = {
description = "Categories that group blocks of Unicode characters by the number of characters in those blocks.",
parents = {
{name = "Bloke ng Yunikowd", sort = " "}, --TLCHANGE "Unicode blocks"
},
}
for _, block in ipairs({
{num = "0", desc = "no other", sort = "*000"},
{num = "1–10", desc = "1 to 10", sort = "*001"},
{num = "11–50", desc = "11 to 50", sort = "*011"},
{num = "51–100", desc = "51 to 100", sort = "*051"},
{num = "101+", desc = "at least 101", sort = "*101"},
}) do
raw_categories["Unicode blocks with " .. block.num .. " entries"] = {
description = "Unicode block categories containing 1 appendix + " .. block.desc .. " entries.",
parents = {{name = "Unicode blocks by number of entries", sort = block.sort}},
breadcrumb = block.num,
}
end
-----------------------------------------------------------------------------
-- --
-- RAW HANDLERS --
-- --
-----------------------------------------------------------------------------
table.insert(raw_handlers, function(data)
local block = data.category:match("^Blokeng (.*)") --TLCHANGE "^(.*) block"
if block then
local pages_in_category = mw.site.stats.pagesInCategory(mw.title.getCurrentTitle().text, "pages")
local entry_bucket
-- At least 1 page is the appendix for the current Unicode block.
if pages_in_category == 1 then
entry_bucket = "0"
elseif pages_in_category <= 11 then
entry_bucket = "1–10"
elseif pages_in_category <= 51 then
entry_bucket = "11–50"
elseif pages_in_category <= 101 then
entry_bucket = "51–100"
else
entry_bucket = "101+"
end
return {
description = "Entries for characters in the '''[[Appendix:Unicode/" .. block .. "|" .. block .. "]]''' block, " ..
"as categorized by the character boxes.",
additional = "Some entries may define characters from multiple Unicode codepoints at once, so the page title " ..
"could be an entry that is not from this block.",
breadcrumb = block,
parents = {
{name = "Bloke ng Yunikowd", sort = block}, --TLCHANGE "Unicode blocks",
"Unicode blocks with " .. entry_bucket .. " entries",
},
english_name = block .. " block", --TLCHANGE
}
end
end)
return {RAW_CATEGORIES = raw_categories, RAW_HANDLERS = raw_handlers}
4l845u24zm0j4lae8geub7fzm8vhq7r
Module:topic list
828
34834
176012
168135
2026-04-09T03:07:43Z
Yivan000
4078
176012
Scribunto
text/plain
local export = {}
local columns_module = "Module:columns"
local languages_module = "Module:languages"
local parameters_module = "Module:parameters"
local parameter_utilities_module = "Module:parameter utilities"
local parse_interface_module = "Module:parse interface"
local string_utilities_module = "Module:string utilities"
local utilities_module = "Module:utilities"
local m_str_utils = require(string_utilities_module)
local is_callable = require("Module:fun").is_callable
local rfind = m_str_utils.find
local ucfirst = m_str_utils.ucfirst
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local html = mw.html.create
local force_cat = false -- for testing
local function letter_like_category(data)
return ("Category:%s na titik"):format(data.lang:getCanonicalName()) --TLCHANGE "Category:%s letters"
end
local function page_exists(page)
local title = mw.title.new(page)
return title and title.exists
end
local function letter_like_appendix(data)
local appendices = {}
local alphabet_appendix = ("Appendix:%s alphabet"):format(data.lang:getCanonicalName())
if page_exists(alphabet_appendix) then
table.insert(appendices, ("[[%s|alphabet appendix]]"):format(alphabet_appendix))
end
local script_name = data.list_name:match("^(.* script) .*$")
if not script_name then
error(("Internal error: Can't pull out script name from list name '%s'"):format(data.list_name))
end
local script_appendix = "Appendix:" .. script_name
if page_exists(script_appendix) then
table.insert(appendices, ("[[%s|script appendix]]"):format(script_appendix))
end
if appendices[1] then
return table.concat(appendices, ",")
else
return nil
end
end
local letter_like_properties = {
horiz = "comma",
sort = false,
cat = letter_like_category,
appendix = letter_like_appendix,
notr = true,
allow_space_delim = true, -- allow space as a delimiter
tilde_delim = "~", -- use a tilde without spaces around it
}
local function letter_name_category(data)
local script_name = data.list_name:match("^(.*) script .*$")
if not script_name then
error(("Internal error: Can't pull out script name from list name '%s'"):format(data.list_name))
end
return ("%s letter names"):format(script_name)
end
local function calendar_month_adjectives_category(data)
local calendar = data.list_name:match("^(.*) calendar month adjectives$")
if not calendar then
error(("Internal error: Can't pull out calendar type from list name '%s'"):format(data.list_name))
end
return calendar .. " calendar months"
end
local topic_list_properties = {
{".* calendar months", {sort = false}},
{".* calendar month adjectives", {sort = false, cat = calendar_month_adjectives_category}},
{"compass point adjectives", {cat = "Compass points"}},
{"compass point adverbs", {cat = "Compass points"}},
{".* script letters", letter_like_properties},
{".* script vowels", letter_like_properties},
{".* script consonants", letter_like_properties},
{".* script diacritics", letter_like_properties},
{".* script digraphs", letter_like_properties},
-- FIXME: We may need to be smarter, and use a regular columnar display in some cases (e.g. when translit is
-- present)
{".* script letter names", {horiz = "bullet", sort = false, cat = letter_name_category}},
-- Geographic lists should not categorize. {{place}} does that, and may do it differently.
{"administrative .* of .*", {nocat = true}},
{"autonomous .* of .*", {nocat = true}},
{"cantons of .*", {nocat = true}},
{"capital cities of .*", {nocat = true}},
{"continents", {nocat = true}},
{"counties of .*", {nocat = true}},
{"countries in .*", {appendix = "Appendix:Countries of the world", nocat = true}},
{"districts of .*", {nocat = true}},
{"divisions of .*", {nocat = true}},
{"federal .* of .*", {nocat = true}},
{"governorates of .*", {nocat = true}},
{"macroregions of .*", {nocat = true}},
{"prefectures of .*", {nocat = true}},
{"provinces.* of .*", {nocat = true}},
{"regions of .*", {nocat = true}},
{"states.* of .*", {nocat = true}},
{"territories of .*", {nocat = true}},
{"union territories of .*", {nocat = true}},
{"vilayets of .*", {nocat = true}},
{"books of the.* Testament", {sort = false, cat = "Books of the Bible"}},
-- FIXME: Use the following instead of the previous when we create 'Books of the Old Testament' and
-- 'Books of the New Testament'
--{"books of the Old Testament", {sort = false}},
--{"books of the .*New Testament", {sort = false, cat = "Books of the New Testament"}},
{"canids", {horiz = "bullet"}}, -- only 5 items on most lists
{"days of the week", {horiz = "bullet", sort = false, appendix = "Appendix:Days of the week"}},
{"dentistry location adjectives", {cat = "Dentistry"}},
-- FIXME: Delete the following once we rename these categories to 'electromagnetic spectrum'
{"electromagnetic radiation", {sort = false, cat = "Electromagnetic spectrum"}}, -- FIXME, add category
{"electromagnetic spectrum", {sort = false}},
-- FIXME: Delete the following once we rename these categories to 'terms for fingers'
{"fingers", {sort = false, cat = "Terms for fingers"}},
{"terms for fingers", {sort = false, cat = "Terms for fingers"}},
{"fundamental interactions", {cat = "Physics"}},
{"geological time units", {sort = false, cat = "Units of time,Geology"}},
{"human anatomy location adjectives", {cat = "Medicine"}},
{"Islamic prophets", {sort = false}},
{"leptons", {sort = false, horiz = "bullet"}},
{"antileptons", {sort = false, horiz = "bullet", cat = "Leptons"}},
{"oceans", {horiz = "bullet"}},
{"planets of the Solar System", {horiz = "bullet", sort = false}},
{"quarks", {sort = false, horiz = "bullet"}},
{"squarks", {sort = false, horiz = "bullet", cat = "Quarks"}},
{"antiquarks", {sort = false, horiz = "bullet", cat = "Quarks"}},
{"religions", {cat = "Religion"}}, -- FIXME, add and use category 'Religions'
{"religious adherents", {cat = "Religion"}},
{"religious texts", {cat = "Religion"}}, -- FIXME, add and use category 'Religious texts'
{"seasons", {horiz = "bullet", sort = false}},
{"sexual orientation adjectives", {cat = "Sexual orientations"}},
{"taxonomic ranks", {sort = false}},
{"times of day", {sort = false}},
{"units of time", {sort = false}},
}
local function parse_topic_list_user_args(raw_user_args)
local user_params = {
nocat = {type = "boolean"},
sortbase = {},
}
return require(parameters_module).process(raw_user_args, user_params)
end
local function add_topic_list_params(params)
params["cat"] = {}
params["nocat"] = {type = "boolean"}
params["enhypernym"] = {}
params["hypernym"] = {}
params["appendix"] = {}
params["pagename"] = {} -- for testing of topic list
end
local function set_default_arguments(args, default_props)
if default_props then
for k, v in pairs(default_props) do
if args[k] == nil then
args[k] = v
end
end
end
end
local function make_horiz_edit_button(topic_list_template)
return tostring(html("small"):node(html("sup")
:wikitext(" [[[Special:EditPage/" .. topic_list_template .. "|edit]]]")
))
end
local function analyze_template_name(topic_list_template)
-- Analyze template name for list name language and variant. The variant comes after the language code and a
-- slash and may or may not be present. Cf. [[Template:list:days of the week/cim/Luserna]] (for the Luserna dialect
-- of Cimbrian) and [[Template:list:days of the week/cim/13]] (for the Tredici Comuni dialect of Cimbrian).
--
-- Also compute default properties based on template name.
local list_name_plus_lang = topic_list_template:gsub("^Template:", ""):gsub("^list:", "")
local list_name, langcode_and_variant = list_name_plus_lang:match("^(.-)/(.*)$")
local lang, variant
if langcode_and_variant then
local langcode
langcode, variant = langcode_and_variant:match("^(.-)/(.*)$")
langcode = langcode or langcode_and_variant
lang = require(languages_module).getByCode(langcode, nil, "allow etym")
if not lang then
error(("Unrecognized language code '%s' in topic list template name [[%s]]"):format(
langcode, topic_list_template))
end
else
error(("Can't parse language code out of topic list template name [[%s]]; it should be of the form " ..
"'Template:list:LISTNAME/LANGCODE' or 'Template:list:LISTNAME/LANGCODE/VARIETY'"):format(
topic_list_template))
end
local default_props
for _, pattern_and_props in ipairs(topic_list_properties) do
local pattern, props = unpack(pattern_and_props)
if rfind(list_name, "^" .. pattern .. "$") then
default_props = props
break
end
end
if default_props then
-- Safest to make a copy of the default props in case we modify it, as we do when one of the values is a
-- function, in case we are called twice in the same Scribunto invocation (not common but possible I think).
local default_props_copy = {}
for k, v in pairs(default_props) do
if is_callable(v) then
default_props_copy[k] = v {
topic_list_template = topic_list_template,
list_name = list_name,
lang = lang,
variant = variant,
}
else
default_props_copy[k] = v
end
end
default_props = default_props_copy
end
return list_name, lang, variant, default_props
end
-- FIXME: This needs to be implemented properly in [[Module:links]].
local function get_left_side_link(link)
local left, right = link:match("^%[%[([^%[%]|]+)|([^%[%]|]+)%]%]$")
if left then
return left
end
local single_part = link:match("^%[%[([^%[%]|]+)%]%]$")
if single_part then
return single_part
end
if not link:match("%[%[") then
return link
end
return nil
end
local term_param_mods = require(parameter_utilities_module).construct_param_mods {
{group = "link"}, -- sc has separate_no_index = true; that's the only one
-- It makes no sense to have overall l=, ll=, q= or qq= params for columnar display.
{group = {"ref", "l", "q"}, require_index = true},
}
local function parse_term_with_delimiters(data)
local term, paramname, lang, sc, pagename = data.term, data.paramname, data.lang, data.sc, data.pagename
local function generate_obj(term, parse_err)
local actual_term, termlang = require(parse_interface_module).parse_term_with_lang {
term = term,
parse_err = parse_err,
paramname = paramname,
}
return {
term = actual_term ~= "" and actual_term or nil,
lang = termlang or lang,
}
end
local items = require(parse_interface_module).parse_inline_modifiers(term, {
paramname = paramname,
param_mods = term_param_mods,
generate_obj = generate_obj,
splitchar = "[,~]",
preserve_splitchar = true,
outer_container = {},
})
local item_is_page = false
for i, item in ipairs(items.terms) do
if i == 1 then
item.separator = nil
elseif item.delimiter == "~" then
item.separator = data.tilde_delim or " ~ "
else
item.separator = data.comma_delim or ", "
end
-- Do this afterwards rather than in generate_obj() or use of <sc:...> will trigger an error
-- because the modifier is already set.
if not item.sc and sc then
item.sc = sc
end
if data.notr then
item.tr = "-"
end
if item.term and pagename then
local left_side = get_left_side_link(item.term)
if left_side and left_side == pagename then
item_is_page = true
end
end
end
return items, item_is_page
end
local function get_title_and_formatted_cats(args, lang, sc, topic_list_data)
local title = args.title
local formatted_cats
local cats
local default_title = topic_list_data.list_name
local user_args = topic_list_data.user_args
local nocat = args.nocat or user_args.nocat
local fulllangcode = lang:getFullCode()
if nocat then
-- don't generate categories for the title
elseif not args.cat then
local default_cat = ucfirst(default_title)
local cat_title = mw.title.new(("Category:%s"):format(default_cat))
if cat_title and cat_title.exists then
cats = {fulllangcode .. ":" .. default_cat}
end
elseif args.cat ~= "-" then
cats = require(parse_interface_module).split_on_comma(args.cat)
for i, cat in ipairs(cats) do
if cat:find("^Category:") then
cats[i] = cat:gsub("^Category:", "")
else
cats[i] = fulllangcode .. ":" .. cats[i]
end
end
end
local hypernym_is_page
if not title then
local titleparts = {}
local function ins(txt)
table.insert(titleparts, txt)
end
local enhypernym
if args.enhypernym then
enhypernym = args.enhypernym:gsub("%+", m_str_utils.replacement_escape(default_title))
else
enhypernym = default_title
if topic_list_data.variant then
enhypernym = ("%s (%s)"):format(enhypernym, topic_list_data.variant)
end
end
if cats and not enhypernym:find("%[%[") then
ins(("[[:Category:%s|%s]]"):format(cats[1], enhypernym))
else
ins(enhypernym)
end
if args.hypernym then
local lang_hypernyms
local pagename = args.pagename or mw.loadData("Module:headword/data").pagename
lang_hypernyms, hypernym_is_page = parse_term_with_delimiters {
term = args.hypernym,
paramname = "hypernym",
lang = lang,
sc = sc,
pagename = pagename,
-- Don't set notr= here; we still want to transliterate the hypernym if given
}
local formatted_hypernyms = require(columns_module).format_item(lang_hypernyms, {lang = lang}, "bold")
ins(": " .. formatted_hypernyms)
end
if args.appendix then
local appendices = require(parse_interface_module).split_on_comma(args.appendix)
for i, appendix in ipairs(appendices) do
if not appendix:find("%[%[") then
appendices[i] = ("[[%s|appendix]]"):format(appendix)
end
end
ins((" (<small>%s</small>)"):format(table.concat(appendices, ", ")))
end
title = table.concat(titleparts)
end
if not args.horiz and not topic_list_data.suppress_edit_button then
-- append edit button to title
local edit_link = html("span")
:addClass("list-switcher-edit")
:wikitext("[[Special:Edit/" .. topic_list_data.topic_list_template .. "|edit]]")
title = title .. tostring(edit_link)
end
if cats and not nocat and not hypernym_is_page then
formatted_cats = require(utilities_module).format_categories(cats, lang, nil, user_args.sortbase, force_cat)
end
return title, formatted_cats
end
--[==[
This implements topic lists. A given topic list template must directly invoke this function rather than
going through a wrapping template. A sample template implementation (e.g. for {{tl|list:continents/sw}}) is
{
{{#invoke:topic list|show|sw
|hypernym=[[bara|mabara]]
|Afrika<t:Africa>
|Antaktika~Antaktiki<t:Antarctica>
|Asia<t:Asia>
|Ulaya,Uropa<t:Europe>
|Amerika ya Kaskazini<t:North America>
|Amerika ya Kusini<t:South America>
|Australia<t:Australia>
}}
}
The syntax of the params is largely the same as for {{tl|col}}, but the following additional params supported:
* {{para|cat}}: Comma-separated list of categories to add the page to. The categories should specify bare topic
categories without the preceding language code, e.g. `Islamic calendar months` for a category
`LANGCODE:Islamic calendar months`. If you need to specify a different type of category, prefix the full category name
with `Category:`. There must not be any spaces after the comma delimiter for it to be recognized as such. By default,
the category comes from the template name, minus the initial `list:` and anything starting with a slash, and with the
first letter capitalized; but only if the top-level language-agnostic category exists. Hence a template like
{{tl|list:prefectures of Japan/ja}} will automatically categorize into [[:Category:ja:Prefectures of Japan]] (and
likewise {{tl|list:prefectures of Japan/sq}} will still categorize into [[:Category:sq:Prefectures of Japan]] whether
or not it exists, because the top-level [[:Category:Prefectures of Japan]] exists), but a template like
{{tl|list:human anatomy direction adjectives/en}} will not categorize anywhere by default because there is no
top-level [[:Category:Human anatomy direction adjectives]]. Use {{para|cat|-}} to disable categorization. Note that no
categorization takes place if {{para|nocat|1}} is specified in the invocation of the list template or if the page is
the same as any of the pages linked to by the language-specific hypernym(s) given in {{para|hypernym}}.
* {{para|hypernym}}: The language-specific plural form of the hypernym category (e.g. in the above example, the word for
"continents" in Swahili). Generally this should be linked to the corresponding singular, if they are different. If
specified, it is displayed after the English hypernym, following a colon. This parameter can be omitted to not display
a hypernym, and you can also specify multiple comma-separated or tilde-separated hypernyms with inline modifiers
attached to each one (essentially, following the format of a given item in {{tl|col}}).
* {{para|enhypernym}}: The English-language hypernym, e.g. `continents` in the above example. If omitted, this is
derived from the template name by chopping off the initial `list:` and anything starting with a slash. This will be
hyperlinked to the first category that the page categorizes into, if such a category exists.
* {{para|appendix}}: One or more comma-separated appendices to display after the hypernym, in parens. The appendix
should be a full pagename including the namespace `Appendix:`, or a two-part link giving a pagename and display form.
If a link is not specified, the display form will be `appendix`.
* {{para|pagename}}: Override the pagename, which should normally be a template of the form
`Template:list:<var>list name</var>/<var>langcode</var>` or
`Template:list:<var>list name</var>/<var>langcode</var>/<var>variant</var>`. The list name and language code are
parsed out of the pagename and used as the default title and language, and various other defaults are set based on the
list name.
]==]
function export.show(frame)
local raw_item_args = frame.args
local frame_parent = frame:getParent()
local raw_user_args = frame_parent.args
local topic_list_template = raw_item_args.pagename or frame_parent:getTitle()
local user_args = parse_topic_list_user_args(raw_user_args)
local list_name, lang, variant, default_props = analyze_template_name(topic_list_template)
return require(columns_module).handle_display_from_or_topic_list(
{minrows = 2, sort = true, collapse = true, lang = lang}, raw_item_args, {
topic_list_template = topic_list_template,
list_name = list_name,
variant = variant,
set_default_arguments = function(args)
set_default_arguments(args, default_props)
end,
get_title_and_formatted_cats = get_title_and_formatted_cats,
add_topic_list_params = add_topic_list_params,
make_horiz_edit_button = make_horiz_edit_button,
user_args = user_args,
}
)
end
function export.parse_directions_and_draw_compass(args, lang, sc, notr)
local m_columns = require(columns_module)
local function parse_and_format_direction(paramname)
if not args[paramname] then
return ""
end
local terms = parse_term_with_delimiters {
term = args[paramname],
paramname = paramname,
lang = lang,
sc = sc,
comma_delim = "<br />",
notr = notr,
}
return m_columns.format_item(terms, {lang = lang})
end
local parts = {}
local function ins(txt)
table.insert(parts, txt)
end
ins('{| frame=void border=0 rules=none style="background:var(--wikt-palette-paleblue, #f9f9f9);"')
ins('\n| style="text-align: left" | ')
ins(parse_and_format_direction("nw"))
ins('\n| style="text-align: center" | ')
ins(parse_and_format_direction("n"))
ins('\n| style="text-align: right" | ')
ins(parse_and_format_direction("ne"))
ins("\n|-")
ins('\n| style="text-align: left" | ')
ins(parse_and_format_direction("w"))
ins("\n| [[File:Compass rose simple plain.svg|upright=0.31]] ")
ins('\n| style="text-align: right" | ')
ins(parse_and_format_direction("e"))
ins("\n|-")
ins('\n| style="text-align: left" | ')
ins(parse_and_format_direction("sw"))
ins('\n| style="text-align: center" | ')
ins(parse_and_format_direction("s"))
ins('\n| style="text-align: right" | ')
ins(parse_and_format_direction("se"))
ins("\n|}")
return table.concat(parts)
end
function export.compass_plain(frame)
local parent_args = frame:getParent().args
local params = {
[1] = {type = "language"},
["sc"] = {type = "script"},
["notr"] = boolean,
["n"] = {},
["s"] = {},
["e"] = {},
["w"] = {},
["ne"] = {},
["nw"] = {},
["se"] = {},
["sw"] = {},
}
local args = require(parameters_module).process(parent_args, params)
return export.parse_directions_and_draw_compass(args, args[1], args.sc, args.notr)
end
function export.compass(frame)
local raw_item_args = frame.args
local frame_parent = frame:getParent()
local raw_user_args = frame_parent.args
local topic_list_template = raw_item_args.pagename or frame_parent:getTitle()
local user_args = parse_topic_list_user_args(raw_user_args)
local list_name, lang, variant, default_props = analyze_template_name(topic_list_template)
local params = {
["lang"] = {type = "language"},
["sc"] = {type = "script"},
["notr"] = boolean,
["title"] = {},
["n"] = {},
["s"] = {},
["e"] = {},
["w"] = {},
["ne"] = {},
["nw"] = {},
["se"] = {},
["sw"] = {},
}
add_topic_list_params(params)
local args = require(parameters_module).process(raw_item_args, params)
set_default_arguments(args, default_props)
local title, formatted_cats = get_title_and_formatted_cats(args, args.lang or lang, sc, {
topic_list_template = topic_list_template,
list_name = list_name,
variant = variant,
user_args = user_args,
suppress_edit_button = true,
})
local m_columns = require(columns_module)
local parts = {}
local function ins(txt)
table.insert(parts, txt)
end
ins(m_columns.construct_old_style_header(title, "horiz"))
ins(make_horiz_edit_button(topic_list_template))
ins("\n")
ins(export.parse_directions_and_draw_compass(args, args.lang or lang, sc, args.notr))
return table.concat(parts) .. (formatted_cats or "")
end
return export
m5el4na0x4zs4f7661kozu1h3p0amce
Kategorya:Bahasa Sūg na padron
14
34978
176061
168464
2026-04-09T05:27:34Z
Yivan000
4078
Inilipat ni Yivan000 ang pahinang [[Kategorya:Bahasa Sug na padron]] sa [[Kategorya:Bahasa Sūg na padron]] nang walang iniwang redirect
168464
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Padron:hi-proper noun
10
35003
176051
168552
2026-04-09T05:05:41Z
Yivan000
4078
enwikt parity
176051
wikitext
text/x-wiki
{{#invoke:inc-headword|show|proper nouns|lang=hi}}<!--
--><noinclude>{{documentation}}</noinclude>
fm0hyrayszx595s2t8zlwhctflvdcn2
Module:inc-headword
828
35005
176048
168553
2026-04-09T05:03:39Z
Yivan000
4078
Inilipat ni Yivan000 ang pahinang [[Module:hi-pa-headword]] sa [[Module:inc-headword]]: enwikt parity
168553
Scribunto
text/plain
-- Common code between [[Module:hi-headword]] and [[Module:pa-headword]].
local export = {}
local m_links = require("Module:links")
export.pos_functions = {}
local rfind = mw.ustring.find
local rmatch = mw.ustring.match
local rsplit = mw.text.split
local function glossary_link(anchor, text)
text = text or anchor
return "[[Appendix:Glossary#" .. anchor .. "|" .. text .. "]]"
end
local function process_genders(data, genders)
for _, g in ipairs(genders) do
if g == "m" or g == "f" or g == "m-p" or g == "f-p" or g == "mf" or g == "mf-p" or g == "mfbysense" or g == "mfbysense-p" or g == "?" then
table.insert(data.genders, g)
else
error("Invalid gender: " .. (g or "(nil)"))
end
end
end
export.pos_functions["pang-uri"] = { --TLCHANGE adjectives
params = {
["comparative"] = {},
["superlative"] = {},
[1] = {alias_of = "comparative"},
[2] = {alias_of = "superlative"},
["f"] = {list = true},
["m"] = {list = true},
["ind"] = {type = "boolean"},
},
func = function(args, data)
if args["ind"] then
table.insert(data.inflections, {label = glossary_link("indeclinable")})
table.insert(data.categories, data.langname .. " indeclinable adjectives")
end
if args["comparative"] then
table.insert(data.inflections, {label = "comparative", args["comparative"]})
end
if args["superlative"] then
table.insert(data.inflections, {label = "superlative", args["superlative"]})
end
if #args["m"] > 0 then
args["m"].label = "masculine"
table.insert(data.inflections, args["m"])
end
if #args["f"] > 0 then
args["f"].label = "feminine"
table.insert(data.inflections, args["f"])
end
end,
}
export.pos_functions.ordinals = {
params = {
["f"] = {list = true},
["m"] = {list = true},
["ind"] = {type = "boolean"},
},
func = function(args, data)
data.pos_category = "adjectives"
table.insert(data.categories, data.langname .. " numerals")
if args["ind"] then
table.insert(data.inflections, {label = glossary_link("indeclinable")})
table.insert(data.categories, data.langname .. " indeclinable numerals")
end
if #args["m"] > 0 then
args["m"].label = "masculine"
table.insert(data.inflections, args["m"])
end
if #args["f"] > 0 then
args["f"].label = "feminine"
table.insert(data.inflections, args["f"])
end
end,
}
export.pos_functions.cardinals = {
params = {
["g"] = {list = true},
["sym"] = {list = true},
},
func = function(args, data)
data.pos_category = "numerals"
process_genders(data, args["g"])
if #args["sym"] > 0 then
args["sym"].label = "native script symbol"
table.insert(data.inflections, args["sym"])
end
end,
}
local function nouns(plpos)
return {
params = {
["g"] = {list = true, default = "?"},
["pl"] = {list = true},
["f"] = {list = true},
["m"] = {list = true},
["ind"] = {type = "boolean"},
},
func = function(args, data)
process_genders(data, args["g"])
if args["ind"] then
if #args["pl"] > 0 then
error("Can't specify both ind= and pl=")
end
table.insert(data.inflections, {label = glossary_link("indeclinable")})
table.insert(data.categories, data.langname .. " indeclinable " .. plpos)
elseif #args["pl"] > 0 then
args["pl"].label = "plural"
table.insert(data.inflections, args["pl"])
end
if #args["m"] > 0 then
args["m"].label = "masculine"
table.insert(data.inflections, args["m"])
end
if #args["f"] > 0 then
args["f"].label = "feminine"
table.insert(data.inflections, args["f"])
end
if #args["m"] > 0 or #args["f"] > 0 then
table.insert(data.categories, data.langname .. " " .. plpos .. " with other-gender equivalents")
end
end,
}
end
export.pos_functions["pangngalan"] = nouns("nouns") --TLCHANGE nouns
export.pos_functions["pangngalang pantangi"] = nouns("proper nouns") --TLCHANGE proper nouns
export.pos_functions["panghalip"] = { --TLCHANGE pronouns
params = {
["g"] = {list = true},
},
func = function(args, data)
process_genders(data, args["g"])
end,
}
export.pos_functions["pandiwa"] = { --TLCHANGE verbs
params = {
[1] = {},
["g"] = {list = true},
},
func = function(args, data)
data.genders = args["g"]
if args[1] then
local label, cat
if args[1] == "t" then
label = "transitive"
table.insert(data.categories, data.langname .. " transitive verbs")
elseif args[1] == "i" then
label = "intransitive"
table.insert(data.categories, data.langname .. " intransitive verbs")
elseif args[1] == "d" then
label = "ditransitive"
table.insert(data.categories, data.langname .. " ditransitive verbs")
elseif args[1] == "it" or args[1] == "ti" then
label = "ambitransitive"
table.insert(data.categories, data.langname .. " transitive verbs")
table.insert(data.categories, data.langname .. " intransitive verbs")
else
error("Unrecognized param 1=" .. args[1] .. ": Should be 'i' = intransitive, 't' = transitive, or 'it'/'ti' = ambitransitive")
end
table.insert(data.inflections, {label = glossary_link(label)})
end
local head = data.heads[1]
if head:find(" ") then
local base_verb = m_links.remove_links(head):gsub("^.* ", "")
table.insert(data.categories, data.langname .. " compound verbs formed with " .. base_verb)
end
end,
}
local function pos_with_gender()
return {
params = {
["g"] = {list = true},
},
func = function(args, data)
data.genders = args["g"]
end,
}
end
export.pos_functions.numerals = pos_with_gender()
export.pos_functions["hulapi"] = pos_with_gender() --TLCHANGE suffixes
export.pos_functions["adjective forms"] = pos_with_gender()
export.pos_functions["noun forms"] = pos_with_gender()
export.pos_functions["pronoun forms"] = pos_with_gender()
export.pos_functions["determiner forms"] = pos_with_gender()
export.pos_functions["anyong pandiwa"] = pos_with_gender() --TLCHANGE verb forms
export.pos_functions["postposition forms"] = pos_with_gender()
return export
dojf00aamuyqikpmx3r7bdytnzlrhpz
176050
176048
2026-04-09T05:05:05Z
Yivan000
4078
enwikt parity
176050
Scribunto
text/plain
-- Support for Hindi, Punjabi, Urdu, Palula, Kohistani Shina headword templates; eventually will support other Indic languages, such as
-- Marathi, Gujarati, Bengali, Assamese, etc.
local export = {}
local pos_functions = {}
local force_cat = false -- for testing; if true, categories appear in non-mainspace pages
local require_when_needed = require("Module:utilities/require when needed")
local m_links = require("Module:links")
local m_table = require("Module:table")
local list_to_set = m_table.listToSet
local rsplit = mw.text.split
local uupper = mw.ustring.upper
local ulower = mw.ustring.lower
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local en_utilities_module = "Module:en-utilities"
local headword_module = "Module:headword"
local headword_utilities_module = "Module:headword utilities"
local languages_module = "Module:languages"
local parse_interface_module = "Module:parse interface"
local scripts_module = "Module:scripts"
local ur_hi_convert_module = "Module:ur-hi-convert"
local m_en_utilities = require_when_needed(en_utilities_module)
local m_headword_utilities = require_when_needed(headword_utilities_module)
local glossary_link = require_when_needed(headword_utilities_module, "glossary_link")
local boolean_param = {type = "boolean"}
local list_param = {list = true, disallow_holes = true}
local gender_param = {type = "genders"}
local gender_param_with_default = {type = "genders", default = "?"}
local insert = table.insert
local concat = table.concat
local rfind = mw.ustring.find
local rmatch = mw.ustring.match
local rsplit = mw.text.split
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local misc_pos_with_gender = list_to_set {
"numerals",
"suffixes",
"adjective forms",
"noun forms",
"proper noun forms",
"pronoun forms",
"determiner forms",
"verb forms",
"postposition forms",
}
local function generate_hindis_from_urdu_heads(headobjs)
local hindis = {}
for _, headobj in ipairs(headobjs) do
local hindiobj = m_table.shallowCopy(headobj)
hindiobj.term = require(ur_hi_convert_module).tr(m_links.remove_links(headobj.term))
hindiobj.tr = nil
insert(hindis, hindiobj)
end
return hindis
end
local function generate_gur_from_shah_heads(headobjs)
local gurus = {}
for _, headobj in ipairs(headobjs) do
local guruobj = m_table.shallowCopy(headobj)
guruobj.term = require(pa-Arab-Guru_module).tr(m_links.remove_links(headobj.term))
guruobj.tr = nil
insert(gurus, guruobj)
end
return gurus
end
local langs_supported = {
["hi"] = {
other_langs_scripts = {
{"ur", "ur", "ur-Arab", "Urdu"},
},
},
["pa"] = {
other_langs_scripts = {
{"gur", "pa", "Guru", "Gurmukhi"},
{"sha", "pa", "pa-Arab", "Shahmukhi"},
},
sccat = true,
},
["ur"] = {
other_langs_scripts = {
{"hi", "hi", "Deva", "Hindi", generate_hindis_from_urdu_heads},
},
enable_auto_translit = true,
},
["phl"] = {
other_langs_scripts = {
{"pa", "phl", "Arab", "Perso-Arabic"},
{"lat", "phl", "Latn", "Latin"},
},
sccat = true,
},
["plk"] = {
other_langs_scripts = {
{"pa", "plk", "Arab", "Perso-Arabic"},
{"lat", "plk", "Latn", "Latin"},
},
sccat = true,
}
}
----------------------------------------------- Utilities --------------------------------------------
local function split_on_comma(val)
if val:find(",") then
return require(parse_interface_module).split_on_comma(val)
else
return {val}
end
end
local function ine(val)
if val == "" then return nil else return val end
end
local function track(page)
require("Module:debug").track("hi-pa-headword/" .. page)
return true
end
local function validate_genders(data, genders)
data.genders = genders
if not genders then
return
end
for _, gspec in ipairs(genders) do
local g = gspec.spec
if g == "m" or g == "f" or
g == "m-p" or g == "f-p" or
g == "mf" or g == "mf-p" or
g == "mfbysense" or g == "mfbysense-p" or
g == "mfequiv" or g == "mfequiv-p" or
g == "?" then
else
error("Invalid gender: " .. g)
end
end
end
-- Parse an inflection. The raw arguments come from `args[field]`, which is parsed for inline modifiers. Multiple
-- comma-separated values are allowed.
local function parse_inflection(data, args, field, is_head, no_include_tr, is_single_param)
local argfield = field
if type(argfield) == "table" then
argfield = argfield[1]
end
if is_single_param then
local retval
if args[argfield] then
retval = m_headword_utilities.parse_term_with_modifiers {
val = args[argfield],
paramname = field,
splitchar = ",",
is_head = is_head,
include_mods = not no_include_tr and {"tr"} or nil,
}
end
return retval or {}
else
return m_headword_utilities.parse_term_list_with_modifiers {
forms = args[argfield],
paramname = field,
splitchar = ",",
is_head = is_head,
include_mods = not no_include_tr and {"tr"} or nil,
}
end
end
-- Parse and insert an inflection not requiring additional processing into `data.inflections`. The raw arguments come
-- from `args[field]`, which is parsed for inline modifiers. Multiple comma-separated values are allowed. `label` is the
-- label that the inflections are given; sections enclosed in <<...>> are linked to the glossary. `accel_form` is the
-- accelerator form, or nil. `enable_auto_translit` is set if requested by the language.
local function parse_and_insert_inflection(data, args, field, label, accel_form)
local terms = parse_inflection(data, args, field)
local accel_obj
if accel_form then
local lemmas = {}
local lemma_translits = {}
for i, headobj in ipairs(data.heads) do
lemmas[i] = headobj.term
lemma_translits[i] = headobj.tr
end
accel_obj = {
lemma = lemmas,
lemma_translit = lemma_translits,
form = accel_form,
}
end
m_headword_utilities.insert_inflection {
headdata = data,
terms = terms,
label = label,
accel = accel_obj,
enable_auto_translit = data.langprops.enable_auto_translit,
}
end
--[==[
Main entry point. Takes two params:
; {{para|lang|req=1}}
: The language code of the language of the headword template.
; {{para|1}}
: The part of speech, pluralized; omit for {{tl|hi-head}}, {{tl|pa-head}} and {{tl|ur-head}}.
]==]
function export.show(frame)
local iparams = {
[1] = true,
["lang"] = {required = true},
}
local iargs = require("Module:parameters").process(frame.args, iparams)
local parargs = frame:getParent().args
local poscat = iargs[1]
local langcode = iargs.lang
if not langs_supported[langcode] then
local langcodes_supported = {}
for lang, _ in pairs(langs_supported) do
insert(langcodes_supported, lang)
end
error("This module currently only works for lang=" .. concat(langcodes_supported, "/"))
end
local lang = require(languages_module).getByCode(langcode, true)
local langname = lang:getCanonicalName()
local pos_in_1 = not poscat
if pos_in_1 then
poscat = ine(parargs[1]) or
mw.title.getCurrentTitle().fullText == "Template:" .. langcode .. "-head" and "interjection" or
error("Part of speech must be specified in 1=")
poscat = require(headword_module).canonicalize_pos(poscat)
end
local indexing_poscat = pos_in_1 and (misc_pos_with_gender[poscat] and "head_with_gender" or "head") or poscat
local langprops = langs_supported[langcode]
local params = {
["head"] = true,
["head2"] = {replaced_by = false, instead = "use comma-separated |head="},
["tr"] = true,
["tr2"] = {replaced_by = false, instead = "use comma-separated |tr= or <tr:...> inline modifier on head"},
["id"] = true,
["sort"] = true,
["nolink"] = boolean_param,
["nolinkhead"] = {type = "boolean", alias_of = "nolink"},
["suffix"] = boolean_param,
["nosuffix"] = boolean_param,
["splithyphen"] = boolean_param,
["json"] = boolean_param,
["pagename"] = true, -- for testing
}
if pos_in_1 then
params[1] = {required = true} -- required but ignored as already processed above
end
for _, other_lang_script in ipairs(langprops.other_langs_scripts) do
local param, _, _, _ = unpack(other_lang_script)
params[param] = true
params[param .. "1"] = {replaced_by = false, instead = "use comma-separated items (with no space after the comma) in |" .. param .. "="}
params[param .. "2"] = {replaced_by = false, instead = "use comma-separated items (with no space after the comma) in |" .. param .. "="}
end
if pos_functions[indexing_poscat] then
for key, val in pairs(pos_functions[indexing_poscat].params) do
params[key] = val
end
end
local parargs = frame:getParent().args
local args = require("Module:parameters").process(parargs, params)
local pagename = args.pagename or mw.loadData("Module:headword/data").pagename
local data = {
lang = lang,
langname = langname,
langprops = langprops,
pos_category = poscat,
categories = {},
genders = {},
inflections = {},
pagename = pagename,
id = args.id,
sort_key = args.sort,
force_cat_output = force_cat,
-- We use our own splitting algorithm so the redundant head cat will be inaccurate.
no_redundant_head_cat = true,
sccat = langprops.sccat,
}
local trs = args.tr and split_on_comma(args.tr) or {}
local num_trs = #trs
local heads = args.head and parse_inflection(data, args, "head", "is_head", nil, "is_single_param") or {}
local user_specified_heads = heads
local num_heads = #heads
if num_heads > 0 and num_trs > 0 and num_heads ~= num_trs then
error(("%s head%s specified explicitly but %s translit%s; they must match; use '+' to stand for the default head (the pagename) or no manual translit"):format(
num_heads, num_heads > 1 and "s" or "", num_trs, num_trs > 1 and "s" or ""))
end
-- Be careful here not to overwrite user_specified_heads if it's empty so we can later check user_specified_heads
-- to see if the user provided any heads.
if num_heads == 0 and num_trs > 0 then
heads = {}
for i = 1, num_trs do
heads[i] = {term = "+"}
end
end
if not heads[1] then
heads = {{term = "+"}}
end
for i, headobj in ipairs(heads) do
if headobj.term == "+" then
headobj.term = args.nolink and pagename or m_headword_utilities.add_links_to_multiword_term(pagename,
{split_hyphen_when_space = args.splithyphen})
end
if headobj.tr and trs[i] then
if headobj.tr ~= trs[i] then
error(("Saw two different translits '%s' and '%s' for head #%s '%s'"):format(
headobj.tr, trs[i], i, headobj.term))
end
else
headobj.tr = headobj.tr or trs[i]
end
if headobj.tr == "+" then
headobj.tr = nil
end
end
data.heads = heads
data.is_suffix = false
if args.suffix or (
not args.nosuffix and pagename:find("^%-") and poscat ~= "suffixes" and poscat ~= "suffix forms"
) then
data.is_suffix = true
data.pos_category = "suffixes"
local singular_poscat = m_en_utilities.singularize(poscat)
insert(data.categories, langname .. " " .. singular_poscat .. "-forming suffixes")
insert(data.inflections, {label = singular_poscat .. "-forming suffix"})
end
if pos_functions[indexing_poscat] then
pos_functions[indexing_poscat].func(args, data)
end
for _, other_lang_script in ipairs(langprops.other_langs_scripts) do
local param, other_langcode, other_sccode, lang_script_label, generate_from_heads = unpack(other_lang_script)
local terms = parse_inflection(data, args, param, nil, "no_include_tr", "is_single_param") or {}
if not terms[1] and generate_from_heads then
terms = generate_from_heads(user_specified_heads)
end
if terms[1] then
local other_lang = require(languages_module).getByCode(other_langcode, true)
local other_sc = require(scripts_module).getByCode(other_sccode, true)
for _, termobj in ipairs(terms) do
termobj.lang = other_lang
termobj.sc = other_sc
end
m_headword_utilities.insert_inflection {
headdata = data,
terms = terms,
label = lang_script_label .. " spelling",
-- Don't set `enable_auto_translit` here, e.g. for Urdu.
}
end
end
if args.json then
return require("Module:JSON").toJSON(data)
end
return require(headword_module).full_headword(data)
end
pos_functions.adjectives = {
params = {
[1] = {list = "comp", disallow_holes = true},
[2] = {list = "sup", disallow_holes = true},
["f"] = list_param,
["ind"] = boolean_param,
},
func = function(args, data)
if args["ind"] then
insert(data.inflections, {label = glossary_link("indeclinable")})
insert(data.categories, data.langname .. " indeclinable adjectives")
end
parse_and_insert_inflection(data, args, {1, "comp"}, "<<comparative>>")
parse_and_insert_inflection(data, args, {2, "sup"}, "<<superlative>>")
parse_and_insert_inflection(data, args, "f", "feminine")
end,
}
pos_functions.ordinals = {
params = {
["f"] = list_param,
["ind"] = boolean_param,
},
func = function(args, data)
data.pos_category = "adjectives"
insert(data.categories, data.langname .. " numerals")
if args["ind"] then
insert(data.inflections, {label = glossary_link("indeclinable")})
insert(data.categories, data.langname .. " indeclinable numerals")
end
parse_and_insert_inflection(data, args, "f", "feminine")
end,
}
pos_functions.cardinals = {
params = {
[1] = gender_param,
["g"] = {replaced_by = 1},
["sym"] = list_param,
},
func = function(args, data)
data.pos_category = "numerals"
validate_genders(data, args[1])
parse_and_insert_inflection(data, args, "sym", "native script symbol")
end,
}
local function nouns(plpos)
return {
params = {
[1] = gender_param_with_default,
["g"] = {replaced_by = 1},
["pl"] = list_param,
["f"] = list_param,
["m"] = list_param,
["ind"] = boolean_param,
},
func = function(args, data)
validate_genders(data, args[1])
if args["ind"] then
if args["pl"][1] then
error("Can't specify both ind= and pl=")
end
insert(data.inflections, {label = glossary_link("indeclinable")})
insert(data.categories, data.langname .. " indeclinable " .. plpos)
else
parse_and_insert_inflection(data, args, "pl", "formal plural", "formal|p")
end
parse_and_insert_inflection(data, args, "m", "male equivalent", "m")
parse_and_insert_inflection(data, args, "f", "female equivalent", "f")
if args["m"][1] or args["f"][1] then
insert(data.categories, data.langname .. " " .. plpos .. " with other-gender equivalents")
end
end,
}
end
pos_functions.nouns = nouns("nouns")
pos_functions["proper nouns"] = nouns("proper nouns")
pos_functions.pronouns = {
params = {
[1] = gender_param,
["g"] = {replaced_by = 1},
},
func = function(args, data)
validate_genders(data, args[1])
end,
}
pos_functions.verbs = {
params = {
[1] = true,
},
func = function(args, data)
if args[1] then
local label, cat
if args[1] == "t" then
label = "transitive"
insert(data.categories, data.langname .. " transitive verbs")
elseif args[1] == "i" then
label = "intransitive"
insert(data.categories, data.langname .. " intransitive verbs")
elseif args[1] == "d" then
label = "ditransitive"
insert(data.categories, data.langname .. " ditransitive verbs")
elseif args[1] == "it" or args[1] == "ti" or args[1] == "a" then
label = "ambitransitive"
insert(data.categories, data.langname .. " ambitransitive verbs")
insert(data.categories, data.langname .. " transitive verbs")
insert(data.categories, data.langname .. " intransitive verbs")
elseif args[1] == "tp" then -- only in Palula
label = "transitive"
insert(data.categories, data.langname .. " transitive verbs")
insert(data.categories, data.langname .. " passive verbs")
insert(data.inflections, {label = glossary_link("passive")})
else
error("Unrecognized param 1=" .. args[1] .. ": Should be 'i' = intransitive, 't' = transitive, 'd' = ditransitive or 'it'/'ti'/'a' = ambitransitive")
end
insert(data.inflections, {label = glossary_link(label)})
end
if data.pagename:find(" ") then
local base_verb = m_links.remove_links(data.pagename):gsub("^.* ", "")
insert(data.categories, data.langname .. " compound verbs formed with " .. base_verb)
end
end,
}
pos_functions.head_with_gender = {
params = {
[2] = gender_param,
},
func = function(args, data)
validate_genders(data, args[2])
end,
}
local pos_prelude = {
["head"] =
"This template should be used to generate the headword line for LANG terms whose part of speech does not have an associated specialized template. The current specialized templates are " ..
"{{tl|CODE-noun}}, {{tl|CODE-proper noun}}, {{tl|CODE-pron}} (pronouns), {{tl|CODE-verb}}, {{tl|CODE-adj}} (adjectives), {{tl|CODE-adv}} (adverbs), {{tl|CODE-num-card}} (cardinal numbers/numerals) and "..
"{{tl|CODE-num-ord}} (ordinal numbers/numerals). All others should use {{tl|CODE-head}}.",
}
local noun_addl_params = [=[
;{{para|pl}}
: Formal or irregular plural(s). Intended particularly for Arabic and Persian-origin plurals. Separate multiple items with a comma (not followed by a space). Per-item inline modifiers are supported.
;{{para|f}}
: Female equivalent(s), for a noun referring to a male person or animal. Separate multiple items with a comma (not followed by a space). Per-item inline modifiers are supported.
;{{para|m}}
: Male equivalent(s), for a noun referring to a female person or animal. Separate multiple items with a comma (not followed by a space). Per-item inline modifiers are supported.
;{{para|ind|1}}
: Specify that the noun is indeclinable.
]=]
local pos_addl_params = {
["nouns"] = noun_addl_params,
["proper nouns"] = noun_addl_params,
["verbs"] = [=[
;{{para|1}}
: Verb type. One of {{cd|t}} (transitive), {{cd|i}} (intransitive), {{cd|d}} (ditransitive) or {{cd|it}}/{{cd|ti}}/{{cd|a}} (ambitransitive).
]=],
["adjectives"] = [=[
;{{para|1}}
: Comparative form(s). Separate multiple items with a comma (not followed by a space). Per-item inline modifiers are supported.
;{{para|2}}
: Superlative form(s). Separate multiple items with a comma (not followed by a space). Per-item inline modifiers are supported.
;{{para|ind|1}}
: Specify that the adjective is indeclinable.
;{{para|f}}
: Feminine form(s) of an adjective with irregular feminine forms.
]=],
["cardinals"] = [=[
;{{para|sym}}
: Native script symbol(s) for this numeral. Separate multiple items with a comma (not followed by a space). Per-item inline modifiers are supported.
]=],
["ordinals"] = [=[
;{{para|ind|1}}
: Specify that the ordinal is indeclinable.
;{{para|f}}
: Feminine form(s) of an ordinal adjective with irregular feminine forms.
]=],
["head"] = [=[
;{{para|1|req=1}}
: Part of speech. Can be singular or plural and can be abbreviated (e.g. {{cd|n}} for noun; {{cd|nounf}} or {{cd|nf}} for noun form; {{cd|interj}} or {{cd|intj}} for interjection; {{cd|pcl}} for particle; {{cd|phr}} for phrase; etc.). The recognized abbreviations are listed in [[Template:head#Part of speech]] and are the same abbreviations that can be specified in the part-of-speech parameter to {{tl|head}}.
;{{para|2}}
: Gender(s). Specifying a gender is always optional and is only allowed for certain parts of speech where it makes sense to specify a gender (currently this includes numerals, suffixes, adjective forms, noun forms, proper noun forms, pronoun forms, determiner forms, verb forms and postposition forms). Possible values are {{cd|m}}, {{cd|f}}, {{cd|m-p}}, {{cd|f-p}}, {{cd|mf}} (can be either masculine or feminine), {{cd|mf-p}} (plural-only, can be either masculine or feminine), {{cd|mfbysense}} (can be either masculine or feminine, depending on the natural gender of the person or animal being referred to), {{cd|mfbysense-p}} (plural-only, can be either masculine or feminine, depending on the natural gender of the person or animal being referred to). Separate multiple items with a comma (not followed by a space). Per-item inline modifiers are supported.
]=],
}
local pos_has_gender = {
["nouns"] = true,
["proper nouns"] = true,
["pronouns"] = true,
["cardinals"] = true,
}
--[==[
Documentation generation function, used to populate the documentation describing all parameters of all headword-line templates. Supports the following parameters:
; {{para|lang|req=1}}
: The language code of the language of the headword template being documented.
; {{para|pos|req=1}}
: The plural part of speech of the headword template being documented. Use {{cd|head}} for {{tl|hi-head}}/{{tl|pa-head}}/{{tl|ur-head}}/etc.
]==]
function export.doctext(frame)
local iparams = {
["lang"] = {required = true, type = "language"},
["pos"] = {required = true},
}
local iargs = require("Module:parameters").process(frame.args, iparams)
local langcode = iargs.lang:getCode()
if not langs_supported[langcode] then
local langcodes_supported = {}
for lang, _ in pairs(langs_supported) do
insert(langcodes_supported, lang)
end
error("This module currently only works for lang=" .. concat(langcodes_supported, "/"))
end
local other_lang_script_equivs = langcode == "hi" and [=[
;{{para|ur}}
: Urdu equivalent(s). Separate multiple items with a comma (not followed by a space). Per-item inline modifiers are supported.
]=] or langcode == "ur" and [=[
;{{para|hi}}
: Hindi equivalent(s). Separate multiple items with a comma (not followed by a space). Per-item inline modifiers are supported.
]=] or langcode == "pa" and [=[
;{{para|gur}}
: Gurmukhi equivalent(s) of a Shahmukhi term. Separate multiple items with a comma (not followed by a space). Per-item inline modifiers are supported.
;{{para|sha}}
: Shahmukhi equivalent(s) of a Gurmukhi term. Separate multiple items with a comma (not followed by a space). Per-item inline modifiers are supported.
]=] or (langcode == "phl" or langcode == "plk") and [=[
;{{para|pa}}
: Perso-Arabic spelling(s) of the term. Separate multiple items with a comma (not followed by a space). Per-item inline modifiers are supported.
;{{para|lat}}
: Latin spelling(s) of the term. Separate multiple items with a comma (not followed by a space). Per-item inline modifiers are supported.
]=] or ""
local prelude = (pos_prelude[iargs.pos] or "This template should be used to generate the headword line for LANG POS.")
:gsub("LANG", iargs.lang:getCanonicalName())
:gsub("CODE", iargs.lang:getCode())
:gsub("POS", iargs.pos)
local g_text = [=[
;{{para|1}}
: Gender(s). Possible values are {{cd|m}}, {{cd|f}}, {{cd|m-p}}, {{cd|f-p}}, {{cd|mf}} (can be either masculine or feminine), {{cd|mf-p}} (plural-only, can be either masculine or feminine), {{cd|mfbysense}} (can be either masculine or feminine, depending on the natural gender of the person or animal being referred to), {{cd|mfbysense-p}} (plural-only, can be either masculine or feminine, depending on the natural gender of the person or animal being referred to). Separate multiple items with a comma (not followed by a space). Per-item inline modifiers are supported.
]=]
local includeg = pos_has_gender[iargs.pos]
local addl_params = pos_addl_params[iargs.pos] or ""
local text = prelude .. [=[
==Parameters==
The following parameters are supported:
]=] .. (includeg and g_text or "") .. addl_params .. [=[
;{{para|head}}
: Explicitly specified headword(s), for ]=] .. (langcode == "pa" and "adding vowel diacritics to Shahmukhi terms or " or langcode == "ur" and "adding vowel diacritics or " or "") ..
"introducing links in multiword expressions. Separate multiple items with a comma (not followed by a space). " ..
"Per-item inline modifiers are supported. Use {{cd|+}} to request the default linking algorithm (equivalent to omitting the value if there's only one value). " ..
"Note that by default each word of a multiword lemma is linked" .. (langcode == "ur" and "." or ", so you only need to use this " ..
(langcode == "pa" and "for Gurmukhi terms " or "") ..
"when the default links don't suffice (e.g. the multiword expression consists of non-lemma forms, which need to be linked to their lemmas).") .. "\n" .. [=[
;{{para|tr}}
: Manual transliteration(s), in case the automatic transliteration is incorrect. Separate multiple items with a comma (not followed by a space), ]=] ..
[=[and use {{cd|+}} to stand for the default automatic translation (equivalent to omitting the value if there's only one value). ]=] ..
[=[If {{para|head}} is used, there should be the same number of transliterations as head values, or an error will occur.
]=] .. other_lang_script_equivs .. [=[
;{{para|nolink|1}}, {{para|nolinkhead|1}}
: Don't link the individual words in a multiword expression.
;{{para|suffix|1}}
: Specify that the term is a suffix. Not needed if the term begins with a hyphen.
;{{para|nosuffix|1}}
: Specify that a term beginning with a hyphen is not a suffix.
;{{para|id}}
: Sense ID, for linking to this particular headword when there is more than one. See {{tl|senseid}} for more information.
; {{para|splithyph|1}}
: Indicate that automatic splitting and linking of words should split on hyphens in multiword expressions with spaces in them. Normally splitting on hyphens only occurs in terms without spaces.
; {{para|pagename}}
: Override the page name used to compute default values of various sorts. Useful when testing, for documentation pages, etc.
; {{para|sort}}
: Sort key. Rarely needs to be specified, as it is normally automatically generated.
; {{para|json|1}}
: Output the headword data in JSON form instead of the normal output. For use by bots.
]=]
local after_params_text =[=[
==Inline modifiers==
All params above that allow for multiple comma-separated values (except for {{para|tr}}) support ''inline modifiers'', e.g. {{para|pl|रायज़,फ़राइज़<l:rare>}} to attach a label ''rare'' to the second plural. The following modifiers are recognized:
* {{cd|tr}}: manual translit; cannot be specified for genders as it doesn't make sense to do so
* {{cd|q}}: qualifier, e.g. {{cd|<q:in the plural>}} or {{cd|<q:when referring to a card game>}}; this appears *BEFORE* the term, parenthesized and italicized
* {{cd|qq}}: qualifier, e.g. {{cd|<qq:in the plural>}} or {{cd|<qq:when referring to a card game>}}; this appears *AFTER* the term, parenthesized and italicized
* {{cd|l}}: comma-separated list of labels, e.g. {{cd|<l:rare>}} or {{cd|<l:dated,or,literary>}}; this appears *BEFORE* the term, parenthesized and italicized
* {{cd|ll}}: comma-separated list of labels, e.g. {{cd|<ll:rare>}} or {{cd|<ll:dated,or,literary>}}; this appears *AFTER* the term, parenthesized and italicized
* {{cd|ref}}: one or more references, in the format documented in [[Module:references]] and {{tl|IPA}}
* {{cd|id}}: sense ID; see {{temp|senseid}}; cannot be specified for headwords or genders as it doesn't make sense to do so
==Suffix handling==
If the term begins with a hyphen ({{cd|-}}), it is assumed to be a suffix rather than a base form, and is categorized into [[:Category:LANG suffixes]] and [[:Category:LANG POS-forming suffixes]] rather than [[:Category:LANG POSs]] (e.g. [[:Category:LANG noun-forming suffixes]] rather than [[:Category:LANG nouns]]). This can be overridden using {{para|nosuffix|1}}.
]=]
after_params_text = after_params_text:gsub("LANG", iargs.lang:getCanonicalName())
text = text .. after_params_text
-- Remove final newline so template code can add a newline after invocation
text = text:gsub("\n$", "")
return mw.getCurrentFrame():preprocess(text)
end
return export
h4p6nlx44kmdjyegwnb2s98ro43rwny
Kategorya:Bahasa Sūg na padrong pansangguni
14
36840
176060
172676
2026-04-09T05:27:11Z
Yivan000
4078
Inilipat ni Yivan000 ang pahinang [[Kategorya:Bahasa Sug na padrong pansangguni]] sa [[Kategorya:Bahasa Sūg na padrong pansangguni]] nang walang iniwang redirect
171881
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Padron:past participle of
10
36998
176071
172863
2026-04-09T06:07:51Z
Yivan000
4078
176071
wikitext
text/x-wiki
{{ {{#if:{{{lang|}}}|check deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{#invoke:form of/templates|tagged_form_of_t|past|ptcp|cat=na pandiwaring pangnagdaan|ignore=nocat}}<!--
-->}}<!--
--><noinclude>{{documentation}}</noinclude>
j7pm3wa2w5y0tq7i2wuyrlmwcivy6le
176072
176071
2026-04-09T06:08:08Z
Yivan000
4078
176072
wikitext
text/x-wiki
{{ {{#if:{{{lang|}}}|check deprecated lang param usage|no deprecated lang param usage}}|lang={{{lang|}}}|<!--
-->{{#invoke:form of/templates|tagged_form_of_t|past|ptcp|cat=na pandiwaring pangnagdaan|ignore=nocat}}<!-- TLCHANGE
-->}}<!--
--><noinclude>{{documentation}}</noinclude>
8p1mtw6205nypqxvvvt352z49eovh36
Module:ca-headword
828
37207
176070
173734
2026-04-09T05:59:52Z
Yivan000
4078
enwikt parity
176070
Scribunto
text/plain
local export = {}
local pos_functions = {}
local force_cat = false -- for testing; if true, categories appear in non-mainspace pages
local require_when_needed = require("Module:utilities/require when needed")
local m_table = require("Module:table")
local com = require("Module:ca-common")
local ca_IPA_module = "Module:ca-IPA"
local ca_verb_module = "Module:ca-verb"
local en_utilities_module = "Module:en-utilities"
local headword_utilities_module = "Module:headword utilities"
local inflection_utilities_module = "Module:inflection utilities"
local parse_utilities_module = "Module:parse utilities"
local romut_module = "Module:romance utilities"
local m_en_utilities = require_when_needed(en_utilities_module)
local m_headword_utilities = require_when_needed(headword_utilities_module)
local m_string_utilities = require_when_needed("Module:string utilities")
local glossary_link = require_when_needed(headword_utilities_module, "glossary_link")
local lang = require("Module:languages").getByCode("ca")
local langname = lang:getCanonicalName()
local list_to_text = mw.text.listToText
local insert = table.insert
local concat = table.concat
local rfind = m_string_utilities.find
local rmatch = m_string_utilities.match
local rsplit = m_string_utilities.split
local usub = m_string_utilities.sub
local rsub = com.rsub
local function track(page)
require("Module:debug/track")("ca-headword/" .. page)
return true
end
local list_param = {list = true, disallow_holes = true}
local boolean_param = {type = "boolean"}
-----------------------------------------------------------------------------------------
-- Main entry point --
-----------------------------------------------------------------------------------------
-- The main entry point.
-- This is the only function that can be invoked from a template.
function export.show(frame)
local poscat = frame.args[1] or error("Part of speech has not been specified. Please pass parameter 1 to the module invocation.")
local params = {
["head"] = list_param,
["id"] = true,
["splithyph"] = boolean_param,
["nolinkhead"] = boolean_param,
["json"] = boolean_param,
["pagename"] = true, -- for testing
}
if pos_functions[poscat] then
for key, val in pairs(pos_functions[poscat].params) do
params[key] = val
end
end
local args = require("Module:parameters").process(frame:getParent().args, params)
local pagename = args.pagename or mw.loadData("Module:headword/data").pagename
local user_specified_heads = args.head
local heads = user_specified_heads
if args.nolinkhead then
if #heads == 0 then
heads = {pagename}
end
else
local romut = require(romut_module)
local auto_linked_head = romut.add_links_to_multiword_term(pagename, args.splithyph)
if #heads == 0 then
heads = {auto_linked_head}
else
for i, head in ipairs(heads) do
if head:find("^~") then
head = romut.apply_link_modifiers(auto_linked_head, usub(head, 2))
heads[i] = head
end
if head == auto_linked_head then
track("redundant-head")
end
end
end
end
local data = {
lang = lang,
pos_category = pos_functions[poscat] and pos_functions[poscat].pos_category or poscat,
categories = {},
heads = heads,
user_specified_heads = user_specified_heads,
no_redundant_head_cat = #user_specified_heads == 0,
genders = {},
inflections = {},
pagename = pagename,
id = args.id,
force_cat_output = force_cat,
checkredlinks = pos_functions[poscat] and pos_functions[poscat].redlink_pos or true,
}
if pagename:find("^%-") and poscat ~= "suffix forms" then
data.is_suffix = true
data.pos_category = "suffixes"
data.checkredlinks = true
local singular_poscat = require(en_utilities_module).singularize(poscat)
insert(data.categories, langname .. " " .. singular_poscat .. "-forming suffixes")
insert(data.inflections, {label = singular_poscat .. "-forming suffix"})
end
if pos_functions[poscat] then
pos_functions[poscat].func(args, data)
end
if args.json then
return require("Module:JSON").toJSON(data)
end
local post_note = data.post_note and "; " .. data.post_note or ""
return require("Module:headword").full_headword(data) .. post_note
end
-----------------------------------------------------------------------------------------
-- Utility functions --
-----------------------------------------------------------------------------------------
local function replace_hash_with_lemma(term, lemma)
-- If there is a % sign in the lemma, we have to replace it with %% so it doesn't get interpreted as a capture replace
-- expression.
lemma = lemma:gsub("%%", "%%%%")
-- Assign to a variable to discard second return value.
term = term:gsub("#", lemma)
return term
end
-- Parse and insert an inflection not requiring additional processing into `data.inflections`. The raw arguments come
-- from `args[field]`, which is parsed for inline modifiers. `label` is the label that the inflections are given;
-- `accel` is the accelerator form, or nil.
local function parse_and_insert_inflection(data, args, field, label, accel)
m_headword_utilities.parse_and_insert_inflection {
headdata = data,
forms = args[field],
paramname = field,
splitchar = ",",
label = label,
accel = accel and {form = accel} or nil,
}
end
-- Insert default plurals generated when a given plural had the value of + and default plurals were fetched as a result.
-- `plobj` is the parsed object whose `term` field is "+". `defpls` is the list of default plurals. `dest` is the list
-- into which the plurals are inserted (which inherit their qualifiers and labels from `plobj`).
local function insert_defpls(defpls, plobj, dest)
if not defpls then
-- Happens e.g. with [[S.A.]] where the default plural algorithm returns nothing.
return
end
if #defpls == 1 then
plobj.term = defpls[1]
insert(dest, plobj)
else
for _, defpl in ipairs(defpls) do
local newplobj = m_table.shallowCopy(plobj)
newplobj.term = defpl
insert(dest, newplobj)
end
end
end
-----------------------------------------------------------------------------------------
-- Adjectives --
-----------------------------------------------------------------------------------------
local function do_adjective(args, data, is_superlative)
local feminines = {}
local masculine_plurals = {}
local feminine_plurals = {}
-- Use "participle" not "past participle" for categories such as 'invariable paticiples'
local category_plpos = data.checkredlinks
if category_plpos == true then
category_plpos = data.pos_category
end
local category_pos = m_en_utilities.singularize(category_plpos)
if args.sp then
local romut = require(romut_module)
if not romut.allowed_special_indicators[args.sp] then
local indicators = {}
for indic, _ in pairs(romut.allowed_special_indicators) do
insert(indicators, "'" .. indic .. "'")
end
table.sort(indicators)
error("Special inflection indicator beginning can only be " ..
list_to_text(indicators) .. ": " .. args.sp)
end
end
local lemma = data.pagename
local function fetch_inflections(field)
local retval = m_headword_utilities.parse_term_list_with_modifiers {
paramname = field,
forms = args[field],
splitchar = ",",
}
if not retval[1] then
return {{term = "+"}}
end
return retval
end
local function insert_inflection(terms, label, accel)
m_headword_utilities.insert_inflection {
headdata = data,
terms = terms,
label = label,
accel = accel and {form = accel} or nil,
}
end
if args.f[1] == "ind" or args.f[1] == "inv" then
-- invariable adjective
insert(data.inflections, {label = glossary_link("invariable")})
insert(data.categories, langname .. " indeclinable " .. category_plpos)
if args.sp or args.f[2] or args.pl[1] or args.mpl[1] or args.fpl[1] then
error("Can't specify inflections with an invariable " .. category_pos)
end
elseif args.fonly then
-- feminine-only
if args.f[1] then
error("Can't specify explicit feminines with feminine-only " .. category_pos)
end
if args.pl[1] then
error("Can't specify explicit plurals with feminine-only " .. category_pos .. ", use fpl=")
end
if args.mpl[1] then
error("Can't specify explicit masculine plurals with feminine-only " .. category_pos)
end
local argsfpl = fetch_inflections("fpl")
for _, fpl in ipairs(argsfpl) do
if fpl.term == "+" then
-- Generate default feminine plural.
local defpls = com.make_plural(lemma, "f", args.sp)
if not defpls then
error("Unable to generate default plural of '" .. lemma .. "'")
end
insert_defpls(defpls, fpl, feminine_plurals)
else
fpl.term = replace_hash_with_lemma(fpl.term, lemma)
insert(feminine_plurals, fpl)
end
end
insert(data.inflections, {label = "feminine-only"})
insert_inflection(feminine_plurals, "feminine plural", "f|p")
else
-- Gather feminines.
for _, f in ipairs(fetch_inflections("f")) do
if f.term == "mf" then
f.term = lemma
elseif f.term == "+" then
-- Generate default feminine.
f.term = com.make_feminine(lemma, args.sp)
else
f.term = replace_hash_with_lemma(f.term, lemma)
end
insert(feminines, f)
end
local fem_like_lemma = #feminines == 1 and feminines[1].term == lemma and
not m_headword_utilities.termobj_has_qualifiers_or_labels(feminines[1])
if fem_like_lemma then
insert(data.categories, langname .. " epicene " .. category_plpos)
end
local mpl_field = "mpl"
local fpl_field = "fpl"
if args.pl[1] then
if args.mpl[1] or args.fpl[1] then
error("Can't specify both pl= and mpl=/fpl=")
end
mpl_field = "pl"
fpl_field = "pl"
end
local argsmpl = fetch_inflections(mpl_field)
local argsfpl = fetch_inflections(fpl_field)
for _, mpl in ipairs(argsmpl) do
if mpl.term == "+" then
-- Generate default masculine plural.
local defpls
-- First, some special hacks based on the feminine singular.
if not fem_like_lemma and not args.sp and not lemma:find(" ") then
for _, f in ipairs(feminines) do
if f.term:find("ssa$") then
-- If the feminine ends in -ssa, assume that the -ss- is also in the
-- masculine plural form
defpls = {rsub(f.term, "a$", "os")}
break
elseif f.term == lemma .. "na" then
defpls = {lemma .. "ns"}
break
elseif lemma:find("ig$") and f.term:find("ja$") then
-- Adjectives in -ig have two masculine plural forms, one derived from
-- the m.sg. and the other derived from the f.sg.
defpls = {lemma .. "s", rsub(f.term, "ja$", "jos")}
break
end
end
end
defpls = defpls or com.make_plural(lemma, "m", args.sp)
if not defpls then
error("Unable to generate default plural of '" .. lemma .. "'")
end
insert_defpls(defpls, mpl, masculine_plurals)
else
mpl.term = replace_hash_with_lemma(mpl.term, lemma)
insert(masculine_plurals, mpl)
end
end
for _, fpl in ipairs(argsfpl) do
if fpl.term == "+" then
-- First, some special hacks based on the feminine singular.
if fem_like_lemma and not args.sp and not lemma:find(" ") and lemma:find("[çx]$") then
-- Adjectives ending in -ç or -x behave as mf-type in the singular, but
-- regular type in the plural.
local defpls = com.make_plural(lemma .. "a", "f")
if not defpls then
error("Unable to generate default plural of '" .. lemma .. "a'")
end
insert_defpls(defpls, fpl, feminine_plurals)
else
for _, f in ipairs(feminines) do
-- Generate default feminine plural; f is a table.
local defpls = com.make_plural(f.term, "f", args.sp)
if not defpls then
error("Unable to generate default plural of '" .. f.term .. "'")
end
for _, defpl in ipairs(defpls) do
local fplobj = m_table.shallowCopy(fpl)
fplobj.term = defpl
m_headword_utilities.combine_termobj_qualifiers_labels(fplobj, f)
insert(feminine_plurals, fplobj)
end
end
end
else
fpl.term = replace_hash_with_lemma(fpl.term, lemma)
insert(feminine_plurals, fpl)
end
end
local fem_pl_like_masc_pl = masculine_plurals[1] and feminine_plurals[1] and
m_table.deepEquals(masculine_plurals, feminine_plurals)
local masc_pl_like_lemma = #masculine_plurals == 1 and masculine_plurals[1].term == lemma and
not m_headword_utilities.termobj_has_qualifiers_or_labels(masculine_plurals[1])
if fem_like_lemma and fem_pl_like_masc_pl and masc_pl_like_lemma then
-- actually invariable
insert(data.inflections, {label = glossary_link("invariable")})
insert(data.categories, langname .. " indeclinable " .. category_plpos)
else
-- Make sure there are feminines given and not same as lemma.
if not fem_like_lemma then
insert_inflection(feminines, "feminine", "f|s")
elseif args.gneut then
data.genders = {"gneut"}
else
data.genders = {"mf"}
end
if fem_pl_like_masc_pl then
if args.gneut then
insert_inflection(masculine_plurals, "plural", "p")
else
insert_inflection(masculine_plurals, "masculine and feminine plural", "p")
end
else
insert_inflection(masculine_plurals, "masculine plural", "m|p")
insert_inflection(feminine_plurals, "feminine plural", "f|p")
end
end
end
parse_and_insert_inflection(data, args, "comp", "comparative")
parse_and_insert_inflection(data, args, "sup", "superlative")
parse_and_insert_inflection(data, args, "dim", "diminutive")
parse_and_insert_inflection(data, args, "aug", "augmentative")
if args.irreg and is_superlative then
insert(data.categories, langname .. " irregular superlative " .. category_plpos)
end
end
local function get_adjective_params(adjtype)
local params = {
["sp"] = true, -- special indicator: "first", "first-last", etc.
["f"] = list_param, --feminine form(s)
[1] = {alias_of = "f", list = false},
["pl"] = list_param, --plural override(s)
["mpl"] = list_param, --masculine plural override(s)
["fpl"] = list_param, --feminine plural override(s)
}
if adjtype == "base" then
params["comp"] = list_param --comparative(s)
params["sup"] = list_param --superlative(s)
params["dim"] = list_param --diminutive(s)
params["aug"] = list_param --augmentative(s)
params["fonly"] = boolean_param -- feminine only
params["hascomp"] = {} -- has comparative
end
if adjtype == "sup" then
params["irreg"] = boolean_param
end
return params
end
-- Display additional inflection information for an adjective
pos_functions["adjectives"] = {
params = get_adjective_params("base"),
func = do_adjective,
}
pos_functions["past participles"] = {
params = get_adjective_params("part"),
func = do_adjective,
redlink_pos = "participles",
}
pos_functions["determiners"] = {
params = get_adjective_params("det"),
func = do_adjective,
}
pos_functions["pronouns"] = {
params = get_adjective_params("pron"),
func = do_adjective,
}
-----------------------------------------------------------------------------------------
-- Nouns --
-----------------------------------------------------------------------------------------
local allowed_genders = m_table.listToSet(
{"m", "f", "mf", "mfbysense", "mfequiv", "gneut", "n", "m-p", "f-p", "mf-p", "mfbysense-p", "mfequiv-p", "gneut-p", "n-p", "?", "?-p"}
)
local function validate_genders(genders)
for _, g in ipairs(genders) do
if type(g) == "table" then
g = g.spec
end
if not allowed_genders[g] then
error("Unrecognized gender: " .. g)
end
end
end
local function do_noun(args, data, is_proper)
local is_plurale_tantum = false
local has_singular = false
local category_plpos = data.checkredlinks
if category_plpos == true then
category_plpos = data.pos_category
end
local category_pos = m_en_utilities.singularize(category_plpos)
validate_genders(args[1])
data.genders = args[1]
local saw_m = false
local saw_f = false
local saw_gneut = false
local gender_for_irreg_ending, gender_for_default_plural
-- Check for specific genders and pluralia tantum.
for _, g in ipairs(args[1]) do
if type(g) == "table" then
g = g.spec
end
if g:find("-p$") then
is_plurale_tantum = true
else
has_singular = true
if g == "m" or g == "mf" or g == "mfbysense" then
saw_m = true
end
if g == "f" or g == "mf" or g == "mfbysense" then
saw_f = true
end
if g == "gneut" then
saw_gneut = true
end
end
end
if saw_m and saw_f then
gender_for_irreg_ending = "mf"
elseif saw_f then
gender_for_irreg_ending = "f"
else
gender_for_irreg_ending = "m"
end
gender_for_default_plural =
saw_gneut and "gneut" or gender_for_irreg_ending == "mf" and "m" or gender_for_irreg_ending
local lemma = data.pagename
-- Plural
local plurals = {}
local function insert_noun_inflection(terms, label, accel)
m_headword_utilities.insert_inflection {
headdata = data,
terms = terms,
label = label,
accel = accel and {form = accel} or nil,
}
end
if is_plurale_tantum and not has_singular then
if args[2][1] then
error("Can't specify plurals of plurale tantum " .. category_pos)
end
insert(data.inflections, {label = glossary_link("plural only")})
else
plurals = m_headword_utilities.parse_term_list_with_modifiers {
paramname = {2, "pl"},
forms = args[2],
splitchar = ",",
}
-- Check for special plural signals
local mode = nil
local pl1 = plurals[1]
if pl1 and #pl1.term == 1 then
mode = pl1.term
if mode == "?" or mode == "!" or mode == "-" or mode == "~" then
pl1.term = nil
if next(pl1) then
error(("Can't specify inline modifiers with plural code '%s'"):format(mode))
end
table.remove(plurals, 1) -- Remove the mode parameter
elseif mode ~= "+" and mode ~= "#" then
error(("Unexpected plural code '%s'"):format(mode))
end
end
if is_plurale_tantum then
-- both singular and plural
insert(data.inflections, {label = "sometimes " .. glossary_link("plural only") .. ", in variation"})
end
if mode == "?" then
-- Plural is unknown
insert(data.categories, langname .. " " .. category_plpos .. " with unknown or uncertain plurals")
elseif mode == "!" then
-- Plural is not attested
insert(data.inflections, {label = "plural not attested"})
insert(data.categories, langname .. " " .. category_plpos .. " with unattested plurals")
if plurals[1] then
error("Can't specify any plurals along with unattested plural code '!'")
end
elseif mode == "-" then
-- Uncountable noun; may occasionally have a plural
insert(data.categories, langname .. " uncountable " .. category_plpos)
-- If plural forms were given explicitly, then show "usually"
if plurals[1] then
insert(data.inflections, {label = "usually " .. glossary_link("uncountable")})
insert(data.categories, langname .. " countable " .. category_plpos)
else
insert(data.inflections, {label = glossary_link("uncountable")})
end
else
-- Countable or mixed countable/uncountable
if not plurals[1] and not is_proper then
plurals[1] = {term = "+"}
end
if mode == "~" then
-- Mixed countable/uncountable noun, always has a plural
insert(data.inflections, {label = glossary_link("countable") .. " and " .. glossary_link("uncountable")})
insert(data.categories, langname .. " uncountable " .. category_plpos)
insert(data.categories, langname .. " countable " .. category_plpos)
elseif plurals[1] then
-- Countable nouns
insert(data.categories, langname .. " countable " .. category_plpos)
else
-- Uncountable nouns
insert(data.categories, langname .. " uncountable " .. category_plpos)
end
end
-- Gather plurals, handling requests for default plurals.
local has_default_or_hash = false
for _, pl in ipairs(plurals) do
if pl.term:find("^%+") or pl.term:find("#") then
has_default_or_hash = true
break
end
end
if has_default_or_hash then
local newpls = {}
for _, pl in ipairs(plurals) do
if pl.term == "+" then
local default_pls = com.make_plural(lemma, gender_for_default_plural)
insert_defpls(default_pls, pl, newpls)
elseif pl.term:find("^%+") then
pl.term = require(romut_module).get_special_indicator(pl.term)
local default_pls = com.make_plural(lemma, gender_for_default_plural, pl.term)
insert_defpls(default_pls, pl, newpls)
else
pl.term = replace_hash_with_lemma(pl.term, lemma)
insert(newpls, pl)
end
end
plurals = newpls
end
local pl1 = plurals[1]
if pl1 and not plurals[2] and pl1.term == lemma then
insert(data.inflections, {label = glossary_link("invariable"),
q = pl1.q, qq = pl1.qq, l = pl1.l, ll = pl1.ll, refs = pl1.refs
})
insert(data.categories, langname .. " indeclinable " .. category_plpos)
else
insert_noun_inflection(plurals, "plural", "p")
end
if plurals[2] then
insert(data.categories, langname .. " " .. category_plpos .. " with multiple plurals")
end
end
-- Gather masculines/feminines. For each one, generate the corresponding plural. `field` is the name of the field
-- containing the masculine or feminine forms (normally "m" or "f"); `inflect` is a function of one or two arguments
-- to generate the default masculine or feminine from the lemma (the arguments are the lemma and optionally a
-- "special" flag to indicate how to handle multiword lemmas, and the function is normally make_feminine or
-- make_masculine from [[Module:ca-common]]); and `default_plurals` is a list into which the corresponding default
-- plurals of the gathered or generated masculine or feminine forms are stored.
local function handle_mf(field, inflect, default_plurals)
local function call_inflect(special)
if inflect then
-- Generate default feminine.
return inflect(lemma, special)
else
-- FIXME
error("Can't generate default masculine currently")
end
end
local mfs = m_headword_utilities.parse_term_list_with_modifiers {
paramname = field,
forms = args[field],
splitchar = ",",
frob = function(term)
if term == "+" then
-- Generate default masculine/feminine.
term = call_inflect()
else
term = replace_hash_with_lemma(term, lemma)
end
local special = require(romut_module).get_special_indicator(term)
if special then
term = call_inflect(special)
end
return term
end
}
for _, mf in ipairs(mfs) do
local mfpls = com.make_plural(mf.term, gender, special)
if mfpls then
for _, mfpl in ipairs(mfpls) do
local plobj = m_table.shallowCopy(mf)
plobj.term = mfpl
-- Add an accelerator for each masculine/feminine plural whose lemma
-- is the corresponding singular, so that the accelerated entry
-- that is generated has a definition that looks like
-- # {{plural of|ca|MFSING}}
plobj.accel = {form = "p", lemma = mf.term}
table.insert(default_plurals, plobj)
end
end
end
return mfs
end
local feminine_plurals = {}
local feminines = handle_mf("f", com.make_feminine, feminine_plurals)
local masculine_plurals = {}
local masculines = handle_mf("m", com.make_masculine, masculine_plurals)
local function handle_mf_plural(mfplfield, default_plurals, singulars)
local mfpl = m_headword_utilities.parse_term_list_with_modifiers {
paramname = mfplfield,
forms = args[mfplfield],
splitchar = ",",
}
local new_mfpls = {}
local saw_plus
for i, mfpl in ipairs(mfpl) do
local accel
if #mfpl == #singulars then
-- If same number of overriding masculine/feminine plurals as singulars, assume each plural goes with
-- the corresponding singular and use each corresponding singular as the lemma in the accelerator. The
-- generated entry will have
-- # {{plural of|ca|SINGULAR}}
-- as the definition.
accel = {form = "p", lemma = singulars[i].term}
else
accel = nil
end
if mfpl.term == "+" then
-- We should never see + twice. If we do, it will lead to problems since we overwrite the values of
-- default_plurals the first time around.
if saw_plus then
error(("Saw + twice when handling %s="):format(mfplfield))
end
saw_plus = true
if not default_plurals[1] then
-- FIXME: Can this happen? Not in corresponding Spanish code and the old Portuguese code tried to
-- handle this condition by generating the default plural from the lemma.
error("Internal error: Something wrong, no generated default m/f plurals at this stage")
end
for _, defpl in ipairs(default_plurals) do
-- defpl is already a table and has an accel field
m_headword_utilities.combine_termobj_qualifiers_labels(defpl, mfpl)
insert(new_mfpls, defpl)
end
elseif mfpl.term:find("^%+") then
mfpl.term = require(romut_module).get_special_indicator(mfpl.term)
for _, mf in ipairs(singulars) do
local default_mfpls = com.make_plural(mf.term, gender, mfpl.term)
for _, defp in ipairs(default_mfpls) do
local mfplobj = m_table.shallowCopy(mfpl)
mfplobj.term = defp
mfplobj.accel = accel
m_headword_utilities.combine_termobj_qualifiers_labels(mfplobj, mf)
insert(new_mfpls, mfplobj)
end
end
else
mfpl.accel = accel
mfpl.term = replace_hash_with_lemma(mfpl.term, lemma)
insert(new_mfpls, mfpl)
end
end
return new_mfpls
end
if args.fpl[1] then
-- Override any existing feminine plurals.
feminine_plurals = handle_mf_plural("fpl", feminine_plurals, feminines)
end
if args.mpl[1] then
-- Override any existing masculine plurals.
masculine_plurals = handle_mf_plural("mpl", masculine_plurals, masculines)
end
local function parse_and_insert_noun_inflection(field, label, accel)
parse_and_insert_inflection(data, args, field, label, accel)
end
insert_noun_inflection(feminines, "feminine", "f")
insert_noun_inflection(feminine_plurals, "feminine plural")
insert_noun_inflection(masculines, "masculine")
insert_noun_inflection(masculine_plurals, "masculine plural")
parse_and_insert_noun_inflection("dim", "diminutive")
parse_and_insert_noun_inflection("aug", "augmentative")
parse_and_insert_noun_inflection("pej", "pejorative")
parse_and_insert_noun_inflection("dem", "demonym")
parse_and_insert_noun_inflection("fdem", "female demonym")
-- Is this a noun with an unexpected ending (for its gender)?
-- Only check if the term is one word (there are no spaces in the term).
local irreg_gender_lemma = rsub(lemma, " .*", "") -- only look at first word
if (gender_for_irreg_ending == "m" or gender_for_irreg_ending == "mf") and irreg_gender_lemma:find("a$") then
insert(data.categories, langname .. " masculine " .. category_plpos .. " ending in -a")
elseif (gender_for_irreg_ending == "f" or gender_for_irreg_ending == "mf") and not (
irreg_gender_lemma:find("a$") or irreg_gender_lemma:find("ió$") or irreg_gender_lemma:find("tat$") or
irreg_gender_lemma:find("tud$") or irreg_gender_lemma:find("[dt]riu$")) then
insert(data.categories, langname .. " feminine " .. category_plpos .. " with no feminine ending")
end
end
local function get_noun_params(is_proper)
return {
[1] = {list = "g", disallow_holes = true, required = not is_proper, default = "?", type = "genders",
flatten = true}, -- gender(s)
[2] = {list = "pl", disallow_holes = true}, --plural override(s)
["f"] = list_param, --feminine form(s)
["m"] = list_param, --masculine form(s)
["fpl"] = list_param, --feminine plural override(s)
["mpl"] = list_param, --masculine plural override(s)
["dim"] = list_param, --diminutive(s)
["aug"] = list_param, --diminutive(s)
["pej"] = list_param, --pejorative(s)
["dem"] = list_param, --demonym(s)
["fdem"] = list_param, --female demonym(s)
}
end
pos_functions["nouns"] = {
params = get_noun_params(),
func = do_noun,
}
pos_functions["proper nouns"] = {
params = get_noun_params("is proper"),
func = function(args, data)
do_noun(args, data, "is proper")
end,
}
-----------------------------------------------------------------------------------------
-- Verbs --
-----------------------------------------------------------------------------------------
pos_functions["verbs"] = {
params = {
[1] = true,
["pres"] = list_param, --present
["pres_qual"] = {list = "pres\1_qual", allow_holes = true},
["pres3s"] = list_param, --third-singular present
["pres3s_qual"] = {list = "pres3s\1_qual", allow_holes = true},
["pret"] = list_param, --preterite
["pret_qual"] = {list = "pret\1_qual", allow_holes = true},
["part"] = list_param, --participle
["part_qual"] = {list = "part\1_qual", allow_holes = true},
["short_part"] = list_param, --short participle
["short_part_qual"] = {list = "short_part\1_qual", allow_holes = true},
["noautolinktext"] = boolean_param,
["noautolinkverb"] = boolean_param,
["attn"] = boolean_param,
["pres_1_sg"] = true, -- accept any ignore old-style param
["past_part"] = true, -- accept any ignore old-style param
["root"] = true, -- FIXME: Implement root-stressed vowel quality
},
func = function(args, data, tracking_categories, frame)
local preses, preses_3s, prets, parts, short_parts
if args.attn then
insert(tracking_categories, "Requests for attention concerning " .. langname)
return
end
local ca_verb = require(ca_verb_module)
local alternant_multiword_spec = ca_verb.do_generate_forms(args, "ca-verb", data.heads[1])
local specforms = alternant_multiword_spec.forms
local function slot_exists(slot)
return specforms[slot] and #specforms[slot] > 0
end
local function do_finite(slot_tense, label_tense)
-- Use pres_3s if it exists and pres_1s doesn't exist (e.g. impersonal verbs); similarly for pres_3p (only3p verbs);
-- but fall back to pres_1s if neither pres_1s nor pres_3s nor pres_3p exist (e.g. [[empedernir]]).
local has_1s = slot_exists(slot_tense .. "_1s")
local has_3s = slot_exists(slot_tense .. "_3s")
local has_3p = slot_exists(slot_tense .. "_3p")
if has_1s or (not has_3s and not has_3p) then
return {
slot = slot_tense .. "_1s",
label = ("first-person singular %s"):format(label_tense),
}, true
elseif has_3s then
return {
slot = slot_tense .. "_3s",
label = ("third-person singular %s"):format(label_tense),
}, false
else
return {
slot = slot_tense .. "_3p",
label = ("third-person plural %s"):format(label_tense),
}, false
end
end
local did_pres_1s
preses, did_pres_1s = do_finite("pres", "present")
preses_3s = {
slot = "pres_3s",
label = "third-person singular present",
}
prets = do_finite("pret", "preterite")
parts = {
slot = "pp_ms",
label = "past participle",
}
short_parts = {
slot = "short_pp_ms",
label = "short past participle",
}
if args.pres[1] or args.pres3s[1] or args.pret[1] or args.part[1] or args.short_part[1] then
track("verb-old-multiarg")
end
local function strip_brackets(qualifiers)
if not qualifiers then
return nil
end
local stripped_qualifiers = {}
for _, qualifier in ipairs(qualifiers) do
local stripped_qualifier = qualifier:match("^%[(.*)%]$")
if not stripped_qualifier then
error("Internal error: Qualifier should be surrounded by brackets at this stage: " .. qualifier)
end
insert(stripped_qualifiers, stripped_qualifier)
end
return stripped_qualifiers
end
local function do_verb_form(args, qualifiers, slot_desc, skip_if_empty)
local forms
local to_insert
if #args == 0 then
forms = specforms[slot_desc.slot]
if not forms or #forms == 0 then
if skip_if_empty then
return
end
forms = {{form = "-"}}
end
elseif #args == 1 and args[1] == "-" then
forms = {{form = "-"}}
else
forms = {}
for i, arg in ipairs(args) do
local qual = qualifiers[i]
if qual then
-- FIXME: It's annoying we have to add brackets and strip them out later. The inflection
-- code adds all footnotes with brackets around them; we should change this.
qual = {"[" .. qual .. "]"}
end
local form = arg
if not args.noautolinkverb then
-- [[Module:inflection utilities]] already loaded by [[Module:ca-verb]]
form = require(inflection_utilities_module).add_links(form)
end
insert(forms, {form = form, footnotes = qual})
end
end
if forms[1].form == "-" then
to_insert = {label = "no " .. slot_desc.label}
else
local into_table = {label = slot_desc.label}
for _, form in ipairs(forms) do
local qualifiers = strip_brackets(form.footnotes)
-- Strip redundant brackets surrounding entire form. These may get generated e.g.
-- if we use the angle bracket notation with a single word.
local stripped_form = rmatch(form.form, "^%[%[([^%[%]]*)%]%]$") or form.form
-- Don't include accelerators if brackets remain in form, as the result will be wrong.
-- FIXME: For now, don't include accelerators. We should use the new {{ca-verb form of}}.
-- local this_accel = not stripped_form:find("%[%[") and accel or nil
local this_accel = nil
insert(into_table, {term = stripped_form, q = qualifiers, accel = this_accel})
end
to_insert = into_table
end
insert(data.inflections, to_insert)
end
local skip_pres_if_empty
if alternant_multiword_spec.no_pres1_and_sub then
insert(data.inflections, {label = "no first-person singular present"})
insert(data.inflections, {label = "no present subjunctive"})
end
if alternant_multiword_spec.no_pres_stressed then
insert(data.inflections, {label = "no stressed present indicative or subjunctive"})
skip_pres_if_empty = true
end
if alternant_multiword_spec.only3s then
insert(data.inflections, {label = glossary_link("impersonal")})
elseif alternant_multiword_spec.only3sp then
insert(data.inflections, {label = "third-person only"})
elseif alternant_multiword_spec.only3p then
insert(data.inflections, {label = "third-person plural only"})
end
local has_vowel_alt
if alternant_multiword_spec.vowel_alt then
for _, vowel_alt in ipairs(alternant_multiword_spec.vowel_alt) do
if vowel_alt ~= "+" and vowel_alt ~= "í" and vowel_alt ~= "ú" then
has_vowel_alt = true
break
end
end
end
do_verb_form(args.pres, args.pres_qual, preses, skip_pres_if_empty)
-- We want to include both the pres_1s and pres_3s if there is a vowel alternation in the present singular. But we
-- don't want to redundantly include the pres_3s if we already included it.
if did_pres_1s and has_vowel_alt then
do_verb_form(args.pres3s, args.pres3s_qual, preses_3s, skip_pres_if_empty)
end
do_verb_form(args.pret, args.pret_qual, prets)
do_verb_form(args.part, args.part_qual, parts)
do_verb_form(args.short_part, args.short_part_qual, short_parts, "skip if empty")
-- Add categories.
for _, cat in ipairs(alternant_multiword_spec.categories) do
insert(data.categories, cat)
end
-- If the user didn't explicitly specify head=, or specified exactly one head (not 2+) and we were able to
-- incorporate any links in that head into the 1= specification, use the infinitive generated by
-- [[Module:ca-verb]] in place of the user-specified or auto-generated head. This was copied from
-- [[Module:it-headword]], where doing this gets accents marked on the verb(s). We don't have accents marked on
-- the verb but by doing this we do get any footnotes on the infinitive propagated here. Don't do this if the
-- user gave multiple heads or gave a head with a multiword-linked verbal expression such as Italian
-- '[[dare esca]] [[al]] [[fuoco]]' (FIXME: give Catalan equivalent).
if #data.user_specified_heads == 0 or (
#data.user_specified_heads == 1 and alternant_multiword_spec.incorporated_headword_head_into_lemma
) then
data.heads = {}
for _, lemma_obj in ipairs(alternant_multiword_spec.forms.infinitive_linked) do
local quals, refs = require(inflection_utilities_module).
convert_footnotes_to_qualifiers_and_references(lemma_obj.footnotes)
insert(data.heads, {term = lemma_obj.form, q = quals, refs = refs})
end
end
if args.root then
local m_ca_IPA = require(ca_IPA_module)
local parsed_respellings = {}
local function set_parsed_respelling(dialect, parsed)
-- Validate the individual root vowel specs.
for _, termobj in ipairs(parsed.terms) do
if not rfind(termobj.words[1].term, "^" .. m_ca_IPA.mid_vowel_hint_c .. "$") then
error(("Root vowel spec '%s' should be one of the vowels %s"):format(
termobj.words[1].term, m_ca_IPA.mid_vowel_hints))
end
end
if not dialect then
for _, dial in ipairs(m_ca_IPA.dialects) do
-- Need to clone as we destructively modify each one later with the pronun.
parsed_respellings[dial] = m_table.deepCopy(parsed)
end
elseif m_ca_IPA.dialect_groups[dialect] then
for _, dial in ipairs(m_ca_IPA.dialect_groups[dialect]) do
-- Need to clone as we destructively modify each one later with the pronun.
parsed_respellings[dial] = m_table.deepCopy(parsed)
end
else
parsed_respellings[dialect] = parsed
end
end
local function check_dialect_or_dialect_group(dialect)
if not m_table.contains(m_ca_IPA.dialects, dialect) and not
m_ca_IPA.dialect_groups[dialect] then
local dialect_list = {}
for _, dial in ipairs(m_ca_IPA.dialects) do
insert(dialect_list, "'" .. dial .. "'")
end
dialect_list = list_to_text(dialect_list, nil, " or ")
local dialect_group_list = {}
for dialect_group, _ in pairs(m_ca_IPA.dialect_groups) do
insert(dialect_group_list, "'" .. dialect_group .. "'")
end
dialect_group_list = list_to_text(dialect_group_list, nil, " or ")
error(("Unrecognized dialect '%s': Should be a dialect %s or a dialect group %s"):format(
dialect, dialect_list, dialect_group_list))
end
end
-- Parse the root vowel specs.
if args.root:find("[<%[]") then
local put = require(parse_utilities_module)
-- Parse balanced segment runs involving either [...] (substitution notation) or <...> (inline
-- modifiers). We do this because we don't want commas or semicolons inside of square or angle brackets
-- to count as respelling delimiters. However, we need to rejoin square-bracketed segments with nearby
-- ones after splitting alternating runs on comma and semicolon.
local segments = put.parse_multi_delimiter_balanced_segment_run(args.root, {{"<", ">"}, {"[", "]"}})
local semicolon_separated_groups = put.split_alternating_runs(segments, "%s*;%s*")
for _, group in ipairs(semicolon_separated_groups) do
local first_element = group[1]
local dialect
if first_element:find("^[a-z]+:") then
-- a dialect-specific spec
local rest
dialect, rest = first_element:match("^([a-z]+):(.*)$")
check_dialect_or_dialect_group(dialect)
group[1] = rest
end
local comma_separated_groups = put.split_alternating_runs_on_comma(group)
-- Process each value.
local outer_container = m_ca_IPA.parse_comma_separated_groups(comma_separated_groups, true, args.root,
"root")
set_parsed_respelling(dialect, outer_container)
end
else
for _, dialect_spec in ipairs(rsplit(args.root, "%s*;%s*")) do
local dialect
if dialect_spec:find("^[a-z]+:") then
-- a dialect-specific spec
local rest
dialect, rest = dialect_spec:match("^([a-z]+):(.*)$")
check_dialect_or_dialect_group(dialect)
dialect_spec = rest
end
local termobjs = {}
for _, word in ipairs(rsplit(dialect_spec, ",")) do
insert(termobjs, {words = {{term = word}}})
end
set_parsed_respelling(dialect, {
terms = termobjs,
})
end
end
-- Convert each canonicalized respelling to phonemic/phonetic IPA.
m_ca_IPA.generate_phonemic_phonetic(parsed_respellings)
-- Group the results.
local grouped_pronuns = m_ca_IPA.group_pronuns_by_dialect(parsed_respellings)
-- Format for display.
for _, grouped_pronun_spec in pairs(grouped_pronuns) do
local pronunciations = {}
local function ins(text)
insert(pronunciations, text)
end
-- Loop through each pronunciation. For each one, format the phonetic version "raw".
for j, pronun in ipairs(grouped_pronun_spec.pronuns) do
-- Add dialect tags to left accent qualifiers if first one
local as = pronun.a
if j == 1 then
if as then
as = m_table.deepCopy(as)
else
as = {}
end
for _, dialect in ipairs(grouped_pronun_spec.dialects) do
insert(as, m_ca_IPA.dialects_to_names[dialect])
end
else
ins(", ")
end
local slash_pron = "/" .. pronun.phonetic:gsub("ˈ", "") .. "/"
if as or pronun.q or pronun.qq or pronun.aa then
ins(require("Module:pron qualifier").format_qualifiers {
lang = lang,
text = slash_pron,
q = pronun.q,
a = as,
qq = pronun.qq,
aa = pronun.aa
})
else
ins(slash_pron)
end
if pronun.refs then
-- FIXME: Copied from [[Module:IPA]]. Should be in a module.
local refs = {}
if #pronun.refs > 0 then
for _, refspec in ipairs(pronun.refs) do
if type(refspec) ~= "table" then
refspec = {text = refspec}
end
local refargs
if refspec.name or refspec.group then
refargs = {name = refspec.name, group = refspec.group}
end
insert(refs, mw.getCurrentFrame():extensionTag("ref", refspec.text, refargs))
end
ins(concat(refs))
end
end
end
grouped_pronun_spec.formatted = concat(pronunciations)
end
-- Concatenate formatted results.
local formatted = {}
for _, grouped_pronun_spec in ipairs(grouped_pronuns) do
insert(formatted, grouped_pronun_spec.formatted)
end
data.post_note = "''root stress'': " .. concat(formatted, "; ")
end
end
}
-----------------------------------------------------------------------------------------
-- Numerals --
-----------------------------------------------------------------------------------------
-- Display additional inflection information for a numeral
pos_functions["numerals"] = {
params = {
[1] = true,
[2] = true,
},
func = function(args, data)
if args[1] then
insert(data.genders, "m")
parse_and_insert_inflection(data, args, 1, "feminine")
parse_and_insert_inflection(data, args, 2, "noun form")
else
insert(data.genders, "m")
insert(data.genders, "f")
end
end
}
-----------------------------------------------------------------------------------------
-- Phrases --
-----------------------------------------------------------------------------------------
pos_functions["phrases"] = {
params = {
["g"] = {list = true, disallow_holes = true, type = "genders", flatten = true},
["m"] = list_param,
["f"] = list_param,
},
func = function(args, data)
validate_genders(args.g)
data.genders = args.g
parse_and_insert_inflection(data, args, "m", "masculine")
parse_and_insert_inflection(data, args, "f", "feminine")
end,
}
-----------------------------------------------------------------------------------------
-- Suffix forms --
-----------------------------------------------------------------------------------------
pos_functions["suffix forms"] = {
params = {
[1] = {required = true, list = true, disallow_holes = true},
["g"] = {list = true, disallow_holes = true, type = "genders", flatten = true},
},
func = function(args, data)
validate_genders(args.g)
data.genders = args.g
local suffix_type = {}
for _, typ in ipairs(args[1]) do
insert(suffix_type, typ .. "-forming suffix")
end
insert(data.inflections, {label = "non-lemma form of " .. m_table.serialCommaJoin(suffix_type, {conj = "or"})})
end,
}
return export
5xu2j4iep2zrgf4pvctrw4bbkvj1wjf
Kategorya:Katitikang Latino na wika
14
37766
176005
2026-04-09T02:52:29Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176005
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kategorya:Katitikang Latino
14
37767
176006
2026-04-09T02:52:42Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176006
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Padron:letter
10
37768
176007
2026-04-09T03:04:19Z
Yivan000
4078
Nilikha ang pahina na may '{{#invoke:letter headword|show}}<noinclude>{{documentation}}</noinclude>'
176007
wikitext
text/x-wiki
{{#invoke:letter headword|show}}<noinclude>{{documentation}}</noinclude>
h8o8stcifm08qgb8pk8txdm4efq7da8
Module:letter headword
828
37769
176008
2026-04-09T03:04:45Z
Yivan000
4078
Nilikha ang pahina na may 'local export = {} local force_cat = false local require_when_needed = require("Module:utilities/require when needed") local headword_module = "Module:headword" local headword_utilities_module = "Module:headword utilities" local JSON_module = "Module:JSON" local languages_module = "Module:languages" local parameters_module = "Module:parameters" local scripts_module = "Module:scripts" local table_module = "Module:table" local m_string_utilities = require("Modul...'
176008
Scribunto
text/plain
local export = {}
local force_cat = false
local require_when_needed = require("Module:utilities/require when needed")
local headword_module = "Module:headword"
local headword_utilities_module = "Module:headword utilities"
local JSON_module = "Module:JSON"
local languages_module = "Module:languages"
local parameters_module = "Module:parameters"
local scripts_module = "Module:scripts"
local table_module = "Module:table"
local m_string_utilities = require("Module:string utilities")
local glossary_link = require_when_needed(headword_utilities_module, "glossary_link")
local deep_equals = require_when_needed(table_module, "deepEquals")
local shallow_copy = require_when_needed(table_module, "shallowCopy")
local uupper = m_string_utilities.upper
local ucfirst = m_string_utilities.ucfirst
local ulower = m_string_utilities.lower
local ulen = m_string_utilities.len
local insert = table.insert
local per_language_defaults = {
de = {g = "n"},
en = {pl_ending = "s,'s"},
it = {g = "f,m", pl_ending = "_"},
pt = {g = "m"},
}
local function ine(val)
if not val then
return val
end
val = mw.text.trim(val)
if val == "" then return nil else return val end
end
local function add_initial_colon_to_term(term)
if term ~= "-" and term ~= "+" and not term:find("^:") then
-- Make sure we link to the specified term even if it has a diacritic that would normally be stripped off.
term = ":" .. term
end
return term
end
local function resolve_plus(termobjs, default, paramname)
local saw_plus = false
for _, termobj in ipairs(termobjs) do
if termobj.term == "+" then
saw_plus = true
break
end
end
if not saw_plus then
return termobjs
end
if not default then
error(("Saw '+' for param '%s' but no default available"):format(paramname))
end
if type(default) == "string" then
for _, termobj in ipairs(termobjs) do
if termobj.term == "+" then
termobj.term = default
end
end
return termobjs
end
if type(default) ~= "table" then
error("Internal error: `default` should be nil, string or list of strings")
end
local resolved_termobjs = {}
for _, termobj in ipairs(termobjs) do
if termobj.term == "+" then
for _, defval in ipairs(default) do
defval = shallow_copy(defval)
require(headword_utilities_module).combine_termobj_qualifiers_labels(defval, termobj)
insert(resolved_termobjs, defval)
end
else
insert(resolved_termobjs, termobj)
end
end
return resolved_termobjs
end
local function parse_equivalent(value, default, paramname, no_prefix_colon)
if not value then
return nil
end
local termobjs
if value == "+" then
-- optimization to avoid loading [[Module:headword utilities]]
if not default then
error(("Saw '+' for param '%s' but no default available"):format(paramname))
end
if type(default) == "string" then
termobjs = {{term = default}}
else
if type(default) ~= "table" then
error("Internal error: `default` should be nil, string or list of term objects")
end
termobjs = default
end
elseif value:find("[,<]") then
termobjs = require(headword_utilities_module).parse_term_with_modifiers {
val = value,
paramname = paramname,
splitchar = ",",
include_mods = {"tr", "ts", "t", "sc"},
}
else
termobjs = {{ term = value }}
end
termobjs = resolve_plus(termobjs, default, paramname)
for _, termobj in ipairs(termobjs) do
if not no_prefix_colon then
termobj.term = add_initial_colon_to_term(termobj.term)
end
termobj.tr = "-"
end
return termobjs
end
--[==[
Implementation of the letter headword template for a given language (e.g. {{tl|en-letter}}, {{tl|it-letter}} or
{{tl|sh-letter}}). Supports the following invocation parameters:
; {{para|pos}}
: The plural part of speech to use; defaults to {{cd|letters}}. Other possibilities are e.g. {{cd|numeral symbols}} for
numeral symbols (letters used for list items).
; {{para|lang}}
: The language code of the language of the headword template. Omit for language-agnostic {{tl|letter}}.
; {{para|sc}}
: Specify the default script code. Rarely needs to be given.
; {{para|g}}
: Specify the default gender(s) of the letter. Multiple comma-separated values are allowed, along with qualifier, label
and reference inline modifiers. See [[Module:gender and number]] for more information, including the allowed values.
The default(s) can be overridden using the {{para|g}} template parameter.
; {{para|pl_ending}} ...
: Specify the default ending(s) of the plural form(s) of the letter. Multiple items should be comma-separated, and
qualifier, label, reference, transliteration and gloss inline modifiers are allowed. Use the value {{cd|_}} to
indicate a null ending. The default(s) can be overridden using the {{para|pl}} template parameter.
; {{para|allow_tr|1}}
: Specify that the template allows the {{para|tr}} parameter to be given for specifying transliteration.
]==]
function export.show(frame)
local list_param = {list = true, disallow_holes = true}
local boolean_param = {type = "boolean"}
local frame_args = frame.args
local parent_args = frame:getParent().args
-- Extract language and any per-language defaults. If they exist, clone the frame args and set the defaults into the
-- frame args before parsing. If there is no language specified at either the invocation or template level, we'll
-- get an error later.
local lang = ine(frame_args.lang) or ine(parent_args[1])
if lang and per_language_defaults[lang] then
local cloned_frame_args = {}
for k, v in pairs(frame_args) do
cloned_frame_args[k] = v
end
local defaults = per_language_defaults[lang]
for k, v in pairs(defaults) do
if cloned_frame_args[k] == nil then
cloned_frame_args[k] = v
end
end
frame_args = cloned_frame_args
end
local iargs = require(parameters_module).process(frame_args, {
pos = {default = "letters"},
lang = {type = "language", template_default = "und"},
sc = {type = "script"},
g = {type = "genders"},
pl_ending = true,
allow_tr = boolean_param,
})
local allowed_types = {"upper", "lower", "mixed", "allcaps", "nocase"}
local params = {
g = {type = "genders"},
sc = {type = "script"},
type = {set = allowed_types},
head = list_param,
upper = true,
lower = true,
mixed = true,
allcaps = true,
pl = true,
nopl = boolean_param,
id = true,
sort = true,
pagename = true,
modern = true,
}
local langparam, otherparam
if not iargs.lang then
langparam = 1
otherparam = 2
params[langparam] = {type = "language", required = true, template_default = "und"}
else
otherparam = 1
end
params[otherparam] = list_param
if iargs.g and iargs.g[1] then
params.nog = boolean_param
end
if iargs.allow_tr or not iargs.lang then
params.tr = list_param
end
if not iargs.lang then
params.ts = list_param
end
local args = require(parameters_module).process(parent_args, params)
local others = {}
for i, otherspec in ipairs(args[otherparam]) do
local lang_sc, rest = otherspec:match("^([a-zA-Z0-9-]+):([^ ].*)$")
if not lang_sc then
error(("Expected other-lang or other-script param %s=%s to begin with a language code or script code followed by a colon and no space"):format(i + otherparam - 1, otherspec))
end
local obj = require(scripts_module).getByCode(lang_sc)
local objtype
if obj then
objtype = "script"
else
obj = require(languages_module).getByCode(lang_sc, nil, "allow etym")
if obj then
objtype = "language"
else
error(("Unrecognized language or script '%s' in %s=%s"):format(lang_sc, i + otherparam - 1, otherspec))
end
end
insert(others, {
obj = obj,
objtype = objtype,
value = rest,
})
end
local pagename = args.pagename or mw.loadData("Module:headword/data").pagename
if args.type then
if args.type ~= "upper" and args.type ~= "lower" and args.type ~= "mixed" and args.type ~= "nocase" then
error(("Unrecognized value for type '%s'; should be one of 'upper', 'lower', 'mixed' or 'nocase'"):format(
args.type))
end
end
local lang = langparam and args[langparam] or iargs.lang
local sc = args.sc or iargs.sc or lang:findBestScript(pagename)
local data = {
lang = lang,
sc = sc,
pos_category = iargs.pos,
categories = {},
pagename = pagename,
inflections = {},
id = args.id,
sort_key = args.sort,
heads = args.head,
translits = args.tr,
transcriptions = args.ts,
force_cat_output = force_cat,
genders = not args.nog and (args.g and args.g[1] and args.g or iargs.g) or nil,
categories = {},
-- Disable "terms with redundant script codes" and "terms with non-redundant manual script codes"
-- categories. We always specify the script and the categories simply aren't useful in this case; having
-- them just clutters the categories with letter entries.
no_script_code_cat = true,
}
-- All letters can also be used as nouns ("There are two f's in that word").
insert(data.categories, lang:getFullName() .. " nouns")
if sc:getCode() ~= "None" then
insert(data.categories, sc:getCategoryName() .. " characters")
end
local uppage = uupper(pagename)
local lopage = ulower(pagename)
local ucfirstpage = ucfirst(lopage)
local function insert_inflection(termobjs, label)
if not termobjs or not termobjs[1] then
return
end
if termobjs[1].term == "-" then
require(headword_utilities_module).insert_inflection {
headdata = data,
terms = termobjs,
label = label,
}
else
termobjs.label = label
insert(data.inflections, termobjs)
end
end
local typ = args.type
if not typ then
if uppage == lopage then
typ = "nocase"
elseif data.pagename == ucfirstpage then
typ = "upper"
elseif data.pagename == uppage then
typ = "allcaps"
elseif data.pagename == lopage then
typ = "lower"
else
typ = "mixed"
end
end
if typ == "nocase" then
if args.upper or args.lower or args.mixed or args.allcaps then
error("Can't specify upper=, lower=, mixed= or allcaps= when letter has no case")
end
insert(data.inflections, {label = "no case"})
else
local upper = parse_equivalent(args.upper or "+", ucfirstpage, "upper")
local lower = parse_equivalent(args.lower or "+", lopage, "lower")
local allcaps = parse_equivalent(args.allcaps or ulen(pagename) == 1 and args.upper or "+", uppage, "allcaps")
local mixed = parse_equivalent(args.mixed, nil, "mixed")
local pagenameobj = {{term = ":" .. pagename, tr = "-"}}
if typ == "upper" then
if args.upper then
error("Already uppercase; can't specify upper=")
end
insert(data.inflections, {label = "[[Appendix:Capital letter|upper case]]"})
insert_inflection(lower, "lower case")
if not deep_equals(pagenameobj, allcaps) then
insert_inflection(allcaps, "[[Appendix:Capital letter|all caps]]")
end
insert_inflection(mixed, "mixed case")
elseif typ == "lower" then
if args.lower then
error("Already lowercase; can't specify lower=")
end
insert(data.inflections, {label = "lower case"})
if deep_equals(upper, allcaps) then
if ulen(pagename) == 1 then
insert_inflection(upper, "[[Appendix:Capital letter|upper case]]")
else
insert_inflection(upper, "[[Appendix:Capital letter|upper case]] and all caps")
end
else
insert_inflection(upper, "[[Appendix:Capital letter|upper case]]")
insert_inflection(allcaps, "[[Appendix:Capital letter|all caps]]")
end
insert_inflection(mixed, "mixed case")
elseif typ == "allcaps" then
if args.allcaps then
error("Already all-caps; can't specify allcaps=")
end
insert(data.inflections, {label = "[[Appendix:Capital letter|all caps]]"})
if not deep_equals(pagenameobj, upper) then
insert_inflection(upper, "[[Appendix:Capital letter|upper case]]")
end
insert_inflection(lower, "lower case")
insert_inflection(mixed, "mixed case")
else
if args.mixed then
error("Already mixed-case; can't specify mixed=")
end
insert(data.inflections, {label = "mixed case"})
insert_inflection(lower, "lower case")
if deep_equals(upper, allcaps) then
insert_inflection(upper, "[[Appendix:Capital letter|upper case]] and all caps")
else
insert_inflection(upper, "[[Appendix:Capital letter|upper case]]")
insert_inflection(allcaps, "[[Appendix:Capital letter|all caps]]")
end
end
end
if args.nopl then
insert(data.inflections, {label = "no plural"})
elseif args.pl or iargs.pl_ending then
local default_pls
if iargs.pl_ending then
default_pls = parse_equivalent(iargs.pl_ending, nil, "pl_ending", "no_prefix_colon")
for _, pl_ending in ipairs(default_pls) do
if pl_ending.term == "_" then
pl_ending.term = pagename
else
pl_ending.term = pagename .. pl_ending.term
end
end
end
local pls = parse_equivalent(args.pl or "+", default_pls, "pl")
if not pls[2] and pls[1].term == ":" .. pagename then
require(headword_utilities_module).insert_fixed_inflection {
headdata = data,
originating_term = pls[1],
label = glossary_link("invariable"),
}
else
insert_inflection(pls, "plural")
end
end
if args.modern then
local termobjs = parse_equivalent(args.modern, nil, "modern")
insert_inflection(termobjs, "modern equivalent")
end
if others[1] then
for _, other in ipairs(others) do
local termobjs = parse_equivalent(other.value, nil, other.obj:getCode())
for _, termobj in ipairs(termobjs) do
if other.objtype == "language" then
termobj.lang = other.obj
else
termobj.sc = other.obj
end
end
insert_inflection(termobjs, other.obj:getCanonicalName() .. " equivalent")
end
end
if args.json then
return require(JSON_module).toJSON(data)
end
return require(headword_module).full_headword(data)
end
return export
0jmnzw2yn96bjfsug8n8zmultjlryw3
176033
176008
2026-04-09T03:53:36Z
Yivan000
4078
176033
Scribunto
text/plain
local export = {}
local force_cat = false
local require_when_needed = require("Module:utilities/require when needed")
local headword_module = "Module:headword"
local headword_utilities_module = "Module:headword utilities"
local JSON_module = "Module:JSON"
local languages_module = "Module:languages"
local parameters_module = "Module:parameters"
local scripts_module = "Module:scripts"
local table_module = "Module:table"
local m_string_utilities = require("Module:string utilities")
local glossary_link = require_when_needed(headword_utilities_module, "glossary_link")
local deep_equals = require_when_needed(table_module, "deepEquals")
local shallow_copy = require_when_needed(table_module, "shallowCopy")
local uupper = m_string_utilities.upper
local ucfirst = m_string_utilities.ucfirst
local ulower = m_string_utilities.lower
local ulen = m_string_utilities.len
local insert = table.insert
local per_language_defaults = {
de = {g = "n"},
en = {pl_ending = "s,'s"},
it = {g = "f,m", pl_ending = "_"},
pt = {g = "m"},
}
local function ine(val)
if not val then
return val
end
val = mw.text.trim(val)
if val == "" then return nil else return val end
end
local function add_initial_colon_to_term(term)
if term ~= "-" and term ~= "+" and not term:find("^:") then
-- Make sure we link to the specified term even if it has a diacritic that would normally be stripped off.
term = ":" .. term
end
return term
end
local function resolve_plus(termobjs, default, paramname)
local saw_plus = false
for _, termobj in ipairs(termobjs) do
if termobj.term == "+" then
saw_plus = true
break
end
end
if not saw_plus then
return termobjs
end
if not default then
error(("Saw '+' for param '%s' but no default available"):format(paramname))
end
if type(default) == "string" then
for _, termobj in ipairs(termobjs) do
if termobj.term == "+" then
termobj.term = default
end
end
return termobjs
end
if type(default) ~= "table" then
error("Internal error: `default` should be nil, string or list of strings")
end
local resolved_termobjs = {}
for _, termobj in ipairs(termobjs) do
if termobj.term == "+" then
for _, defval in ipairs(default) do
defval = shallow_copy(defval)
require(headword_utilities_module).combine_termobj_qualifiers_labels(defval, termobj)
insert(resolved_termobjs, defval)
end
else
insert(resolved_termobjs, termobj)
end
end
return resolved_termobjs
end
local function parse_equivalent(value, default, paramname, no_prefix_colon)
if not value then
return nil
end
local termobjs
if value == "+" then
-- optimization to avoid loading [[Module:headword utilities]]
if not default then
error(("Saw '+' for param '%s' but no default available"):format(paramname))
end
if type(default) == "string" then
termobjs = {{term = default}}
else
if type(default) ~= "table" then
error("Internal error: `default` should be nil, string or list of term objects")
end
termobjs = default
end
elseif value:find("[,<]") then
termobjs = require(headword_utilities_module).parse_term_with_modifiers {
val = value,
paramname = paramname,
splitchar = ",",
include_mods = {"tr", "ts", "t", "sc"},
}
else
termobjs = {{ term = value }}
end
termobjs = resolve_plus(termobjs, default, paramname)
for _, termobj in ipairs(termobjs) do
if not no_prefix_colon then
termobj.term = add_initial_colon_to_term(termobj.term)
end
termobj.tr = "-"
end
return termobjs
end
--[==[
Implementation of the letter headword template for a given language (e.g. {{tl|en-letter}}, {{tl|it-letter}} or
{{tl|sh-letter}}). Supports the following invocation parameters:
; {{para|pos}}
: The plural part of speech to use; defaults to {{cd|letters}}. Other possibilities are e.g. {{cd|numeral symbols}} for
numeral symbols (letters used for list items).
; {{para|lang}}
: The language code of the language of the headword template. Omit for language-agnostic {{tl|letter}}.
; {{para|sc}}
: Specify the default script code. Rarely needs to be given.
; {{para|g}}
: Specify the default gender(s) of the letter. Multiple comma-separated values are allowed, along with qualifier, label
and reference inline modifiers. See [[Module:gender and number]] for more information, including the allowed values.
The default(s) can be overridden using the {{para|g}} template parameter.
; {{para|pl_ending}} ...
: Specify the default ending(s) of the plural form(s) of the letter. Multiple items should be comma-separated, and
qualifier, label, reference, transliteration and gloss inline modifiers are allowed. Use the value {{cd|_}} to
indicate a null ending. The default(s) can be overridden using the {{para|pl}} template parameter.
; {{para|allow_tr|1}}
: Specify that the template allows the {{para|tr}} parameter to be given for specifying transliteration.
]==]
function export.show(frame)
local list_param = {list = true, disallow_holes = true}
local boolean_param = {type = "boolean"}
local frame_args = frame.args
local parent_args = frame:getParent().args
-- Extract language and any per-language defaults. If they exist, clone the frame args and set the defaults into the
-- frame args before parsing. If there is no language specified at either the invocation or template level, we'll
-- get an error later.
local lang = ine(frame_args.lang) or ine(parent_args[1])
if lang and per_language_defaults[lang] then
local cloned_frame_args = {}
for k, v in pairs(frame_args) do
cloned_frame_args[k] = v
end
local defaults = per_language_defaults[lang]
for k, v in pairs(defaults) do
if cloned_frame_args[k] == nil then
cloned_frame_args[k] = v
end
end
frame_args = cloned_frame_args
end
local iargs = require(parameters_module).process(frame_args, {
pos = {default = "letters"},
lang = {type = "language", template_default = "und"},
sc = {type = "script"},
g = {type = "genders"},
pl_ending = true,
allow_tr = boolean_param,
})
local allowed_types = {"upper", "lower", "mixed", "allcaps", "nocase"}
local params = {
g = {type = "genders"},
sc = {type = "script"},
type = {set = allowed_types},
head = list_param,
upper = true,
lower = true,
mixed = true,
allcaps = true,
pl = true,
nopl = boolean_param,
id = true,
sort = true,
pagename = true,
modern = true,
}
local langparam, otherparam
if not iargs.lang then
langparam = 1
otherparam = 2
params[langparam] = {type = "language", required = true, template_default = "und"}
else
otherparam = 1
end
params[otherparam] = list_param
if iargs.g and iargs.g[1] then
params.nog = boolean_param
end
if iargs.allow_tr or not iargs.lang then
params.tr = list_param
end
if not iargs.lang then
params.ts = list_param
end
local args = require(parameters_module).process(parent_args, params)
local others = {}
for i, otherspec in ipairs(args[otherparam]) do
local lang_sc, rest = otherspec:match("^([a-zA-Z0-9-]+):([^ ].*)$")
if not lang_sc then
error(("Expected other-lang or other-script param %s=%s to begin with a language code or script code followed by a colon and no space"):format(i + otherparam - 1, otherspec))
end
local obj = require(scripts_module).getByCode(lang_sc)
local objtype
if obj then
objtype = "script"
else
obj = require(languages_module).getByCode(lang_sc, nil, "allow etym")
if obj then
objtype = "language"
else
error(("Unrecognized language or script '%s' in %s=%s"):format(lang_sc, i + otherparam - 1, otherspec))
end
end
insert(others, {
obj = obj,
objtype = objtype,
value = rest,
})
end
local pagename = args.pagename or mw.loadData("Module:headword/data").pagename
if args.type then
if args.type ~= "upper" and args.type ~= "lower" and args.type ~= "mixed" and args.type ~= "nocase" then
error(("Unrecognized value for type '%s'; should be one of 'upper', 'lower', 'mixed' or 'nocase'"):format(
args.type))
end
end
local lang = langparam and args[langparam] or iargs.lang
local sc = args.sc or iargs.sc or lang:findBestScript(pagename)
local data = {
lang = lang,
sc = sc,
pos_category = iargs.pos,
categories = {},
pagename = pagename,
inflections = {},
id = args.id,
sort_key = args.sort,
heads = args.head,
translits = args.tr,
transcriptions = args.ts,
force_cat_output = force_cat,
genders = not args.nog and (args.g and args.g[1] and args.g or iargs.g) or nil,
categories = {},
-- Disable "terms with redundant script codes" and "terms with non-redundant manual script codes"
-- categories. We always specify the script and the categories simply aren't useful in this case; having
-- them just clutters the categories with letter entries.
no_script_code_cat = true,
}
-- All letters can also be used as nouns ("There are two f's in that word").
insert(data.categories, lang:getFullName() .. " na pangngalan") --TLCHANGE " nouns"
if sc:getCode() ~= "None" then
insert(data.categories, sc:getCategoryName() .. " na karakter") --TLCHANGE " characters"
end
local uppage = uupper(pagename)
local lopage = ulower(pagename)
local ucfirstpage = ucfirst(lopage)
local function insert_inflection(termobjs, label)
if not termobjs or not termobjs[1] then
return
end
if termobjs[1].term == "-" then
require(headword_utilities_module).insert_inflection {
headdata = data,
terms = termobjs,
label = label,
}
else
termobjs.label = label
insert(data.inflections, termobjs)
end
end
local typ = args.type
if not typ then
if uppage == lopage then
typ = "nocase"
elseif data.pagename == ucfirstpage then
typ = "upper"
elseif data.pagename == uppage then
typ = "allcaps"
elseif data.pagename == lopage then
typ = "lower"
else
typ = "mixed"
end
end
if typ == "nocase" then
if args.upper or args.lower or args.mixed or args.allcaps then
error("Can't specify upper=, lower=, mixed= or allcaps= when letter has no case")
end
insert(data.inflections, {label = "no case"})
else
local upper = parse_equivalent(args.upper or "+", ucfirstpage, "upper")
local lower = parse_equivalent(args.lower or "+", lopage, "lower")
local allcaps = parse_equivalent(args.allcaps or ulen(pagename) == 1 and args.upper or "+", uppage, "allcaps")
local mixed = parse_equivalent(args.mixed, nil, "mixed")
local pagenameobj = {{term = ":" .. pagename, tr = "-"}}
if typ == "upper" then
if args.upper then
error("Already uppercase; can't specify upper=")
end
insert(data.inflections, {label = "[[Appendix:Capital letter|upper case]]"})
insert_inflection(lower, "lower case")
if not deep_equals(pagenameobj, allcaps) then
insert_inflection(allcaps, "[[Appendix:Capital letter|all caps]]")
end
insert_inflection(mixed, "mixed case")
elseif typ == "lower" then
if args.lower then
error("Already lowercase; can't specify lower=")
end
insert(data.inflections, {label = "lower case"})
if deep_equals(upper, allcaps) then
if ulen(pagename) == 1 then
insert_inflection(upper, "[[Appendix:Capital letter|upper case]]")
else
insert_inflection(upper, "[[Appendix:Capital letter|upper case]] and all caps")
end
else
insert_inflection(upper, "[[Appendix:Capital letter|upper case]]")
insert_inflection(allcaps, "[[Appendix:Capital letter|all caps]]")
end
insert_inflection(mixed, "mixed case")
elseif typ == "allcaps" then
if args.allcaps then
error("Already all-caps; can't specify allcaps=")
end
insert(data.inflections, {label = "[[Appendix:Capital letter|all caps]]"})
if not deep_equals(pagenameobj, upper) then
insert_inflection(upper, "[[Appendix:Capital letter|upper case]]")
end
insert_inflection(lower, "lower case")
insert_inflection(mixed, "mixed case")
else
if args.mixed then
error("Already mixed-case; can't specify mixed=")
end
insert(data.inflections, {label = "mixed case"})
insert_inflection(lower, "lower case")
if deep_equals(upper, allcaps) then
insert_inflection(upper, "[[Appendix:Capital letter|upper case]] and all caps")
else
insert_inflection(upper, "[[Appendix:Capital letter|upper case]]")
insert_inflection(allcaps, "[[Appendix:Capital letter|all caps]]")
end
end
end
if args.nopl then
insert(data.inflections, {label = "no plural"})
elseif args.pl or iargs.pl_ending then
local default_pls
if iargs.pl_ending then
default_pls = parse_equivalent(iargs.pl_ending, nil, "pl_ending", "no_prefix_colon")
for _, pl_ending in ipairs(default_pls) do
if pl_ending.term == "_" then
pl_ending.term = pagename
else
pl_ending.term = pagename .. pl_ending.term
end
end
end
local pls = parse_equivalent(args.pl or "+", default_pls, "pl")
if not pls[2] and pls[1].term == ":" .. pagename then
require(headword_utilities_module).insert_fixed_inflection {
headdata = data,
originating_term = pls[1],
label = glossary_link("invariable"),
}
else
insert_inflection(pls, "maramihan") --TLCHANGE "plural"
end
end
if args.modern then
local termobjs = parse_equivalent(args.modern, nil, "modern")
insert_inflection(termobjs, "modern equivalent")
end
if others[1] then
for _, other in ipairs(others) do
local termobjs = parse_equivalent(other.value, nil, other.obj:getCode())
for _, termobj in ipairs(termobjs) do
if other.objtype == "language" then
termobj.lang = other.obj
else
termobj.sc = other.obj
end
end
insert_inflection(termobjs, other.obj:getCanonicalName() .. " equivalent")
end
end
if args.json then
return require(JSON_module).toJSON(data)
end
return require(headword_module).full_headword(data)
end
return export
4i7y7epoabgvt32pywm5fwnvh4paavq
Padron:list:Baybayin script letters/tl
10
37770
176009
2026-04-09T03:05:14Z
Yivan000
4078
Nilikha ang pahina na may '{{#invoke:topic list|show |hypernym=[[mga]] [[titik]] |{{tl-bay sc|A}} |{{tl-bay sc|U}} |{{tl-bay sc|I}} |{{tl-bay sc|HA}} |{{tl-bay sc|PA}} |{{tl-bay sc|KA}} |{{tl-bay sc|SA}} |{{tl-bay sc|LA}} |{{tl-bay sc|TA}} |{{tl-bay sc|NA}} |{{tl-bay sc|BA}} |{{tl-bay sc|MA}} |{{tl-bay sc|GA}} |{{tl-bay sc|DA}} |{{tl-bay sc|YA}} |{{tl-bay sc|NGA}} |{{tl-bay sc|WA}} }}<noinclude>{{list doc}}</noinclude>'
176009
wikitext
text/x-wiki
{{#invoke:topic list|show
|hypernym=[[mga]] [[titik]]
|{{tl-bay sc|A}}
|{{tl-bay sc|U}}
|{{tl-bay sc|I}}
|{{tl-bay sc|HA}}
|{{tl-bay sc|PA}}
|{{tl-bay sc|KA}}
|{{tl-bay sc|SA}}
|{{tl-bay sc|LA}}
|{{tl-bay sc|TA}}
|{{tl-bay sc|NA}}
|{{tl-bay sc|BA}}
|{{tl-bay sc|MA}}
|{{tl-bay sc|GA}}
|{{tl-bay sc|DA}}
|{{tl-bay sc|YA}}
|{{tl-bay sc|NGA}}
|{{tl-bay sc|WA}}
}}<noinclude>{{list doc}}</noinclude>
edo5x50wzfrskwezflbnjn5qflt7gzw
Kategorya:Tagalog na titik
14
37771
176010
2026-04-09T03:05:30Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176010
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
176011
176010
2026-04-09T03:06:11Z
Yivan000
4078
Inilipat ni Yivan000 ang pahinang [[Kategorya:Tagalog letters]] sa [[Kategorya:Tagalog na titik]] nang walang iniwang redirect
176010
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Padron:tl-bay sc
10
37772
176013
2026-04-09T03:08:03Z
Yivan000
4078
Ikinakarga sa [[Padron:tl-baybayin script]]
176013
wikitext
text/x-wiki
#REDIRECT [[Template:tl-baybayin script]]
sw60ooghm2eqok09mxh0kzyqybtbkg1
Module:list description
828
37773
176014
2026-04-09T03:09:56Z
Yivan000
4078
Nilikha ang pahina na may 'local export = {} function export.show(frame) local title = mw.title.getCurrentTitle() local rootpagename = title.rootText local isSubpage = title.isSubpage local subpagename = title.subpageText mw.log(rootpagename, isSubpage, subpagename) local lang, canonicalName if isSubpage then lang = require("Module:languages").getByCode(subpagename) end local listName, matches if rootpagename then listName, matches = mw.ustring.gsub(rootpagename, "list:"...'
176014
Scribunto
text/plain
local export = {}
function export.show(frame)
local title = mw.title.getCurrentTitle()
local rootpagename = title.rootText
local isSubpage = title.isSubpage
local subpagename = title.subpageText
mw.log(rootpagename, isSubpage, subpagename)
local lang, canonicalName
if isSubpage then
lang = require("Module:languages").getByCode(subpagename)
end
local listName, matches
if rootpagename then
listName, matches = mw.ustring.gsub(rootpagename, "list:", "")
end
local description
local category = ""
if lang then
if matches == 1 then
description = "This is a list of " .. listName .. " in the " .. lang:getCanonicalName() .. " language."
if mw.ustring.match(listName, "Latin script") then
category = "[[Category:Latin script templates]]"
end
else
description = "This is a list in the " .. lang:getCanonicalName() .. " language."
end
end
if description then
return description .. category
end
end
return export
2wqa2bggflly6o5f5zv6817suayr6kw
ᜋ
0
37774
176015
2026-04-09T03:11:19Z
Yivan000
4078
Nilikha ang pahina na may '{{character info}} =={{=tl=}}== ===Pagbigkas=== {{tl-pr |mamâ<qq:pangalan ng titik> |ma<qq:ponema> }} ===Titik=== {{letter|tl}} # {{l|tl|mama}}, ang ikalabing-pitong titik sa katitikang [[Baybayin]] ng Tagalog ===Tingnan din=== {{list:Baybayin script letters/tl}}'
176015
wikitext
text/x-wiki
{{character info}}
=={{=tl=}}==
===Pagbigkas===
{{tl-pr
|mamâ<qq:pangalan ng titik>
|ma<qq:ponema>
}}
===Titik===
{{letter|tl}}
# {{l|tl|mama}}, ang ikalabing-pitong titik sa katitikang [[Baybayin]] ng Tagalog
===Tingnan din===
{{list:Baybayin script letters/tl}}
7a6v928ze2u06dupcokkk9ioh9vlk84
Kategorya:Katitikang Baybayin na karakter
14
37775
176017
2026-04-09T03:24:50Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176017
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kategorya:Karakter ayon sa katitikan
14
37776
176019
2026-04-09T03:26:03Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176019
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
176020
176019
2026-04-09T03:28:09Z
Yivan000
4078
176020
wikitext
text/x-wiki
{{auto cat|english_name=Characters by script}}
kutr1pyvyjc61udyjcpnfhcq4jb0f5q
176021
176020
2026-04-09T03:30:26Z
Yivan000
4078
176021
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kategorya:Blokeng Tagalog
14
37777
176024
2026-04-09T03:35:51Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176024
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
176029
176024
2026-04-09T03:44:00Z
Yivan000
4078
Inilipat ni Yivan000 ang pahinang [[Kategorya:Tagalog na bloke]] sa [[Kategorya:Blokeng Tagalog]] nang walang iniwang redirect
176024
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Padron:check deprecated lang param usage
10
37778
176026
2026-04-09T03:38:34Z
Hiyuune
5522
Inilipat ni Hiyuune ang pahinang [[Padron:check deprecated lang param usage]] sa [[Padron:deprecated lang param usage]]
176026
wikitext
text/x-wiki
#REDIRECT [[Padron:deprecated lang param usage]]
gipzu6fvsd05ej44jvggfnoig98pp53
Kategorya:Bloke ng Yunikowd
14
37779
176030
2026-04-09T03:45:58Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176030
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Module:Unicode data/build
828
37780
176032
2026-04-09T03:49:44Z
Yivan000
4078
Nilikha ang pahina na may 'local export = {} local unpack = unpack or table.unpack -- Lua 5.2 compatibility local m_str_utils = require("Module:string utilities") local byte = string.byte local dump = mw.dumpObject local format = string.format local gmatch = m_str_utils.gmatch local gsplit = m_str_utils.gsplit local gsub = string.gsub local match = string.match local sub = string.sub local table_concat = table.concat local table_insert = table.insert local table_sort = table.sort local...'
176032
Scribunto
text/plain
local export = {}
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
local m_str_utils = require("Module:string utilities")
local byte = string.byte
local dump = mw.dumpObject
local format = string.format
local gmatch = m_str_utils.gmatch
local gsplit = m_str_utils.gsplit
local gsub = string.gsub
local match = string.match
local sub = string.sub
local table_concat = table.concat
local table_insert = table.insert
local table_sort = table.sort
local tonumber = tonumber
local trim = m_str_utils.trim
local u = m_str_utils.char
local u_codepoint = mw.ustring.codepoint
-- To update Unicode data:
-- 1. Update all raw data files (see [[Special:PrefixIndex/Module:Unicode_data/raw/]])
-- 2. Update unicode_ver below
-- 3. Run the _formatted functions, copy the return values of each to the corresponding data modules, and save them
-- 4. Update Unicode_version in [[Module:character list]] and [[Appendix:Unicode]]
local unicode_ver = "17.0" -- update as needed once raw data files have been updated.
local CODEPOINT_MAX = 0x10FFFF
local function get_text(mod)
return mw.title.new(mod):getContent()
end
local function normalize_value(val)
val = trim(val)
return val ~= "" and val or nil
end
local function unpack_line(line)
local val, rem = match(line, "^([^;]*);(.*)$")
if val then
return normalize_value(val), unpack_line(rem)
end
return normalize_value(line)
end
local function iterate_lines(mod)
return gmatch(get_text(mod), "[^\n]+")
end
local function iterate_unicode_data(mod)
local iter = iterate_lines(mod)
return function()
while true do
local line = iter()
if line == nil then
return nil
end
line = gsub(line, "#.*", "")
if line ~= "" then
return unpack_line(line)
end
end
end
end
local escapes = {
["\a"] = [[\a]], ["\b"] = [[\b]], ["\t"] = [[\t]], ["\n"] = [[\n]],
["\v"] = [[\v]], ["\f"] = [[\f]], ["\r"] = [[\r]], ["\""] = [[\"]],
["\\"] = [[\\]],
}
local function escape_byte(ch)
return escapes[ch] or format("\\%03d", byte(ch))
end
local function escape(str)
return (gsub(str, "[%c\"\\\128-\255]", escape_byte))
end
local function make_lua_string(str)
return '"' .. gsub(str, "[%c\"\\]", escape_byte) .. '"'
end
local function add(data, k, v)
local cp1, cp2 = match(k, "^(.-)%.%.(.*)$")
if cp1 then
cp1, cp2 = tonumber(cp1, 16), tonumber(cp2, 16)
for cp = cp1, cp2 do
data[u(cp)] = v
end
else
data[u(tonumber(k, 16))] = v
end
end
local function add_num(data, k, v)
local cp1, cp2 = match(k, "^(.-)%.%.(.*)$")
if cp1 then
cp1, cp2 = tonumber(cp1, 16), tonumber(cp2, 16)
for cp = cp1, cp2 do
data[cp] = v
end
else
data[tonumber(k, 16)] = v
end
end
local function gather_singles_ranges(arr, max_singles_group)
local singles = {}
local ranges = {}
local anchor = nil
local last_val = nil
max_singles_group = max_singles_group or 1
for i = 0, CODEPOINT_MAX + 1 do -- intentionally one past
local val = arr[i]
if val == last_val then
anchor = anchor or i
else
if anchor ~= nil and last_val ~= nil then
if i - anchor <= max_singles_group then
for j = anchor, i - 1 do
table_insert(singles, { j, last_val })
end
else
table_insert(ranges, { anchor, i - 1, last_val })
end
end
anchor = i
last_val = val
end
end
return singles, ranges
end
function export.combining_classes()
local data = {}
for cp, class in iterate_unicode_data("Module:Unicode data/raw/DerivedCombiningClass.txt") do
class = tonumber(class)
if class ~= 0 then
add(data, cp, class)
end
end
return data
end
-- output goes to [[Module:Unicode data/combining classes]]
function export.combining_classes_formatted()
local data = export.combining_classes()
local sorted_pairs = {}
for ch, class in pairs(data) do
table_insert(sorted_pairs, { u_codepoint(ch), class })
end
table_sort(sorted_pairs, function (a, b) return a[1] < b[1] end)
local formatted_rows = {}
for _, kv in ipairs(sorted_pairs) do
local codepoint, class = unpack(kv)
table_insert(formatted_rows, string.format("\t[\"%s\"] = %d,\t-- U+%04X", escape(u(codepoint)), class, codepoint))
end
return "-- Generated by [[Module:Unicode data/build]] combining_classes_formatted (Unicode version " .. unicode_ver .. ")\nreturn {\n" .. table_concat(formatted_rows, "\n") .. "\n}"
end
function export.blocks()
local data = {}
for cp, block_name in iterate_unicode_data("Module:Unicode data/raw/Blocks.txt") do
local cp1, cp2 = match(cp, "^(.-)%.%.(.*)$")
if cp1 then
cp1, cp2 = tonumber(cp1, 16), tonumber(cp2, 16)
table_insert(data, { cp1, cp2, block_name })
else
cp1 = tonumber(k, 16)
table_insert(data, { cp1, cp1, block_name })
end
end
return data
end
-- output goes to [[Module:Unicode data/blocks]]
function export.blocks_formatted()
local data = export.blocks()
local formatted_rows = {}
for _, kv in ipairs(data) do
local cp1, cp2, block_name = unpack(kv)
table_insert(formatted_rows, format("\t{ 0x%06X, 0x%06X, %-60s },", cp1, cp2, make_lua_string(block_name)))
end
return "-- Generated by [[Module:Unicode data/build]] blocks_formatted (Unicode version " .. unicode_ver .. ")\nlocal blocks = {\n" .. table_concat(formatted_rows, "\n") .. "\n}\nblocks.length = #blocks\n\nreturn blocks"
end
function export.name_aliases()
local data = {}
for cp, alias, tp in iterate_unicode_data("Module:Unicode data/raw/NameAliases.txt") do
local cp_num = tonumber(cp, 16)
local cp_data = data[cp_num]
if cp_data == nil then
cp_data = {}
data[cp_num] = cp_data
elseif cp_data[alias] ~= nil then
error(format("Alias %s specified more than once in the data", dump(alias)))
end
cp_data[alias] = tp
end
return data
end
-- output goes to [[Module:Unicode data/aliases]]
function export.name_aliases_formatted()
local data = export.name_aliases()
local defnames = { "correction", "control", "alternate", "figment", "abbreviation" }
local has_def = {}
local defstrings = {}
for _, v in ipairs(defnames) do
has_def[v] = true
table_insert(defstrings, make_lua_string(v))
end
local defs = "local " .. table_concat(defnames, ", ") .. " =\n\t" .. table_concat(defstrings, ", ")
local formatted_rows = {}
for i = 0, 0x10FFFF do
if data[i] then
local formatted_subrows = {}
for k, v in pairs(data[i]) do
if not has_def[v] then error(("Missing string '%s' from defnames"):format(v)) end
table_insert(formatted_subrows, format('\t\t{ %12s, %s };', v, make_lua_string(k)))
end
table_sort(formatted_subrows)
table_insert(formatted_rows, format("\t[0x%06X] = {\n%s\n\t};", i, table_concat(formatted_subrows, "\n")))
end
end
return "-- Generated by [[Module:Unicode data/build]] name_aliases_formatted (Unicode version " .. unicode_ver .. ")\n" .. defs .. "\n\nreturn {\n" .. table_concat(formatted_rows, "\n") .. "\n}"
end
function export.scripts()
--[=[
-- Official Unicode script values for individual codepoints and ranges of
-- codepoints.
-- https://www.unicode.org/Public/UNIDATA/Scripts.txt provided
-- the script names, https://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt
-- provided script codes corresponding to the names (see [[Script (Unicode)]]),
-- and https://www.unicode.org/Public/UNIDATA/ScriptExtensions.txt provided
-- script extensions.
--]=]
-- Script extensions are not currently used.
local script_aliases = {}
local script_aliases_reverse = {}
for kind, sc, name in iterate_unicode_data("Module:Unicode data/raw/PropertyValueAliases.txt") do
if kind == "sc" then
script_aliases[sc] = gsub(name, "_", " ")
script_aliases_reverse[name] = sc
end
end
local cp_sc = {}
for cp, script in iterate_unicode_data("Module:Unicode data/raw/Scripts.txt") do
add_num(cp_sc, cp, script_aliases_reverse[script])
end
local singles, ranges = gather_singles_ranges(cp_sc, 2)
return {
singles = singles,
ranges = ranges,
aliases = script_aliases,
}
end
-- output goes to [[Module:Unicode data/scripts]]
function export.scripts_formatted()
local data = export.scripts()
local formatted_groups = {}
local formatted_rows
formatted_rows = {}
for _, tuple in ipairs(data.singles) do
table_insert(formatted_rows, format('\t\t[0x%05X] = "%s",', unpack(tuple)))
end
table_insert(formatted_groups, "\tsingles = {\n" .. table_concat(formatted_rows, "\n") .. "\n\t},")
formatted_rows = {}
for _, tuple in ipairs(data.ranges) do
table_insert(formatted_rows,format ('\t\t{ 0x%05X, 0x%05X, "%s" },', unpack(tuple)))
end
table_insert(formatted_groups, "\tranges = {\n" .. table_concat(formatted_rows, "\n") .. "\n\t},")
formatted_rows = {}
local alias_pairs = {}
for k, v in pairs(data.aliases) do
table_insert(alias_pairs, { k, v })
end
table_sort(alias_pairs, function (a, b) return a[1] < b[1] end)
for _, tuple in ipairs(alias_pairs) do
table_insert(formatted_rows, format('\t\t%s = %s,', tuple[1], make_lua_string(tuple[2])))
end
table_insert(formatted_groups, "\t--Scripts.txt gives full names; here we consider them aliases to save space.\n\taliases = {\n" .. table_concat(formatted_rows, "\n") .. "\n\t},")
return "-- Generated by [[Module:Unicode data/build]] scripts_formatted (Unicode version " .. unicode_ver .. ")\n\nlocal data = {\n" .. table_concat(formatted_groups, "\n\n") .. "\n}\n\n" .. [=[
-- Required for binary search function in [[Module:Language/scripts]].
-- Cannot get length of module loaded with mw.loadData.
data.ranges.length = #data.ranges
return data
]=]
end
function export.category(kind_filter)
local long_names = {}
for kind, gc, name in iterate_unicode_data("Module:Unicode data/raw/PropertyValueAliases.txt") do
if kind == "gc" and (not kind_filter or kind_filter[gc]) then
long_names[gc] = name
end
end
local cp_gc = {}
for cp, gc in iterate_unicode_data("Module:Unicode data/raw/DerivedGeneralCategory.txt") do
if not kind_filter or kind_filter[gc] then
add_num(cp_gc, cp, gc)
end
end
local singles, ranges = gather_singles_ranges(cp_gc, 1)
return {
singles = singles,
ranges = ranges,
long_names = long_names,
}
end
-- output goes to [[Module:Unicode data/category]]
function export.category_formatted()
local data = export.category()
local formatted_groups = {}
local formatted_rows
formatted_rows = {}
for _, tuple in ipairs(data.singles) do
table_insert(formatted_rows, format('\t\t[0x%05X] = "%s",', unpack(tuple)))
end
table_insert(formatted_groups, "\tsingles = {\n" .. table_concat(formatted_rows, "\n") .. "\n\t},")
formatted_rows = {}
for _, tuple in ipairs(data.ranges) do
table_insert(formatted_rows, format('\t\t{ 0x%06X, 0x%06X, "%s" },', unpack(tuple)))
end
table_insert(formatted_groups, "\tranges = {\n" .. table_concat(formatted_rows, "\n") .. "\n\t},")
formatted_rows = {}
local long_name_pairs = {}
for k, v in pairs(data.long_names) do
table_insert(long_name_pairs, { k, v })
end
table_sort(long_name_pairs, function (a, b) return a[1] < b[1] end)
for _, tuple in ipairs(long_name_pairs) do
table_insert(formatted_rows, format('\t\t%-02s = %s,', tuple[1], make_lua_string(tuple[2])))
end
table_insert(formatted_groups, "\tlong_names = {\n" .. table_concat(formatted_rows, "\n") .. "\n\t},")
return "-- Generated by [[Module:Unicode data/build]] category_formatted (Unicode version " .. unicode_ver .. ")\n\nlocal data = {\n" .. table_concat(formatted_groups, "\n\n") .. "\n}\n\n" .. [=[
data.ranges.length = #data.ranges
return data
]=]
end
-- output goes to [[Module:Unicode data/control]]
function export.control_formatted()
local control_classes = {
{ "Cc", "control" },
{ "Cf", "format" },
{ "Cs", "surrogate" },
{ "Co", "private-use" },
{ "Cn", "unassigned" },
{ "Zs", "space-separator" },
{ "Zl", "line-separator" },
{ "Zp", "paragraph-separator" },
}
local control_classes_kv = {}
local control_classes_by_first_letter = {}
local control_classes_first_letters = {}
for _, kv in ipairs(control_classes) do
local k, v = unpack(kv)
control_classes_kv[k] = v
local first_letter = sub(k, 1, 1)
if not control_classes_by_first_letter[first_letter] then
table_insert(control_classes_first_letters, first_letter)
control_classes_by_first_letter[first_letter] = {
vars = {}, values = {}
}
end
local target = control_classes_by_first_letter[first_letter]
table_insert(target.vars, k)
table_insert(target.values, v)
end
local control_classes_defs = {}
for _, first_letter in ipairs(control_classes_first_letters) do
local target = control_classes_by_first_letter[first_letter]
local formatted_values = {}
for _, v in ipairs(target.values) do
table.insert(formatted_values, make_lua_string(v))
end
table_insert(control_classes_defs, "local " .. table_concat(target.vars, ", ") .. " =\n\t" .. table_concat(formatted_values, ", "))
end
local header = table_concat(control_classes_defs, "\n") .. "\n"
local data = export.category(control_classes_kv)
local formatted_groups = {}
local formatted_rows
formatted_rows = {}
for _, tuple in ipairs(data.singles) do
table_insert(formatted_rows, format('\t\t[0x%06X] = %s,', unpack(tuple)))
end
table_insert(formatted_groups, "\tsingles = {\n" .. table_concat(formatted_rows, "\n") .. "\n\t};")
formatted_rows = {}
for _, tuple in ipairs(data.ranges) do
table_insert(formatted_rows, format('\t\t{ 0x%06X, 0x%06X, %s },', unpack(tuple)))
end
table_insert(formatted_groups, "\tranges = {\n" .. table_concat(formatted_rows, "\n") .. "\n\t};")
return "-- Generated by [[Module:Unicode data/build]] control_formatted (Unicode version " .. unicode_ver .. ")\n" .. header .. "\nlocal data = {\n" .. table_concat(formatted_groups, "\n\n") .. "\n}\n\n" .. [=[
data.ranges.length = #data.ranges
return data
]=]
end
return export
mmxixdjqy5nmjvcw8pqssp724yx06fu
Kategorya:Blokeng Hiragana
14
37781
176034
2026-04-09T03:59:23Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176034
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kategorya:Franses na anyong pandiwa
14
37782
176036
2026-04-09T04:46:27Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176036
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kategorya:Rumano na anyong di-lema
14
37783
176037
2026-04-09T04:47:12Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176037
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kategorya:Rumano na anyong pangngalan
14
37784
176038
2026-04-09T04:49:57Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176038
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kategorya:Rumano na anyong pang-uri
14
37785
176039
2026-04-09T04:50:34Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176039
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kategorya:Italyano na anyong pandiwa
14
37786
176040
2026-04-09T04:51:33Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176040
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kategorya:Italyano na anyong di-lema
14
37787
176041
2026-04-09T04:51:51Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176041
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Padron:lbor
10
37788
176042
2026-04-09T04:55:56Z
Yivan000
4078
Ikinakarga sa [[Padron:learned borrowing]]
176042
wikitext
text/x-wiki
#REDIRECT [[Template:learned borrowing]]
1sb0a05g1fxcx4wf617c0mtcp0eex0p
Padron:learned borrowing
10
37789
176043
2026-04-09T04:56:09Z
Yivan000
4078
Nilikha ang pahina na may '<includeonly>{{#invoke:etymology/templates|specialized_borrowing|bortype=learned}}</includeonly><noinclude>{{lbor|mul|mul|test}}{{documentation}}</noinclude>'
176043
wikitext
text/x-wiki
<includeonly>{{#invoke:etymology/templates|specialized_borrowing|bortype=learned}}</includeonly><noinclude>{{lbor|mul|mul|test}}{{documentation}}</noinclude>
leqvgq63dxaka2a0vaadfh9xzyifpot
Padron:com+
10
37790
176044
2026-04-09T04:56:43Z
Yivan000
4078
Nilikha ang pahina na may '{{glossary|{{#if:{{{nocap|}}}|c|C}}ompound}} of {{#invoke:affix/templates|compound}}<noinclude>{{documentation}}</noinclude>'
176044
wikitext
text/x-wiki
{{glossary|{{#if:{{{nocap|}}}|c|C}}ompound}} of {{#invoke:affix/templates|compound}}<noinclude>{{documentation}}</noinclude>
ajck284pet1eufkmutpfzgqiwdtx869
Padron:sa-IPA
10
37791
176045
2026-04-09T04:57:10Z
Yivan000
4078
Nilikha ang pahina na may '{{#invoke:sa-pronunc|show}}<!-- --><noinclude>{{documentation}}</noinclude>'
176045
wikitext
text/x-wiki
{{#invoke:sa-pronunc|show}}<!--
--><noinclude>{{documentation}}</noinclude>
3ath8tik9m9lkpi3n35lfx80rtl08c5
Padron:sa-decl-noun-f
10
37792
176046
2026-04-09T04:57:15Z
Yivan000
4078
Nilikha ang pahina na may '<includeonly>{{#invoke:sa-decl|show|f}}</includeonly><!-- --><noinclude>{{tcat|ndecl:f}}</noinclude><!-- --><noinclude>{{documentation}}</noinclude>'
176046
wikitext
text/x-wiki
<includeonly>{{#invoke:sa-decl|show|f}}</includeonly><!--
--><noinclude>{{tcat|ndecl:f}}</noinclude><!--
--><noinclude>{{documentation}}</noinclude>
t0l1pj57nq53tvx53bgumcewykfwssa
Module:sa-pronunc
828
37793
176047
2026-04-09T04:58:18Z
Yivan000
4078
Nilikha ang pahina na may 'local export = {} local u = require("Module:string/char") local gsub = mw.ustring.gsub local match = mw.ustring.match local ACUTE = u(0x0301) local COARTIC = u(0x0361) local DENTAL = u(0x032A) local FLAP = u(0x0306) local NORELEASE = u(0x031A) local SYLLABIC = u(0x0329) local NASAL = u(0x0303) local m_IPA = require("Module:IPA") local lang = require("Module:languages").getByCode("sa") local m_a = require("Module:accent qualifier") local con...'
176047
Scribunto
text/plain
local export = {}
local u = require("Module:string/char")
local gsub = mw.ustring.gsub
local match = mw.ustring.match
local ACUTE = u(0x0301)
local COARTIC = u(0x0361)
local DENTAL = u(0x032A)
local FLAP = u(0x0306)
local NORELEASE = u(0x031A)
local SYLLABIC = u(0x0329)
local NASAL = u(0x0303)
local m_IPA = require("Module:IPA")
local lang = require("Module:languages").getByCode("sa")
local m_a = require("Module:accent qualifier")
local consonants = {
["क"] = "k", ["ग"] = "ɡ", ["ख"] = "kʰ", ["घ"] = "ɡʱ", ["ङ"] = "ŋ",
["च"] = "t͡ɕ", ["ज"] = "d͡ʑ", ["छ"] = "t͡ɕʰ", ["झ"] = "d͡ʑʱ", ["ञ"] = "ɲ",
["त"] = "t", ["द"] = "d", ["थ"] = "tʰ", ["ध"] = "dʱ", ["न"] = "n",
["ट"] = "ʈ", ["ड"] = "ɖ", ["ठ"] = "ʈʰ", ["ढ"] = "ɖʱ", ["ण"] = "ɳ",
["प"] = "p", ["ब"] = "b", ["फ"] = "pʰ", ["भ"] = "bʱ", ["म"] = "m",
["य"] = "j", ["र"] = "ɾ", ["ल"] = "l", ["व"] = "ʋ", ["ळ"] = "ɭ̆", -- ["ळ्ह"] = "ɭ̆ʱ",
["श"] = "ɕ", ["ष"] = "ʂ", ["स"] = "s", ["ह"] = "ɦ",
}
local diacritics = {
["ा"] = "ɑː", ["ि"] = "i", ["ी"] = "iː", ["ु"] = "u", ["ू"] = "uː", ["ृ"] = "r̩", ["ॄ"] = "r̩ː",
["ॢ"] = "l̩", ["ॣ"] = "l̩ː", ["े"] = "ɐj", ["ै"] = "ɑːj", ["ो"] = "ɐw", ["ौ"] = "ɑːw", ["्"] = "",
}
local vowel_list = {
["ɐ"] = true, ["ɑː"] = true, ["i"] = true, ["iː"] = true, ["u"] = true, ["uː"] = true, ["r̩"] = true, ["r̩ː"] = true,
["l̩"] = true, ["l̩ː"] = true, ["ɐj"] = true, ["ɑːj"] = true, ["ɐw"] = true, ["ɑːw"] = true,
}
local stop_list = {
["k"] = true, ["ɡ"] = true, ["kʰ"] = true, ["ɡʱ"] = true,
["t͡ɕ"] = true, ["d͡ʑ"] = true, ["t͡ɕʰ"] = true, ["d͡ʑʱ"] = true,
["t"] = true, ["d"] = true, ["tʰ"] = true, ["dʱ"] = true,
["ʈ"] = true, ["ɖ"] = true, ["ʈʰ"] = true, ["ɖʱ"] = true,
["p"] = true, ["b"] = true, ["pʰ"] = true, ["bʱ"] = true,
}
local consonant_sonority = {
-- voiceless stops and affricates
["k"] = 1, ["kʰ"] = 1,
["t͡ɕ"] = 1, ["t͡ɕʰ"] = 1,
["t"] = 1, ["tʰ"] = 1,
["ʈ"] = 1, ["ʈʰ"] = 1,
["p"] = 1, ["pʰ"] = 1,
-- voiceless fricatives
["ɕ"] = 2, ["ʂ"] = 2, ["s"] = 2, ["h"] = 2, ["x"] = 2, ["ɸ"] = 2,
-- voiced stops and affricates
["ɡ"] = 3, ["ɡʱ"] = 3,
["d͡ʑ"] = 3, ["d͡ʑʱ"] = 3,
["d"] = 3, ["dʱ"] = 3,
["ɖ"] = 3, ["ɖʱ"] = 3,
["b"] = 3, ["bʱ"] = 3,
-- voiced fricatives
["ɦ"] = 4,
-- nasals
["ŋ"] = 5, ["ɲ"] = 5, ["n"] = 5, ["ɳ"] = 5, ["m"] = 5, ["m̐"] = 5, ["ṃ"] = 5,
-- flaps
["ɾ"] = 6,
-- laterals
["l"] = 7, ["ɭ̆"] = 7, ["ɭ̆ʱ"] = 7,
-- glides
["j"] = 8, ["ʋ"] = 8,
}
local tt = {
-- vowels
["अ"] = "ɐ", ["आ"] = "ɑː", ["इ"] = "i", ["ई"] = "iː", ["उ"] = "u", ["ऊ"] = "uː", ["ऋ"] = "r̩", ["ॠ"] = "r̩ː",
["ऌ"] = "l̩", ["ॡ"] = "l̩ː", ["ए"] = "ɐj", ["ऐ"] = "ɑːj", ["ओ"] = "ɐw", ["औ"] = "ɑːw",
-- visarga
["ः"] = "h",
-- chandrabindu
["ँ"] = "m̐",
-- anusvara
["ं"] = "ṃ",
-- avagraha
['ऽ'] = "",
--Vedic extensions
['ᳵ'] = "x", ['ᳶ'] = "ɸ",
}
local accent_vowel = {
["ɐ"] = "ɐ́", ["ɑː"] = "ɑ́ː", ["i"] = "í", ["iː"] = "íː", ["u"] = "ú", ["uː"] = "úː", ["r̩"] = "ŕ̩", ["r̩ː"] = "ŕ̩ː",
["l̩"] = "ĺ̩", ["l̩ː"] = "ĺ̩ː", ["ɐj"] = "ɐ́j", ["ɑːj"] = "ɑ́ːj", ["ɐw"] = "ɐ́w", ["ɑːw"] = "ɑ́ːw",
}
local function shift_to_codas(syllables)
-- shift codas to previous syllable using the Weerasinghe-Wasala-Gamage method
local to_move = 0
for i, syll in ipairs(syllables) do
if i == 1 then
-- no need to shift to coda if in the first syllable
elseif #syll < 3 then
-- coda movement only needed for onset clusters of 2 or more
elseif #syll == 3 then
-- V.CCV => VC.CV
to_move = 1
elseif #syll == 4 then
if syll[#syll - 1] == "ɾ" or syll[#syll - 1] == "j" or (stop_list[syll[1]] and stop_list[syll[2]]) then
-- V.CCrV or V.CCyV => VC.CrV or VC.CyV
-- if the first two consonants are stops, VC.CCV
to_move = 1
else
-- V.CCCV => VCC.CV
to_move = 2
end
else
-- 4 consonants or more
if syll[#syll - 1] == "ɾ" or syll[#syll - 1] == "j" then
to_move = #syll - 3
else
-- find index of consonant of least sonority
to_move = #syll - 1
local min_son = consonant_sonority[syll[#syll - 1]]
for i = (#syll - 1), 1, -1 do
if consonant_sonority[syll[i]] < min_son then
to_move = i
min_son = consonant_sonority[syll[i]]
end
end
end
end
while to_move > 0 do
table.insert(syllables[i - 1], table.remove(syllables[i], 1))
to_move = to_move - 1
end
end
return syllables
end
local function syllabify(remainder, accent)
local syllables = {}
local syll = {}
while #remainder > 0 do
local phoneme = table.remove(remainder, 1)
if vowel_list[phoneme] then
table.insert(syll, phoneme)
table.insert(syllables, syll)
syll = {}
else
table.insert(syll, phoneme)
end
end
-- store whatever consonants remain
local final_cons = syll
-- Vedic pitch accent
if accent ~= nil and accent <= #syllables then
syll = syllables[accent]
syllables[accent][#syll] = accent_vowel[syll[#syll]]
end
syllables = shift_to_codas(syllables)
-- it is not necessary to include 'l' in the pattern for short vowels as it doesn't occur as a vowel in syllable coda and as consonantal 'l' would then be erroneously included
local short_vowel_patt = "^[ɐiur]" .. SYLLABIC .. "?" .. ACUTE .. "?$"
-- Classic stress accent
-- local num_sylls = #syllables
-- if num_sylls == 2 then
-- table.insert(syllables[1], 1, 'ˈ')
-- elseif num_sylls == 3 then
-- -- if the final segment of the second syllable is not a short vowel, stress the second syllable
-- if match(syllables[2][#syllables[2]], short_vowel_patt) == nil then
-- table.insert(syllables[2], 1, 'ˈ')
-- -- else stress the third
-- else
-- table.insert(syllables[1], 1, 'ˈ')
-- end
-- elseif num_sylls >= 4 then
-- if match(syllables[num_sylls - 1][#syllables[num_sylls - 1]], short_vowel_patt) == nil then
-- table.insert(syllables[num_sylls - 1], 1, 'ˈ')
-- elseif match(syllables[num_sylls - 2][#syllables[num_sylls - 2]], short_vowel_patt) == nil then
-- table.insert(syllables[num_sylls - 2], 1, 'ˈ')
-- else
-- table.insert(syllables[num_sylls - 3], 1, 'ˈ')
-- end
-- end
-- If there are phonemes left, then the word ends in a consonant
-- Add them to the last syllable
for _, phoneme in ipairs(final_cons) do
table.insert(syllables[#syllables], phoneme)
end
for i, _ in ipairs(syllables) do
syllables[i] = table.concat(syllables[i], "")
end
return table.concat(syllables, ".")
end
local anu_to_nasals = {
["k"] = "ŋ", ["ɡ"] = "ŋ", ["ŋ"] = "ŋ",
["t͡ɕ"] = "ɲ", ["d͡ʑ"] = "ɲ", [""] = "ɲ",
["t"] = "n", ["d"] = "n", ["n"] = "n",
["ʈ"] = "ɳ", ["ɖ"] = "ɳ", ["ɳ"] = "ɳ",
["p"] = "m", ["b"] = "m", ["m"] = "m",
}
local function anusvara(text)
text = gsub(text, "ṃ$", "m")
text = gsub(
text,
"ṃ([ %.ˈ]?)([kɡtdnʈɖpbm])([" .. DENTAL .. COARTIC .. "]?)([ɕʑ]?)",
function(div, cons, mark, fric)
return anu_to_nasals[cons .. mark .. fric] .. div .. cons .. mark .. fric
end
)
text = gsub(
text,
"([ɐɑiurleo])(" .. SYLLABIC .. "?)(" .. ACUTE .. "?)(ː?)([jw]?)ṃ",
"%1%2" .. NASAL .. "%3%4%5"
)
text = gsub(text, "ṃ", "ɴ")
return text
end
local function convert_word(word, accent)
local chars = {}
local t = {}
gsub(word, ".", function(c) table.insert(chars, c) end)
for i, c in ipairs(chars) do
if consonants[c] then
table.insert(t, consonants[c])
if not diacritics[chars[i + 1]] then
table.insert(t, "ɐ")
end
elseif c == "्" then
-- do nothing
elseif diacritics[c] then
table.insert(t, diacritics[c])
elseif tt[c] then
table.insert(t, tt[c])
end
end
word = syllabify(t, accent)
word = gsub(word, "%.ˈ", "ˈ")
-- correction for ळ्ह = ɭ̆ʱ
word = gsub(word, "ɭ̆([.']?)ɦ", "%1ɭ̆ʱ")
-- chandrabindu
word = gsub(
word,
"([ɐɑiurleo])(" .. SYLLABIC .. "?)(" .. ACUTE .. "?)(ː?)([jw]?)m̐",
"%1%2" .. NASAL .. "%3%4%5"
)
return word
end
local function convert_words(words, accents)
local result = {}
local word_num = 1
for word in mw.text.gsplit(words, " ") do
table.insert(result, convert_word(word, accents[word_num]))
word_num = word_num + 1
end
text = table.concat(result, " ")
return text
end
local function phon_procs(text)
-- Anusvāra
text = anusvara(text)
return text
end
local function abhinidhana_phonemic(text)
--de-aspirate and de-affricate before stops
text = gsub(
text,
"([kɡtdʈɖpb])(" .. DENTAL .. "?)[ʰʱ]?([ %.ˈ]?)([kɡtdʈɖpb])",
"%1%2%3%4"
)
text = gsub(
text,
"([td])" .. COARTIC .. "[ɕʑ][ʰʱ]?([ %.ˈ]?)([kɡtdʈɖpb])",
"%1%2%3"
)
return text
end
local function abhinidhana_phonetic(text)
text = gsub(
text,
"([kɡtdʈɖpb])(" .. DENTAL .. "?)([ %.ˈ]?)([kɡtdʈɖpb])",
"%1%2" .. NORELEASE .. "%3%4"
)
return text
end
local superscript = {
["ɐ"] = "ɐ̆",
["ɑ"] = "ɑ̆",
["e"] = "ĕ",
["o"] = "ŏ",
["i"] = "ĭ",
["u"] = "ŭ",
}
local function make_dialects(text)
local dialects = {}
text = abhinidhana_phonemic(text)
-- Rigvedic Sanskrit
local rig_phnm = text
rig_phnm = gsub(rig_phnm, "^ˈ", "")
rig_phnm = gsub(rig_phnm, "ˈ", ".")
rig_phnm = gsub(rig_phnm, " %.", " ")
local rig_phnt = abhinidhana_phonetic(rig_phnm)
-- visarga alternation
rig_phnt = gsub(rig_phnt, "h([ %.ˈ]?)([p])", "ɸ%1%2")
rig_phnt = gsub(rig_phnt, "h([ %.ˈ]?)([k])", "x%1%2")
-- nasalized semivowels
rig_phnt = gsub(
rig_phnt,
"([ŋɲnɳm])(" .. DENTAL .. "?)([ %.ˈ]?)([lɭjʋ])([" .. DENTAL .. FLAP .. "]?)(ʱ?)",
"%4%5" .. NASAL .. "%3%4%5%6"
)
dialects['rig'] = {
label = "Vedic",
phonemic = rig_phnm,
phonetic = rig_phnt,
}
-- Classical Sanskrit
local cla_phnm = text
cla_phnm = gsub(cla_phnm, "[éóíúŕĺ" .. ACUTE .. "]", {
["é"] = "e", ["ó"] = "o", ["í"] = "i", ["ú"] = "u",
["ŕ"] = "r", ["ĺ"] = "l", [ACUTE] = ""
})
cla_phnm = gsub(cla_phnm, "ɐ(" .. NASAL .. "?)j", "e%1ː")
cla_phnm = gsub(cla_phnm, "ɐ(" .. NASAL .. "?)w", "o%1ː")
cla_phnm = gsub(cla_phnm, "ɑ(" .. NASAL .. "?)ː([jw])", "ɑ%1%2")
-- Add dental diacritic to t, d, tʰ, dʱ, n, l, s.
cla_phnm = gsub(
cla_phnm,
"([td]" .. COARTIC .. "?[ɕʑ]?)([ʰʱ]?)",
function(base_consonant, aspiration)
if base_consonant == "t" or base_consonant == "d" then
return base_consonant .. DENTAL .. aspiration
end
end
)
cla_phnm = gsub(cla_phnm, "([nls])", "%1" .. DENTAL)
local cla_phnt = abhinidhana_phonetic(cla_phnm)
-- cla_pron = gsub(cla_pron, "r̩(" .. NASAL .. "?)(" .. ACUTE .. "?)(ː?)", "ɾi%1%2%3")
-- cla_pron = gsub(cla_pron, "l̩(" .. NASAL .. "?)(" .. ACUTE .. "?)(ː?)", "l̪i%1%2%3")
cla_phnt = gsub(
cla_phnt,
"([ɐɑeoiu])(" .. NASAL .. "?)(ː?)([jw]?)h$",
function (vow, nas, length, glide)
return vow .. nas .. length .. glide .. "h" .. superscript[vow]
end
)
cla_phnt = gsub(
cla_phnt,
"([ɐɑeoiu])(" .. NASAL .. "?)(ː?)([jw]?)h ",
function (vow, nas, length, glide)
return vow .. nas .. length .. glide .. "h" .. superscript[vow] .. " "
end
)
dialects['cla'] = {
label = "Classical Sanskrit",
phonemic = cla_phnm,
phonetic = cla_phnt,
}
return dialects
end
local function make_table(dialects, novedic, noclassical, nolabel)
local dial_types = {'rig', 'cla'}
if novedic then
table.remove(dial_types, 1)
end
if noclassical then
table.remove(dial_types, 2)
end
if #dial_types == 1 then
local dial = dial_types[1]
local IPA_args = {{pron = '/' .. dialects[dial].phonemic .. '/'}}
if dialects[dial].phonemic ~= dialects[dial].phonetic then
table.insert(IPA_args, {pron = '[' .. dialects[dial].phonetic .. ']'})
end
if nolabel then
return m_IPA.format_IPA_full { lang = lang, items = IPA_args }
else
return table.concat{
'\n* ',
m_a.format_qualifiers(lang, {dialects[dial].label}),
' ',
m_IPA.format_IPA_full { lang = lang, items = IPA_args },
}
end
else
local inline_args = {{pron = '/' .. dialects.cla.phonemic .. '/'}}
if dialects.cla.phonemic ~= dialects.cla.phonetic then
table.insert(inline_args, {pron = '['.. dialects.cla.phonetic ..']'})
end
local full = {}
for _, dial in ipairs(dial_types) do
local full_args = {{pron = '/' .. dialects[dial].phonemic .. '/'}}
if dialects[dial].phonemic ~= dialects[dial].phonetic then
table.insert(full_args, {pron = '['.. dialects[dial].phonetic ..']'})
end
table.insert(full, table.concat{
'\n* ',
m_a.format_qualifiers(lang, {dialects[dial].label}),
' ',
m_IPA.format_IPA_full { lang = lang, items = full_args },
})
end
return table.concat(full, "")
end
end
function export.show(frame)
local params = {
[1] = {alias_of = 'w'},
w = {default = mw.loadData("Module:headword/data").pagename},
a = {list = true, allow_holes = true, type = 'number'},
novedic = {type = 'boolean'},
noclassical = {type = 'boolean'},
nolabel = {type = 'boolean'},
}
local args = require("Module:parameters").process(frame:getParent().args, params)
local text = convert_words(args.w, args.a)
text = phon_procs(text)
local dialects = make_dialects(text)
return make_table(dialects, args.novedic, args.noclassical, args.nolabel)
end
return export
7tzp3llma5wlvcmngnet02jhyxd8v4p
Module:hi-pa-headword
828
37794
176049
2026-04-09T05:03:39Z
Yivan000
4078
Inilipat ni Yivan000 ang pahinang [[Module:hi-pa-headword]] sa [[Module:inc-headword]]: enwikt parity
176049
Scribunto
text/plain
return require [[Module:inc-headword]]
g99jwaujgaxkw3cpzrctww5ambl419d
Padron:hi-adj
10
37795
176052
2026-04-09T05:06:38Z
Yivan000
4078
Nilikha ang pahina na may '{{#invoke:inc-headword|show|adjectives|lang=hi}}<!-- --><noinclude>{{documentation}}</noinclude>'
176052
wikitext
text/x-wiki
{{#invoke:inc-headword|show|adjectives|lang=hi}}<!--
--><noinclude>{{documentation}}</noinclude>
l293wv67umtmji8iok9xurj76dj879q
Kategorya:Salitang minana mula sa Nerlandes ayon sa wika
14
37796
176056
2026-04-09T05:24:43Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176056
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kategorya:Danes na salitang hinango mula sa Franses
14
37797
176066
2026-04-09T05:39:37Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176066
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Padron:sv-infl-noun-c-er
10
37798
176067
2026-04-09T05:56:03Z
Yivan000
4078
Nilikha ang pahina na may '{{#invoke:sv-nouns|show|c-er}}<noinclude>{{documentation}}</noinclude>'
176067
wikitext
text/x-wiki
{{#invoke:sv-nouns|show|c-er}}<noinclude>{{documentation}}</noinclude>
fu9tr5k1auydgffc6wegg7qja9bp6cg
Padron:ca-pp
10
37799
176068
2026-04-09T05:57:56Z
Yivan000
4078
Nilikha ang pahina na may '{{#invoke:ca-headword|show|past participles}}<!-- --><noinclude>{{documentation}}</noinclude>'
176068
wikitext
text/x-wiki
{{#invoke:ca-headword|show|past participles}}<!--
--><noinclude>{{documentation}}</noinclude>
56qurnawgp6wd6ro7n9r9xyzeh2lvb3
Kategorya:Katalan na pandiwaring pangnagdaan
14
37800
176073
2026-04-09T06:08:44Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176073
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kategorya:Pandiwaring pangnagdaan ayon sa wika
14
37801
176074
2026-04-09T06:08:53Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176074
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kategorya:Katalan na pandiwari
14
37802
176075
2026-04-09T06:09:21Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176075
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kategorya:Katalan na anyong pandiwa
14
37803
176076
2026-04-09T06:09:46Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176076
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx
Kategorya:Katalan na anyong di-lema
14
37804
176077
2026-04-09T06:10:02Z
Yivan000
4078
Nilikha ang pahina na may '{{auto cat}}'
176077
wikitext
text/x-wiki
{{auto cat}}
eomzlm5v4j7ond1phrju7cnue91g5qx